NameSilo

Php.ini file help and questions...

Spaceship Spaceship
Watch

JsteRmX

Established Member
Impact
2
Hey everyone, im parsing a large file that keep aborting after about 2 minutes. it is such a pain because i have to keep refreshing the page, and it ends up taking the whole day to parse one file. The file im parsing is about 250MB

I have been playing around with my php.ini file to take off the php script process time limit, but nothing seems to work. here is my current php.ini file:

Code:
register_globals = off
allow_url_fopen = off

set_time_limit(0)
expose_php = Off
max_input_time = 86440
max_execution_time = 86440
variables_order = "EGPCS"
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

[Zend]
zend_extension=/usr/local/zo/ZendExtensionManager.so
zend_extension=/usr/local/zo/4_3/ZendOptimizer.so

what changes should i make to keep my parsing from stopping?

many thanks!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Is this the global php.ini file you're editing? Or just one in your directory?
 
0
•••
this is the one in my main directory

im using godaddy... if this changes anything?


how do i know if it is my global php.ini?
 
0
•••
Do you have...

PHP:
set_time_limit(0);
Somewhere in the script itself?

I don't mess around with php.ini a whole lot, but I believe you can set both of the following to zero:

max_input_time = 86440
max_execution_time = 86440

I'm just not sure it's necessary.
 
0
•••
JsteRmX said:
im using godaddy... if this changes anything?


how do i know if it is my global php.ini?


Simple answer... you're not using your global PHP.INI file. Especially with a 'discount' hosting company like GoDaddy, there's a 99.9999% chance that you can't do anything about this. No matter what you set, the 'global' setting will override it, and they're not going to let you use resources like that.

Sorry.
 
0
•••
no, set_time_limit(0); does not seem to be in the script.

my php.ini file originally just had
Code:
max_input_time = 60

so i changed this to 86440 so that it would run 24 hours without stopping, but this didnt solve the problem...

So I added the line
Code:
max_execution_time = 86440

This did not seem to work either, so I added
Code:
set_time_limit(0)
as well.

Having all three of these in the ini file didnt seem to work either.


Well, I just took out
Code:
max_input_time = 86440
max_execution_time = 86440
and it has been running for 4 minutes now without stopping. I wonder if this will work now?

TwistMyArm said:
Simple answer... you're not using your global PHP.INI file. Especially with a 'discount' hosting company like GoDaddy, there's a 99.9999% chance that you can't do anything about this. No matter what you set, the 'global' setting will override it, and they're not going to let you use resources like that.

Sorry.


I have no experience with PHP.ini files, so when my script kept stopping during parsing, I emailed GoDaddy about it, asking them if there is a time limit on php script processes.

I received a response back from them saying, yes it is a 2 minute time limit and that I need to edit the php.ini file to take off the limit. They did not tell me how to do this, but just told me to research it and figure it out.

Soooo according to whoever responded to me, I can edit it to unlimit the process timelimit.

Maybe he was lying? Because i did see that it said 60 seconds instead of 120 which it should have been if he was telling the truth when he said that it was a 2 minute time limit.

Im confused here. Dealing with GoDaddy has been very frustrating when it comes to their hosting. I am thinking of leaving them.
 
0
•••
Well, I guess I'll take that statement back... with a proviso. Even though they may not have a 'hard' time limit they will definitely have a 'CPU time' limit, if that makes sense. If you start using the CPU 'too' much, that will trigger other problems and you can almost be certain that that will be the case.

Good luck with it :)
 
0
•••
thanks.


still no luck though. my script keeps stopping.

any other ideas?
 
0
•••
Make a blank script with just
PHP:
<?php phpinfo();?>
And see the values.
 
0
•••
http://www.staymodest.com/phpinfo

there is all the info. I noticed these lines:

execution time i need to change, but do these others have any impact?

max_execution_time 30 30
max_input_time -1 -1
post_max_size 8M 8M
 
0
•••
max_execution_time
you'll need to change that as well - your script will die after 30seconds otherwise

also - is your script dieing from a time out, or a memory limit, if your parsing a 250meg file, php might be hiting the maximum script memory usage limit for the server.


JsteRmX said:
http://www.staymodest.com/phpinfo

there is all the info. I noticed these lines:

execution time i need to change, but do these others have any impact?

max_execution_time 30 30
max_input_time -1 -1
post_max_size 8M 8M
 
0
•••
well i dont get any errors, but it will stop running. It will say "Done" in my status bar, and just not continue parsing.
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back