Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 01:24 am EST
Geeklog Forums
admin error with staticpages
Status: offline
ldfoo
Forum User
Junior
Registered: 05/10/04
Posts: 34
Everything was working fine on a new site using latest cvs 1.4.1b2 but now I am having a problem accessing static pages when logged in as admin (root).
The pages are accessible by anonymous and and editable by another logged-in group as per allowable permissions
I am getting this error:
I have tried deleting all cache in firefox and get same using internet explorer. I have also replaced the staticpages index file.
Things I did before it happened:
- added a staticpage link to another static page using an autotag
- switched to an ie-tab in firefox while logged in as admin requiring to login again
I had a look at the database in phpmyadmin but don't see anything, but then I probably don't know what to look for.
Using hosting service which has hosted GL for years without problem - Mysql 4.1.21, php 4.4
Any help appreciated, thanks
Laurie
The pages are accessible by anonymous and and editable by another logged-in group as per allowable permissions
I am getting this error:
An error has occurred:
2 - Cannot use a scalar value as an array @ /home/xxxx/public_html/xxxxx/staticpages/index.php line 171
2 - Cannot use a scalar value as an array @ /home/xxxx/public_html/xxxxx/staticpages/index.php line 171
I have tried deleting all cache in firefox and get same using internet explorer. I have also replaced the staticpages index file.
Things I did before it happened:
- added a staticpage link to another static page using an autotag
- switched to an ie-tab in firefox while logged in as admin requiring to login again
I had a look at the database in phpmyadmin but don't see anything, but then I probably don't know what to look for.
Using hosting service which has hosted GL for years without problem - Mysql 4.1.21, php 4.4
Any help appreciated, thanks
Laurie
14
15
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: ldfoo
Everything was working fine on a new site using latest cvs 1.4.1b2
CVS and 1.4.1b2 are not the same - what exactly are you using? And is this a fresh install or did you update an exisiting site?
There has been a change in CVS since the release of 1.4.1b2 that allows passing an array of SQL requests to DB_query. That would more or less match the line number you quoted. So if you're on a CVS version, make sure you've also updated system/lib-database.php and system/databases/mysql.class.php
bye, Dirk
14
16
Quote
ldfoo
Anonymous
Thanks for the pointers Dirk.
This was a clean install - I have been updating a cvs version since 1.4.1b2 was released - latest update today shows config 1.4.1RC1. I have checked the 2 files (system/lib-database.php and system/databases/mysql.class.php) and they were correct dates but I overwrote them again by FTP from my TortoiseCVS download folder and result is same. I am 99% sure all files are updated to latest cvs.
There had been no updates for several days when the problem arose and I had been actively working on the site without problem.
Would there be some database structure changes in this period since the install? If so, can I run an update or manually update?
I am not having any problems with a similar setup running under xampp local server.
There is nothing in the error log - the last entry is below (can't remember what this error was about)
Thanks
Laurie
This was a clean install - I have been updating a cvs version since 1.4.1b2 was released - latest update today shows config 1.4.1RC1. I have checked the 2 files (system/lib-database.php and system/databases/mysql.class.php) and they were correct dates but I overwrote them again by FTP from my TortoiseCVS download folder and result is same. I am 99% sure all files are updated to latest cvs.
There had been no updates for several days when the problem arose and I had been actively working on the site without problem.
Would there be some database structure changes in this period since the install? If so, can I run an update or manually update?
I am not having any problems with a similar setup running under xampp local server.
There is nothing in the error log - the last entry is below (can't remember what this error was about)
Wed 06 Dec 2006 14:37:28 PGT - 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 STRAIGHT_JOIN s.*, UNIX_TIMESTAMP(s.date) AS day, u.username, u.fullname, u.photo, t.topic, t.imageurl FROM gl_stories AS s, gl_users AS u, gl_topics AS t WHERE (s.uid = u.uid) AND (s.tid = t.tid) AND (date <= NOW()) AND (draft_flag = 0) AND frontpage = 1 ORDER BY featured DESC, date DESC LIMIT 0,
Thanks
Laurie
14
15
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Okay, so we seem to have the same problem here on geeklog.net (which I have just updated to the latest CVS version). So relax, it's nothing you did.
Will look into it and come back to you ...
bye, Dirk
Will look into it and come back to you ...
bye, Dirk
12
14
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Okay, simple fix: In staticpages/index.php, add this line as the new line 171, i.e. just before the line that starts with $sql['mysql'] = ...
Or update the file from CVS. That should fix it. Thanks for the report.
bye, Dirk
Text Formatted Code
$sql = array();Or update the file from CVS. That should fix it. Thanks for the report.
bye, Dirk
14
12
Quote
All times are EST. The time is now 01:24 am.
- 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