PHP Exception

2 months 1 week ago - 2 months 1 week ago #324227 by silverman1
Replied by silverman1 on topic PHP Exception
Yes it returns a message with id 789.

Not sure there is any easy way to reproduce this. Most of the messages seem to work with no error. So maybe you have to send hundreds of messages to get one error.

And yesterday I got a different PHP exception mail. Could this be because there is a smiley in the username? (It shows a questionmark here when I paste it as code)

A PHP Exception occurred on your site. Here you can find the stack trace:

Exception Type: JDatabaseExceptionExecuting
File: public_html/libraries/joomla/database/driver/mysqli.php
Line: 665
Message: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='


#0 public_html/libraries/joomla/database/driver.php(1740): JDatabaseDriverMysqli->execute()
#1 public_html/libraries/CBLib/CBLib/Database/Driver/CmsDatabaseDriver.php(345): JDatabaseDriver->loadResult()
#2 public_html/components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php(609): CBLib\Database\Driver\CmsDatabaseDriver->loadResult()
#3 public_html/components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php(777): CBfield_predefined->checkAliasExists('John')
#4 public_html/components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php(634): CBfield_predefined->validate(Object(CB\Database\Table\FieldTable), Object(CB\Database\Table\UserTable), 'username', 'John', Array, 'register')
#5 public_html/libraries/CBLib/CB/Legacy/cbPluginHandler.php(885): CBfield_predefined->prepareFieldDataSave(Object(CB\Database\Table\FieldTable), Object(CB\Database\Table\UserTable), Array, 'register')
#6 public_html/libraries/CBLib/CB/Legacy/cbPluginHandler.php(1081): cbPluginHandler->call(1, 'prepareFieldDat...', 'CBfield_predefi...', Array)
#7 public_html/libraries/CBLib/CB/Legacy/cbTabs.php(1177): cbPluginHandler->callField('predefined', 'prepareFieldDat...', Array, Object(CB\Database\Table\FieldTable))
#8 public_html/libraries/CBLib/CB/Database/Table/UserTable.php(452): cbTabs->saveTabsContents(Object(CB\Database\Table\UserTable), Array, 'register')
#9 public_html/libraries/CBLib/CB/Database/Table/UserTable.php(879): CB\Database\Table\UserTable->bindSafely(Array, 1, 'register', Object(CB\Database\Table\UserTable))
#10 public_html/components/com_comprofiler/comprofiler.php(1041): CB\Database\Table\UserTable->saveSafely(Array, 1, 'register')
#11 public_html/components/com_comprofiler/comprofiler.php(132): saveRegistration('com_comprofiler')
#12 public_html/libraries/src/Component/ComponentHelper.php(402): require_once('/home/u196...')
#13 public_html/libraries/src/Component/ComponentHelper.php(377): Joomla\CMS\Component\ComponentHelper::executeComponent('/home/u196...')
#14 public_html/libraries/src/Application/SiteApplication.php(194): Joomla\CMS\Component\ComponentHelper::renderComponent('com_comprofiler')
#15 public_html/libraries/src/Application/SiteApplication.php(233): Joomla\CMS\Application\SiteApplication->dispatch()
#16 public_html/libraries/src/Application/CMSApplication.php(196): Joomla\CMS\Application\SiteApplication->doExecute()
#17 public_html/index.php(49): Joomla\CMS\Application\CMSApplication->execute()
#18 {main}

Request information
GET variables

Array
(
    [Itemid] => 186
    [option] => com_comprofiler
    [view] => saveregisters
    [task] => saveregisters
)

POST variables

Array
(
    [id] => 0
    [gid] => 0
    [emailpass] => 0
    [cbsecuritym3] => cbm_33829bb2
    [cbrasitway] => cbrv1_e2ad9c7e
    [name] => Tony
    [cb_age] => 26-30
    [cb_country] => United States
    [username] => John?
    [email] => xxx@outlook.com
    [password] => xxx
)

COOKIE variables

Array
(
    [_ga] => GA1.1.1950194638.16177116
    [_ga_9QSB3ZGZM0] => GS1.1.16177116.1.1.16177223.0
    [99547323dbb5efb391105420017e7] => 60009b729262c44a9df827ea477e9
    [reDimCookieHint] => 1
    [__cfduid] => d3bc77a1d7ed66116e5e51bd1b2ea11617730092
)

REQUEST variables

Array
(
    [Itemid] => 186
    [id] => 0
    [gid] => 0
    [emailpass] => 0
    [cbsecuritym3] => cbm_33829bb2_582bf149_768be387484603200f
    [cbrasitway] => cbrv1_e2ad9c7eea2ff76392a673dbd5ce_ZWXHfqg
    [name] => Tony
    [cb_age] => 26-30
    [cb_country] => United States
    [username] => John?
    [email] => xxx@outlook.com
    [password] => xxx
    [_ga] => GA1.1.1950194638.1617730
    [_ga_9QSB3ZGZM0] => GS1.1.1617730116.1.1.1617730.0
    [99547323dbb5efb391412420017e7] => 60009bff7262c44a9df8277e9
    [reDimCookieHint] => 1
    [__cfduid] => d3bc77a1d7ed6611bdbd411617730092
    [option] => com_comprofiler
    [view] => saveregisters
    [task] => saveregisters
)

SERVER variables

Array
(
    [LSPHP_ProcessGroup] => on
    [PATH] => /usr/local/bin:/bin:/usr/bin
    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    [HTTP_ACCEPT_ENCODING] => gzip
    [HTTP_ACCEPT_LANGUAGE] => en-gb
    [HTTP_CONNECTION] => Keep-Alive
    [CONTENT_TYPE] => multipart/form-data; boundary=----WebKitFormBoundaryxHPLTjFUMGqq81ni
    [CONTENT_LENGTH] => 1381
    [HTTP_COOKIE] => _ga=GA1.1.1954638.1610116; _ga_9QSB3ZGZM0=GS1.1.1617730116.1.1.1617730223.0; 99547323dbb5efb11054420017e7=60b729ff7262c44af827ea477e9; reDimCookieHint=1; __cfduid=d3bc77a7ed66116e5e51bdbd41b2ea11617730092
    [HTTP_HOST] => www.site.com
    [HTTP_REFERER] => /signup
    [HTTP_USER_AGENT] => Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Mobile/15E148 Safari/604.1
    [HTTP_X_FORWARDED_FOR] => 2a02:c7f:bb1b:d400:74f0:87be:48bc:66ef
    [HTTP_CF_IPCOUNTRY] => GB
    [HTTP_CF_RAY] => 63bcc4862beb38d2-ATH
    [HTTP_X_FORWARDED_PROTO] => https
    [HTTP_CF_VISITOR] => {"scheme":"https"}
    [HTTP_ORIGIN] => 
    [HTTP_CF_CONNECTING_IP] => 2a02:c7f:bb1b:d400:74f0:87be:48bc:66ef
    [HTTP_CDN_LOOP] => cloudflare
    [HTTP_CF_REQUEST_ID] => 0949d27db0038d0c8ac0000001
    [DOCUMENT_ROOT] => public_html
    [REMOTE_ADDR] => 2a02:c7f:bb1b:d00:74f0:87be:48bc:66ef
    [REMOTE_PORT] => 61068
    [SERVER_ADDR] => 15.24.18.13
    [SERVER_NAME] => www.site.com
    [SERVER_ADMIN] => 
    [SERVER_PORT] => 443
    [REQUEST_SCHEME] => https
    [REQUEST_URI] => /component/comprofiler/saveregisters?Itemid=186
    [REDIRECT_URL] => /component/comprofiler/saveregisters
    [REDIRECT_QUERY_STRING] => Itemid=186
    [PROXY_REMOTE_ADDR] => 17.68.62.19
    [HTTPS] => on
    [HTTP_AUTHORIZATION] => 
    [REDIRECT_STATUS] => 200
    [SSL_PROTOCOL] => TLSv1.3
    [SSL_CIPHER] => TLS_AES_128_GCM_SHA256
    [SSL_CIPHER_USEKEYSIZE] => 128
    [SSL_CIPHER_ALGKEYSIZE] => 128
    [SCRIPT_FILENAME] => public_html/index.php
    [QUERY_STRING] => Itemid=186
    [SCRIPT_URI] => /component/comprofiler/saveregisters
    [SCRIPT_URL] => /component/comprofiler/saveregisters
    [SCRIPT_NAME] => /index.php
    [SERVER_PROTOCOL] => HTTP/1.1
    [SERVER_SOFTWARE] => LiteSpeed
    [REQUEST_METHOD] => POST
    [X-LSCACHE] => on
    [PHP_SELF] => /index.php
    [REQUEST_TIME_FLOAT] => 1617730474.1178
    [REQUEST_TIME] => 1617730474
)

Please Log in to join the conversation.

2 months 1 week ago - 2 months 1 week ago #324243 by krileon
Replied by krileon on topic PHP Exception

Yes it returns a message with id 789.

I don't know what to suggest then. The query is clearly working fine.

Not sure there is any easy way to reproduce this. Most of the messages seem to work with no error. So maybe you have to send hundreds of messages to get one error.

My test site has over 1 million private messages. I'm still unable to reproduce your issue, but will continue looking for possible causes.

And yesterday I got a different PHP exception mail. Could this be because there is a smiley in the username? (It shows a questionmark here when I paste it as code)

No, that's due to you having 2 different collations in your database. You have 1 table using utf8_general_ci and another using utf8mb4_general_ci. Looks like _users and _comprofiler don't have same collations.

You should be able to fix that with phpmyadmin. In phpmyadmin after selecting either of those tables click Operations then set Collation to utf8mb4_general_ci and select the "Change all column collations" checkbox then click Go. If you have multiple tables in your database with a wrong collation then you can apply this to your entire database in phpmyadmin by selecting your database click Operations then set Collation to utf8mb4_general_ci and select both "Change all tables collations" and "Change all tables columns collations" checkboxes then click Go. Please make a backup before doing this.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.405 seconds