XF 2.1 i have so much Problem..

BySoft

Member
Openlitespeed php cmd.php xf:convert-utf8mb4 problem is Fixed :)




Today i upgraded from XF 1.5 to 2.4 version but i take like this error message, if you ask me php cmd.php xf:convert-utf8mb4 i did it but dosent work...


How can i fix this problem clearly ?

Error message
  • XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\x98\x81' for column 'message' at row 1
  • src/XF/Db/AbstractStatement.php:217
  • Generated by: xxxx
  • Feb 19, 2020 at 8:43 PM
Stack trace
INSERT INTO xf_search_index (content_type, content_id, title, message, metadata, item_date, user_id, discussion_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE title = VALUES(title), message = VALUES(message), metadata = VALUES(metadata), item_date = VALUES(item_date), user_id = VALUES(user_id), discussion_id = VALUES(discussion_id)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1366, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1366, 'HY000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(218): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/XF/Search/Sourc
 
Last edited:
You will need to run the command again to convert the database.

If you can't then you will need to remove the line from the config.php file for emoji support.
 
You will need to run the command again to convert the database.

If you can't then you will need to remove the line from the config.php file for emoji support.

i must again upgrade my database ? :( ? if i do it my datas will delete ?

or

$config['fullUnicode'] = true; i must delete this line ?

i hope i understand true.


Edit: i try again thi command but on ssh like that wrong giving me ?
php cmd.php xf:convert-utf8mb4
Code:
root@vps581370:/usr/local/lsws/Example/html/forum# php cmd.php xf:convert-utf8mb4
PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_init() in /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php:152
Stack trace:
#0 /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array)
#1 /usr/local/lsws/Example/html/forum/src/XF/Error.php(85): XF\Db\Mysqli\Adapter->getConnection()
#2 /usr/local/lsws/Example/html/forum/src/XF/App.php(2189): XF\Error->logException(Object(Error), true, '')
#3 /usr/local/lsws/Example/html/forum/src/XF.php(170): XF\App->logException(Object(Error), true)
#4 [internal function]: XF::handleException(Object(Error))
#5 {main}
  thrown in /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php on line 152
PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_init() in /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php:152
Stack trace:
#0 /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array)
#1 /usr/local/lsws/Example/html/forum/src/XF/Error.php(85): XF\Db\Mysqli\Adapter->getConnection()
#2 /usr/local/lsws/Example/html/forum/src/XF/App.php(2189): XF\Error->logException(Object(ErrorException), true, '')
#3 /usr/local/lsws/Example/html/forum/src/XF.php(210): XF\App->logException(Object(ErrorException), true)
#4 [internal function]: XF::handleFatalError()
#5 {main}
  thrown in /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php on line 152
root@vps581370:/usr/local/lsws/Example/html/forum# php cmd.php xf:convert-utf8mb4
PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_init() in /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php:152
Stack trace:
#0 /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array)
#1 /usr/local/lsws/Example/html/forum/src/XF/Error.php(85): XF\Db\Mysqli\Adapter->getConnection()
#2 /usr/local/lsws/Example/html/forum/src/XF/App.php(2189): XF\Error->logException(Object(Error), true, '')
#3 /usr/local/lsws/Example/html/forum/src/XF.php(170): XF\App->logException(Object(Error), true)
#4 [internal function]: XF::handleException(Object(Error))
#5 {main}
  thrown in /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php on line 152
PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_init() in /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php:152
Stack trace:
#0 /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php(28): XF\Db\Mysqli\Adapter->makeConnection(Array)
#1 /usr/local/lsws/Example/html/forum/src/XF/Error.php(85): XF\Db\Mysqli\Adapter->getConnection()
#2 /usr/local/lsws/Example/html/forum/src/XF/App.php(2189): XF\Error->logException(Object(ErrorException), true, '')
#3 /usr/local/lsws/Example/html/forum/src/XF.php(210): XF\App->logException(Object(ErrorException), true)
#4 [internal function]: XF::handleFatalError()
#5 {main}
  thrown in /usr/local/lsws/Example/html/forum/src/XF/Db/Mysqli/Adapter.php on line 152
 
My bet would be that the version of PHP symlinked to php is way old and not the same version of PHP which is powering the web server. This isn't entirely uncommon.

Instead of php cmd.php xf:convert-utf8mb4 you will need to specify the full real path to PHP on your server.

For example it could be /usr/local/bin/php or it could be something entirely different.

I suspect if you ran: php -v this would demonstrate that php is actually pointing to a very old version.
 
My bet would be that the version of PHP symlinked to php is way old and not the same version of PHP which is powering the web server. This isn't entirely uncommon.

Instead of php cmd.php xf:convert-utf8mb4 you will need to specify the full real path to PHP on your server.

For example it could be /usr/local/bin/php or it could be something entirely different.

I suspect if you ran: php -v this would demonstrate that php is actually pointing to a very old version.

im using openlitespeed, and what can i do ?

i think my php file there is /usr/local/lsws/lsphp73/bin/php

how can i run this command ?
 
Top Bottom