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/calsw.tm.agilent.com/New_Webpage_Test/Site/assets/php/functions.php 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.
http://cal.software.keysight.com/New_We ... /index.php

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

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, Sonic.net
2 posts Page 1 of 1

Who is online

In total there are 37 users online :: 0 registered, 0 hidden and 37 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 37 guests