开发者

Custom PHP.ini not loading [closed]

开发者 https://www.devze.com 2023-01-30 19:29 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

开发者_开发知识库 Improve this question

When I print out the phpinfo(), it shows my Configuration File (php.ini) Path as /usr/local/php/lib Which is correct, and where the custom ini file is located. But my Loaded Configuration File is (none). It seems like my PHP is not loading the custom ini file, although it is there where the file is looking.

I have attempted to recompile PHP, and it had no effect.

I am currently running PHP 5.2.14 on Ubuntu on Apache.

Yes, I restarted apache. I also tried to stop it and start it completely fresh.

Also a slight addition: The PHP server is running fine. I have been running this server for 6 months with no issues. It is running off of the default settings it seems, and all extensions I have compiled PHP with work, like xmlrpc and mbstring. They are shown in the PHP info.


If the Loaded Configuration File is (none), then you do not have installed PHP and Apache correctly. Try to re-install them again (in my opinion first the PHP and then the Apache). It is less time consuming than trying to change configuration. When Loaded Configuration File is (none) and PHP and Apache is working, it means that your server is using a default configuration file (default php.ini), but not your modified one.


Check the file permissions of your php.ini file. Could be that it is THERE but apache cannot access it, should be same user & group of your apache user (www-data)

Usually you can do this:

sudo chown www-data.www-data php.ini

0

精彩评论

暂无评论...
验证码 换一张
取 消