Path: csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: cant use mysql_connect Date: Mon, 29 Oct 2012 07:39:43 +0100 Lines: 40 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net ZxZHC3nRefFpzDjLdrQXUgBkAqE+Z5E6crPVeU5NI87fQHSuhfoCaf4/9ANJlnTSyd Cancel-Lock: sha1:vP+rQ1jMNF7i8GbUyLfUYYzGR58= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121021 Firefox/16.0 SeaMonkey/2.13.1 In-Reply-To: Xref: csiph.com comp.lang.php:7380 Markus Grob wrote: > Hello together > > I have changed to Apache 2.4 with PHP 5.4 and MySQL 5.5. MySQL is running and > all databases were imported from the earlier version. > Apache is running and php_info gives me the hint, that mysqlnd was found: > > PHP Version 5.4.4 > System Windows NT KRWM0023 6.1 build 7601 (Windows 7 Enterprise Edition > > But if I now try to connect to the database, pypmyadmin tells me, that mysql > can't be found: Cannot load mysql extension. > > My one site tells me the same: > Fatal error: Call to undefined function mysql_error() in... > > netstat tells me, that mysql is waiting on 3306. > > Can someone gives me a hint? For the phpmyadmin http://www.phpmyadmin.net/documentation : $cfg['Servers'][$i]['extension'] string What php MySQL extension to use for the connection. Valid options are: mysql : The classic MySQL extension. mysqli : The improved MySQL extension. This extension became available with PHP 5.0.0 and is the recommended way to connect to a server running MySQL 4.1.x or newer. For your site, either rewrite it to not use the mysql extension or download it from a shady website which claims it's build for the PHP version you installed and hope it hasn't some nasty backdoor (Recommendation would be that you used a operating system which provides php and all the extensions without requiring you to go to 3rd party pages). -- //Aho