Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Bonk Error when attempting to Edit/Add Roles
r0obert
✭
Fatal Error in PDOStatement.execute();
PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
The error occurred on or near: /home/satforum/public_html/library/database/class.database.php
289: $PDOStatement = $this->Connection()->prepare($Sql); 290: 291: if (!is_object($PDOStatement)) { 292: trigger_error(ErrorMessage('PDO Statement failed to prepare', $this->ClassName, 'Query', $this->GetPDOErrorMessage($this->Connection()->errorInfo())), E_USER_ERROR); 293: } else if ($PDOStatement->execute($InputParameters) === FALSE) { 294: trigger_error(ErrorMessage($this->GetPDOErrorMessage($PDOStatement->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR); 295: } 296: } else { 297: $PDOStatement = $this->Connection()->query($Sql);
What's wrong (line 293)?
Application: Vanilla
Application Version: 2.1
PHP Version: 5.4.27
Operating System: Linux
Server Software: Apache
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.114 Safari/537.36
Request Uri: /role/edit/40
Controller: PDOStatement
Method: execute
Tagged:
0
Comments
follow these steps and see if the problem goes away.
http://vanillaforums.org/discussion/comment/199091/#Comment_199091
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I've tried everything you said, including chmod smarty/compile to 777 and clearing .ini files from cache.
Still not working. I inserted this $Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php'; in my config.php and now I get this error (line 294 in library/database/class.database.php):
Fatal Error in Gdn_Database.Query();
What next? Should I do a fresh vanilla install on my server and if it's still not working file issue on github?
Any thoughts would be appreciated, thanks!
and see if it works. (could be your role table or something is corrupted).
so a fresh install might be the ticket,
that is what i would do, others might do something different.
try a fresh install and see what happens, obviously you have pdo enabled and you are not in mysql strict mode - correct?
I can edit roles and so can others, so if a fresh install doesn't solve issue, you have either an edge case or your php doesn't have the correct extensions or all the extensions it needs (i guess).
Although I don't use php 5.4, but certainly others are using php 5.4 and not having issues.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I'm not sure how to check for that really.
I did a fresh install w/o importing my db and it worked. What next?
what do you want to do next?
you might have a corrupted roles and/or permissions table. I would create a mysql dump (backup) of the role table and permissionss table for the newly installed database.
use phpmyadmin to import the old db data. make sure you empty tables before you import.
then clear the .ini files and do /utility/update and utility/structure.
if you still can't edit after the import, load the permissions and role table that you dumped earlier from new install (after you empty) and go through all the permissions in dashboard with a fine tooth comb to set how you want. then verify all users have valid roles.
If you run into the problem because you have a huge amount of roles that could be the problem.
then enable plugins.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine thanks!
I just want to get this straight so I don't mess up in phpmyadmin:
basically export GDN_Permission & GDN_Role for my fresh install?
truncate my old tables and import the ones I exported in the step above? or import old tables into the new install after dumping + emptying them?
Sorry for the confusion, but I'm not entirely sure what we're trying to accomplish.
obviously make sure you have backups of your real data.
step 1:
yes.
step 2:
truncate the tables in the freshly created vanilla that you said worked.
import the ones from your old live database into the new fresh install.
if there was corruption, this may even help - just the act of importing via phpmyadmin.
run utility/update utility/structure and clear the .ini
if you still get the same error.
truncate GDN_Permission & GDN_Role in the new install.
import the the two tables that you dumped from step 1
go through all the permissions in dashboard with a fine tooth comb to set how you want. then verify all users have valid roles.
If you run into the problem because you have a huge amount of roles that could be the problem.
then enable plugins.
run utility/update utility/structure and clear the .ini
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
#1054 - Unknown column 'Garden.Applicants.Manage' in 'field list'
more info:
3) export the whole database from your old live installation.
there will be options for export in phpmyadmin.
options:
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Done.
and does it work?
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
No, same error. I also did run utility/update utility/structure and cleared the .ini files.
if you still can't edit after the import, load the permissions and role table that you dumped earlier from new install (after you empty) and go through all the permissions in dashboard with a fine tooth comb to set how you want. then verify all users have valid roles.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
And after I've done all that, how do I move the new install back to root on my server (it's currently in /folder)?
first see if it works then we can worry about the rest.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
we assume the source code is the same in both installations because you said that earlier in this thread.
if the new datatabase works for you and you can edit roles. and you've double checked all users for the correct roles. and you've checked the permissions for each role and everything is the way you want it with all discussions and comments and everything else correct.
and you are absolutely sure you like it. the new one, that is.
then just modify the config.php in your root. (the old installation)
take the following statements from the (newinstallation config.php.) and paste them in to your root installation config and you will essentially just swap databases to your old installation.
delete the ini files in cache
and
run/utility/update.
enable all plugins.
and double check roles and permissions are what you want for each role and users have correct roles again.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Done.
Still not working.
Fatal Error in PDOStatement.execute();
PDOStatement::execute(): SQLSTATE[HY093]: Invalid parameter number: parameter was not defined (line 293)
A few notes:
a) I keep getting logged off while trying to make changes to roles/permissions
b) I keep getting Need to re-index theme cache/Need to re-index plugin cache message
c) I can edit Admin role, but not when it comes to custom category permissions (I get that error)
d) I can create new role, but I get error if I save it (no matter the changes) and when I go back to the Roles & Permissions (after closing error screen) I can see that role there, BUT it has zero permissions set, it's blanc
what did you do. you give me error, but you say not what step you are at and what you did so far.
(don't say everything) tell me step by step what you did.
you can't have two different vanilla's running in the same browser, unless you change one of the config.php's to reflect different cookies.
put this in one of the configs, if you are running both vanilla's at the same time.
$Configuration['Garden']['Cookie']['Name'] = 'vanilla21';
its normal.
go into categories and try to edit there.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
>
Done this. Loaded the permissions+role tables that I dumped from the new db into the new install and when I tried to go through all the permissions I got that error again.
I understand now.
can you edit the categories by going into categories.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.