PHP.trigger_error() when sending new messages in Vanilla 2.2.1
Hi everyone,
I just upgraded to Vanilla 2.2.1 and found I cannot send any new messages to other members. I can click 'New Message' and write something, but upon clicking 'Post Message', I get the following error:
Fatal Error in PHP.trigger_error();
The error occurred on or near: C:\xxx\forum\library\database\class.database.php
418: $this->closeConnection(); 419: continue; 420: } 421: 422: trigger_error($message, E_USER_ERROR); 423: } 424: 425: } 426:
Backtrace:
C:\xxx\forum\library\database\class.database.phpPHP::Gdn_ErrorHandler(); [C:\xxx\forum\library\database\class.database.php:422] PHP::trigger_error(); [C:\xxx\forum\library\database\class.sqldriver.php:1663] Gdn_Database->query(); [C:\xxx\forum\library\database\class.sqldriver.php:1083] Gdn_SQLDriver->query(); [C:\xxx\forum\applications\conversations\models\class.conversationmodel.php:505] Gdn_SQLDriver->insert(); [C:\xxx\forum\library\core\class.form.php:2224] ConversationModel->save(); [C:\xxx\forum\applications\conversations\controllers\class.messagescontroller.php:96] Gdn_Form->save(); [C:\xxx\forum\applications\conversations\controllers\class.messagescontroller.php:96] MessagesController->add(); [C:\xxx\forum\library\core\class.dispatcher.php:329] PHP::call_user_func_array(); [C:\xxx\forum\index.php:44] Gdn_Dispatcher->dispatch();
Variables in local scope:
[Sql] 'insert GDN_Conversation (`InsertUserID`, `DateInserted`, `InsertIPAddress`, `UpdateUserID`, `DateUpdated`, `UpdateIPAddress`) values (:InsertUserID, :DateInserted, :InsertIPAddress, :UpdateUserID, :DateUpdated, :UpdateIPAddress)' [InputParameters] array ( ':InsertUserID' => '1', ':DateInserted' => '2016-09-05 17:45:38', ':InsertIPAddress' => '127.0.0.1', ':UpdateUserID' => '1', ':DateUpdated' => '2016-09-05 17:45:38', ':UpdateIPAddress' => '127.0.0.1', ) [Options] array ( 'Type' => 'insert', 'Slave' => NULL, 'ReturnType' => 'ID', ) [ReturnType] 'ID' [tries] 2 [try] 0 [PDO] array ( ) [PDOStatement] array ( 'queryString' => 'insert GDN_Conversation (`InsertUserID`, `DateInserted`, `InsertIPAddress`, `UpdateUserID`, `DateUpdated`, `UpdateIPAddress`) values (:InsertUserID, :DateInserted, :InsertIPAddress, :UpdateUserID, :DateUpdated, :UpdateIPAddress)', ) [ex] array ( ) [message] NULL [code] NULL [state] '00000'
Additional information for support personnel:
Application: Vanilla Application Version: 2.2.1 PHP Version: 5.5.11 Operating System: WINNT Server Software: Microsoft-IIS/8.5 Referer: http://localhost/xxx/forum/index.php?p=/messages/add User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Request Uri: /xxx/forum/index.php?p=/messages/add& Controller: PHP Method: trigger_error
What I've tried so far:
I have disabled all plugins, switched to the default theme, checked permissions (I'm the administrator), however still get the same error.
My \cache\Smarty\compile folder has full permission enabled for everyone.
The normal update procedure /utility/structure and /utility/update were both successful.
I can post discussions and comments without problem.
I searched the forum for a similar issue but could not find one that was related to Conversations.
Could anyone please shed a light to what may have gone wrong? I appreciate any help in advance. Thank you for a great platform Vanilla team!
Best Answer
-
vrijvlinder MVP
You probably have the same issues as this guy here who also is using the wrong type of server IIS instead of Apache , please follow the advice of user @River
https://vanillaforums.org/discussion/32533/file-failed-to-upload
5
Answers
You probably have the same issues as this guy here who also is using the wrong type of server IIS instead of Apache , please follow the advice of user @River
https://vanillaforums.org/discussion/32533/file-failed-to-upload
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thanks for your reply @vrijvlinder ! That's good to know. This is my staging site that runs on IIS, and since my production site runs on Apache, I went ahead and upgraded my production site to 2.2.1, thinking it should work fine there. However it gave me a different error. I can access everything in the dashboard, but outside the dashboard I get HTTP 500 error.
I tried checking the error log on the server, but it seems that, strangely, the error log doesn't even exist. (I'm supposed to look for /php_errors.log, is that right?) When the log is not even created and the browser doesn't give any details on the 500 error, is there any other way I can debug this problem? I really appreciate your help.
Ok, an error 500 is a server error. It can be due to outdated plugins. Or simply the need to delete the .ini files in the forum cache.
The error log is enabled by the server configuration. Try to delete the .ini files in the cache after you disable all plugins and use the default theme.
You will need to make sure the htaccess file is correct as well as the config having rewrite url set to true.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder Thanks again. I tried the following but still get the 500 error:
Disable all plugins
Use default theme
Delete .ini files in cache
Set \cache\Smarty\compile folder permission to 777
.htaccess file is correct
Rewrite url is enabled in config
I'm now googling how to enable PHP error logging, haha. (not sure if this is something I can do or I have to ask my hosting company...)
Will post an update if I find any useful information. Much appreciated!
Your host should be able to enable error logs. The CGI error logs should be available with any host. Just ask them how to access your cgi error logs.
Your installation should work out of the box if you have followed the procedures and recommended server software .
It really is not difficult to use this software. A chimp can do it. You just need to follow the steps as described in the open source tutorials and use the recommended server software etc.
There is no file in vanilla that requires 777 permissions which open you up to hacking. 775 is the highest ever needed. Most hosts do not allow 777 on anything.
Chmod permissions are not the same as owner permissions.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder That is absolutely true, Vanilla is very easy to use. I've been happily using it for the past 2 years and have been constantly impressed at how intuitive and user-friendly it is! It's just that, this time, the problem seems quite stubborn...
The documentation I followed for upgrade were
https://vanillaforums.org/discussion/31153/tutorial-a-fool-proof-way-to-do-a-vanilla-upgrade-from-2-1-to-2-2
https://github.com/vanilla/vanilla#upgrading
Oo by the way I got the 777 idea from here, since the issue looked very similar to mine:
https://vanillaforums.org/discussion/24453/solved-new-2-2-installation-dashboard-loads-homepage-doesnt
(just so that I don't look like I'm making things up out of thin air haha)
Okay I'll ask my hosting company about the error log then! Thank you for your help!
I don't think you are making it up at all…. please do not think that. We at this forum are all volunteers and do our best to help out. Sometimes it is our own ineptitude that is not helpful.
However we are willing to help , if you will stick with us trying to help you. Don't abandon Vanilla for a lower quality software because of a few issues. Like the guy in the link I gave you… He likely was inept but I am sure you are not.
Let us help you fix this , because fixing this for you, might be fixing this for others too.
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Check if you have mb_string extension enabled
@vrijvlinder Noooo there's no way I'm abandoning Vanilla! I tested 6 different forum software before launching my website and Vanilla emerged a clear winner.... hence my loyalty No software is perfect and some issues here and there are totally normal. Most of my issues are user errors anyways, haha.
I know everyone here is a volunteer, taking time out of your busy lives to help other users, and I'm really grateful for that. So thank you!
Hi @R_J thanks for the suggestion! I checked my PHP info and confirmed mbstring is enabled.
If you are serious about wanting help. I would suggest you start a new discussion, unless you are still talking about the trigger error, and provide detailed info regarding your current issue.
the other thing I would do is
In your NEW DISCUSSION. state your error message or problem, and provide detailed info.
when you shifted your discussion onto another tangent you left out crucial info.
@vivacelix said:The documentation I followed for upgrade were
https://vanillaforums.org/discussion/31153/tutorial-a-fool-proof-way-to-do-a-vanilla-upgrade-from-2-1-to-2-2
https://github.com/vanilla/vanilla#upgrading
apparently you didn't follow the instructions in the fool-proof tutorial. because you haven't read this part.
your operating system
your version of php
and if you followed steps 5,6,7,8
for vanilla 2.2.1
you have to use php 5.4, 5.5 or 5.6 and definitely NOT php 7.0 or 7.1 (see the install requirements)
I wouldn't recommend php 5.3
meaning did you change php version? to what? what was it before.
state what you did on your production site, and how you upgraded. state your steps -- step by step. and the order you did things. We can read instructions, but we don't know how closely you followed things or where you may have deviated from them.
also post your .htaccess and your config.php (remove passwords and salts and emails addresses).
and preferably a posting of the phpinfo() information. (you can xxx out really private stuff if you need.
personally I would download vanilla 2.2.1 zip and reinstall and double and triple check .htaccess if your web server uses .htaccess and make sure the webserver is capable of re-writing. make sure rewrite module installed. make sure htaccess can override.
we need to determine if the 500 error was a result of php upgrade if any, what you did, or something with your host
Pragmatism is all I have to offer. Avoiding the sidelines and providing centerline pro-tips.
Hi @River , you're right I should have written a new discussion. Sorry. I'll collect the details and write a new question again. Thank you for your time and advices, I really do want to solve this issue and I'll do what it takes.
Hi everyone,
So this is a bit embarrassing, but... it seems that the problem was solved by upgrading PHP from 5.3 to 5.5. Now everything is working flawlessly so far. Go figure...
I really appreciate all your help! Thank you guys!