1

I need to Upgrade my Server PHP version to 7.

Is there a way to update in OpenSuse 13.2 to version PHP7 via the console?
Can I install a php Extension which allows me to use the following again?

mysql_connect
mysql_query
mysql_select_db

PS: May be you could help me on another question too? https://stackoverflow.com/q/34200270/1694342?sem=2

That's the Reason why I need to updgrade to PHP to 7.

2 Answers 2

0

I answered your other question in the other thread, and, you're not going to be able to use Magento with PHP 7 at this time. However, I'm assuming you're asking about a different PHP application since Magento surely wouldn't make use of these functions.

The short answer is no, because mysql_*() functions are deprecated and dangerous. Everyone should be using MySQLi (the improved version) now, as it fixes these issues. Prepared statements should also be used. If you run into an issue converting a particular mysql_*() function call to MySQLi, just post a question to StackOverflow. There should be quite a bit of information on particular MySQLi issues on SO already.

But, as I posted to the other threat, it looks like you won't need PHP 7 yet, but you should still stop using mysql_*().

2
  • soo "should be using MySQLi" still working in PHP7? Thank you very much. You saved me a lot of time and disappointment :)
    – MCSell
    Dec 14, 2015 at 9:08
  • No problem :) Yes, MySQLi should be used for both 5 and 7.
    – Will
    Dec 14, 2015 at 22:18
0

The functions you are asking about have been deprecated for years, and no longer exist in PHP 7. See the PHP documentation for information on choosing another MySQL API for your application. (Note that Magento uses PDO so you should have no issues with that aspect of it.)

1
  • Thank you for your answer. I know, that the function is removed in PHP7 but i got other really big projects which still run with these Functions. Are there no extensions or stuff to add?
    – MCSell
    Dec 14, 2015 at 8:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .