Fix PHP issue with website when moved from one host to another
- or -
Post a project like this769
£50(approx. $63)
- Posted:
- Proposals: 9
- Remote
- #3529797
- Awarded
Full Stack Developer | Laravel | Angular |React JS| CodeIgniter | WordPress | Web And APP Designing | Mobile Application Development | Digital Marketing
Ahmedabad
Versatile Full Stack Developer: Bridging Frontend Excellence with Backend Ingenuity for Seamless Web Solutions
Porbandar
WordPress Expert✮Shopify Expert✮Graphic Designer✮AutoCAD 2D & 3D✮CV Writer & Designer✮Fullstack developer
Rawalpindi
Full Stack Web Developer | Laravel | WordPress | Kotlin | Flutter | Java | React Native | Node JS | Jquery | React Js | MongoDB, MySQL, SQL
Dhaka
4119501299911300089209934921873793636573671962269096136910610
Description
Experience Level: Entry
Hi, we are moving a website from one host to another. The old site is using an older version of PHP that is incompatible with the new hosting PHP version. We need this fixing. This is from the new host:
We transferred your website, however the transferred website returns an error:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/customer/www/bettingtools.co.uk/public_html/tipster-table/db/config.php:3 Stack trace: #0 /home/customer/www/bettingtools.co.uk/public_html/tipster-table/index.php(42): include() #1 {main} thrown in /home/customer/www/bettingtools.co.uk/public_html/tipster-table/db/config.php on line 3
The reason for the error is that the site is using the PHP function mysql_connect that is removed since PHP 7.0.
https://www.php.net/manual/en/function.mysql-connect.php
Our servers do not support such old PHP versions and the minimum PHP version that we have available is PHP 7.3.
https://www.siteground.com/blog/moving-to-php-7-4/
On the other hand, your site is using PHP 5.6 on the remote host. I tried to troubleshoot this by replacing:
mysql_connect
mysql_select_db
mysql_error
with:
mysqli_connect
mysqli_select_db
mysqli_error
I made this change to all of the website files and this resolved the PHP error, however, then the site displayed a blank page and it seems that there is still another code that is not compatible with newer PHP versions.
We transferred your website, however the transferred website returns an error:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/customer/www/bettingtools.co.uk/public_html/tipster-table/db/config.php:3 Stack trace: #0 /home/customer/www/bettingtools.co.uk/public_html/tipster-table/index.php(42): include() #1 {main} thrown in /home/customer/www/bettingtools.co.uk/public_html/tipster-table/db/config.php on line 3
The reason for the error is that the site is using the PHP function mysql_connect that is removed since PHP 7.0.
https://www.php.net/manual/en/function.mysql-connect.php
Our servers do not support such old PHP versions and the minimum PHP version that we have available is PHP 7.3.
https://www.siteground.com/blog/moving-to-php-7-4/
On the other hand, your site is using PHP 5.6 on the remote host. I tried to troubleshoot this by replacing:
mysql_connect
mysql_select_db
mysql_error
with:
mysqli_connect
mysqli_select_db
mysqli_error
I made this change to all of the website files and this resolved the PHP error, however, then the site displayed a blank page and it seems that there is still another code that is not compatible with newer PHP versions.
Alex W.
100% (196)Projects Completed
245
Freelancers worked with
163
Projects awarded
29%
Last project
17 Oct 2022
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Alex
is that a placeholder budget?
Do you have a staging server? -
Is this job still open ?
10143431014312
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies