Prestashop: Call to undefined function mysql_connect - php

I installed prestashop using softaculous, my php version is 5.2.17 and despite of that it shows this
ERROR: Fatal error: Call to undefined function mysql_connect() in /home/adeego/public_html/prestashop/classes/db/MySQL.php on line 51
If I go changing php version then it will be very painful to change every mysql_ into mysqli_ or pdo_mysqli_.
What is the best solution?

Related

how to fix this error : Fatal error: Call to undefined function password_hash() [duplicate]

I am running php version 5.4.16 on localhost right now, while I am developing my site. I want to use password_hash(), but I keep getting this error:
Fatal error: Call to undefined function password_hash() in /dir/to/file.php on line 123
Why is this happening?
The new password_* methods are only available as of PHP 5.5:
http://www.php.net/manual/en/function.password-hash.php
Take a look at this library that provides forward compatibility:
https://github.com/ircmaxell/password_compat
You can use that to get access to the new password_* methods until you are able to run PHP 5.5.

Php 7.4 version and unable to access user authorization page

I am using php 7.4. I have a php page called auth1. It requires a username and Password, which in the
past took me into auth3. I started receiving a deprecated error when I was on php 5.4 so I upgraded to
7.4. Now I get the error messages below. Any ideas. Could it be my mysql not compatible
Warning: Use of undefined constant user - assumed 'user' (this will throw an Error in a future version of PHP) in /home/utm/public_html/auth3.php on line 5
Warning: Use of undefined constant password - assumed 'password' (this will throw an Error in a future version of PHP) in /home/utm/public_html/auth3.php on line 5
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/utm/public_html/auth3.php:19 Stack trace: #0 {main} thrown in /home/utm/public_html/auth3.php on line 19
welcome to stackoverflow
your first and second lines are not Uncaught error and don't break your php processes
but about your last line it tell you that mysql_connect doesn't exists
because mysql extension and all of mysql_* functions are deprecated as of PHP 5.5 and has been removed as of PHP 7 to up
as the itachi said, and you said an example (mysqli) you should use a new extension between 3 following ways:
MySQLI reference functions Check they here
MySQLI OOP extension Check they here
PDO Extension Check they here
Also you can see this references for install your needs:
PDO Installation
MySQLI Installation
and about your 1st and 2nd lines you could put your codes to let us check, know and solve your problem

Fatal error: Call to undefined function printer_list()

So Im busy with this project that involves printing. I found a class online to do so. But when I try to test it, I get the following error:
Fatal error: Call to undefined function printer_list() in /Applications/XAMPP/xamppfiles/htdocs/barcode/Sample.php on line 9
And I know that I probably should install an extention, but how which one and how to do so? I use Xampp on OSX Yosemite.
The printer extension working only on Windows
printer_list() id deprecate in new php

Why do i keep getting Fatal error: Call to undefined function password_hash()? [duplicate]

I am running php version 5.4.16 on localhost right now, while I am developing my site. I want to use password_hash(), but I keep getting this error:
Fatal error: Call to undefined function password_hash() in /dir/to/file.php on line 123
Why is this happening?
The new password_* methods are only available as of PHP 5.5:
http://www.php.net/manual/en/function.password-hash.php
Take a look at this library that provides forward compatibility:
https://github.com/ircmaxell/password_compat
You can use that to get access to the new password_* methods until you are able to run PHP 5.5.

Fatal error: Call to undefined method SplFileInfo::getRealPath()

I've got a client who has just set up a new VPN and is attempting to install my plugin.
He's getting the following error:
Fatal error: Call to undefined method SplFileInfo::getRealPath() on the commented line below. This appears to have something to do with the ZEND libraries. Any ideas what I should tell him to do?
If you are getting the undefined error means you have lower version of PHP.
The function is supported after PHP 5.2.2
SplFileInfo::getRealPath
(PHP 5 >= 5.2.2)
SplFileInfo::getRealPath — Gets
absolute path to file
http://php.net/manual/en/splfileinfo.getrealpath.php

Categories