up vote 1 down vote favorite

Hello, here is my error:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home3/*/www/modules/mysql_worker.php on line 9

Here is file mysql_worker.php http://pastie.org/697284

flag

which version of php installed on server? – Dmitry Merkushin Nov 13 '09 at 15:02
I'm unable to replicate the error using php -l in PHP 5.2.0. What version of PHP are you using? – jkndrkn Nov 13 '09 at 15:05

1 Answer

up vote 7 down vote accepted

You are using PHP5 code on a PHP4 system.

Consider upgrading to PHP5. PHP4 is outdated.

link|flag
And what exactly PHP5 doesn't provide in my code? – Ockonal Nov 13 '09 at 15:05
The "Private" and "public" keywords. Advanced OOP. – Pekka Nov 13 '09 at 15:06
Ockonal, it seems your machine is running PHP4. The code is for php5. In php4, "private" is not a keyword, hence the error. – gnud Nov 13 '09 at 15:07
public, private and protected are new in PHP5 – Colin Pickard Nov 13 '09 at 15:08
Okay, thank you. – Ockonal Nov 13 '09 at 15:09

Your Answer

get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.