1

Fatal error: Call to undefined function mysql_connect() in teste.php on line 3.

<?php
$config = array(
    'servidor'  => '127.0.0.1',
    'usuario'   => 'root',
    'senha'     => ''
);
$mysql = mysql_connect($config['servidor'], $config['usuario'], $config['senha']);

c:\MAMP\bin\php\php5.3.23>php.exe -m

[PHP Modules] bcmath calendar com_dotnet Core ctype date dom ereg filter hash iconv json libxml mcrypt mysqlnd odbc pcre PDO pdo_mysql Phar Reflection session SimpleXML soap sockets SPL standard tidy tokenizer wddx xml xmlreader xmlwriter zip zlib

[Zend Modules]

hakre
  • 184,866
  • 48
  • 414
  • 792
Aron
  • 39
  • 4
  • certainly the mysql extension is not enabled in your setup – Bob Jan 28 '15 at 12:31
  • My phpinfo() http://jsfiddle.net/5L6x8962/embedded/result/ – Aron Jan 28 '15 at 13:59
  • you can check `php.ini` somewhere in `/MAMP/conf/php5.3.23/php.ini` and look for mysql extension. If it's the same with wamp you can uncomment it by removing the `;` – Bob Jan 29 '15 at 06:42
  • extension=php_mysql.dll extension=php_mysqli.dll Not commenting :) – Aron Jan 29 '15 at 11:19
  • [Fatal error Call to undefined function mysql_connect().avi](https://www.youtube.com/watch?v=e3y57I63gCw) – hakre Mar 29 '15 at 12:18
  • possible duplicate of [undefined function mysql\_connect()](http://stackoverflow.com/questions/13825108/undefined-function-mysql-connect) – hakre Mar 29 '15 at 12:19

0 Answers0