Please do not close this question, it's not a duplicate and the suggested link explaining how to use quotes on MySQL does nothing for me since this problem is inside a WP script. Thanks
I’m trying to install WP 5.4.1 on a clean Windows 2019 Server virtual machine.
I didn’t use Microsoft Web Platform Installer since it download old versions of WP / MySQL and PHP, so I’m trying to install from scratch.
Here are the steps I’ve taken:
Downloaded and Installed latest PHP 7.4.5, non thread safe version
and installed it
renamed php.ini-production to php.ini
Edited php.ini to:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
extesion=mysqli (removed the semicolon here since PHP needs this driver to connect to MySQL8)
In IIS I created the *.php mapping and added default.php and index.php
Created the dummy phpinfo.php file and tested on IIS, all working correctly and phpinfo() shows data
Downloaded MySQL 8.0.20 and installed with the following options:
Server only
Standalone
Server computer
For the authentication method I choose ‘Use Stron password encryption’ as suggested by the PHP installer
added MySQL BIN folder to path environment variable
opened %PROGRAMDATA%\MySQL\MySQL Server 8.0\my.ini and disabled sha2 and enable native_password:
;default_authentication_plugin=caching_sha2_password
default_authentication_plugin=mysql_native_password
created a new database for WP, called wp1 (in MySQL 8, the ‘one liner’ to create the user and grant access at the same time doesn’t work, so we need to do it in 2 lines)
mysql -u root -p
create database wp1;
CREATE USER ‘wp1’#’%’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON wp1.* TO ‘wp1’#’%’;
FLUSH PRIVILEGES;
EXIT
created the folder C:\intepub\wwroot\wp1 and give full access to IUSR and Users windows groups so WP can write the config files
In IIS, right click on the Default Web Site and click on Add Application pointing to the new wp1 folder
navigate to localhost/wp1 to start WP installation
So after selecting the language and entering the DB info, I get this error
WordPress database error Unknown column ‘wp_’ in ‘field list’ for query SELECT wp_
After hours fighting with this, here’s what I found:
the error came from the DB, not WP.
tried with both wp1 and root users during the installation
tried with both localhost and 127.0.0.1 during the installation
the error generates in setup-config.php file, line 315 $wpdb->query("SELECT $prefix")
seems the problem is that what arrives at MySQL is the string select wp_ insted of select 'wp_' (note the missing quotes)
If I go to MySQL and execute select wp_ I get the exact same error
So the issue seems to be related to how MySQL 8.0 is handling quotes in the query it receives from WP installer…
I restored a snapshot just before installing MySQL 8.0.20 and this time, instead of
Use Strong Password Encryption for Authentication
I selected
Use Legacy Authentication Method (Retain MySQL 5.x Compatibility) but the error is still the same
Before answering, please consider:
I’m looking to solve the issue, not to start a discussion whatever I should use MySQL 5.x instead of MySQL 8.x
Yes, the connection to the database is Ok, that’s not the problem, please read all the my post
Yes, wp-config is being written with the correct values
Even tough I saw many messages with this same error on the WP forum, they normally have no answer, or the answer don’t make any sense (like asking to OP to check the DB credentials and write access to the WP folder), still I posted on the WP forum, but I no answer yet.
Sorry for my poor formatting!
Can anyone please help?
Finally found the issue...
TLDR; edit your php.ini and make sure you have both:
display_errors = On
error_log = php_errors.log
Setting error_log solves the issue... I guess that when error_log has no value (default configuration), PHP decides to send the error back to the calling program, resulting in the error message column 'wp_' in 'field list' during the WP installation.
More details here
I just deleted lines 317 to 322 in wp-admin\setup-config.php re-ran the setup and it all worked fine.
Might not be the right solution but the only thing that worked for me.
This was for WP 5.5.3, previous versions I had no issues downloading and installing
This error is possible if WordPress version doesn't support server's PHP version.
In my case I recently installed the latest XAMPP with PHP 8.1.1 and had to downgrade PHP to 8.0.14 in order for WordPress 5.8.2/5.8.3 to be installed and work properly.
I just deleted lines 317 to 322 in wp-admin\setup-config.php re-ran the setup and it all worked fine.
Might not be the right solution but the only thing that worked for me.
This was for WP 5.5.3, previous versions I had no issues downloading and installing
Same for me on version 5.6.2 when trying to install a second site using the same database so needed new table prefix
None of the above solutions is worked for my case. Because I have already installed Mysql workbench on my windows machine. I stopped the already running mysql server, I have followed the below mentioned steps.
Open command prompt, then navigate to the following path
C:\Program Files\MySQL\MySQL Server 8.0\
Then ran the following command
mysqladmin -u root -p shutdown
After that I restarted the apache and mysql on xampp server it is working fine.
I found a solution, for me the problem was in php folder (exactly "php.ini" file), so to get the standard settings I just installed windows server 2019 in VMWare then installed "php 7.4" using web platform, then I copied the PHP folder from VMWare "C:\Program Files (x86)\PHP\v7.4" to my PC (windows10), then I download "wordpress5.8.2", and "mysql8.0.1", after installing mysql and creating DB for wordpress(just create DB) and setup the IIS in my windows10, I ran localhost and every thing working good and wordpress installed without any errors.
So try to get the php.ini that installed with web platform and overwrite it on your php folder and run, if it does not work try to copy the whole php folder and try again, I tried this with php 8.0 but have many errors.
Please see the above picture and help me fix this issue.
As the error message says, you need to enable mbstring.
If you use cPanel and you have or can find out the username and password, this is done by logging in to cPanel at http://yourwebsite.com/cpanel (update the name to the url of your website obviously) and clicking on the "Select PHP Version" tool as shown below:
In the PHP Selector tool, enable mbstring by ticking the check box and clicking the Save button:
I'm using...
PHP version 5.4.28
Filezilla
Wordpress
cPanel
MediaTemple hosting
I get this error Fatal error: Call to undefined function mysqli_connect(),
after trying to connect to my database with mysqli functions. I've read online that either mysqli isn't enabled, it may not be installed. I know I have to check my php.ini file located in /usr/local/lib/, but I don't how know look for that. I'm using cPanel's WHM and it looks like this... cpanel WHM
Any suggestions?
If you have WHM you can see and install PHP modules via Easy Apache.
1) Search "Easy Apache" in search box of WHM
2) Click "show more" from DEFAULT profile.
3) You can see all installed modules. Check for MySQL Improved. It's mysqli.
You need to create phpinfo page in your account through cPanel file manger and then try to browse that to check all php information of your server.
Here are the php code of phpinfo page.
<?php
phpinfo();
php?>
I recently moved to an unmanaged VPS and added a Joomla component to a client website and received the following error when attempting to use a specific part of the component.
Fatal error: Call to undefined function mb_strtolower() in /home/oursite/public_html/components/com_rsfiles/helpers/files.php on line 135
I'm sure if this was on a shared machine the error would not have been thrown because they would have configured the server to accept it. But that is not my case. I have to configure it to work.
The original error lead me to identify if mbstring was enabled on our server and it was not.
So I wondered how I could enable it. Googled it! found it may be a derivative of the php.ini file so I tried to enable it using this php.ini definition. zend.multibyte = 1. After adding the line I restarted the Apache web server but the php info page still showed it disabled. :-(
After making the above modification I received a different error when attemoting to access the same page throwing the original error. This is the new error:
Fatal error: Could not convert the script from the detected encoding "UTF-8" to a compatible encoding in /home/psgadmincore/public_html/libraries/legacy/controller/legacy.php on line 609
There are 8 other mbstring items in the php.ini file but they are all commented out.
;mbstring.language = Japanese
;mbstring.internal_encoding = EUC-JP
;mbstring.http_input = auto
;mbstring.http.output = SJIS
;mbstring.encoding_translation = On
;mbstring.detect_order = auto
;mbstring.substitute_character = none
;mbstring.func_overload = 0
I un-commented all of these thinking they had to be enabled also, but the "Could not convert the script" error is returned.
Can someone please direct me to a procedure that outlines the steps necessary to include the "Multibyte String library"?
CENTOS 6.7 x86_64 virtuozzo w/Cpanel - php 5.4.33
These sites have not help me:
http://php.net/manual/en/ref.mbstring.php
http://php.net/manual/en/ini.core.php#ini.zend.multibyte
Thank you
After #ceejayoz response I though I would upgrade the php build to 5.6. I used EasyApache in the WHM to carry out the process below. During the upgrade I was able to select mbstring module in the Exhaustive Options List.
Log in to WHM as the 'root' user. In the Find box type easy. Click
EasyApache (Apache Update). Leave default, and then click the gear
icon (Customize Profile).
Leave default, and then click Next Step.
Click Exhaustive Options List. (this is where I selected the
mbstring module)
Click the name of the Apache or PHP module, and then click Save and build.
I have problem for installation OpenCart in cPanel with Softacolous, when I'm finished for install and during open the site I have message:
Fatal error: Class 'mysqli' not found in /home/radiance/public_html/shoukhin/system/library/db/mysqli.php on line 7
==Info:==
OpenCart:
Version: 2.0.3.1, 1.5.6.4
Release Date: 29-05-2015
Anything more to solve or get ans? Anyone there to solve it?
Please install mysqli into your centos server .
To install mysqli using EachApache:
Login to WHM as 'root' user.
Either search for "EasyApache" or go to Software > EasyApache
Scroll down and select a build option (Previously Saved Config)
Click Start "Start customizing based on profile"
Select the version of Apache and click "Next Step".
Select the version of PHP and click "Next Step".
Choose additional options within the "Short Options List"
Select "Exhaustive Options List" and look for "MySQL Improved extension"
Click "Save and Build"
I recently faced the same issue, that Class mysqli not found. And found out that this particular issue is not related to OpenCart. It is related to the PHP version that your OpenCart is using and the PHP version that your server is supporting.
So make sure sure PHP version mentioned during configuration is matched with PHP version that your server is running.
In my case my server was running PHP 7.4 and OpenCart was configured for PHP 7.3. So the problem was solved by changing my server's PHP version to 7.3.
And lived Happily forever after....
In cPanel, just goto your php version, make sure you are on 7.3 and enable nd_mysqli. That fixed it for me.