hi guys i have an error in my script im using on the guestbook
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in public_html/guestbook/index.php on line 320
Guest: rampage (Today, 08:13)
hi and welcome to the siteReply | Edit | Delete
-----------------------------------------------
now when i had the site on my other server it worked no problems no mods were made to the index page in guestbook.if anyone knows how to fix this id appreciate it thankyou
Check that the settings in the MySQL server was turned off STRICT_MODE
ive contacte my host as if i upload a php.ini page it throws me a 500 error
for those who need to know how to do it open my.ini or php.ini page
Find:
# Set the SQL mode to strict sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
Replace with:
# Set the SQL mode to strict sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
or
in the sql query window logged in as super user
SET @@global.sql_mode= '';
rampage (14.05.2012/11:42)
# Set the SQL mode to strict sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
If you have a parameter is specified this way, all right, do not need to change anything.
AlkatraZ, Олег, ошибка действительно есть, когда гости пишут. Там имя таблицы в запросе списка сообщений неверное. Написано cms_guests а таблица cms_sessions
well ive contacted my host as i dont have root access to do the setting and they replied that they dont allow access to .ini files and if i wanted to have root access id need to purchase a vps server. never had a issue with the guestbook b4 and i use the current jcms 4.0 script
its strange as if i view it via admin club there is no error if normal guest view error is there
~XeOn~ (14.05.2012/19:05)
AlkatraZ, Олег, ошибка действительно есть, когда гости пишут. Там имя таблицы в запросе списка сообщений неверное. Написано cms_guests а таблица cms_sessions
Да, точно. По гостям ошибка имеет место быть.
rampage (14.05.2012/10:11)
hi guys i have an error in my script im using on the guestbook
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in public_html/guestbook/index.php on line 320
Guest:
Here's the corrected file
ive made a tempory fix the error is only there if guest makes a comment but if i make the guestbook allow only reg users when they post ther is no error