XML Sitemaps Generator

Author Topic: Changing php.ini and Cron  (Read 18692 times)

arcandio

  • Registered Customer
  • Approved member
  • *
  • Posts: 4
Changing php.ini and Cron
« on: August 07, 2008, 03:25:55 PM »
Well, first of all, commendable work on this. This software is really a sweet deal. Good job.

My crawl hangs, so I've been refreshing my crawl a lot and restarting it manually. I found a thread that talked about editing php.ini to allow scripts to run longer, but I found no line in it for max_execution_time (I did find a max_input_time though). Is it necessary to add that in, if it's not there, or does that mean that the problem is somewhere else?

I've got a cron job setup to run this weekly, but I'm worried about that hanging too.

My url for the generator is [external links are visible to admins only]

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10624
Re: Changing php.ini and Cron
« Reply #1 on: August 07, 2008, 03:54:13 PM »
Hello,

yes, if you don't have that line, try to add it manually. Then create a "phpinfo.php" file in generator folder with:
Code: [Select]
<?php
phpinfo
();
?>
and open it in browser to see current php settings.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

arcandio

  • Registered Customer
  • Approved member
  • *
  • Posts: 4
Re: Changing php.ini and Cron
« Reply #2 on: August 07, 2008, 03:56:27 PM »
What would be a good length to set that to? A couple of thousand seconds?

arcandio

  • Registered Customer
  • Approved member
  • *
  • Posts: 4
Re: Changing php.ini and Cron
« Reply #3 on: August 07, 2008, 04:10:35 PM »
I changed max_execution_time to 180 and uploaded the new php.ini, but the phpinfo.php still shows 30. How do I reset that?

And anyway, would the cron job have the same problem or would it just work around it? I'm mostly interested in having the script auto-run and ping google automatically. As long as cron can run it successfully without hanging for a week, I'm happy with how it works.

arcandio

  • Registered Customer
  • Approved member
  • *
  • Posts: 4
Re: Changing php.ini and Cron
« Reply #4 on: August 07, 2008, 11:56:42 PM »
Would running the script from the command line even defeat the php timeout, or would it just time out anyay if I ran it from ssh?

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10624
Re: Changing php.ini and Cron
« Reply #5 on: August 10, 2008, 01:35:44 PM »
Hello,

the scripts running in command line or vi cron job are normally executed with different php.ini, so they have own settings (including max_execution_time and memory_limit), which are usually less restrictive than php.ini for web scripts.
So, yes - I would suggest to run it from command line and if it works, just setup a cron job for it.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

 

SMF 2.0.12 | SMF © 2014, Simple Machines
XHTML RSS WAP2