Shared Server, Drupal 5.3, PHP 4 via CGI, PHP 5 made available by editing the htaccess file.

The server disables wget or lynx via cron.

Instead people use php /home/n..../cron.php which somehow runs in CGI rather than Command Line mode and otherwise seems to function properly for those using Drupal.

Here is my problem. I had to edit the .htaccess file to switch from php 4 to php 5 because on this server php 4 doesn't support the domxml_open_mem() function.

Everything works fine until the cron job tries to run. Its still running under php 4 so it crashes when it reaches domxml_open_mem() .

My solution is create a cronhelper.php <? $f = file("http://......com/cron.php"); ?> .

Cron executes cronhelper.php using php 4 which requests cron.php from the webserver which interprets it using php 5.

Is this a reasonable work around or can it cause problems?

Comments

CyberCore’s picture

Hi ZenCoder,

if i understand you right, you try to use the cron with lynx or wget abd it isn't working?
If it works with http://......com/cron.php you can try some free cronjob provider.

in germany we have different providers for free-cronjobs. i setup my cronjobs (all 15 minutes) on www.cronjob.de, there are a lot other providers for this.

i don't know this one, found on google: http://webcron.org/

maybe it helps and sorry for my bad english.

Greetings Andreas

CyberCore.de - spicy tasting internet

ZenCoder’s picture

Thanks.

I found out that curl is supported so I switch to that, but its nice to know that there are free services available.

I am still curious about whether my original workaround could have lead to problems, but its no longer mission critical. :)

PS You english is excellent, anyone having to suffer through my German would know that I long ago lost the right to criticize anyone's 2nd language skills :)