Strange Situation
« on: September 21, 2008, 06:14:01 AM »
Hi, (sorry for my bad english)

Well i have a problem: when the sitemap runs in cronjob only works well for sitemap.xml, but urllist.txt and sitemap.html dont works, and i have system errors like:

PHP Warning:  fopen(/home/MYWEB/public_html/generator/data/urllist.txt): failed to open stream: Permission denied in /home/MYWEB/public_html/generator/pages/class.xml-creator.inc.php on line 95

PHP Warning:  fwrite(): supplied argument is not a valid stream resource in /home/MYWEB/public_html/generator/pages/class.xml-creator.inc.php on line 177

and

PHP Warning:  fopen(/home/MYWEB/public_html/generator/data/sitemap.html): failed to open stream: Permission denied in /home/MYWEB/public_html/generator/pages/class.html-creator.inc.php on line 149

and

PHP Warning:  fwrite(): supplied argument is not a valid stream resource in /home/MYWEB/public_html/generator/pages/class.html-creator.inc.php on line 150

and then i delete all content in the /data/ folder and run the script manually from the browser an then works well.

Why happens this???

Thanks a lot and have a pleasant day!

Re: Strange Situation
« Reply #1 on: September 21, 2008, 06:29:58 AM »
I have seen in the forum this answer for the same problem:

make sure that all files inside data/ folder are also set to 0666.

ok, i do that, but when the script has finished the system or the sccript (i dont know) change another time to 0644.

this is a normal situation?
i have every time change to 0666 before the cronjob runs the script?

thanks!
Re: Strange Situation
« Reply #2 on: September 21, 2008, 08:56:15 PM »
No, if you have it *always* running as cron job, it should work fine after that. The issue only happens if you run it from browser and then from cron task (and vice versa).
Re: Strange Situation
« Reply #3 on: September 23, 2008, 03:06:53 PM »
Ok!, thanks  ;)