platypus
platypus

Reputation: 706

Apache is not loading PHP.ini

Okay this is a beginner problem but I can't seem to find a solution to it. I've ran <?php phpinfo(); ?> and confirmed my php.ini path. Restarted Apache server after making changes in php.ini but still Apache is not accepting changes i've made in php.ini. I can't load extensions, change error reporting status, etc. Where else should i look, what else should i do in order to make Apache work with my php.ini? (p.s: PHP works fine so I don't think there is a problem with LoadModule in httpd.conf)

Also, this is my phpinfo output: http://jsbin.com/ipilom and this is my php.ini in that path: http://paste2.org/p/2133057

Upvotes: 4

Views: 13882

Answers (3)

user2423500
user2423500

Reputation: 19

based on my experience, you may need to make sure that

PHPIniDir "C:\php54\" in apache httpd.conf

is proper configured, sometimes the '\' or '/' could be very tricky.

Upvotes: 1

tony gil
tony gil

Reputation: 9554

check if your ftp user owns the file (it will usually belong to root)

sudo chown ubuntu /etc/php5/apache2/php.ini
sudo chown ubuntu /etc/php5/cli/php.ini

change "ubuntu" for your userName and "/etc/php5/apache2/" for the path indicated in phpInfo()

then restart apache

sudo /etc/init.d/apache2 restart

should do the trick

Upvotes: 4

glasz
glasz

Reputation: 2565

what is phpinfo() telling you in the row Configuration File (php.ini)?
what operating system are your running?

make sure your php.ini is located inside of that directory.
additionally, you might want to check file permissions.
the user your apache runs with must be able to read php.ini.

Upvotes: 2

Related Questions