Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


hellonearthisman

1819 posts

Uber Geek
+1 received by user: 52

Trusted

#14844 23-Jul-2007 16:25
Send private message

I am writing a php script and it looks like it's timing out as it just stops if I do too much looping
or processing.

If I only process a few forum, it;s ok, if my list of forums to process is 14 it does.

I wonder if php has a setting that stops my script running to long.



Create new topic
nairda
140 posts

Master Geek
+1 received by user: 4


  #79306 23-Jul-2007 16:55
Send private message

Maybe this would help you:

Set time limit



barf
643 posts

Ultimate Geek


  #79311 23-Jul-2007 17:08

theres a maximum memory setting in php.ini I've had to increase from default for some webmail clients when a person's inbox is over a few GB. maybe check that too.




Sniffing the glue holding the Internet together

hellonearthisman

1819 posts

Uber Geek
+1 received by user: 52

Trusted

  #79312 23-Jul-2007 17:28
Send private message

Thanks you two for the help. Doing a set_time_limit (0); totally fix my last set of problems.

I've constructed an rss feed builder for a forum that has no rss. http://forums.slingshot.co.nz
It's very beta as I have not learned how to run the script via a task scheduler yeah and doing it manual.

If you would like to see the beta feeds for then look at http://homepages.slingshot.co.nz/~takeme.brett/


Thanks Barf, I think you also gave me good advice the other day in the chartroom.



barf
643 posts

Ultimate Geek


  #79313 23-Jul-2007 17:38

no problem mate

I've scheduled tasks before using cron and wget, this is how drupal runs it's maintenance tasks too.
and example crontab to hit http://user:pass@example.com/periodic_task.php every 5 minutes would look like:

*/5 * * * * wget -O - -q http://user:pass@example.com/periodic_task.php


from a shell account 'crontab -e' edits the crontab file. however I'm not a PHP guru or even a PHP developer so there may be a better way to do this. windows task scheduler maybe?




Sniffing the glue holding the Internet together

hellonearthisman

1819 posts

Uber Geek
+1 received by user: 52

Trusted

  #79491 24-Jul-2007 20:41
Send private message

Sounds like you have a linux platform. I have XP.windows,  not a good platform for php developement. Anway,
I'm going to use a taskmanager and run the php from like a dos shell.

php.exe -f "D:\www local\htdocs\slingshot forum 2 rss\Slingshot RSS Builder.php"

You mentioned drupal, is that Drupal and is google code using an example of it.

hellonearthisman

1819 posts

Uber Geek
+1 received by user: 52

Trusted

  #80128 28-Jul-2007 16:43
Send private message

found a windows version of cron called nnCron LITE

I call my script like this, every 55mins

*/55 * * * * cmd /c c:\wamp\php\php.exe -f "D:\www local\htdocs\slingshot forum 2 rss\Slingshot RSS Builder.php"

Seems to be working but only getting a correct feed from using FeedReader.

Thanks for the help.

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.