Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Getting "syntax error" in initial install


Reply


5 Posts   2422 Views

Avatar
ITninjas

Community Member, 3 Posts

13 July 2008 at 4:33am

Hello,
I'm a complete SS noob and am trying to install it on my webserver provider Hostmonster.com. I called their support to double check that their servers meet all the requirements and they are running Apache servers with MySQL 4.1+ and PHP 5+.

After uploading the contents of the extracted "silverstripe-v2.2.2" folder into the root directory of my domain and then visiting it with a Firefox browser, the following error appears:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/{main_domain}/public_html/{subdomain}/install.php on line 518

Any idea how I proceed from here? All documentation seems to take for granted that dumping the files into the root and visiting the domain will make things work. So I'm not sure what i can troubleshoot. I've tried opening the install.php file in Dreamweaver to look at line 518 but all it says is "protected &baseDIR;"

I'd greatly appreciate any help with this. I'm anxious to get my site up and running and SilverStripe looks like a really great way to manage and grow it.

Avatar
simon_w

Forum Moderator, 474 Posts

13 July 2008 at 8:27am

Can you verify that you're running PHP 5? That error seems to be caused by the keyword protected.

Avatar
ITninjas

Community Member, 3 Posts

14 July 2008 at 2:23am

I checked with hostmonster's tech support and double checked on my own that PHP 5.2.6 is running. I also messed around with the permissions of the public_HTML/domain folder in which the SS install files have been placed. They are currently set at 5 5 5. I was told by support that the site wouldn't function if I changed permissions to 7 7 7. Can anyone tell me what the correct permissions should be to allow the install to do its thing?

After I changed the permissions of the install.php, index.html, index.php and check-php.php I got an "500 Internal Server Error" page. It says there was an error and it was unable to complete my request. I should note that this error appears when the check-php.php file is listed as the URL. Before I was getting the syntax error when the install.php file was listed as the URL.

Does anyone know what else I can do or what the proper permissions should be to make the install work? I'm pretty sure the server is running the necessary software. It just won't run the Silverstripe install in its current configuration.

Here's the line at the bottom of the 500 error page:

Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8g DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at {my_domain} Port 80

If you guys need some sort of log posted to help troubleshoot, let me know which one and I'll put it up. Thanks in advance for your help.

Avatar
Sam

Administrator, 685 Posts

14 July 2008 at 4:41pm

For some reason, your webserver is parsing code using the PHP4 parser. It *really* seems like your webserver is using PHP4, although I can appreciate that this isn't very helpful advice, given that you've double-checked the PHP version.

Perhaps there is something strange going on, for example, that are 2 versions of PHP on the server and for some reason it's using PHP4 to process install.php?

What happens if you create a file called info.php in the silverstripe install dir, containing this code:

<?php

phpinfo();

?>

If you visit the file, what version does it report?

Avatar
ITninjas

Community Member, 3 Posts

14 July 2008 at 5:41pm

Edited: 14/07/2008 5:41pm

Thanks for your help. You're quite right. Support and my control panel were both telling me that PHP5 was being used. However, when I entered the Apache config area I discovered that the handler was using 4.

So after switching to the proper version of PHP, I made it most of the way through setup. The script ran into another permission error when doing the rewrite test. It told me to make sure that mod_rewrite and AccessOveride was active. My webserver provider told me such changes couldn't be performed by 1st or even 2nd level support. So they created a ticket for 3rd level.

Now, I'm patiently waiting to have that done. If anyone knows a way around this problem without having permissions changed, please let me know. Everything else in the install seemed to be green.