PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, February 11, 2022

[FIXED] Enabling .so extension causes code to be downloaded rather than run

 February 11, 2022     lamp, php, php-extension     No comments   

Issue

I'm trying to enable a PHP extension, but whenever I un-comment any extensions in my php.ini file it causes the code from a file to be downloaded whenever I try to run it in a browser.


EDIT

I've added

LoadModule php5_module modules/sdo.so
AddHandler php5-script php
AddType application/x-httpd-php php

To the httpd.conf file but it is still not working.


Solution

If this is a PHP extension, which I assume is the Service Data Objects extension, then you're simply not enabling it correctly.

Extensions in PHP are enabled by editing php.ini and adding a line like so:

extension=sdo.so

What you're doing right now is loading the SDO extension as the php5_module, causing an invalid or inexistent Apache module to handle PHP files.

You don't have to edit any Apache configuration files to enable a PHP extension.



Answered By - netcoder
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing