I am currently trying to locate the correct php.ini file to edit it and restart apache so the changes will take place and I'm stumped.
I have found three different php.ini files (no idea why there are three) this is how I found the files
$ sudo find / -name php.ini /etc/php5/cli/php.ini /etc/php5/apache2/php.ini /etc/php5/cgi/php.iniI also did....
$ sudo php -i | grep 'Configuration File' Configuration File (php.ini) Path => /etc/php5/cli Loaded Configuration File => /etc/php5/cli/php.iniI changed all of them (just to be sure) to the settings I wanted.
I restarted apache using
sudo service apache2 restartThe results...
* Restarting web server apache2I reloaded the page and it showed that the php.ini file was not updated.
I know this because I used
echo ini_get('post_max_size');Which was supposed to be changed to 20M but was still only 2M
I tried rebooting my computer thinking maybe that would stop the apache server and reload the php.ini file with the correct setting, but alas that attempt also failed.
Is there any chance there could be another php.ini file that could be interfering?
1 answer to this question.
Hello @kartik,
You can get a full phpinfo() using :
php -iAnd, in there, there is the php.ini file used :
$ php -i | grep 'Configuration File' Configuration File (php.ini) Path => /etc Loaded Configuration File => /etc/php.iniOn Windows use find instead:
php -i|find/i"configuration file"Hope this is helpfull!!
Thank You!!
• 82,780 points
Related Questions In PHP
- All categories
- Apache Kafka (84)
-
Apache Spark (596)
- Azure (131)
- Big Data Hadoop (1,907)
-
Blockchain (1,673)
- C# (124)
- C++ (268)
-
Career Counselling (1,060)
- Cloud Computing (3,356)
- Cyber Security & Ethical Hacking (145)
- Data Analytics (1,266)
- Database (853)
- Data Science (75)
-
DevOps & Agile (3,500)
- Digital Marketing (111)
- Events & Trending Topics (28)
- IoT (Internet of Things) (387)
- Java (1,148)
- Kotlin (3)
-
Linux Administration (384)
- Machine Learning (337)
- MicroStrategy (6)
-
PMP (423)
- Power BI (516)
- Python (3,154)
- RPA (650)
- SalesForce (92)
- Selenium (1,569)
- Software Testing (56)
- Tableau (608)
-
Talend (73)
- TypeSript (124)
- Web Development (2,984)
-
Ask us Anything! (66)
- Others (964)
- Mobile Development (29)
Subscribe to our Newsletter, and get personalized recommendations.
Already have an account? Sign in.