Why am I getting so many error messages in phpmyadmin localhost? - php

I just set up XAMPP and, when I start the Apache localhost, it displays all of these errors when I search "localhost/phpmyadmin"
I am very new to this (just downloaded XAMPP) and I watched this tutorial: https://www.youtube.com/watch?v=hqfIksHKPPg on setting it up (I didn't install phpmyadmin since it was already installed with XAMPP)
I edited the notepad text files as stated in the video, but instead of a login, I get all of the error messages shown in the above picture...
I also opened config.inc.php and edited the line:
['Servers'][$i]['(MySQL root password)'] = '';$cfg
so it matched MySQL root password
Even if you have a suggestion to fix one of the errors, please still comment
Also, if you need any more information please let me know

You're getting several error messages because you have several problems :)
Cannot connect: invalid settings
Some setting is incorrect, most likely something in your config.inc.php is misspelled or incorrectly copied and pasted. Specifically, if the line ['Servers'][$i]['(MySQL root password)'] = '';$cfg is actually how it appears in your configuration, that is clearly the problem as the line should actually be $cfg['Servers'][$i]['password'] = 'green'; except with you password instead of 'green'...except that only applies if your auth_type is 'config', otherwise the 'password' line isn't used at all (since you're prompted for the password at log in). I'm not sure what XAMPP does here for auth_type, but I don't think you should have had to edit the configuration file at all, since you used the XAMPP installer which should have configured everything.
The server requested authentication method unknown to the client [sha256_password]
This appears to be a bit of a version mismatch in your installed files. Access denied after setting user's password with SHA256 in phpMyAdmin goes in to more detail, but this most often occurs when you've got MySQL 8 and PHP older than 7.4. Normally, I'd suggest upgrading your PHP version — but you're using the packaged XAMPP, which certainly wouldn't ship with conflicting MySQL and PHP versions, so something is odd here. Please confirm for us your MySQL and PHP versions. You didn't happen to have an existing MySQL or PHP installation before you installed XAMPP, did you?
Connection for controluser as defined in your configuration failed
This is probably related to the MySQL 8/PHP 7.4 conflict. There is an administrative user (called the controluser) that phpMyAdmin can use to manage some extra features, ordinarily you wouldn't need it to access phpMyAdmin (only to access those additional features), but it seems XAMPP has configured this for you. Since the authentication fails, you get an additional message that the controluser was not able to connect.
You could bypass this by commenting out the configuration lines referencing controluser and controlpass, although again the XAMPP package should have this all configured so I don't recommend that at this point.
The other messages are basically echoes of the previous messages; you get an additional protocol notification because the controluser is trying the same sha256 connection type that the main user was, and then finally phpMyAdmin is telling you that MySQL rejected the connection.
If this is a fresh XAMPP install, I'd suggest reinstalling, because something got a bit confused. I'd also suggest making sure that you don't have any other conflicting software running — XAMPP is a package of all the included parts, so you don't want to install or run your own Apache or MySQL instance which would interfere with the packaged kit.

Related

WP database error Unknown column ‘wp_’ in ‘field list’ for query SELECT wp_

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.

PHP Warning: oci_connect(): ORA-28040: No matching authentication protocol

I was given a task of fixing an app after the update.
Presumably, the person who updated it said they updated it to 'Oracle 12c' - whatever that means, thought the path is: 'C:/oracle/product/11.2.0/' which sounds like it's still 11.2.0 or whatever.. not important.
Whenever I'm trying to run oci_connect(); with verified and tested credentials, the error pops:
Warning: oci_connect(): ORA-28040: No matching authentication protocol
I've searched around the internet, found 2 solutions:
download and add 'ojdbc8.jar' to 'C:\oracle\product\11.2.0\client_1\jdbc\lib' (hope the path is correct).
add the lines below to 'sqlnet' which I found in:
'C:\oracle\product...\network\admin\' and
'C:\oracle\ora92\newtork\ADMIN'
**I've changed in both to be
sure**.
The lines:
SQLNET.ALLOWED_LOGON_VERSION=8
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8
SQLNET.ALLOWED_LOGON_VERSION_SERVER=8
Same result, neither worked.
Edit:
I've also noticed, there's no oradmin.exe nor oracle.exe in the bin folder, is this normal?
It sounds like the server is updated and now the client fails to connect. In this case the server needs to configured to allow older client to connect. Add the SQLNET parameters to the server sqlnet.ora file and restart the server.

WAMPServer Install - Error on phpMyAdmin login - Error #1193

I'm trying to set up WAMPServer for the first time on my personal computer to do some WordPress work. When I try to log into phpadmin with the root login, I get an error screen. The Error reads as such:
SQL query: Edit
SET lc_messages = 'en_US';
MySQL said:
1193 - Unknown system variable 'lc_messages'
I've tried running PHP version 7.0.10 and 5.6.25 but the errors occurred on both.
I'm running MySQL version 5.7.14
I've tried looking at a StackOverflow forum with the same issue, linked here, but none of the suggested fixes worked for me there, since I'm running a pretty updated version of phpMyAdmin.
The correct name for that parameter is lc-messages note a hyphen and not an underscore.
Have you amended anything in the 'my.ini'?
RE: Your Comment
Then potentially you have another MySQL runing or maybe just a rouge my.ini file on your system.
Search for my.ini and if you find it anywhere other then inside the \wamp\ or \wamp64\ folders, remove or rename it. There should not be one outside the wamp folder structure.
Worked for me
On my system there was another SQL SERVER was running, that was the problem.
Simply go to WAMPMANAGER-> MySQL-> Use a port other than 3306
(In my case, Wamp Manager automatically selected port 3308)
click ok and restart the wamp server.

Apache in MAMP Pro 4 has stopped working, refuses to start

Have been using MAMP Pro for a fair while - version 3 primarily, upgraded to 4 a while ago.
I haven't had any unusual issues at all, but today the Apache service failed to start, telling me to check the error logs. The logs were blank unfortunately... I've made no system configuration changes, no changes to MAMP/MAMP Pro. Shut down my system yesterday, started today, it no longer works...
I've tried numerous suggestions found via Stack Overflow and Google without any success.
Even after completely uninstalling and re-installing MAMP Pro I am unable to get the service to start.
Nothing appears in the logs...
When starting it manually on the command line it comes up with a PHP related error:
$ Applications/MAMP/bin/apache2/bin/apachectl start
httpd: Syntax error on line 135 of /Applications/MAMP/conf/apache/httpd.conf: Cannot load /Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so into server: dlopen(/Applications/MAMP/bin/php/php5.2.17/modules/libphp5.so, 10): image not found
The confusing thing is that I don't have PHP 5.2.17 specified anywhere, at all - according to MAMP Pro it should be using PHP 7.0.12.
If I add PHP 5.2.17 to MAMP using the appropriate MAMP Pro dialogs, Apache still fails to start via the MAMP Pro interface. I can now start it manually from the command line however, but none of my virtual hosts/etc seem to be loaded.
apachectl -V tells me it's using /Applications/MAMP/conf/apache/httpd.conf, but there is nothing in that file that has any reference to any of the configs generated in /Library/Application Support/appsolute/MAMP PRO/conf
It also looks like hosts entries aren't added to /etc/hosts.
Even if I tell /Applications/MAMP/conf/apache/httpd.conf to do nothing but include /Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf (and manually add entries to /etc/hosts) it still doesn't seem to work at all...
I and my colleagues are at a complete loss, especially given it was working yesterday...
Has anyone had any issues like this?
I managed to fix the similar issue you had.
My Apache server was working fine and then following updating to 4.0.6 I experienced similar issues.
There were 2 things I did to fix the issue. I was getting the same error where it couldn't find a php file in 5.2.17. After fixing that by adding 5.2.17 to MAMP I experienced an apache error regarding user permissions.
(22)Invalid argument: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
File > Edit Template > Revert ALL Templates to Default Settings.
Save & restarted the servers and all worked finally and all my hosts had retained as well.
I had previously entered a custom line in my httpd.conf file that for countless versions had copied across fine however it looks like the folder structure had changed and so couldn't locate it causing the unusual error about User permissions. I have since re-entered the custom line with the correct structure and all working fine again.
Hope this helps.

log4php failed connecting to mysql-cluster database in ubuntu12.04

all,
My log4php gets this error in a new server environment.
PHP Warning: log4php: [LoggerAppenderPDO:default]: Failed connecting to database. Closing appender. Error: could not find driver in ../log4php/LoggerAppender.php on line 283
I have the same settings for log4php (1. config.xml file 2.same log4php version) as my local development, which works perfectly. I tried simply log to a file in the new server, it works, which means the log4php lib has no problem. And I can even log to the database in the new server from my local script using local log4php lib, which means my server can recognize log4php logging.
I think this should related to the authentication to the database from the server itself. But have no idea what is the problem and how to solve it. Any idea?
Work around:
After some searches and tests(script using PDO not mysqli to connect to the database,reference here) , I confirm the problem is caused by lacking of pdo_mysql related driver, as akluth pointed out. I tried to re-install php5-mysql, but it failed, I tried to modify php.ini, got more errors. I think that is because the mysql-cluster settings maybe different from normal mysql. As the new server is a production server, we decide not to touch it and move the scripts to other server with normal mysql settings.

Categories