PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Thu Dec 20, 2007 12:07 pm Reply with quote Back to top

Hi, maybe I should say news and not articles. I just discovered that I cannot add any more topics because there is already 19 of them. Any way to change and increase the limit?

This is phpnuke 7.3

Thanks.
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

PostPosted: Thu Dec 20, 2007 1:25 pm Reply with quote Back to top

Are you referring to adding topics through the ACP Topics?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Thu Dec 20, 2007 5:05 pm Reply with quote Back to top

No Raven, not the Forum ACP but the Topics in the phpnuke Admin menu ... these are the Topics for when posting news article on nuke.

Thanks
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

PostPosted: Thu Dec 20, 2007 5:12 pm Reply with quote Back to top

Uh, I never mentioned Forums Wink. I was referring to the nuke Admin Control Panel Smile
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

PostPosted: Thu Dec 20, 2007 5:13 pm Reply with quote Back to top

Now, please explain the steps you go through and at what point you receive the error. And, what exactly is the error message you receive?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Fri Dec 21, 2007 6:38 am Reply with quote Back to top

Sorry, Raven, I somehow always "link" ACP to the Forums admin.

So when I when I want to add a topic, I go to the admin page, click on Topics. I then see a Topics Manager page where the top half shows all the 19 active topics with their icons and the bottom half is the "Add a New Topic" section.

Here I see these:-

Topic Name:
(just a name without spaces - max: 20 characters)
(for example: gamesandhobbies)


Topic Text:
(the full topic text or description - max: 40 characters)
(for example: Games and Hobbies)


Topic Image: (with drop down menu)

I enter the various stuff above and then click on Add Topic button and it just reloads the page with no additional topic added. No error messages, just reloads the page.
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7456
Location: Arizona

PostPosted: Fri Dec 21, 2007 6:51 am Reply with quote Back to top

I suspect it has to do with the data you are entering. Try to change your data and do not use the work "union" anywhere and don't use any special characters. Let us see if there really is a hard limit. I wasn't aware of one, so I suspect it is something in the data...
View user's profile Send private message Visit poster's website
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Fri Dec 21, 2007 8:35 am Reply with quote Back to top

OK, I tried using "raven" for the Topic name and Text and still nothing happens except the page reloading. Wierd!
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

PostPosted: Fri Dec 21, 2007 9:00 am Reply with quote Back to top

That sounds like a MySQL INSERT error or as Montego has alluded to, some kind of a string rejection issue. have you checked your server eror log to see if there is an error being loged?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Fri Dec 21, 2007 1:27 pm Reply with quote Back to top

Oops, now it gets too technical for me. I'll try and work out how to check error logs and get back here. Question
View user's profile Send private message Visit poster's website
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Fri Dec 21, 2007 1:36 pm Reply with quote Back to top

Ah, found it in the control panel of my host.

I did a few tries to generate a new topic and then checked the logs but nothing there apart from a complaint about a missing gif file and this :-

PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/xxxxx/public_html/modules/Multiheadlines/functions.php on line 289

What does the above mean?
View user's profile Send private message Visit poster's website
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Fri Dec 21, 2007 1:46 pm Reply with quote Back to top

When I look at my database with phpMyAdmin, I see this for mynukedb_Topic:-

Keyname.....Type........Cardinality...Action..Field
PRIMARY......PRIMARY..19..............Edit......Drop
topicid..........INDEX......19..............Edit......Drop

Does "Cardinality" = 19 mean anything with the problem of having Topic being limited to 19?
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

PostPosted: Fri Dec 21, 2007 2:29 pm Reply with quote Back to top

Does "Cardinality" = 19 mean anything with the problem of having Topic being limited to 19?
No. Cardinality shows the number of unique/distinct values for the column/index.

PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/xxxxx/public_html/modules/Multiheadlines/functions.php on line 289
That is a problem and possibly related but you won't know until you clear it up. User 'nobody' is Apache. That is telling you that Apache attempted to access your database w/o using a password and was denied, which is a good thing Laughing

Something is wrong in your setup as you are not providing a password to whatever line 289 is attempting to do.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 4821

PostPosted: Fri Dec 21, 2007 4:20 pm Reply with quote Back to top

In;
modules/Multiheadlines/functions.php on line 289
replace the whole line with this one to fix that specific problem with that module.
Code:

$title=mysql_escape_string(stripslashes(check_html($title, "nohtml")));

This module and the error mesage should not affect the normal nuke news/topics functions as the Multiheadlines is an RSS feed reader.
Part of the Multiheadlines setup requires a database connection so it can store incoming feeds so I guess some steps for the install might have been missed??
View user's profile Send private message Send e-mail Visit poster's website
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Fri Dec 21, 2007 4:39 pm Reply with quote Back to top

Raven thanks for the feedback on the error. I checked the setup in Multiheadlines, all seem OK and working. I'm not sure what other setup needs to happen but I've also posted the issue on the author's site.

Guardian, what can I say except that perhaps you (and your team's) PHP, mysql, nuke knowledge is awesome! I checked the logs after doing the above change and there are no more errors. Image

I'll keep checking on this one.

I also tried the Topic thing again but no joy there. Still the same outcome ...
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

PostPosted: Fri Dec 21, 2007 4:46 pm Reply with quote Back to top

sowsteady, Send me the following info in a PM and I will take a look when I get a chance. Please reference this thread for my edification Wink

Site URL
FTP URL, id, pass
MySQL URL, id, pass
Nuke Admin id, pass
NukeSentinel id, pass for the Nuke Admin (if applicable)

Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 4821

PostPosted: Fri Dec 21, 2007 4:54 pm Reply with quote Back to top

OffTopic now thats a good idea for a new forum sig hehe
View user's profile Send private message Send e-mail Visit poster's website
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Fri Dec 21, 2007 6:19 pm Reply with quote Back to top

Raven wrote:
sowsteady, Send me the following info in a PM and I will take a look when I get a chance. Please reference this thread for my edification Wink

Site URL
FTP URL, id, pass
MySQL URL, id, pass
Nuke Admin id, pass
NukeSentinel id, pass for the Nuke Admin (if applicable)

Only registered users can see links on this board!
Get registered or login to the forums!


PM sent, thanks!
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

PostPosted: Fri Dec 21, 2007 6:53 pm Reply with quote Back to top

Got it. I'll look into it this evening if at all possible.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

PostPosted: Sat Dec 22, 2007 3:54 am Reply with quote Back to top

The MySQL URL I needed was from your cPanel phpMyAdmin link. Since you didn't have that I had to manually improvise a few scripts Smack

Raven wrote:
That sounds like a MySQL INSERT error

That's exactly what it is. It looks like you have expanded your topics table and added 2 columns.


The initial MySQL error that was displayed was
MySQL said Column count doesn't match value count at row 1

Then I ran a query to find the column names that the table schema is expecting
topicid topicname topicimage topictext counter displayorder displayhome
Notice that there 7 expected column names

In admin/modules/topic.php and function topicmake() you are attempting to only insert 5 colums which is why the MySQL Error (Column count doesn't match value count at row 1)
"INSERT INTO ".$prefix . "_topics VALUES (NULL,'$topicname','$topicimage','$topictext','0')"; which (as an example) resolves to INSERT INTO nuke_topics VALUES (NULL,'Web','OffTopic.jpg','Web Related','0')

So you are missing two values. You can correct this one of two ways. A quick and dirty way is to alter your INSERT statement in admin/modules/topics.php around line 225
FROM
$sql = "INSERT INTO ".$prefix . "_topics VALUES (NULL,'$topicname','$topicimage','$topictext','0')";
TO
$sql = "INSERT INTO ".$prefix . "_topics VALUES (NULL,'$topicname','$topicimage','$topictext','0','','')";

Another way would be to alter your INSERT statment
b]FROM[/b]
$sql = "INSERT INTO ".$prefix . "_topics VALUES (NULL,'$topicname','$topicimage','$topictext','0')";
TO
$sql = "INSERT INTO ".$prefix . "_topics (topicid, topicname, topicimage, topictext, counter) VALUES (NULL,'$topicname','$topicimage','$topictext','0')";

The best way is to find out why those extra 2 columns are at the end of the table and either delete/drop them or fix the logic that tries to modify the tebles to add the last two columns.

RavensScripts

Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7456
Location: Arizona

PostPosted: Sat Dec 22, 2007 8:37 am Reply with quote Back to top

Oh my... Sad that is what I get for assuming a core unadulterated RavenNuke setup. Good find Mr. R.!

worship
View user's profile Send private message Visit poster's website
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Sat Dec 22, 2007 8:56 am Reply with quote Back to top

Errm, are you still working on the script? I can't get to it from the Admin Panel.

........

Sorry Raven, should have pasted the error message, here is what I got when I click on "Topics" in the Admin Panel, blank page with the message below:-

Parse error: syntax error, unexpected T_VARIABLE in /home/xxxxx/public_html/admin/modules/topics.php on line 226
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15210
Location: Kansas

PostPosted: Sat Dec 22, 2007 10:24 am Reply with quote Back to top

Should be ok now.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Sat Dec 22, 2007 11:35 am Reply with quote Back to top

Raven wrote:
Should be ok now.


Many thanks Raven, I'm still looking as to what to do after reading your diagnostics. I'll post here again if all OK and of course ... will click on the "Donate" button if it does! Wink
View user's profile Send private message Visit poster's website
sowsteady
Regular
Regular


Joined: Apr 09, 2004
Posts: 87
Location: UK

PostPosted: Sat Dec 22, 2007 11:51 am Reply with quote Back to top

Hmmm ... I tried both of the methods you described above but with the same result.

I guess its time to dig and find out the part where you said "The best way is to find out why those extra 2 columns are at the end of the table and either delete/drop them or fix the logic that tries to modify the tebles to add the last two columns."
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic