Error running cronjob

Error running cronjob

Posted by: Delaboy
Posted on: 2009-08-06 23:07:00

I set up a cronjob to run a script and anytime it runs I get the following error which makes the phpmailer not function.

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/internetcashman/instantcashprojects.com/autoscraper/cron/phpmailer/class.phpmailer.php on line 53

Any ideas on how to fix this problem...

Thanks in advance

Re: Error running cronjob

Posted by: erikjacobsen
Posted on: 2009-08-07 00:09:00

You have some syntaxerror in phpmailer, or where you include phpmailer in your code.

Re: Error running cronjob

Posted by: Atropos7
Posted on: 2009-08-07 01:22:00

In reply to:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/internetcashman/instantcashprojects.com/autoscraper/cron/phpmailer/class.phpmailer.php on line 53

Any ideas on how to fix this problem...


Wrong PHP version.

PHP 4.4.9 cli = /usr/local/bin/php
PHP 5.2.6 cli = /usr/local/php5/bin/php

Parse errors can also mean "I don't know what you are trying to say" as in "I don't know those words or what you mean by that"

In this case PHP 5 introduces syntax (words) that PHP 4 doesn't understand.


Customer since 2000 cool openvein.org

Re: Error running cronjob

Posted by: Delaboy
Posted on: 2009-08-07 09:53:00

Thanks for the reply. So if I am on the wrong php version, do I downgrade to php4 or include the path you gave below anywhere?

PHP 4.4.9 cli = /usr/local/bin/php
PHP 5.2.6 cli = /usr/local/php5/bin/php

I believe broncos server is running php5..
Thanks in advance

Re: Error running cronjob

Posted by: Atropos7
Posted on: 2009-08-07 13:15:00

In reply to:

Thanks for the reply. So if I am on the wrong php version, do I downgrade to php4 or include the path you gave below anywhere?


You need to determine how PHP is being invoked. This is either in the cron command or at the beginning of the PHP source code files. Then you need to change that to use the path to the PHP 5 version. And never assume because a CGI script is "PHP 5" that everything will be "PHP 5" because the web server has its own separate mechanism for running PHP.



Customer since 2000 cool openvein.org

Tags: phpmailerproblem thanksthanks in advanceerror syntax error