Welcome to Geeklog, Anonymous Saturday, November 30 2024 @ 11:54 pm EST
Geeklog Forums
PHP 5.2 installed now geeklog doesn't work
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
My box (Windows 2003 Server, IIS 6) had PHP 4.4.0 (i believe) installed on it and everything was working fine with geeklog 1.4.1. I then installed PHP 5.2 and I now get this error going to the home page:
An SQL error has occurred. Please see error.log for details.
And the error log contains:
01/16/07 13:40:53 - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. SQL in question: SELECT DISTINCT ft_name FROM gl_access,gl_features WHERE ft_id = acc_ft_id AND acc_grp_id IN ()
Now I realize that the sql statement is missing data in the () but I don't know why?
When I did this install on my test server everything went fine (it was a fresh php install not an install over php 4). PHPMyAdmin does work fine on the new install.
One of the Geeklog Core Developers.
An SQL error has occurred. Please see error.log for details.
And the error log contains:
01/16/07 13:40:53 - 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1. SQL in question: SELECT DISTINCT ft_name FROM gl_access,gl_features WHERE ft_id = acc_ft_id AND acc_grp_id IN ()
Now I realize that the sql statement is missing data in the () but I don't know why?
When I did this install on my test server everything went fine (it was a fresh php install not an install over php 4). PHPMyAdmin does work fine on the new install.
One of the Geeklog Core Developers.
7
8
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
More info
On my live geeklog server I can use my test db server fine (MYSQL 5.0.27) but I get the above error when trying to use my live db server that uses MySQL 4.1.8.
So it appears to be a mysql version issue. Unfortantly I can't upgrade the db server yet as other things are using it.
Any ideas what is going on here?
One of the Geeklog Core Developers.
On my live geeklog server I can use my test db server fine (MYSQL 5.0.27) but I get the above error when trying to use my live db server that uses MySQL 4.1.8.
So it appears to be a mysql version issue. Unfortantly I can't upgrade the db server yet as other things are using it.
Any ideas what is going on here?
One of the Geeklog Core Developers.
12
8
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
Acckk! :banghead:
I fixed the above problem and now have a smaller problem. Rebooting of the MySQL server seems to have solved it. I alway reboot my servers after I install something but nver though to reboot the mysql server since I didn't touch it.
All websites are working except for some staticpage autotags. This is really weird. For some reason some of them just redisplays the actual autotag code like this
[sstaticpagee: idofstaticpage]
and the link for the atuotag may be in the above text but just for part of the text and it contains no id. Also it seems to delete a bit of the word in front of the autotag.
As an example the html that gets returned for the autotag is here (i also included part of the sentence it is in):
I'll update th<a href="http://www.MyDomain.com/staticpages/index.php?page=">[sstaticpagee: idofstaticpage] and blah blah blah
One of the Geeklog Core Developers.
I fixed the above problem and now have a smaller problem. Rebooting of the MySQL server seems to have solved it. I alway reboot my servers after I install something but nver though to reboot the mysql server since I didn't touch it.
All websites are working except for some staticpage autotags. This is really weird. For some reason some of them just redisplays the actual autotag code like this
[sstaticpagee: idofstaticpage]
and the link for the atuotag may be in the above text but just for part of the text and it contains no id. Also it seems to delete a bit of the word in front of the autotag.
As an example the html that gets returned for the autotag is here (i also included part of the sentence it is in):
I'll update th<a href="http://www.MyDomain.com/staticpages/index.php?page=">[sstaticpagee: idofstaticpage] and blah blah blah
One of the Geeklog Core Developers.
7
8
Quote
Status: offline
Benta
Forum User
Regular Poster
Registered: 03/11/05
Posts: 80
Quote by: Laugh
Also it seems to delete a bit of the word in front of the autotag.
I'll update th<a href="http://www.MyDomain.com/staticpages/index.php?page=">[sstaticpagee: idofstaticpage] and blah blah blah
That one is really weird. Can you look at the field in the database table to see what is actually in there?
10
10
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
Well I think I might know what was possibly causing an issue.
I found a bug in the rating plugin I was working on where some info was not being saved if it contained a quote in it. It turns out that I was missing an addslashes call. Further checking revealed that in version 4.1.8 installs of php they have magic_quotes automatically turned on, there by this error was automatically fixed. In php 5.2 magic_quotes is automatically disabled so the bug revealed it self.
Now back to my autotags issue, I notice that it only seemed to happen in articles that contained quotes in them that were saved when I used php 4.1. If I manually removed the quotes and put them back in then the autotag in the article would then work correctly (a simple cut and repaste of the whole article would not).
So it you are upgrading php and had magic_quotes turned on in your older version, you may have to resave any article that had quotes in them.
One of the Geeklog Core Developers.
I found a bug in the rating plugin I was working on where some info was not being saved if it contained a quote in it. It turns out that I was missing an addslashes call. Further checking revealed that in version 4.1.8 installs of php they have magic_quotes automatically turned on, there by this error was automatically fixed. In php 5.2 magic_quotes is automatically disabled so the bug revealed it self.
Now back to my autotags issue, I notice that it only seemed to happen in articles that contained quotes in them that were saved when I used php 4.1. If I manually removed the quotes and put them back in then the autotag in the article would then work correctly (a simple cut and repaste of the whole article would not).
So it you are upgrading php and had magic_quotes turned on in your older version, you may have to resave any article that had quotes in them.
One of the Geeklog Core Developers.
7
8
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
I think I figured out how to reproduce the autotags bug. If you enter some special characters like below in the article, it will screw up the autotag. I guess I will have to add this to the bug list. I just wanted to test it out on another site that wasn't mine (incase I had something setup wrong).
•
••
Autotags Test, linking to article id 20061231140053707, now a bunch of blah blah text Forum Version 2.6 RC3 Released.
One of the Geeklog Core Developers.
•
••
Autotags Test, linking to article id 20061231140053707, now a bunch of blah blah text Forum Version 2.6 RC3 Released.
One of the Geeklog Core Developers.
7
8
Quote
All times are EST. The time is now 11:54 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content