Jump to content

Using this famous password library gives me an error on live server. Why's that?

Go to solution Solved by Jacques1,

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.