PHP Classes

unexpected '[', expecting ')' in

Recommend this page to a friend!

      PHP Secure Login and Registration  >  PHP Secure Login and Registration package blog  >  Secure PHP Login Scri...  >  All threads  >  unexpected '[', expecting ')' in  >  (Un) Subscribe thread alerts  
Subject:unexpected '[', expecting ')' in
Summary:Error PHP Secure Login and Registration
Messages:7
Author:luciano vaz
Date:2016-12-21 22:08:36
 

  1. unexpected '[', expecting ')' in   Reply   Report abuse  
Picture of luciano vaz luciano vaz - 2016-12-21 22:08:36

Hello, I need help !! Please :(, how to solve this situation?

Parse error: syntax error, unexpected '[', expecting ')' in /home/gesto581/public_html/ipsm/class/user.php on line 62

  2. Re: unexpected '[', expecting ')' in   Reply   Report abuse  
Picture of Ashraf Gheith Ashraf Gheith - 2016-12-22 12:13:05 - In reply to message 1 from luciano vaz
I will fix this bug and re-post the code. Thank you for noticing that bug.

  3. Re: unexpected '[', expecting ')' in   Reply   Report abuse  
Picture of luciano vaz luciano vaz - 2016-12-22 15:49:43 - In reply to message 2 from Ashraf Gheith

Thank you for your attention, I'm waiting.

  4. Re: unexpected '[', expecting ')' in   Reply   Report abuse  
Picture of luciano vaz luciano vaz - 2016-12-22 15:49:58 - In reply to message 2 from Ashraf Gheith

Thank you for your attention, I'm waiting.

  5. Re: unexpected '[', expecting ')' in   Reply   Report abuse  
Picture of Ashraf Gheith Ashraf Gheith - 2016-12-22 23:01:01 - In reply to message 4 from luciano vaz
Hi,
I have tested it does not seem there is a bug in the syntax. Can you please explain how do you get that bug?
Send me what are you righting for username and password when you try to log-in. And using info.php send me the information of the PHP version, MySQL version and if the PDO module installed.

regards,
Ash

  6. Re: unexpected '[', expecting ')' in   Reply   Report abuse  
Picture of luciano vaz luciano vaz - 2016-12-23 01:22:41 - In reply to message 5 from Ashraf Gheith


Sorry to bother you, follow phpinfo data, I did not make any changes to the downloaded files.

PDO

PDO support enabled
PDO drivers sqlite, sqlite2, mysql

pdo_mysql

PDO Driver for MySQL, client library version 5.5.51-38.2
mysqli

MysqlI Support enabled
Client API library version 5.5.51-38.2
Client API header version 5.5.21
MYSQLI_SOCKET /var/lib/mysql/mysql.sock
mysql

MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.5.51-38.2
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib64 -lmysqlclient

PHP Version 5.2.17

  7. Re: unexpected '[', expecting ')' in   Reply   Report abuse  
Picture of luciano vaz luciano vaz - 2016-12-23 01:26:37 - In reply to message 6 from luciano vaz
Parse error: syntax error, unexpected '[', expecting ')' in *****class/user.php on line 62



line 61 $stmt = $pdo->prepare('SELECT id, fname, lname, email, wrong_logins, password, user_role FROM users WHERE email = ? and confirmed = 1 limit 1');
line 62 $stmt->execute([$email]);
line 63 $user = $stmt->fetch();