Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Trouble Finding php.ini
PostPosted: Thu Feb 02, 2012 12:08 pm 
Offline
Junior Member

Joined: Mon Oct 17, 2011 11:11 pm
Posts: 35
I have an xml importing script that's timing out. I've tried calling the set_time_limit() function inside the script, set to 90 secs, but it looks like it's still defaulting to 30 secs.

So I'm trying to find the php.ini script to configure the max_execution_time and max_input_time settings, but I'm having trouble locating its parent directory.

Any help would be most appreciated!


Top
   
 Post subject:
PostPosted: Thu Feb 02, 2012 12:18 pm 
Offline
Junior Member

Joined: Mon Oct 17, 2011 11:11 pm
Posts: 35
Sorry I should've also mentioned I'm running Ubuntu 11.04


Top
   
 Post subject:
PostPosted: Thu Feb 02, 2012 12:24 pm 
Offline
Junior Member

Joined: Tue Jan 31, 2012 6:17 am
Posts: 42
Website: https://www.serverfruit.com/
Location: Denmark
By running the following command on the command line interface (CLI), you can get the path to php.ini

Code:
php -i | grep php.ini

_________________
lakridserne
Serverfruit - shared and managed VPS hosting, SSL certificates and domains
Awesome servers rented from Linode!


Top
   
 Post subject:
PostPosted: Thu Feb 02, 2012 1:39 pm 
Offline
Junior Member

Joined: Mon Oct 17, 2011 11:11 pm
Posts: 35
Great. Found it. Thank you.


Top
   
 Post subject:
PostPosted: Thu Feb 02, 2012 6:58 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
lakridserne wrote:
By running the following command on the command line interface (CLI), you can get the path to php.ini
Code:
php -i | grep php.ini

To anyone who might come across this thread later:

On Ubuntu, the command above will probably return /etc/php5/cli/php.ini, which is NOT the same file that is used for processing web requests. In fact, setting max_execution_time in cli/php.ini will not have any effect even for command-line scripts.

If you use Apache with mod_php, the relevant file is /etc/php5/apache2/php.ini.
If you use CGI or FastCGI, it's /etc/php5/cgi/php.ini.
If you use FPM, it's /etc/php5/fpm/php.ini.
If you followed some odd tutorial, it could be anywhere.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group