Luego agregue la direccion a la variable PATH
C:\Program Files\PHP\libmysql.dll
El script que estoy probando es este
Código PHP:
<?php
date_default_timezone_set('America/New_York');
$var = mysql_connect("localhost","root","");
if($var)
echo "Conecto";
else
echo "No conecto";
?>
Código PHP:
Ver original
Warning: mysql_connect(): [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\bd.php on line 3 Warning: mysql_connect(): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\bd.php on line 3 Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\bd.php on line 3
Ahora tengo cierta duda de si cometi un error al activar el mysql en el php.ini
Para empezar en el php ini modifike estas lineas
Código PHP:
Ver original
; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir ; extension_dir = "./" ; On windows: extension_dir = "ext"
Por estas
Código PHP:
Ver original
; Directory in which the loadable extensions (modules) reside. ; http://php.net/extension-dir extension_dir = "C:\Program Files\PHP\ext" ; On windows: extension_dir = "C:\Program Files\PHP\ext"
aunque mas abajo ya venia esta linea
; Default timeout for socket based streams (seconds)
; http://php.net/default-socket-timeout
default_socket_timeout = 60
upload_tmp_dir="C:\Windows\Temp"
session.save_path="C:\Windows\Temp"
error_log="C:\Windows\temp\php-errors.log"
extension_dir="C:\Program Files\PHP\ext"
Las lineas para habilitar el mysql me vinieron activadas o al menos eso creo, ya que son estas
Código PHP:
Ver original
[PHP_BZ2] extension=php_bz2.dll [PHP_CURL] extension=php_curl.dll [PHP_GD2] extension=php_gd2.dll [PHP_GETTEXT] extension=php_gettext.dll [PHP_IMAP] extension=php_imap.dll [PHP_MBSTRING] extension=php_mbstring.dll [PHP_MYSQL] extension=php_mysql.dll [PHP_MYSQLI] extension=php_mysqli.dll [PHP_OPENSSL] extension=php_openssl.dll [PHP_PDO_MYSQL] extension=php_pdo_mysql.dll [PHP_PDO_ODBC] extension=php_pdo_odbc.dll [PHP_PDO_SQLITE] extension=php_pdo_sqlite.dll [PHP_PGSQL] extension=php_pgsql.dll [PHP_SOAP] extension=php_soap.dll [PHP_SOCKETS] extension=php_sockets.dll [PHP_SQLITE3] extension=php_sqlite3.dll [PHP_TIDY] extension=php_tidy.dll [PHP_XMLRPC] extension=php_xmlrpc.dll [PHP_EXIF] extension=php_exif.dll
Bueno agradesco de antemano su ayuda