imgrooot Posted June 25, 2016 Share Posted June 25, 2016 I am using this https://github.com/ircmaxell/password_compat I have no problem using it on a local server. But as soon as I test it on a live server, it gives me an error like this. Parse error: syntax error, unexpected '{' in /home/public_html/sub/snippets/password.php on line 19 The error is on the same line as the beginning of the code in that library. Why is this happening? Quote Link to comment Share on other sites More sharing options...
Solution Jacques1 Posted June 25, 2016 Solution Share Posted June 25, 2016 So what is line 19 in your password.php script? There's no opening brace on line 19 in any of the official versions. Is it “namespace {”? Then you're appearently running an ancient, long-abandoned PHP version (something prior to 5.3). Quote Link to comment Share on other sites More sharing options...
imgrooot Posted June 25, 2016 Author Share Posted June 25, 2016 So what is line 19 in your password.php script? There's no opening brace on line 19 in any of the official versions. Is it “namespace {”? Then you're appearently running an ancient, long-abandoned PHP version (something prior to 5.3). Yes it's the “namespace {”. And yes you're correct. The server was running older PHP version. I switched it to PHP 5.4 and i no longer get that error. Thanks for clearing it up. Quote Link to comment Share on other sites More sharing options...
benanamen Posted June 25, 2016 Share Posted June 25, 2016 I switched it to PHP 5.4 You are still well over a hundred releases behind. You need to be running 5.6x minimum. Quote Link to comment Share on other sites More sharing options...
imgrooot Posted June 25, 2016 Author Share Posted June 25, 2016 You are still well over a hundred releases behind. You need to be running 5.6x minimum. I do see the option for 5.6x but it says it's currently in BETA stage. Is it wise to use it? Btw, I am using bluehost web hosting. Quote Link to comment Share on other sites More sharing options...
Jacques1 Posted June 25, 2016 Share Posted June 25, 2016 What a weird hoster. PHP 5.6 is indeed the current PHP version (together with the new PHP 7 branch). But before you upgrade, you should definitely ask Bluehost what on earth they mean by “beta”. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.