Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues
Author Message
emmaphp
Worker
Worker



Joined: Aug 22, 2006
Posts: 192

PostPosted: Wed Feb 20, 2008 7:57 pm Reply with quote

Hi everyone,

(With much assistance from Raven), I have just installed a brand new site using the new (2.20.00) version of Raven Nuke.

I have activated the FAQ (Frequently Asked Questions) Module, but as yet no posts have been made to this module.

I notice that when I am not logged in (as a user), I am able to click the link and view the module. However, when I do log in to my user account and click the link, I cannot view the module. Instead I receive a white page with the following error/text:

Unable to Insert MySQL said: 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 's')' at line 1

While this is not a major concern to me immediately, I wonder if anyone else has seen or is experiencing the same issue?

Thanks in advance as ever.
 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Wed Feb 20, 2008 9:25 pm Reply with quote

If you look in rnconfig.php there is an option to activate database. If you follow the instructions to do this you should be able to view the actual MYSQL error in /rnlogs/dblog. I know you posted the mysql error but the log will also show the actual SQL that generated that error. If you post it here we might be able to help.

I suspect that the FAQ module has not been extensively tested and you might be encountering a "legacy" error.
 
View user's profile Send private message Visit poster's website
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Wed Feb 20, 2008 10:31 pm Reply with quote

I have several FAQ's on my site and they all seem to work fine. However these have been drug along with my site ever since I was running 7.9. So my path was upgrade, not fresh install. Yeah, turn on that logging it will pinpoint it for us.

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Thu Feb 21, 2008 7:03 am Reply with quote

I donĀ“t get such an error on any of my sites.
 
View user's profile Send private message
Gremmie







PostPosted: Thu Feb 21, 2008 8:59 am Reply with quote

Weird, emmaphp sent me a log but it didn't contain any errors, let alone any FAQ table manipulations.
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Thu Feb 21, 2008 12:11 pm Reply with quote

Sorry, I am not getting any error either.
Did you create a category through the nuke admin / FAQ interface? As I notice there is none by default
 
View user's profile Send private message Send e-mail
Gremmie







PostPosted: Thu Feb 21, 2008 12:50 pm Reply with quote

I take that back, his log had an error about a nuke_email_config table. This isn't in stock RavenNuke is it? I don't have that table.
 
fkelly







PostPosted: Thu Feb 21, 2008 12:54 pm Reply with quote

I believe that the mail config table gets created when you go into Mail administration in the ACP. So that error will be there until you do. I haven't had time to confirm this but I'm pretty sure that's how it works.
 
emmaphp







PostPosted: Thu Feb 21, 2008 4:17 pm Reply with quote

Hi Everyone,

Thanks for your continued feedback with this matter.

To clarify Guardian2003, I created a test FAQ catagory and q & a in the following way:


1. I went to the website admin section at [ Only registered users can see links on this board! Get registered or login! ] clicking on FAQ,

2. In the Modules Administration area, I clicked on the FAQ link/icon

3. In the filed under the title 'Add a New Category' I created a catagory

I hope that helps.

Please can someone explain what ACP stands for and if I can do anything to/with this to try and resolve the problem?

What else can I do to help solve this matter?


Last edited by emmaphp on Thu Feb 21, 2008 4:22 pm; edited 1 time in total 
Gremmie







PostPosted: Thu Feb 21, 2008 4:21 pm Reply with quote

I don't understand what the FAQ module would be trying to insert into the database just by visiting it. I'll look at the code to see if I see any INSERTs in the user part of the FAQ module.

But I think at this point if you can get access to your server error logs that would be very helpful.

ACP stands for Admin Control Panel.
 
emmaphp







PostPosted: Thu Feb 21, 2008 4:42 pm Reply with quote

Hi Gremmie,

Which log file do you want to see?

To clarify, in addition to any raven nuke logs that may be generated, (and if you mean these you will have to tell me specifically which file you require), my server gives a file called access.log or scripts.log

To the best of my knowledge and from what I can see, no error is being generated in the scripts.log file.

Please advise further.
 
Gremmie







PostPosted: Thu Feb 21, 2008 4:45 pm Reply with quote

It would be nice to see your server error logs. What they are called exactly and how you get to them are host specific. Ask your host if you have access to them. If your host gives you a Plesk control panel, there is Logs icon that you click to access the server logs.
 
fkelly







PostPosted: Thu Feb 21, 2008 5:35 pm Reply with quote

humm ... just wondering if this could be a situation where MYSQL 5 is being more "strict" than 4 was ...

I am trying to get my test system updated so I can try a few things there too.

For instance the faqcategories table has this definition:

Code:
CREATE TABLE IF NOT EXISTS $prefix.`_faqcategories` ( `id_cat` tinyint(3) NOT NULL auto_increment, `categories` varchar(255) default NULL, `flanguage` varchar(30) NOT NULL default '', PRIMARY KEY  (`id_cat`) ) TYPE=MyISAM;  


Yet in the faq admin program we do this:

Code:
$db->sql_query("insert into ".$prefix."_faqcategories values (NULL, '$categories', '$flanguage')");  


I vaguely recall coming across some circumstances where MYSQL 5 wouldn't tolerate this where 4 would. But I'm not sure.
 
Gremmie







PostPosted: Thu Feb 21, 2008 6:25 pm Reply with quote

I seem to recall Raven having to modify emmaphp's require statement in mainfile.php to be require_once('/config.php');

He's getting a similar error in config.php about trying to find 'rnconfig.php'. I just asked emmaphp to change that to '/rnconfig.php'. He's getting an error in his server logs about config.php not being able to open rnconfig.php. Why that is only happening on the FAQ module is beyond me.
 
gotcha
Regular
Regular



Joined: Mar 14, 2005
Posts: 91

PostPosted: Thu Feb 21, 2008 6:44 pm Reply with quote

Looking at this code...
Code:
CREATE TABLE IF NOT EXISTS $prefix.`_faqcategories` ( `id_cat` tinyint(3) NOT NULL auto_increment, `categories` varchar(255) default NULL, `flanguage` varchar(30) NOT NULL default '', PRIMARY KEY  (`id_cat`) ) TYPE=MyISAM; 


I think TYPE=MyISAM should be changed to ENGINE=MyISAM for newer versions of mysql. Also, the the ` are in the wrong place.

The above has:
Code:
$prefix.`_faqcategories`

Which ends up as nuke`_faqcategories` Wink
 
View user's profile Send private message Visit poster's website
Gremmie







PostPosted: Thu Feb 21, 2008 7:07 pm Reply with quote

There is no code in modules/FAQ/index.php that executes an INSERT SQL statement. That error must be coming from some infrastructure code in mainfile.php or modules.php.
 
Gremmie







PostPosted: Thu Feb 21, 2008 7:09 pm Reply with quote

gotcha, where did you get that code? If you got it where I think you did, that code is preprocessed before executed, so don't worry about the $prefix and the quotes being out of place. Also, TYPE is still valid under MySQL 5.0 for backwards compatibility.
 
emmaphp







PostPosted: Thu Feb 21, 2008 7:09 pm Reply with quote

Hi again all,

I am not too sure where the code Gotchas previous post refers to is located and I will wait for someone to advise further before attempting to make any changes.

In the meantime, if it helps, I can confirm that my system is running MySQL 4.1.14

Also, in his last post I think Gremmie was slightly incorrect in understanding what change I had to make with a previous issue I was having. So for this reason I will hold off making a move on this advise, (just in case he did slightly misunderstand etc). On this point, to clarify, Raven had to make a change in my config.php which was as follows:

Change:

require_once('rnconfig.php');

TO:

require_once('/rnconfig.php')


This did not involve any changes to the mainfile.php file as suggested by Gremmie, so I will not act on his last post until advised otherwise, (i.e if he made an error or not)

Thanks for all your help guys and gals.
 
Gremmie







PostPosted: Thu Feb 21, 2008 7:15 pm Reply with quote

Well in that case emmaphp, are the errors in your server error logs regarding not being able to open rnconfig.php from today? I suspect those errors were from before Raven made his change. If that is the case, disregard my advice. Someones going to have to look at your system to figure this one out.
 
emmaphp







PostPosted: Thu Feb 21, 2008 7:20 pm Reply with quote

Gremmie wrote:
There is no code in modules/FAQ/index.php that executes an INSERT SQL statement. That error must be coming from some infrastructure code in mainfile.php or modules.php.



Gremmie,

Which error do you refer to in your post, (quoted above here)?

If you mean the error I originally reported myself, ie:


Unable to Insert MySQL said: 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 's')' at line 1


...Well that error appears on a white page in my browser, when I am logged in (as a user) and after I click the FAQ link in the modules block.

I hope this helps.
 
emmaphp







PostPosted: Thu Feb 21, 2008 7:22 pm Reply with quote

Gremmie wrote:
Well in that case emmaphp, are the errors in your server error logs regarding not being able to open rnconfig.php from today? I suspect those errors were from before Raven made his change. If that is the case, disregard my advice. Someones going to have to look at your system to figure this one out.


Yes Gremmie...The error ('code') I see currently in the log file and which I sent you a copy of, appear to be from previous dates and the previous issues I was having.

As I said in the Private Messages, I do not think any error log is being generated for this particular 'faq' problem.

Even when I switch the config.php file to 'true' for reporting errors, nothing is reported on the screen other than the original text I have quoted in my last post here.
 
gotcha







PostPosted: Thu Feb 21, 2008 7:38 pm Reply with quote

Gremmie, that code came from fkelly's post above mine. I just noticed that the backticks looked out of order, I didn't know exactly where the code fkelly posted came from. Looking back, I should have known that the sql would be parsed in some way Laughing
 
Gremmie







PostPosted: Thu Feb 21, 2008 7:53 pm Reply with quote

gotcha, well....gotcha! Smile Yeah that came from the install script.

emmaphp, this is a stumper. I can't replicate this on my site, either my production site or my local XAMPP install. Do you have any 3rd party modules or blocks that you installed? The only thing I can think of is that you do, and they are not use the $db abstraction layer. That is the only reason I can think of that an INSERT SQL error isn't showing up in the new logging facility.

If you have such blocks/modules, try disabling them in the ACP and see if that changes the behavior.
 
emmaphp







PostPosted: Thu Feb 21, 2008 7:56 pm Reply with quote

Hi Gremmie,

All I have installed in my system/website is the new version of Raven Nuke (2.20.00)

Sad
 
Gremmie







PostPosted: Thu Feb 21, 2008 8:44 pm Reply with quote

What version of MySQL are you running?
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.20.00 - All Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©