I Tried to update my PHP version located on Hostgator. Actually, I'm using but PHP 5.0 and WordPress is requiring at least the PHP 7 version.
After doing that, through the c-panel, my website went down.
This is the message that I received:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress
I was obliged to roll-back so that it works again.
Please can you help me solve that problem?
Thanks in advance.
The php mysql api is deprecated. It's kaput --- going away -- not to be used, finito.
If you have a modern version of PHP (> 5.6) then Wordpress should automatically switch to make use of mysqli. That should be your first attempt.
If you can not update your php, rather than attempting to resurrect something that php no longer supports, just patch your wordpress: http://wordpress.org/plugins/mysqli/
Related
I am changing my hosting provider and migrating from cPanel to Plesk. Everything is nice and I am exited but I can't get old PHP scripts working which still use MySQL instead of MySQLi or PDO.
Plesk lets different accounts or domains use different versions of PHP. Fortunately even older versions that still recognize MySQL are available (5.4, 5.5, 5.6) and I have actually managed to make one of my domains to use PHP 5.6 but although it works there, MySQL is still not available. MySQLi is working with PHP 5.6 but all point of downgrading PHP was to get MySQL working. It simply complains: 'Call to undefined function mysql_connect()'.
As far as I can see mysql extension is installed. phpinfo() shows sections of mysql and mysqli and mysqlnd and even pdo_mysql. mysql.so is there at /opt/plesk/php/5.6/lib64/php/modules.
I have tried all the options in Plesk and I have edited the ini files (extension=mysql.so) but no progress. I have spent all day already. Have also tried different handlers.
One thing that I have noticed is on the phpinfo() page. 'Configure Command' section contains among the other strings, the following: '--without-mysql'. I don't see a way in Plesk to remove this. And I don't see a way to change configure options for PHP. Is this the reason why mysql_ functions don't work? How to solve this? I got it working easily with cPanel but Plesk is new to me and Google has not been helpful today. Please advice!
I inherited a Typo3 site to maintain and have had no trouble until now. When I try login I get this error message:
Oops, an error occured!
PHP Runtime Notice: Declaration of t3lib_userAuthGroup::checkLogFailures() should be compatible with t3lib_userAuth::checkLogFailures() in /home3/onefoug3/public_html/t3lib/class.t3lib_userauthgroup.php line 113
I checked with my hosting service and they say it is an error with the script. I am not a programmer so I do not know how to fix that...not even sure where to start. How do I fix this?
To give you an overview about the situation with your TYPO3 installation I list a few points, some of them where you've to verify more:
TYPO3 in your installation is very old and outdated. You'll get perhaps many hints to update due to security-reasons. This is not wrong but I'd concentrate first on getting it running, perhaps better on a local server.
The Version of your TYPO3 installation is in any case very useful, you should try to provide it.
It's possible that you need an old PHP version to run that site and that the error is just thrown because of a wrong PHP Version. You could try with PHP 5.2.
It's not improbable that something in the TYPO3 core was changed manually. It might be patches or individual but in many versions I never found the mentioned methods in the line 113 like shown in the error-message.
Rarely I changed in the core somethings too, to circumvent some temporary problems, usually that's neither required nor advisable. Nevertheless if it helps you to get the installation locally running - why not.
The more advised step is to download the current version new and replace the existing core with that. Often you can chose the most recent minor version: assume you've Version 4.7.18, then you can download Version 4.7.20 or newer if available.
The link to get the newest Version of that old branch would be https://get.typo3.org/4.7
Better keep the old core till the problem is solved, even if you replace it.
If you follow my hint to get a higher minor version you should have a look in the install-tool, specifically in the update-wizard there.
I'd advise to update the question to include the Versions of TYPO3, PHP and MySQL, then perhaps it will be easier to help more.
As target I see to get the installation locally running and performing an update instead of serving the old site with insecure core. Based on that I answered in point 5 too, on a live-system it's not advisable especially with your limited knowledge.
I was using PHP 4.0 and recently upgraded to PHP 7.0 with cPanel. But now my website is down, it shows the following error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
Does this mean that I will have to completely reinstall & reconfigure all websites, or is there an easy solution within cPanel?
-- snip --
PHP 4? Wow :-P
All the mysql_whatever() commands have been deprecated a while back , and completely removed in v7 (see http://php.net/manual/en/migration70.removed-exts-sapis.php).
You should now update your code to use the PDO API.
http://php.net/manual/en/class.pdo.php
See this guide for steps involved.
https://www.sitepoint.com/migrate-from-the-mysql-extension-to-pdo/
You may have other things needing fixed too. Always check the changelogs, and look at these migration guides, which lists everything you need to know about the upgrade.
http://php.net/manual/en/migration5.php
http://php.net/manual/en/migration70.php
Your wordpress should be able to update itself by clicking something in the admin section. I can't remember specifically, but here's a link that can help. You just need to worry about the code you wrote yourself.
https://codex.wordpress.org/Updating_WordPress
I am still new to php and linux but i try to give you all information I know.
We got a PHP web application using pear and smarty. It's runing on PHP 4 on a Linux system and with XAMP and PHP5 on my PC. I am trying to move the application on a new server with PHP7 and updated PEAR and all extensions (it's the same version as on XAMP), but all I get is: DB Error: extension not found.
I tried to find a solution but wasn't able to find anything which could help me.
The database we are using is a normal mysql database.
I'm not sure if there is still a path missing or what went wrong.
Maybe someone of you got a clue what the problem could be.
It sounds like your very old PHP4 code is using the mysql_ database extension?
If so that extension has been deprecated for years and was completely removed from PHP7. You wont be able to move that code to any version of PHP higher than PHP5.6 and even trying to do that you will almost definitely come across lots of other incompatibilities
I suggest you read http://php.net/manual/en/migration70.php in the menu on this page there is a section on migrating from all sorts of versions of PHP.
You will have to work out how far up the migration levels your code will actually move without major amendments. I would guess, not very far!
I need the php_monetdb.dll for php 5.4. I've found that by building the monetDB with the HAVE_PHP=1 option on windows will create the dll, but the build procedure fails at numerous points. I am using the monetdb source from sourceforge which is a little outdated one. The newer version has problems in the .msc files itself so proceeding to the build itself is a pain. The older version that I am trying on is atleast passing the nmake step but failing on the nmake install step. The reasons vary from component to component. One states that the devenv /build does not exist. For this I copied the vcexpress and renamed it to devenv. I am not sure if this is right but when I run it from the command prompt it seems to work ok with a few warning alerts shown. During other make installs, the header files seem to be missing. Could anyone please help me with this. Also please let me know if there is any other alternative for this approach of getting php_monetdb.dll.
P.S: I am using windows 7, MSVC 10 express, PHP 5.4.4
For the build questions, see http://bugs.monetdb.org/show_bug.cgi?id=3121
For php_monetdb.dll, see
http://sourceforge.net/mailarchive/forum.php?thread_name=20120717145132.GU49719%40cwi.nl&forum_name=monetdb-developers
http://sourceforge.net/mailarchive/forum.php?thread_name=500581D5.8030808%40acm.org&forum_name=monetdb-developers