PhpMyAdmin Error - php

Trying to fix the problem causing this error message, "Your PHP MySQL library version 5.1.54 differs from your MySQL server version 5.5.7. This may cause unpredictable behavior." Any help would be appreciated.
Installed on the web server - PHP version 5.3.5, Apache 2.2.3, MySQL Client API 5.1.54, MySQLi 5.1.54
MySQL 5.5 installed on seperate DB server.
Do I need to upgrade the MySQL Client API on the web server? Any ideas how?

Considering you have :
MySQL Server v 5.5
MySQL Client (the php-side library) v 5.1
You should update the client library (on the PHP side), to use a more recent version : you'll gain more by using a 5.5 server than by reverting to a 5.1, I'd say.
On the how to update the php-side component... The simplest solution is probably to update your version of PHP, I'd say -- or, if that's not enough (if PHP is compiled against the 5.1 client library) to recompile PHP yourself, against a 5.5 client library.
Anyway, as long as you don't do any strange stuff, using a 5.1 client with a 5.5 server should generally work -- that's why phpMyAdmin reports a warning, but still works ;-)

I Do not know what the hell everyone suggesting you the best method is
1.Go to https://dev.mysql.com/downloads/installer/
2.Install the mysql installer do not configure anything .It will update automatically.
3.Restart all services if you are using wamp.
4.now open phpmyadmin.
Please use wamp its easy yo use and configure.
Asif iqbal

Related

How to get SQLSRV on Xampp working with Medoo?

I got a PHP project which uses Medoo for accessing a database on MS SQL Server 2012. I used to test my project on the same server, but since copy-pasting through remote desktop got kinda annoying and inefficient, I wanted to move on a local system, so I installed Xampp (with PHP 5.6.19 VC11). Since I still need to use the server database, I first encountered the problem that the PDO MSSQL extension is not available anymore, and my script failed to send a query to the database. So tried using the SQLSRV 3.0 extension instead (5.4 thread-safe - why isn't there a version 5.6? Is 5.4 supposed to be forward compatible?), which still sends me an uncaught exception with message 'could not find driver', thrown from the PDO constructor and forwarded through Medoo. I'm not sure if this fails on Medoo, the driver, or something else. Moving the database to phpMyAdmin is no option... Has anyone an idea how I can solve this?
All information you need are on this this web page https://msdn.microsoft.com/en-us/library/cc296170(v=sql.105).aspx.
As you can see you need version 3.2 for PHP 5.6 support. I found download link and information about adding SQLSRV extension to php.ini for you.
https://www.microsoft.com/en-us/download/details.aspx?id=20098
https://msdn.microsoft.com/en-us/library/cc296203(v=sql.105).aspx
Finally you have to install Microsoft ODBC Driver 11 for SQL Server.
In short, download SQLSRV 3.2, add PDO extension to php.ini (choose right version for your PHP), install Microsoft ODBC Driver 11 for SQL Server on your local enviroment.

MySQL Server version different than MySQL version PHP is reporting

I'm running Wordpress on a RHEL 5 box. PHP is version 5.3.3, and we just upgraded the MySQL server on the box to 5.5.32 (up from 5.0.xx).
It seems like that upgrade went well, and Wordpress is running just fine. But what I don't understand is that PHP is continuing to report that it is using MySQL 5.0.95.
Anyone have a clue how I can tell PHP to use MySQL 5.5?
Just making my comment into answer as I added to it, it became more complete.
PHP is using 5.0.95 of the MySQL client library. PHP will not report on the version of MySQL being used on the MySQL server.
You can update your mysql client library on your PHP machine. Or better yet, you may consider re-compiling PHP with the MySQL Native Driver enabled, which will decouple you from having to have MySQL client library on your machine at all.
More info on MySQL native driver: http://www.php.net/manual/en/mysqlnd.overview.php
If you just want to upgrade your MySQL client package on RHEL 5, use RPM. I am not sure what the most recent rpm package for mysql client is named for RHEL 5, but the command would be something like this:
rpm -Uvh mysql-clientXXXX.rpm

Version problem in php

I upgraded my system from Windows xp to windows 7. When i was in win xp i used the wamp server with php version 5.0 now i installed the wamp server with the version 5.3. But now it's making problem. The old projects are not running. Even-though they are created in php version 5. How i can solve this problem?
New versions of WAMP use apache 2.2.x and lovest php version supported for that is 5.2. That beeing said you can downgrade your php version of wamp installation by downloading a php addon http://www.wampserver.com/en/addons_php.php from here. Or you can ultimately downgrade WAMP apache installation from 2.2 to 2.0 http://www.wampserver.com/en/addons_apache.php . If your project don't work with 5.2 or 5.3 you need to debug and update your code with the latest changes in php http://php.net/migration53
There are some (but not many) backward-incompatible changes between PHP 5.0 and 5.3. But they're fairly obscure and not generally going to cause major issues. You can find the full details here: http://uk.php.net/manual/en/migration53.incompatible.php
However my guess is that it's more likely that you've installed the new version missing one or more extensions which your code is relying on.
For example, if you are using the pdo_xx() functions, you would need the PDO extension. Most PHP programs will use functionality from several extensions, and not all of them may be included in the default installation, so you need to ensure you have installed with all the ones you need.
The other possibility is that there's an issue with the installation (either PHP itself or the web server, etc) that is preventing PHP from running at all.
But this is all really a guess, because you haven't actually told us anything about what exactly the problem is. You need to look and see in what way it's failing. If you're not getting error messages in the browser, check the server error logs. This is the quickest way to diagnose the problem. It should give you some good clues (if it doesn't help you understand what's happening, paste the relevant log entries here, because they'll definitely make sense to someone)

Can MySQL seamlessly be replaced with MariaDB or are there things to change in this case?

If I replace a MySQL 5.1 server with a MariaDB Server (Maria & XtraDB storages) instead of MySQL (MyISAM & InnoDB), will most of MySQL client software (incl. applications made with PHP 5.2 and Java SE 1.6) ...
just remain working without any changes (with minor regressions maybe)?
Or will I have to replace/reconfigure client drivers (like use another JDBC driver class and connection string)?
Or will I have even to change application code?
http://kb.askmonty.org/v/mariadb-versus-mysql
All MySQL connectors (PHP, Perl, Python, Java, MyODBC, Ruby, MySQL C connector etc) works unchanged with MariaDB.
I have used Mariadb as replacement for Oracle's MySQL for years. It is faster and very reliable. Needs just little attention in apt, but nothing severe. Also, there is one small detail with Mariadb; it is seeing [error] "PHP Warning: mysql_connect(): Headers and client library minor version mismatch" in the logs. I haven't found any other solution to that other than to start manually compiling: askMonty.
$php -i | grep 'Client API'
Client API version => 5.3.7-MariaDB
Client API library version => 5.3.7-MariaDB
Client API header version => 5.1.61
Client API version => 5.3.7-MariaDB
just remain working without any changes (with minor regressions
maybe)?
You shouldn't have any issues as long as you replace with the same version. If you're currently are using MySQL 5.1, you can replace with MariaDB 5.1. If you are using 5.5, use the corresponding one. MariaDB v5.2 and v5.3 and enhanced versions of 5.1.
Or will I have to replace/reconfigure client drivers (like use another
JDBC driver class and connection string)?
You shouldn't. MySQL and MariaDB both use the same protocol and overall syntax, but there could be a few exceptions in some cases. The URL quoted in another answer is a great resource: http://kb.askmonty.org/v/mariadb-versus-mysql
Regarding the drivers' licenses, there are differences if you plan to distribute your project commercially. In that case I recommend you to double check the license terms and if you have any concerns, use the MariaDB/SkySQL versions of the connectors as suggested in another answer. Check http://www.skysql.com/downloads/java-cc-connectors-mariadb for details.
Or will I have even to change application code?
The application code should be unchanged.
Just a little feedback requarding the compatibility with mysql driver/CodeIgniter. I ran into the problems on BIT attributes types few minutes ago.
Value was not retrived from the server. It was always empty.
I was using standard CI database configuration which is using "mysql" driver.
After changing driver in the database.php to "mysqli" problem was solved.
Just the heads up that there can be some differences if you are using old mysql driver.
$db['default']['dbdriver'] = 'mysqli';
MariaDB client API version 5.5.40
MariaDB is MySQL evolved.
It is also the same developer who is behind MySQL and MariaDB. It is almost the same (if it is not, i can only say MariaDB is MySQL improved, dot).
You don't have to change nothing in your PHP.
Contrary to popular belief, the default Connector/J JDBC driver for connecting to and interacting with MySQL in Java does not play nicely with MariaDB. To work with MariaDB, you need to have your application use the Drizzle or SkySQL driver.
http://kb.askmonty.org/en/mariadb-faq-is-there-any-java-connector-for-mariadb-than-the-one-from-mysql

What problems can arise if php mysql client doesn't match the mysql server version?

I have two installations of mysql server 5.1.32 and 5.0.77 (same machine, os x leopard). My php mysql extension is compiled against 5.0.77 (that was the easiest thing to do, and I did it after installing 5.1.32). I'm using the 5.1.32 installation since that's what I compiled my python MySQLdb extension against. I don't code in php much if ever. My main use of the php installation is phpmyadmin. phpmyadmin works in this way against the 5.1.32 mysql server but shows a warning:
"Your PHP MySQL library version 5.0.77 differs from your MySQL server version 5.1.32. This may cause unpredictable behavior.".
My question. Can I expect any serious problems from phpmyadmin with this kind of setup?
I'm using the latest version of phpmyadmin, and it connects thru a tcp connection (not socket file).
You shouldn't have any problems, all the queries are sent over TCP, they are all pretty much standard.
I think the only bad thing is that you can't use ceratin features.
If the developers are respectable, using an older client version on a newer server version shouldn't ever cause issues with any software.
Using a newer client version with an older server version may cause issues depending on the developers policies.
You should be ok however some functions/bugs/quirks could differ between the two versions. I would recommend looking at the MySQL's changelog from version 5.0.77 up to (and past if you have time) 5.1.32.
There was an issue with MySQL user's passwords stored between a version of MySQL 4.11 and up connecting to a version lower than that. Since you're this far I'm sure that's not it. For reference it was an easy fix involving updating the user's password with OLD_PASSWORD().

Categories