Ticket #393 (closed Bug report: fixed)

Opened 4 years ago

Last modified 3 years ago

DB schema problems

Reported by: anonymous Owned by:
Priority: blocker Milestone: Not yet assigned to a Milestone
Component: Auth server, Authentication, permissions and access control Version:
Keywords: parse error database schema security.php Cc:

Description

I keep getting a parse error when getting to the database initalisation step when running install.php. I found documentation that suggests asking for help.

The exact error is:

On localhost, Database wifidog exists and is at schema version 56. The required schema version is 57. Triggering database schema upgrade

Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLe in /var/www/wifidog-auth/wifidog/classes/Security.php on line 65.

I ran svn and checked out the latest build (1300) and still not able to get past this point.

Attachments

Change History

follow-up: ↓ 2   Changed 4 years ago by jay_alpes de cyberdahu.com : futur les Orres sans Fil

I've the same problem. You can change wifidog-postgres-initial-data.sql. For me : vim /var/www/wifidog-auth/sql/wifidog-postgres-initial-data.sql line 252 you put "57" in the place of "56". But I'm still have a problem in another page after : "Fatal error: Call to undefined function pg_escape_string() in /var/www/wifidog-auth/wifidog/classes/AbstractDb.php on line 359"

in reply to: ↑ 1   Changed 4 years ago by jay_alpes de cyberdahu.com : futur les Orres sans Fil

ok it's good for me : you change your wifidog-postgres-initial-data.sql, then you drop your database wifidog and you restart the install of wifidog in your brother...

  Changed 4 years ago by anonymous

Thanks! I did what you suggested and it worked, but now I have a whole new problem when it gets to creating the Administration account it spits another parse error at me about unexpected T_ARRAY and expecting & or T_VARIABLE at line 65 of Security.php

Any ideas for how to get past this one?

  Changed 4 years ago by benoitg

  • status changed from new to closed
  • resolution set to fixed

Manually changing the schema version in wifidog-postgres-initial-data.sql is definitely a BIG no-no. Wifidog will think your db is at schema version 57, and eventually try to apply schema update 58, 59, etc on top of it thinking you are at 57, while the schema really was at 56, which WILL hose your database in the long run. So restart with a new database.

Your actual problem is completely unrelated anyway. Security.php Used a PHP 5.1+ feature. This was corrected in r1301

follow-up: ↓ 6   Changed 3 years ago by jakawan@…

  • status changed from closed to reopened
  • resolution fixed deleted

I get the same message and have no idea how to fix it. Any suggestions? "On localhost:5432, Database wifidog exists and is at schema version 62. The required schema version is 65. Triggering database schema upgrade "

in reply to: ↑ 5   Changed 3 years ago by benoitg

Please paste the EXACT error message (including line numbers) here, as well as your PHP version.

  Changed 3 years ago by jakawan@…

PHP 5.1.6

This is what I see on the screen, no line number on the error message:

"On localhost:5432, Database wifidog exists and is at schema version 62. The required schema version is 65. Triggering database schema upgrade "

When I search in the file install.php - I think it is line number 661

  Changed 3 years ago by benoitg

Are you sure you have display_errors = On as indicated on http://dev.wifidog.org/wiki/Contact%20/%20Support ?

  Changed 3 years ago by jakawan@…

I just turn on the display_errors:

On localhost:5432, Database wifidog exists and is at schema version 62. The required schema version is 65. Triggering database schema upgrade Warning: require_once(classes/Exceptions/SecurityException.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/thetrianglehosting.com/subdomains/wifidog/httpdocs/include/common.php on line 87

Fatal error: require_once() [function.require]: Failed opening required 'classes/Exceptions/SecurityException.php' (include_path='/var/www/vhosts/thetrianglehosting.com/subdomains/wifidog/httpdocs:.:') in /var/www/vhosts/thetrianglehosting.com/subdomains/wifidog/httpdocs/include/common.php on line 87

  Changed 3 years ago by benoitg

  • status changed from reopened to closed
  • resolution set to fixed

Ok, you have a path problem, which has nothing to do with this bug. Considering your include path, most likely, the cause is permission problems. Make sure your web server user can read your entire wifidog tree.

Add/Change #393 (DB schema problems)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.