Ticket #393 (reopened Bug report)

Opened 10 years ago

Last modified 4 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: Gateway 20090925
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.

Change History

follow-up: ↓ 2   Changed 10 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 10 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 10 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 10 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 8 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 8 years ago by benoitg

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

  Changed 8 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 8 years ago by benoitg

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

  Changed 8 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 8 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.

  Changed 5 years ago by guib.neumann@…

I'm on version 9.1.4 and this problem continues:

Database Initialisation

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

Please , help me! Thank's a lot, Guilherme Neumann.

  Changed 4 years ago by tokijici

  • status changed from closed to reopened
  • resolution fixed deleted

I have the same problem - Using Ububtu 12.04 nginx+php-fpm and postgreSQL 9.1 On localhost:5432, Database wifidog exists and is at schema version 62. The required schema version is 71. Triggering database schema upgrade Please help I need a quick fix for this issue

follow-up: ↓ 14   Changed 4 years ago by tokijici

more detailed error with display_errors = On, On localhost:5432, Database wifidog exists and is at schema version 62. The required schema version is 71. Triggering database schema upgrade Fatal error: Cannot redeclare class Locale in /usr/share/wifidog-auth/wifidog/classes/Locale.php on line 55

in reply to: ↑ 13   Changed 4 years ago by benoitg

  • version set to Gateway 20090925

Replying to tokijici:

more detailed error with display_errors = On, On localhost:5432, Database wifidog exists and is at schema version 62. The required schema version is 71. Triggering database schema upgrade Fatal error: Cannot redeclare class Locale in /usr/share/wifidog-auth/wifidog/classes/Locale.php on line 55

If you are on ubuntu, you'll need to remove php5-intl. PHP 5.3 added a Locale class which is conflicting.

You can get a wifidog-auth with semi-up to date install script for dependencies at  https://github.com/benoitg/wifidog-auth

  Changed 4 years ago by anonymous

How is going about this problem? I met similar problem which did not show the Schema version at all:

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

Haven't I installed "Schema"? How to install/update it?

Many thanks for your help!

Note: See TracTickets for help on using tickets.