XF 1.1 An unexpected database error occurred. Please try again later.

  • Thread starter Thread starter vVv
  • Start date Start date
V

vVv

Guest
I tried searching on this before, even tried doing the "ini_set('memory_limit', -1);" in config.php file, and it's been sporadically happening. (usually thats just for normal "unexpected errors" not database errors, i'm tired lmao.) >_<. Host already has a ticket on it, and tried something too.. still got one just tonight.

Viewing page source.. All I seen was..

An unexpected database error occurred. Please try again later.
<!-- Mysqli statement execute error : Prepared statement needs to be re-prepared -->

Sent host that above, and they're saying "We are not seeing the provided error anywhere in the source at footish.xxx. Have you tried clearing your cache and refreshing/restarting your browser? Please let us know." :rolleyes: lol.

Not sure what's going on, or what it could be... Most cases, there's not even a server error log on it either. Sometimes it just takes few seconds or minutes, refresh the page and it's back up again.

Edit; Tonight though I had been doing some edits/testing on a resource, which got some server errors around the time I got above error though.

Code:
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Field 'reglog_username' doesn't have a default value - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, 57 minutes ago
Stack Trace
 
#0 /home/myuser/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/myuser/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/myuser/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `EW...', Array)
#3 /home/myuser/public_html/library/XenForo/DataWriter.php(1591): Zend_Db_Adapter_Abstract->insert('EWRutiles_reglo...', Array)
#4 /home/myuser/public_html/library/XenForo/DataWriter.php(1580): XenForo_DataWriter->_insert()
#5 /home/myuser/public_html/library/XenForo/DataWriter.php(1381): XenForo_DataWriter->_save()
#6 /home/myuser/public_html/library/EWRutiles/Model/Registration.php(40): XenForo_DataWriter->save()
#7 /home/myuser/public_html/library/EWRutiles/ControllerPublic/Register.php(33): EWRutiles_Model_Registration->submitLog(Array, Array)
#8 /home/myuser/public_html/library/XenForo/FrontController.php(310): EWRutiles_ControllerPublic_Register->actionRegister()
#9 /home/myuser/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/myuser/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
 
Request State
 
array(3) {
  ["url"] => string(36) "http://footish.xxx/register/register"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(13) {
    ["username"] => string(8) "spencerp"
    ["email"] => string(22) "ungaizeb69@hotmail.com"
    ["password"] => string(6) "blahblah"
    ["password_confirm"] => string(6) "blahblah"
    ["dob_month"] => string(1) "6"
    ["dob_day"] => string(2) "28"
    ["dob_year"] => string(4) "1976"
    ["gender"] => string(4) "male"
    ["timezone"] => string(16) "America/New_York"
    ["public_uuid"] => string(25) "1aa9d8e738c250a49986751f2"
    ["custom_img_captcha_response_field"] => string(5) "spoon"
    ["agree"] => string(1) "1"
    ["_xfToken"] => string(0) ""
  }
}

That's probably it, the reason for tonight's database error. But I've gotten that above error before though, and no server logs were made... Maybe a quirky resource? lol!
 
That error appears to be generated by XenUtiles.

I would probably look at disabling that first. The cause appears to be because of a database field that doesn't have a default value so a row is added to the database and all of the fields either get data or have a default value, but this one field reglog_username doesn't have any data added nor does it have a default value so this error is thrown.

But if these errors are sporadically happening then I'd keep pushing your hosts.
 
That error appears to be generated by XenUtiles.

I would probably look at disabling that first. The cause appears to be because of a database field that doesn't have a default value so a row is added to the database and all of the fields either get data or have a default value, but this one field reglog_username doesn't have any data added nor does it have a default value so this error is thrown.

But if these errors are sporadically happening then I'd keep pushing your hosts.

Yeah... :)

Edit; Tonight though I had been doing some edits/testing on a resource, which got some server errors around the time I got above error though.

Adam suggested about removing the part of the resource where it calls on / checks the usernames, because they're too strict some times. Which I was testing tonight/this morning lol. When joining with username with that resource installed... "vVv" .. I'm denied, because in their spam database... user "vvv1234" or "vvvJohnlkjl" is in there. I'm denied. In the resource, there's no way to avoid username strict/less strict option. Trying to do it, so when signing up as "John" is fine, even though they have "JohnSpammer" in the database. Even when I tried joining as "spencerp" my old username, I was denied because "spencerpatrick@blah.com" was in their database. Wanted to do it, to where it really just checked for IP and email address lol.
 
Even more simple than that, I would find out what database table that reglog_username field belongs to using PHP My Admin.

When you're browsing the table click Structure. Find the reglog_username field and give it a default value of 0 or NULL.

That will solve the problem.
 
Even more simple than that, I would find out what database table that reglog_username field belongs to using PHP My Admin.

When you're browsing the table click Structure. Find the reglog_username field and give it a default value of 0 or NULL.

That will solve the problem.

lmao.. I love even more simple... haha. Will give that a go.. xD Thanks Chris!
 
Oh, and then report it to Jaxel so he can fix it!

yeah, it was brought up in his thread a few times I guess.. I guess as "default" stopforumspam checks/and other spam database checks... they use the username checking, so that's probably why he left it alone and didn't do anything with it. I remember with vBulletin 4.2.0. StopForumSpam plugin, they had option to uncheck the username checking...or, "less strict username checking" lol. Which then only asked the plugin to check the IPs and Email Address against spam database entries, which I liked.
 
Dang, I found that and gave it "Null" and even "0" instead of 255 in values field.. tried signing up, and got server error. But leaving value as 255, and giving it Null.. said I was denied, found username in their database lol. The only way it appears to work, is file edits so far. http://xenforo.com/community/threads/8wayrun-com-xenutiles-tools.26860/page-7#post-443219

Edit: Unless there's another area in another table to do the same thing for it.. I haven't done that so...
 
You'd need to see if the error changes at all, paste it here if you're unsure.

right, just tired haha.. here's other error after doing what you suggested.. :)

Code:
Server Error Log
Error Info
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Data too long for column 'reglog_username' at row 1 - library/Zend/Db/Statement/Mysqli.php:214
Generated By: Unknown Account, Today at 4:25 AM
Stack Trace
 
#0 /home/myuser/public_html/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /home/myuser/public_html/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/myuser/public_html/library/Zend/Db/Adapter/Abstract.php(574): Zend_Db_Adapter_Abstract->query('INSERT INTO `EW...', Array)
#3 /home/myuser/public_html/library/XenForo/DataWriter.php(1591): Zend_Db_Adapter_Abstract->insert('EWRutiles_reglo...', Array)
#4 /home/myuser/public_html/library/XenForo/DataWriter.php(1580): XenForo_DataWriter->_insert()
#5 /home/myuser/public_html/library/XenForo/DataWriter.php(1381): XenForo_DataWriter->_save()
#6 /home/myuser/public_html/library/EWRutiles/Model/Registration.php(41): XenForo_DataWriter->save()
#7 /home/myuser/public_html/library/EWRutiles/ControllerPublic/Register.php(33): EWRutiles_Model_Registration->submitLog(Array, Array)
#8 /home/myuser/public_html/library/XenForo/FrontController.php(310): EWRutiles_ControllerPublic_Register->actionRegister()
#9 /home/myuser/public_html/library/XenForo/FrontController.php(132): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/myuser/public_html/index.php(13): XenForo_FrontController->run()
#11 {main}
 
Request State
 
array(3) {
  ["url"] => string(36) "http://footish.xxx/register/register"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(13) {
    ["username"] => string(8) "spencerp"
    ["email"] => string(23) "emmymatthews1@gmail.com"
    ["password"] => string(6) "blahblah"
    ["password_confirm"] => string(6) "blahblah"
    ["dob_month"] => string(1) "6"
    ["dob_day"] => string(2) "28"
    ["dob_year"] => string(4) "1976"
    ["gender"] => string(4) "male"
    ["timezone"] => string(16) "America/New_York"
    ["public_uuid"] => string(25) "b4af43a5048f50a4b45847307"
    ["custom_img_captcha_response_field"] => string(5) "screw"
    ["agree"] => string(1) "1"
    ["_xfToken"] => string(0) ""
  }
}
 
Data too long?

That doesn't really make sense...

That field once changed should look something like this:
i7Ez4.png


Notice the length is 255 so I don't know how the data can be too long, and the default value I have defined as 0.
 
Data too long?

That doesn't really make sense...

That field once changed should look something like this:
i7Ez4.png


Notice the length is 255 so I don't know how the data can be too long, and the default value I have defined as 0.

yeah...
Dang, I found that and gave it "Null" and even "0" instead of 255 in values field.. tried signing up, and got server error. But leaving value as 255, and giving it Null.. said I was denied, found username in their database lol.

But I didn't try yours above there though, I just made Default: NULL ... Not "As Defined: 0" .. lol. In my quote above, I made "length/value "0" not 255 though too. But when I left it 255, and made "default" .. "NULL"... i had issues. said I was denied, found username in their database
 
The length has to be kept at 255.

I said the solution would be to set it as NULL or 0 so if NULL didn't work, try 0. If that still doesn't work then you will have to disable the add-on and wait for a solution from Jaxel.
 
Annoying server problem. See this thread, and specifically my post where I posted some possible fixes:

http://xenforo.com/community/threads/error-on-install.17901/#post-236565

Thanks Jake... I'm not sure if I can do that stuff though, since I'm on Shared hosting and I don't think the host likes being pointed to "what should be done", or their own issues with things, cause it's like telling them they don't know what they're doing haha. I can try though... and see what they say. :)
 
Thanks Jake... I'm not sure if I can do that stuff though, since I'm on Shared hosting and I don't think the host likes being pointed to "what should be done", or their own issues with things, cause it's like telling them they don't know what they're doing haha. I can try though... and see what they say. :)

They wrote back with...

I'm not sure this can be done on a shared server but we'll look into this.

Unfortunately these mysql customizations are not an option on shared hosting.

If you are interested in upgrading to a dedicated server we could customize the specific
mysql build to your needs.

http://certifiedhosting.com/managed-dedicated-servers/

Please let us know if there is anything else.

:rolleyes: That would figure..

I replied back with...

"hey, just as i suspected.. *eyeroll* ... this is stuff that should be done regardless what hosting plan anyone is on.. its vital, updates, to allow peoples websites to run smoothly.. not just some "additional feature" to help spice up the hosting account... because random customers "want it".. it's necessity... not a "want". TBH, this is the worst host company I've ever come across since 2000 / 2001 of being on the internet... lol. "
 
Back
Top Bottom