mysql is not enabled in phpinfo() of php 5.3.1

前端 未结 5 506
滥情空心
滥情空心 2021-01-14 13:01

I am having apache 2.2.14, php 5.3.1 and mysql 5.1.43 installed on vista. I am trying since 2 days to configure php to have mysql enable on phpinfo().

  1. I modif
5条回答
  •  醉梦人生
    2021-01-14 13:23

    Thanks a lot to the user who said that we have to move the file php.ini to the folder /bin of the Apache server. it resolves me the same problem after more than one week of trying failed methods.

    Of course we must uncomment in the file the two lines;

    ;extension=php_mysql.dll
    ;extensin_dir="ext"
    

    by removing the semi-colon (;) and by specifying the full path for the extension library php_mysql.dll rather than ext as follows

    extension=php_mysql.dll
    extensin_dir="c:\Apache22\php53\ext"
    

    For me I installed Apache in the folder c:\Apache22 and PHP in the folder c:\Apache22\php53, you must use your own values.

    NOTE: Because mysql_ functions like mysql_connect() become deprecated in PHP 5.5 and above, it is recommended to enable also the library php_mysqli.dll to use functions like mysqli_ (improved version of mysql_ functions). To do that it is simple, you just have to uncomment the line:

    ;extension=php_mysqli.dll
    

    in the file PHP.ini as follows:

    extension=php_mysqli.dll
    

提交回复
热议问题