Error running cronjob

apps

#1

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


#2

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


#3

[quote]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…[/quote]
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


#4

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


#5

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