Foros del Web » Programando para Internet » PHP »

Mysql ayuda urgente

Estas en el tema de Mysql ayuda urgente en el foro de PHP en Foros del Web. Tengo instaldo PHP5 como módulo de Apache 2.0 y Mysql 4.1 todo en windows XP, intento utilizar las funciones de mysql pero marca algo como ...
  #1 (permalink)  
Antiguo 13/12/2004, 12:28
 
Fecha de Ingreso: diciembre-2004
Mensajes: 7
Antigüedad: 19 años, 4 meses
Puntos: 0
Mysql ayuda urgente

Tengo instaldo PHP5 como módulo de Apache 2.0 y Mysql 4.1 todo en windows XP, intento utilizar las funciones de mysql pero marca algo como esto:

Fatal error: Call to undefined function mysql_connect() in C:\...

¿Cómo lo resulevo?
Saludos.
  #2 (permalink)  
Antiguo 13/12/2004, 13:10
Avatar de JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 2 meses
Puntos: 772
Hola churris001 Bienvenido al foro.

Pon el código que estás usando, o al menos una parte, porque así va a ser difícil adivinar donde está el fallo.

Saludos,
  #3 (permalink)  
Antiguo 13/12/2004, 14:21
Avatar de claudiovega  
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 20 años, 5 meses
Puntos: 11
No es un fallo de codigo, me tinca que php 5 no viene compilado con mysql, parece que por temas de incompatibilidad de licencias.
De aqui en adelante empiezo a hacer supuestos.
Busca en el directorio extensions de php si existe alguna dll que se llame php_mysql.dll y habria que hacer lo mismo que para cualquier otra bd, esto es:

1. Entrar al php.ini y descomentar la linea que dijera extension=php_mysql.dll, quitando el punto y coma (;) que tenga delante.
2. Fijarse que la linea que dice extension_dir=xxxx, apunte a donde estén las extensiones, ejemplo: extension_dir="c:/php/extensions"
3. Reiniciar el servidor web (Apache por ejemplo).
  #4 (permalink)  
Antiguo 13/12/2004, 15:01
 
Fecha de Ingreso: diciembre-2004
Mensajes: 7
Antigüedad: 19 años, 4 meses
Puntos: 0
Muchas gracias claudiovega, mira ya quité el (;) del renglón extension=php_mysql.dll, también verifiqué que el directorio de la extensiones este bien direccionado (extension_dir="c:/php/ext") y cuando reinicio Apache me marca este error dos veces:

PHP Startup:Unable to load dynamic library "c:\php\ext\php_mysql.dll" - No de puede encontrar el módulo especificado.

Será algo de Apache ?
  #5 (permalink)  
Antiguo 13/12/2004, 15:09
Avatar de claudiovega  
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 20 años, 5 meses
Puntos: 11
Y verificaste si estaba el archivo en el directorio, es decir si estaba php_mysql.dll en el directorio c:\php\ext\?
Si está, trata copiando ese archivo al directorio: c:\windows\system32
  #6 (permalink)  
Antiguo 13/12/2004, 15:41
 
Fecha de Ingreso: diciembre-2004
Mensajes: 7
Antigüedad: 19 años, 4 meses
Puntos: 0
Lamentablemente me sigue arrojando el mismo error... muchas gracias de todos modos, yo creo que lo mejor es utilizar php4, espero y si funcione.

Pero si por ahí encuentran la respuesta, no duden en publicarla.
  #7 (permalink)  
Antiguo 13/12/2004, 16:05
Avatar de claudiovega  
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 20 años, 5 meses
Puntos: 11
Mira esto, en :
http://www.php.net/manual/en/faq.dat...ses.mysql.php5

4. PHP 5 no longer bundles MySQL client libraries, what does this mean to me? Can I still use MySQL with PHP? I try to use MySQL and get "function undefined" errors, what gives?

Yes. There will always be MySQL support in PHP of one kind or another. The only change in PHP 5 is that we are no longer bundling the client library itself. Some reasons in no particular order:

*

Most systems these days already have the client library installed.
*

Given the above, having multiple versions of the library can get messy. For example, if you link mod_auth_mysql against one version and PHP against another, and then enable both in Apache, you get a nice fat crash. Also, the bundled library didn't always play well with the installed server version. The most obvious symptom of this being disagreement over where to find the mysql.socket Unix domain socket file.
*

Maintenance was somewhat lax and it was falling further and further behind the released version.
*

Future versions of the library are under the GPL and thus we don't have an upgrade path since we cannot bundle a GPL'ed library in a BSD/Apache-style licensed project. A clean break in PHP 5 seemed like the best option.

This won't actually affect that many people. Unix users, at least the ones who know what they are doing, tend to always build PHP against their system's libmyqlclient library simply by adding the --with-mysql=/usr option when building PHP. Windows users may enable the extension php_mysql.dll inside php.ini. Also, be sure libmysql.dll is available to the systems PATH. For more details on how, read the FAQ on setting up the Windows systems PATH. Because libmysql.dll (and many other PHP related files) exist in the PHP folder, you'll want to add the PHP folder to your systems PATH.
  #8 (permalink)  
Antiguo 13/12/2004, 16:48
 
Fecha de Ingreso: diciembre-2004
Mensajes: 7
Antigüedad: 19 años, 4 meses
Puntos: 0
Listo !! muchas gracias, el interprete de php ya identifica la funciones de mysql_##, la solucion es agregar a la variable de entorno "path" la ruta en donde tenemos las librerias de php, en mi caso C:\php

Solo me falta lograr que se conecte a la base de datos, me marca error... algun tip ?? como quiera estoy investigando, es la primera vez que voy a usar Mysql con php y cuando vea que no encuentro la solución crearé otro tema en este foro....

Mil gracias !!

Última edición por churris001; 13/12/2004 a las 16:51
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:44.