Installed OK - now SQL error [message #30312] |
Fri, 17 February 2006 14:14 |
andyccn
Messages: 14 Registered: February 2006 Location: UK
Karma: 0
|
Junior Member |
|
|
Hi,
I've just downloaded and installed FUD 2.7.4, and am getting an SQL error when I visit the index.php page.
The installer ran fine and setup the database and all files OK, but I can't even get to the login page.
The error is as follows:
Quote: | Warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at end of input at character 33 in /perth/data/www/mailnetwork.co.uk/community/index.php on line 96
Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /perth/data/www/mailnetwork.co.uk/community/data/include/core.inc on line 189
|
My sql_errors file reads the following:
Quote: | ?655 ?1140184251?(/perth/data/www/mailnetwork.co.uk/community/index.php:96<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:150<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:208<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:334<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:984<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:1177<br />
) : ERROR: syntax error at end of input at character 33<br />
Query: SELECT id FROM cm_ses WHERE oid=<br />
_GET: array (
't' => 'login',
'adm' => '1',
)<br />
Server Version: <br />
[Referring Page] http://www.mailnetwork.co.uk/install.php?1309550668<br />
?518 ?1140184767?(/perth/data/www/mailnetwork.co.uk/community/index.php:96<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:150<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:208<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:334<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:984<br />
/perth/data/www/mailnetwork.co.uk/community/index.php:1177<br />
) : ERROR: syntax error at end of input at character 33<br />
Query: SELECT id FROM cm_ses WHERE oid=<br />
Server Version: <br />
|
I'm using PHP 5.1.1 on Apache 2.2.0, with PostgreSQL 8.1.2 as the back-end (soon to be 8.1.3.)
Can anyone help!!
Thanks
Andy
--
Andy Shellam
the mail network - server support
|
|
|
|
|
Re: Installed OK - now SQL error [message #30318 is a reply to message #30317] |
Fri, 17 February 2006 15:12 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Well it sounds like the FUDforum tables do not have OID support, since the query you have fails because PHP is unable to retrieve an oid value of the previously inserted row.
FUDforum Core Developer
|
|
|
Re: Installed OK - now SQL error [message #30319 is a reply to message #30312] |
Fri, 17 February 2006 15:20 |
andyccn
Messages: 14 Registered: February 2006 Location: UK
Karma: 0
|
Junior Member |
|
|
I created the database manually, all the tables were created by your installer scripts. Like I say, new tables I can create with OIDs, but I dont want to have to manually create your 50+ tables!!
Is it something you can set when you create the database?
--
Andy Shellam
the mail network - server support
|
|
|
Re: Installed OK - now SQL error [message #30324 is a reply to message #30319] |
Fri, 17 February 2006 19:58 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
I honestly don't know the answer to that. In all the PostgreSQL installs I've dealt with OID support was enabled by default and did not require any additional actions.
FUDforum Core Developer
|
|
|
|
|
|
Re: Installed OK - now SQL error [message #32064 is a reply to message #32062] |
Tue, 06 June 2006 12:48 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
What version of the forum did you install on what database system? You can check the sql_errors file inside the errors/ directory to see the actual error message.
FUDforum Core Developer
|
|
|
|
Re: Installed OK - now SQL error [message #32066 is a reply to message #30312] |
Tue, 06 June 2006 13:16 |
andyccn
Messages: 14 Registered: February 2006 Location: UK
Karma: 0
|
Junior Member |
|
|
I think this is the same problem I had - if your admin has installed PostgreSQL for you, it's doubtful they'll have modified your config file.
VPSs normally have root access. Login as root (using PuTTY or similar SSH-tools.)
Type the command "find / -name postgresql.conf"
You'll get a path like /usr/local/etc/postgresql.conf or similar shown.
Type "vi <path>" (e.g. "vi /usr/local/etc/postgresql.conf".
Use PgDown to get to the bottom of the file where you'll find a line "#default_with_oids = off" (somewhere in the file.)
Press INSERT.
Remove the hash and change off to on, so it reads "default_with_oids = on"
Then press ESC, type ":w" <ENTER> followed by ":q" <ENTER>
Type "killall -HUP postmaster" to reload the postgresql config.
Then type "logout" and press enter.
Drop your FUD database, recreate it and re-install.
You should be OK then. Or if you're uneasy about this, send these details to your admin and kindly ask if he'll modify the PostgreSQL config for you.
--
Andy Shellam
the mail network - server support
[Updated on: Wed, 07 June 2006 06:31] Report message to a moderator
|
|
|
|
Re: Installed OK - now SQL error [message #32074 is a reply to message #30312] |
Wed, 07 June 2006 06:28 |
andyccn
Messages: 14 Registered: February 2006 Location: UK
Karma: 0
|
Junior Member |
|
|
I see what you mean! It's not even when you're trying to login, just trying to see the login page - perhaps the dev team here could tell you what the login page is looking for (I cannot see it being a database error as the index page loads fine.)
Note: I've corrected a mistake in my previous instructions - it should be "change off to on" not "change false to true."
--
Andy Shellam
the mail network - server support
[Updated on: Wed, 07 June 2006 06:32] Report message to a moderator
|
|
|
Re: Installed OK - now SQL error [message #32081 is a reply to message #32073] |
Wed, 07 June 2006 13:14 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
To allow anonymous users to post you need to user the user-land group manager to grant posting privileges to the global anonymous user.
As far as speed is concerned check your server settings and MySQL settings to make sure there is no delays there...
FUDforum Core Developer
|
|
|
|
Re: Installed OK - now SQL error [message #32632 is a reply to message #32066] |
Wed, 12 July 2006 07:32 |
|
why do we have to enable this with it being for "Previous Postgres Versions"?
Is FUDForum written around a 7.x PostgreSQL server?
Are there any efforts for native 8.1.x support (without having to enable legacy tags/parameters)?
------
zariok
|
|
|
Re: Installed OK - now SQL error [message #32634 is a reply to message #30312] |
Wed, 12 July 2006 08:41 |
andyccn
Messages: 14 Registered: February 2006 Location: UK
Karma: 0
|
Junior Member |
|
|
OIDs were turned off by PostgreSQL in 8.1, so either this is being developed on 7.4 or 8.0 - either way, it's not really FUD's problem.
Other than having to turn default_with_oids=on in your postgresql.conf file (which is only a 10-second job) I've not found any problems with running FUD on PostgreSQL 8.1.4.
--
Andy Shellam
the mail network - server support
|
|
|
|
Re: Installed OK - now SQL error [message #40167 is a reply to message #32634] |
Fri, 18 January 2008 10:06 |
bsmanyan
Messages: 1 Registered: January 2008
Karma: 0
|
Junior Member |
|
|
Postgres 8.1.4 default comes with OID off
I had similar problem while restoring data from 7.1.3 to 8.1.4 , i did the following and it worked
1. Take schema or structure dump < chk man pg_dump >
2. Edit the schema , in create table statements append it with "WITH OIDS" like given below
default would be like this - CREATE TABLE table_name ( );
edit it like this - CREATE TABLE table_name ( ) WITH OIDS;
For all the tables in the structure.
3. Restore the structure first
4. Disable the triggers in the that DB < I used a Java code which i asked developer for this purpose >
5. Take a Dump of the original DB ONLY THE DATA < refer man pg_dump >
6. Enable the triggers now < Again i used a java code given by my developer >
Hope it works for all......
Cheers,
Bala
|
|
|