Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query regarding possible source of problem

Status
Not open for further replies.

CHeighlund

Programmer
Jun 11, 2007
163
US
I've got a php program I've been trying to work on. I now have it working on our test box perfectly, but attempts to run it on the box it's supposed to be placed on are causing problems.

I'm getting the error message "Parse error: parse error, unexpected T_NEW in /srv/ on line 197". The contents of line 197 are "throw new FileWriteException();". Given that this works on the test box, I'm presuming it's an environment issue; what am I likely to need to look at in the php environment to compare with the version of the environment that works? (Or alternately, if this isn't likely to be an environmnent issue, where should I start looking?)
 
You're not running PHP 4 on the production server, are you? Exceptions were only introduced in PHP 5, so that's the first thing that springs to mind.
 
typically this will be due to a syntax error in the previous line. Like a missing semi colon
 
Phpinfo indicates it is running PHP 4. I guess this means I need to upgrade it for the program to work properly. Thanks for the advice.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top