php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #73421 General complaint
Submitted: 2016-10-30 15:21 UTC Modified: 2017-05-01 19:04 UTC
From: shearnes at roadrunner dot com Assigned:
Status: Not a bug Package: PDO related
PHP Version: Next Major Version OS: Ubunty 16
Private report: No CVE-ID: None
 [2016-10-30 15:21 UTC] shearnes at roadrunner dot com
Description:
------------
Just a general complaint - not happy with the depreciation of the older mysql to PDO. I have ran an older web portal called PHPNuke for years and  I spent lots of money customizing it to serve a specific trade [ www.parts-link.com ] and after an Ubuntu 16 upgrade, I am told PDO wont support older PHPNuke web portal unless I hire more developers to recode all the files, which they immediately say is going to cost a lot. In this terrible global economy, I cant justify such a thing. I'm disappointed you guys who are thinking this stuff up dont consider these circumstances and just leave people in the dust. I had the site down for a couple months pondering what to do because I spent alot of time trying to get it going with php7 , but and I only just now got a developer to get it back up rolled back to php5.6. 




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-30 15:47 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2016-10-30 15:47 UTC] requinix@php.net
The solution is simple: don't upgrade.
 [2016-10-30 16:16 UTC] rasmus@php.net
Also, the migration from mysql to mysqli is simpler. It is close to a search+replace of mysql_ calls to mysqli_ calls. Should take about 30 minutes.

Alternatively, the outdated mysql extension is still available and works fine with PHP 7. It is simply now just not distributed with the main PHP sources. Get it from Pecl.

However, since you indicated that you are using Ubuntu, there is actually zero difference for you. Ubuntu packages the mysql extension in *exactly* the same was as they did for PHP 5. See http://packages.ubuntu.com/search?keywords=php7.0-mysql
So the deprecation is actually invisible to you since you will apt-get install the package exactly the same way you did for PHP 5.
 [2016-10-31 15:05 UTC] shearnes at roadrunner dot com
Thanks to rasmus for the proactive response.

 Im not really sure there is much a benefit for an older portal like the 1 I am using to use php7, except that from what I hear the sql injections are nearly impossible to do. Overall since I have set the site up back in 2004, php has been a relatively stable language... so thanks for doing an otherwise great job until this time. Of course I rather stay up to date and put 7 in, but for now I guess will stick with 5.6 as its running ok for now, and the site really does not get much traffic anymore in this tanked global economy, so again thanks for your efforts supporting php.
 [2016-10-31 17:52 UTC] rasmus@php.net
But again, your distro provides the necessary php7-mysql package the same way it does for php5, so you don't have to change a single line of code in your app to upgrade to PHP 7.
 [2016-11-01 18:23 UTC] shearnes at roadrunner dot com
Perhaps, but what Im saying is that the Ubuntu upgrade did not indicate this at all. Weather thats Ubuntu's oversight or PHP's who is to say? I'm not an expert IT professional, but I have managed to more or less go on my own ability when it comes to upgrades and other changes for many years, but in this case, the site just stopped loading php, and since we run with safe mode off usually, it was not obvious there were errors. I did alot of research online for weeks, and saw others having the same problem, but after doing everything w/bash as they did, nothing seemed to make progress. Wound up hiring a developer and paying about 150 USD (money which I have to borrow) to resolve the whole problem.

To me it was alot of wasted time, and also some money, and if I knew ahead of time the pro's and cons upgrading to 7, would never have went forward with it.


But really its mostly all irrelevant as the website itself is hardly barely worthwhile keeping up. 150 USD is more than the site has actually generated the past 2 years. Not that its php's fault, but the site has to compete with China and sites like Alibabba, who at the time I made this site were not really able to compete. However Google has placed them at top of lots of search results this site use to be at least on the 1st page for so that it at least has a chance to maintain itself. Its frustrating and you feel like a 1 legged man in an ass kicking contest fighting that stuff, its impossible to really have even a change at all, and it means spending more seo money and probably more on php dev... so when something like this happens, it makes things that much worse to recover from, sorry for the rant.
 






"But again, your distro provides the necessary php7-mysql package the same way it does for php5, so you don't have to change a single line of code in your app to upgrade to PHP 7."
 [2017-05-01 19:04 UTC] shearnes at roadrunner dot com
UPDATE:

Since the last post I have been up running ok, but the latest Apache2 upgrade has either forced PHP7.x into the picture again, or there is some other issue they did not forsee. I have posted to the Apache lounge saying that a "rollback" feature would be nice as I am down for 3 days now with no http.

As we troubleshoot the issue, the Froxlor guys say to try:

php /var/www/froxlor/scripts/froxlor_master_cronjob.php --force --debug


Which results in:

froxlor[29284]: The php PDO extension or PDO-MySQL driver is not available
froxlor[29284]: --- DEBUG: #0 
/var/www/froxlor/lib/classes/database/class.Databa
se.php(178): Database::getDB() #1 /var/www/froxlor/lib/cron_init.php(92): 
Databa
se::__callStatic('query', Array) #2 
/var/www/froxlor/scripts/froxlor_master_cron
job.php(20): include_once('/var/www/froxlo...') #3 {main}
We are sorry, but a MySQL - error occurred. The administrator may find more 
info


This sounded alot familiar way back when I first posted here, and now that I re-read things, looks like we cant use PDO....so the issue has resurfaced again with the php and the older site. I feel like older sites should not just be thrown away because the developers assume you are always using the latest stuff, which I suspect Apache did here.


The last response you guys gave seemed to say I CAN use php7.x with the older php web portal?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 10:01:28 2024 UTC