Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro
Author Message
Targilnar
New Member
New Member


Joined: Nov 01, 2006
Posts: 11

PostPosted: Thu Nov 02, 2006 6:16 am Reply with quote

After having read the documentation it appears that I should be able to select blocks in admin mode and change them. For example I selected the login block and on the location dropdown changed it to the left side. I click save and then nothing happens and when I edit that block again, its back to what it was before.

I am running RN76 v2.02 on a Windows XP Pro, Apache, PHP 5.1, MySQL 5.0 setup.


Any ideas why this is the case?
 
View user's profile Send private message
montego
Site Admin


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

PostPosted: Thu Nov 02, 2006 6:38 am Reply with quote

First of all, welcome to RavenPHPScripts!

It is possible that this is your issue:
Only registered users can see links on this board! Get registered or login!

There is a forum just for post-release fixes. Take a look here first. We also ask that everyone use the forum search tools first as well. There is a wealth of information in these forums if you look for it. Wink

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Targilnar
PostPosted: Thu Nov 02, 2006 6:50 am Reply with quote

That isn't really the problem I'm having but I'll repost in the Post-Reease forum. Thanks for the quick response though.
 
montego
PostPosted: Thu Nov 02, 2006 7:50 am Reply with quote

Targilnar, I would make the code fix anyways and then make sure it does not fix your issue. There is a bug in the code for 2.02.02 and it would be good to fix it before you say it doesn't fix your specific issue. Wink
 
Targilnar
PostPosted: Thu Nov 02, 2006 8:15 am Reply with quote

I'll try it when I go home for lunch. However I think my problem is larger than that. I tried creating groups this morning with the same result. Could fill out the form but when I tried to save nothing happened.

It almos feels like some kind of write protect issue, though I'm not sure where.

I found this article: Only registered users can see links on this board! Get registered or login!

Is there some kind of script or list of things to change for PHP 5 and MySQL 5, because thats what I'm running and I cant drop them or I loose my wiki.
 
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Thu Nov 02, 2006 1:03 pm Reply with quote

It could the PHP 5 causing the problems. If you turn error checking on do you get any error messages?
 
View user's profile Send private message
Targilnar
PostPosted: Fri Nov 03, 2006 8:10 am Reply with quote

I fixed my group edit problem by upgrading. I had downloaded version 2.02.00 by accident but reinstalling to 2.02.02 fixed that. I am still unable to save any admin changes to blocks other than activate and deactivate.

Montego - I applied the fix as you suggested no change.

Jakec - Error checking is set to true but I am not seeing any.
 
montego
PostPosted: Fri Nov 03, 2006 10:36 pm Reply with quote

Targilnar, post the structure (not data) for your nuke_blocks table.
 
Targilnar
PostPosted: Sat Nov 04, 2006 8:10 am Reply with quote

nuke_blocks table

Field Type Null Default
bid int(10) No
bkey varchar(15) No
title varchar(60) No
content text No
url varchar(200) No
bposition char(1) No
weight int(10) No 1
active int(1) No 1
refresh int(10) No 0
time varchar(14) No 0
blanguage varchar(30) No
blockfile varchar(255) No
view int(1) No 0
groups text No
expire varchar(14) No 0
action char(1) No
subscription int(1) No 0
 
montego
PostPosted: Sat Nov 04, 2006 1:53 pm Reply with quote

Well, that looks correct, which means that you still might have a file that is not correct. PM me your email address and I'll send you a admin\modules\blocks.php file to try out.
 
Targilnar
PostPosted: Mon Nov 06, 2006 10:10 am Reply with quote

Message sent.
 
Targilnar
PostPosted: Mon Nov 06, 2006 12:51 pm Reply with quote

There was no difference after switching the blocks.php file.
 
montego
PostPosted: Mon Nov 06, 2006 6:10 pm Reply with quote

I hate to do this to you, but I just saw this here in your original post:

Quote:

PHP 5.1, MySQL 5.0 setup.


RavenNuke (or even PHP-Nuke for that matter) is not certified to run on these. PHP 4.4.x and MySQL 4.1.x are the recommend "stack" components.

Unfortunately, this works just fine for every installation that I have done, so there must be something in there that either PHP 5.1 or MySQL 5.0 doesn't like.
 
Guardian2003
Site Admin


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

PostPosted: Mon Nov 06, 2006 10:08 pm Reply with quote

I think its the mysql version as I'm using PHP 5.1.6 on a test site and not experiencing this at all.
In the deepest crevices of my befuddle mind, something is niggling me and it has something to do with one of the table field names being a new 'reserves' word in mysql 5 - but I just cannot put my finger on where got the data from sorry.
 
View user's profile Send private message Send e-mail
montego
PostPosted: Tue Nov 07, 2006 6:25 am Reply with quote

** EDITED BY MONTEGO: Sorry about this guys! The issue isn't with "active", but "action".... sorry, just had a momentary brainfart. I have corrected the example below ***

Guardian2003, you are THE MAN! While "action" and "time" are not on the "reserved" list for 5.0/5.1, they ARE on a list, so we should try something.

Targilnar, I don't have any way of testing this on mySQL 5.0, so you will have to try this out for us.

Everywhere in the build of a SQL statement that you see the words "action" or "time", backquote them. For example, if you see this:

$result8 = $db->sql_query("update ".$prefix."_blocks set bkey='$bkey', title='$title', content='$content', url='$url', bposition='$bposition', weight='$weight', active='$active', refresh='$refresh', blanguage='$blanguage', blockfile='$blockfile', view='$view', groups='$ingroups', expire='$expire', action='$action', subscription='$subscription' where bid='$bid'");

Change it to look like this:

$result8 = $db->sql_query("update ".$prefix."_blocks set bkey='$bkey', title='$title', content='$content', url='$url', bposition='$bposition', weight='$weight', active='$active', refresh='$refresh', blanguage='$blanguage', blockfile='$blockfile', view='$view', groups='$ingroups', expire='$expire', `action`='$action', subscription='$subscription' where bid='$bid'");


Pay close attention to the `action`. See the backquote marks? Unfortunately, there is a ton of sql statements being used in this file, so this could get quite tedious, but start with one function that does not work, such as an "BlockAdd" and see if it works.

Since you are choosing to run PHP-Nuke, it might also be a good idea to see if you can somehow use mySQL 4.1.x as you are going to find other issues with 5.x as you go along.
 
Targilnar
PostPosted: Tue Nov 07, 2006 10:42 am Reply with quote

I tried updating action in the BlocksEditSave function but there was no change. Then I took the following sql statement.
Code:


update nuke_blocks set bkey='$bkey', title='$title', content='$content', url='$url', bposition='$bposition', weight='$weight', active='$active', refresh='$refresh', blanguage='$blanguage', blockfile='$blockfile', view='$view', groups='$ingroups', expire='$expire', `action`='$action', subscription='$subscription' where bid='$bid'


and set it up to change the search block

Code:


update nuke_blocks set bkey='', title='Search', content='', url='', bposition='r', weight='2', active='0', refresh='3600', blanguage='', blockfile='block-Search.php', view='0', groups='', expire='0', `action`='d', subscription='0' where bid='4'


The query ran with no issues and worked properly. Also I can add blocks/delete blocks just not edit them. The values were pulled right from the db with the only change being the bposition from "l" to "r".

Is there any way to see the sql calls being made so I can hunt down the problem that way. I have no problem putting some effort into making a MySQL 5.x compatible version of blocks.php but I need some method of debugging.
 
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Tue Nov 07, 2006 4:12 pm Reply with quote

Well you can just copy the SQL query out and echo that back to the screen. Then try that in phpMyAdmin
That's generally what I do when one query seems to be buggy.

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
Targilnar
PostPosted: Tue Nov 07, 2006 8:24 pm Reply with quote

I'm not really to familiar with php, however when I put an echo on there I don't see it on the screen. Possibly because the php is being called and then the page is refreshing. Any suggestions or is there a system out mode like java?
 
evaders99
PostPosted: Tue Nov 07, 2006 10:34 pm Reply with quote

Use the die() command after you echo out the query. That will prevent the script from loading further
 
montego
PostPosted: Wed Nov 08, 2006 6:48 am Reply with quote

Are you not able to edit any blocks or is it a specific one that we can try too?
 
Targilnar
PostPosted: Wed Nov 08, 2006 9:32 am Reply with quote

None of the blocks are editable. I am going to try an echo and die() command at lunch today and see if I can get the sql statements.

Here is the error I get when I paste the callled SQL statement

SQL query:

UPDATE nuke_blocks SET title = 'Search',
content = '',
bposition = 'l',
weight = '3',
active = '0',
refresh = '',
blanguage = '',
blockfile = 'block-Search.php',
VIEW = '2',
groups = '',
subscription = '0' WHERE bid = '4'

MySQL said: Documentation
#1264 - Out of range value adjusted for column 'refresh' at row 1

Its an out of range error because you try to put a blank value in an int column, if you change the value to 0 it works fine.

The fix is to add the following line at the begining of BlocksEditSave
if($refresh == "") { $refresh='0'; }
 
evaders99
PostPosted: Wed Nov 08, 2006 2:18 pm Reply with quote

Good catch!

I think refresh is just an number type. So we can use
Code:


$refresh = intval($refresh);

as well
 
montego
PostPosted: Thu Nov 09, 2006 6:08 am Reply with quote

evaders99, I'll take a look at it. I see some more clean-up that can be done on this file as well. It is just odd to me that none of us, even in our RN 2.10 testing, have run into this issue. Something, I think, must be different about Targilnar's setup, but what could it be?
 
Targilnar
PostPosted: Thu Nov 09, 2006 7:00 am Reply with quote

evaders99 code changed worked perfectly as well.

montego I can give you more specifics on my setup if you would like them.
 
montego
PostPosted: Thu Nov 09, 2006 7:21 am Reply with quote

No need. I found it. If you had edited a block that was an RSS feed, it would have worked. If its not an RSS feed block, the *refresh* is not being passed from the browser. Hence why this fix will work just fine. I will make the same in RN2.10. Problem is, I cannot see why this works for the rest of us. But, regardless, this needs to have an intval on it.

Thanks!
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro

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 ©