PHP Throwing Syntax errors after uploading to site

Web hosting discussion, programming, and shared and dedicated servers.
2 posts Page 1 of 1
by calsoft » Sun Jul 15, 2018 10:57 am
Ive building a website for a few weeks now. I've been building it using a local Apache server and MySQL database. Everything has been working great locally. I uploaded the files to a subdirectory in my host folder to test the site online but I am now getting an exception: "Parse error: syntax error, unexpected '{' in /nfs/www/WWW_pages/calsoft/ on line 9." I know it's not and issue with my php because it has been working locally. I still attempted to comment out the include of this file to see if it fixed the issue but then I get another syntax error in a different file.
Unsure of where to go from here.

Here is a link to the sites subdirectory that contains my files. ... /index.php

Any help is appreciated
by drew.phillips » Mon Jul 16, 2018 9:28 am

Our default configuration for PHP scripts files uses PHP 4 which in this case appears to be failing due to the use of some PHP 5 functionality.

Per our Php5 Wiki page I've added the .htaccess code to use PHP 5.6 to your "Site" directory and it appears to be working now.

If I can assist further let me know. When you're ready for production, you'll probably want to move that .htaccess file to your site's root so that PHP 5.6 will be in effect for all subdirectories.
Drew Phillips
Programmer / System Operations,
2 posts Page 1 of 1

Who is online

In total there are 5 users online :: 1 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 964 on Tue Sep 29, 2020 11:23 pm

Users browsing this forum: Bing [Bot] and 4 guests