This might have been covered in this forum before, but the search strings I tried didn't turn up a solution.
I've been developing an application at home using PHP5 on Linux. I brought the project into work to test it on the school's internal iMac Webserver running OS 10.4 and PHP5. The CLI application is crashing with an ...
"Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR'
"
error message everytime it hits a class file with a private or public keyword in front of a class property or method. (I switched the load order of the class files to confirm that it was crashing over private and public.)
The phpinfo.php web page showed me I was running PHP Version 5.2.1; however, on a hunch, I typed php -ver at the command line and discovered I also had PHP 4.4.7 (cli) installed.
I tracked down PHP5's location and was able to execute my program typing /usr/local/php5/bin/php main.php
Deleting PHP4.4.7 would be easy enough, but I'm fairly sure PHP Version 5.2.1 wouldn't automatically step up to the plate when I invoked PHP at the command line.
Does anyone what I need to invoke PHP5 instead of PHP4 from the command line by just typing php? (With or without deleting PHP4).