FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » Installed OK - now SQL error
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon9.gif  Installed OK - now SQL error [message #30312] Fri, 17 February 2006 14:14 Go to next message
andyccn is currently offline  andyccn   United Kingdom
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' =&gt; 'login',
'adm' =&gt; '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 #30315 is a reply to message #30312] Fri, 17 February 2006 14:43 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Does your PostgreSQL install have OID support?

FUDforum Core Developer
Re: Installed OK - now SQL error [message #30317 is a reply to message #30312] Fri, 17 February 2006 14:46 Go to previous messageGo to next message
andyccn is currently offline  andyccn   United Kingdom
Messages: 14
Registered: February 2006
Location: UK
Karma: 0
Junior Member
Umm... pass on that.

I thought it did as standard Confused

If I go to create a new table, it will let me use the "With OIDs" option so I'm assuming so.


--
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
andyccn is currently offline  andyccn   United Kingdom
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #31414 is a reply to message #30324] Fri, 21 April 2006 10:10 Go to previous messageGo to next message
andyccn is currently offline  andyccn   United Kingdom
Messages: 14
Registered: February 2006
Location: UK
Karma: 0
Junior Member
FINALLY discovered the answer!!

PostgreSQL 8.1 installs, by default, have OID support turned off.
To turn it back on - find the line:

#default_with_oids = off

in the postgresql.conf file, and change it to:

default_with_oids = on

Then do "kill -HUP postmaster" to re-read your PostgreSQL configuration, THEN create your FUD database - and it installs fine and dandy!

Very Happy


--
Andy Shellam
the mail network - server support
icon14.gif  Re: Installed OK - now SQL error [message #31417 is a reply to message #31414] Fri, 21 April 2006 13:35 Go to previous messageGo to next message
Ivette is currently offline  Ivette   Germany
Messages: 1
Registered: April 2006
Location: munich
Karma: 0
Junior Member
TOP!

Thank you very much, I had exactly the same problem.

Now it works.
Re: Installed OK - now SQL error [message #32062 is a reply to message #31417] Mon, 05 June 2006 23:51 Go to previous messageGo to next message
philY is currently offline  philY   Poland
Messages: 3
Registered: June 2006
Location: Poland
Karma: 0
Junior Member
Hi every1,
Can anyone help me?
At the end of installation, when I wanted to log-in as administrator some sql error occured:
Quote:


Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /home/users/komiksy/public_html/FUDforum/include/core.inc on line 189

Can you tell what it is?
I watched the core.inc file, but it did not give me any idea...
Greetings
philY
Re: Installed OK - now SQL error [message #32064 is a reply to message #32062] Tue, 06 June 2006 12:48 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #32065 is a reply to message #32064] Tue, 06 June 2006 13:11 Go to previous messageGo to next message
philY is currently offline  philY   Poland
Messages: 3
Registered: June 2006
Location: Poland
Karma: 0
Junior Member
Hi Illia,
PostgreSQL 8.1.0
phpPgAdmin 4.0.1 (PHP 4.4.1)
FUDforum2 2-7-4
The problem is I bought some virtual server space and admin set everything up for me... I do not have accesss to many things...
I just have a log-in and I can see some features...
I am a newbie to postgersql, I have never dealt with it Sad...
Greetings
philY
Re: Installed OK - now SQL error [message #32066 is a reply to message #30312] Tue, 06 June 2006 13:16 Go to previous messageGo to next message
andyccn is currently offline  andyccn   United Kingdom
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 #32073 is a reply to message #32065] Tue, 06 June 2006 22:51 Go to previous messageGo to next message
philY is currently offline  philY   Poland
Messages: 3
Registered: June 2006
Location: Poland
Karma: 0
Junior Member
Andycnn,
Thanx,
At the moment I use MySQL and it works ok Wink. PostgreSQL will be set for me in a few days. MySQL was given to me right away.
I am having other problems:
1. how to allow anymous users to post? - I can't find it in the doc
2. I am also having problems when someone wants to log-in, it takes really minutes to be redirected to log-in pannel. Is it a problem with server (too slow) or was my set-up done incorrectly? Registration of the new user goes fine.
take a look, www. sztuka. bho.pl ...
Again to read anything by anonymous user is almost impossible. I want everybody to be allowed to view anything... Posting takes minutes as well... So, perhaps u can see how it works, it is in Polish but everything looks the same like here Smile... I think my server is too slow, but I am not sure...
Greetings
philY
ps. I have already learnt how to change the outfit a bit Smile

[Updated on: Tue, 06 June 2006 23:01]

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 Go to previous messageGo to next message
andyccn is currently offline  andyccn   United Kingdom
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 #32170 is a reply to message #30312] Tue, 13 June 2006 15:23 Go to previous messageGo to next message
andyccn is currently offline  andyccn   United Kingdom
Messages: 14
Registered: February 2006
Location: UK
Karma: 0
Junior Member
LOLARAA wrote on Tue, 13 June 2006 16:20

http://www.cashfiesta.com/php/join.php?ref=LOLARAA




I really wouldn't waste your time Cool


--
Andy Shellam
the mail network - server support
Re: Installed OK - now SQL error [message #32632 is a reply to message #32066] Wed, 12 July 2006 07:32 Go to previous messageGo to next message
zariok is currently offline  zariok   United States
Messages: 5
Registered: June 2004
Location: St. Louis
Karma: 0
Junior Member

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 Go to previous messageGo to next message
andyccn is currently offline  andyccn   United Kingdom
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 #38986 is a reply to message #32634] Wed, 12 September 2007 14:22 Go to previous messageGo to next message
lawrencec is currently offline  lawrencec   United States
Messages: 2
Registered: September 2007
Karma: 0
Junior Member
andyccn wrote on Wed, 12 July 2006 04:41

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.


Actually, it *is* FUD's problem... OIDs were turned off for a reason by the PostgreSQL developers and applications should really be written to *not* use OIDs. Besides, some people won't have the option to change the database configuration anyway. FUD should really be fixed to work without OIDs.

See http://fudforum.org/forum/index.php?t=msg&goto=38985&#msg_38985 for one fix that would work in both pre-8.1 and 8.1+ versions of postgres.

---Lawrence
Re: Installed OK - now SQL error [message #40167 is a reply to message #32634] Fri, 18 January 2008 10:06 Go to previous message
bsmanyan is currently offline  bsmanyan   India
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Installation problems on Windows
Next Topic: v 2.7.7 Step 2: CREATE UNIQUE INDEX
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 30 07:06:17 GMT 2024

Total time taken to generate the page: 0.03540 seconds