Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Getting "syntax error" in initial install

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

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

Page: 1
Go to End
Author Topic: 2365 Views
  • ITninjas
    Avatar
    Community Member
    3 Posts

    Getting "syntax error" in initial install Link to this post

    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.

  • simon_w
    Avatar
    Forum Moderator
    471 Posts

    Re: Getting "syntax error" in initial install Link to this post

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

  • ITninjas
    Avatar
    Community Member
    3 Posts

    Re: Getting "syntax error" in initial install Link to this post

    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.

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Getting "syntax error" in initial install Link to this post

    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?

  • ITninjas
    Avatar
    Community Member
    3 Posts

    Re: Getting "syntax error" in initial install Link to this post

    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.

    2365 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.