Developed a website on windows on denwer. Everything worked fine. If necessary, moved the site to ubuntu on virtualbox. After the work done, the functions mysql_query, mysql_fetch_row, etc. do not work. I wrote the commands:

sudo apt-get install php-mysql sudo apt-get install php7.0-mysql 

Writes that the latest version is installed. There is no line in /etc/php/7.0/apache2/php.ini

 ;extension = mysql.so 

Generally there is no file with the .so extension. Not only in the file, but throughout the / etc / directory

What could be the problem ?

  • one
    The mysql extension is not supported in PHP7. It's time to switch to mysqli or PDO - Dmitriy Simushev
  • In the directory / etc there should not be any .so files, by the way - strangeqargo

1 answer 1

Denver is worth php 5.3, so for compatibility it is better to choose Ubuntu with the same version of php:

 Ubuntu precise (12.04LTS) - php 5.3 Ubuntu trusty (14.04LTS) - php 5.5