|
| Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more. |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Join Date: Aug 2002
Posts: 97
Reputation: 5
|
This is starting to get way over my head. We need a PHP/SQL expert to point us in the right direction.
|
|
|
|
|
#2 |
|
Posts: n/a
|
yah i tried figureing it out as well but its pretty difficult.. i guess we pay powweb to do their job.
![]() |
|
|
#3 |
|
Join Date: Aug 2002
Posts: 97
Reputation: 5
|
See this thread.
http://forum.powweb.com/showthread.p...421#post264421 This solution was applied to mx_portal with phpbb2 boards but i think it applies to all php scripts. |
|
|
|
|
#4 |
|
Join Date: Aug 2002
Posts: 97
Reputation: 5
|
The solution I found worked on my mx-portal/ phpbb2 site.
mod is a reserved word in MySql 4.1 .......see this thread: http://forum.powweb.com/showthread.php?t=45463 |
|
|
|
|
#5 |
|
Posts: n/a
|
i use invision and i did not find anyt mod on my index.php file
![]() |
|
|
#6 |
|
Join Date: Feb 2002
Posts: 94
Reputation: 19
|
This seems to suggest that I should rename any instance of "mod" to "mod2" in every php file for my board?
|
|
|
|
|
#7 |
|
Join Date: Jul 2004
Location: East Freetown, MA
Posts: 249
Reputation: 65
|
You wouldn't need to replace 'mod' with 'mod2' everywhere in PHP, just whereever it's used in building or interpreting queries to MySQL.
If you're using third-party PHP packages, I'd check their web sites for updated versions. If you wrote the PHP yourself, hopefully you already know what I'm talking about. |
|
|
|
|
#8 | |
|
Join Date: Aug 2002
Posts: 97
Reputation: 5
|
Quote:
That is what it seems to me. Luckily I only had 3 files to edit. Princess can you post the exact error you are getting when you go to your site? |
|
|
|
|
|
#9 |
|
Posts: n/a
|
mySQL query error: SELECT mod.mid as is_mod, m.id, m.name, m.mgroup, m.password, m.email, m.allow_post, m.view_sigs, m.view_avs, m.view_pop, m.view_img, m.auto_track,
m.mod_posts, m.language, m.skin, m.new_msg, m.show_popup, m.msg_total, m.time_offset, m.posts, m.joined, m.last_post, m.last_visit, m.last_activity, m.dst_in_use, m.view_prefs, g.* FROM ibf_members m LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup) LEFT JOIN ibf_moderators mod ON (mod.member_id=m.id OR mod.group_id=m.mgroup ) WHERE m.id='1416' mySQL error: 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 'mod ON (mod.member_id=m.id OR mod.group_id=m.mgroup ) WHERE m.' at line 6 mySQL error code: 1064 Date: Wednesday 12th of January 2005 01:21:28 PM |
|
|
#10 | |
|
Join Date: Feb 2002
Posts: 94
Reputation: 19
|
Quote:
That is the exact error I am getting as well. |
|
|
|
|
|
#11 |
|
Join Date: Jun 2002
Location: México
Posts: 94
Reputation: 5
|
me too...
|
|
|
|
|
#12 |
|
Founder - Xinil.net
Join Date: Mar 2002
Location: Orange County
Posts: 466
Reputation: 14
|
If mod is a reserved word, try putting "`" around your columns.
Example: `mod.member_id`=`m.id`
__________________
MyAnimelist.net - Get your own free Anime list! |
|
|
|
|
#13 |
|
Join Date: Aug 2002
Posts: 97
Reputation: 5
|
It is definitely a problem with the word mod. Any php scripts that use the word "mod" or "mod.something" will mess things up.
SELECT mod.mid LEFT JOIN ibf_moderators mod ON (mod.member_id=m.id OR mod.group_id=m.mgroup ) The php script sends and sql command like SELECT and SQL encounters the word "mod" and doesn't know what to do with it because it is a reservered MySql 4.1 word. Start by figuring out which file is causing the error. Like if it is your home page it is most likely index.php where the problem is. Other pages could be affected too if they have mod in there files. Open the php file and change "mod" where it is all by itself and "mod.anything" to "mod2" and "mod2.anything". Only change it in the parts that involve SQL Queries.....$sql= This is the best I understand it so far. note- mod_module would not need a change because it is one word. Why mod.something does I do not know. else { $sql = "SELECT blk.block_id, bct.column_id, module_path, function_file, auth_view FROM " . COLUMN_BLOCK_TABLE . " bct, " . BLOCK_TABLE . " blk, " . FUNCTION_TABLE . " fnc, " . MODULE_TABLE . " mod2 WHERE blk.function_id = fnc.function_id AND blk.block_id = bct.block_id AND fnc.module_id = mod2.module_id ORDER BY column_id, block_order"; // AND bct.column_id = " . $column_rows[$column]['column_id'] . " 117 mx_message_die(GENERAL_ERROR, "Could not query modules information", "", __LINE__, __FILE__, $sql); Usually the error will tell you what file and at what line the error ocurred at. For instance my error was occuring at line 117 of index.php and right above that was the sql block that was causing it. I use HTML Kit to edit php files. |
|
|
|
|
#14 |
|
Registered
Join Date: Feb 2002
Posts: 14
Reputation: 5
|
Im getting that exact same error with my invision boards.
Anyone have any sugestions on where to start? What page do you think is causing the error? I opened index.php but couldnt find anything that looked like what you are talking about. thanks |
|
|
|
|
#15 |
|
Posts: n/a
|
Same problem here, it seems as if nobody knows how to fix us users with invision board. Is it just me or do we pay this company to host our sites and just make more problems for us that we can't solve, nor them for that matter?
|
|
|
#16 |
|
Join Date: Aug 2002
Posts: 97
Reputation: 5
|
Can you guys put links to the page that is giving the error?
|
|
|
|
|
#17 |
|
Posts: n/a
|
---------------------------
The error only shows when members log in ---------------------------- mySQL query error: SELECT mod.mid as is_mod, m.id, m.name, m.mgroup, m.password, m.email, m.allow_post, m.view_sigs, m.view_avs, m.view_pop, m.view_img, m.auto_track, m.mod_posts, m.language, m.skin, m.new_msg, m.show_popup, m.msg_total, m.time_offset, m.posts, m.joined, m.last_post, m.last_visit, m.last_activity, m.dst_in_use, m.view_prefs, g.* FROM ibf_members m LEFT JOIN ibf_groups g ON (g.g_id=m.mgroup) LEFT JOIN ibf_moderators mod ON (mod.member_id=m.id OR mod.group_id=m.mgroup ) WHERE m.id='1' mySQL error: 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 'mod ON (mod.member_id=m.id OR mod.group_id=m.mgroup ) WHERE m.' at line 6 mySQL error code: 1064 Date: Wednesday 12th of January 2005 06:25:21 PM |
|
|
#18 | ||
|
Posts: n/a
|
Quote:
Hmm, no, that should be `mod`.`member_id`, and `m`.`id` Backticks around each SQL table or column name (between dots) that might be a reserved word, not around the entire thing (database.table.column). Quote:
The database servers were changed from mySQL 4.0 to mySQL 4.1. "mod" became an SQL reserved word in mySQL 4.1. So SQL queries that used "mod" as the name of a table or column now need to be tweaked. That means "mod.anything" or "anything.mod" or even just "mod" by itself. You can either change the name of the table or column, or put backticks around the existing name. FYI, there are over 150 reserved words in mySQL's dialect of SQL. The only reason "mod" is causing a problem is that the previous major version didn't treat it as reserved, and the applications everyone's complaining about used it as a table name. Unfortunately, this change of treatment for "mod" is not mentioned in mySQL's "upgrading from 4.0 to 4.1" notes! |
||
|
|
#19 |
|
Registered
Join Date: Feb 2002
Posts: 14
Reputation: 5
|
Ok thats fine information but unfortunatly I have no idea on what to do with it. I opened all of the php files that I could find and didnt find mod at all. Can someone who knows these things please be a bit more specific as to what files to change?
Thank you |
|
|
|
|
#20 | |
|
Join Date: Dec 2004
Location: Sweden
Posts: 299
Reputation: 28
|
Quote:
Hello everybody! I know it's hard when things doesn't work the way they are expected, but this one actually isn't PowWebs fault. You should install updated versions of your PHP-applications, or ask for help who ever made / sold your applications. These are third party applications and you can't expect support from Powweb for it... |
|
|
|
|
|
#21 |
|
Join Date: Aug 2002
Posts: 97
Reputation: 5
|
Don post a link to the page where the error is occuring or post the whole text of the error in here. Sometimes it depends on how you configure your search whether it will show up. Searching for "mod" may not show "mod.something". The message should show the line number, right above that is where the error occured.
Unfortunately for me I have customized so much stuff I think it would be to much hassle to upgrade my mx portal and phpbb2. What php files are you using? Using free open source software does have its drawbacks. I am not sure but I think MySql is open source freeware. They did not even mention the mod thing in their upgrade notes. Powweb could maybe do a little more research for potenial problems before doing an upgrade. |
|
|
![]() |
| Thread Tools | Search this Thread |
|
|