views:

197

answers:

2

I'm trying to get Zend Amf working on my hosting services (Lunarpages, if that matters). I can get it working on my local machine, but after changing a few directories and posting the code, I keep getting this error:

Parse error: syntax error, unexpected T_STRING, expecting '{' in /home/user_name/public_html/library/Zend/Amf/Server.php on line 57

Normally this issue is a syntax error, and I am enough of a n00b that I can't discount that. But I have cut down the code to just this:

<?php
$clientLibraryPath = '/home/user_name/public_html/library/';
$oldPath = set_include_path(get_include_path() . PATH_SEPARATOR . $clientLibraryPath);

require_once('Zend/Amf/Server.php');

?>
Delicious turkey legs!

Here are lines 57/58 from the Zend_Amf_Server.php file (preceding lines are just more includes for Zend Amf):

class Zend_Amf_Server implements Zend_Server_Interface
{

and I am still getting the error. Could this be something in my config? I tried to set up my .htaccess the way Wade Arnold recommends here, but I am getting errors unless I comment out the lines beginning with php_value and php_flag. Could this be linked to my error? Or am I barking up the wrong tree entirely?

Thanks. - Dave

+2  A: 

The error is in Zend/Amf/Server.php Please show the code around line 57 (if possible, 5 to 10 lines before and after).

Disabling error reporting will only hide errors, not prevent them.

streetpc
Sorry, that line is trivial so I did not bother including it. I've edited my question to show it.
davearchie
That line is not trivial if it's the line the reporting is mentioning :)
Jonathan Sampson
what is the last line with code **before** line 57? If the unexpected T_STRING is the 'class', then the error lies in the line before.
Boldewyn
+3  A: 

If you are running PHP4 on the server then 'implements Zend_Server_Interface' will be unexpected because interfaces were not supported then, and it will instead expect the opening brace.

Tom Haigh
I disabled and re-enabled PHP5 on Lunarpages and it started working, so I think it was related to this.
davearchie