Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 3 Instalar Web Server en Windows XP con Apache 2, PHP5 y MySQL4 - Parte 3
Part 3 - Install PHP 5 Parte 3 - Instalación de PHP 5
Unzip the PHP zip package that downloaded in Descomprima el paquete PHP zip descargado en el que Part 1 Parte 1 to C:\PHP (Create a new folder named PHP at C:\ root level). para C: \ PHP (Crear una nueva carpeta llamada PHP en C: \ raíz). Then shut down Apache server. Luego apagar el servidor Apache.
Open the Apache httpd.conf with a text editor and add two lines of code: Abra el httpd.conf de Apache con un editor de texto y añadir dos líneas de código:
LoadModule php5_module C:/php/php5apache2.dll LoadModule php5_module C: / php/php5apache2.dll
AddType application/x-httpd-php .php AddType application / x-httpd-php. Php
Added .php extension to show how to parse .php files Añadido. Extensión php para mostrar cómo es posible analizar. Php archivos
Note also the directory in load module points to where we installed PHP. Tenga en cuenta también el directorio en el módulo de carga a los puntos donde se instaló PHP. So if you install PHP at other location, change it accordingly. Por lo tanto, si instala PHP en otro lugar, cambiar la forma correspondiente. The directory style should be / too instead of common DOS \. El directorio debe ser el estilo / demasiado común en lugar de DOS \.
These two lines can be added to the bottom of the httpd.conf file. Estas dos líneas se pueden agregar al fondo del archivo httpd.conf. However, note that modules in the load list are in reverse-priority order; those that come later can override or pre-empt those listed earlier. Sin embargo, tenga en cuenta que en los módulos de carga están en la lista de invertir el orden de prioridad, los que lleguen más tarde pueden anular o adelantarse a los mencionados anteriormente. Therefore, adding php_mod at the end of the list can have unexpected results, such as disabling mod_rewrite (and other modules) for any php files that exist (mod_rewrite will run fine if the file doesn’t exist). Por lo tanto, php_mod añadiendo al final de la lista puede tener resultados inesperados, como la inhabilitación de mod_rewrite (y otros módulos) para cualquier php archivos que existen (mod_rewrite se ejecuta bien, si el archivo no existe). The same error can disable mod_auth and other important modules. El mismo error puede desactivar mod_auth y otros importantes módulos. In summary, php_mod should be loaded before any modules you wish to run before your php code is executed. En resumen, php_mod debe ser cargada antes de que los módulos que desee ejecutar antes de que su código PHP es ejecutado. See the note in the Véase la nota a la Apache AddModule documentation Apache AddModule documentación for how to find the recommended ordering. para encontrar la manera de ordenar el recomendado.
Next, copy/paste “php.ini-recommended” to C:/Program Files/Apache Group/Apache2 (or your Apache installation path), and rename it to php.ini. A continuación, copiar / pegar "php.ini-recomendó" a C: / Archivos de Programa / Apache Group/Apache2 (o su ruta de instalación de Apache), y cambiar el nombre a php.ini. Restart the Apache server. Reinicie el servidor Apache.
Testing php5 Installation Prueba de instalación PHP5
Create a file with the following contents and save it to the root web folder (C:/Server/htdocs or default C:/Program Files/Apache Group/Apache2/htdocs/) as “php5info.php”. Crear un archivo con el siguiente contenido y guárdelo en la carpeta Web raíz (C: / Server / htdocs o por defecto C: / Archivos de Programa / Apache Group/Apache2/htdocs /) como "php5info.php".
<?php <? PHP
phpinfo(); phpinfo ();
?> >
Access the following url Acceda a la siguiente URL http://localhost/php5_info.php . The complete PHP setting should be displayed on the browser. La completa configuración de PHP se exhibirán en el navegador. If there is an error or nothing been shown, there is problem with installation. Si hay un error o nada se ha demostrado, hay problema con la instalación. Try the installation procedures again. Pruebe los procedimientos de instalación de nuevo.
Enable MySQL extension Habilitar extensión MySQL
The php.ini that copied from php.ini-recommended already being set to optimum setting, so there is no special need to edit it. El php.ini que copiar de php.ini-ya se está recomendado para establecer una configuración óptima, por lo que no hay necesidad especial para editarlo. However, it still need to edit to enable mysql extension. Sin embargo, todavía falta modificar para permitir la extensión mysql.
Open php.ini in the Apache2 directory with text editor. Abrir php.ini en el directorio de Apache 2 con editor de texto.
Search for the line of extension_dir = “./” . Buscar la línea de extension_dir = ". /". Change it to extension_dir = “C:\php5\ext” . Cambiar a extension_dir = "C: \ php5 \ ext". Also, uncomment the line of extension=php_mysql.dll . Por otra parte, descomentar la línea de extensión = php_mysql.dll.
Save the php.ini. Save the php.ini. Restart the Apache server. Reinicie el servidor Apache. Re-try to access Vuelva a intentar el acceso http://localhost/php5_info.php . It should working fine. Se debe trabajar bien. If not try to check what’s the cause of errors, which most likely due to wrong extension_dir or missing extension. Si no tratar de comprobar cuál es la causa de los errores, que a lo mejor debido al mal extension_dir extensión o desaparecidos. Or you may try to copy all the needed extentions (with .dll extenstion) to Apache2 directory. O puede tratar de copiar todas las extensiones necesarias (con. Extenstion dll) para Apache2 directorio.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Se trata de una máquina que traduzca la página se proporciona "tal cual" sin garantía. Machine translation may be difficult to understand. La traducción automática puede resultar difícil de entender. Please refer to Por favor, consulte original English article artículo original Inglés whenever possible. siempre que sea posible.
Share and contribute or get technical support and help at Compartir y contribuir o recibir apoyo técnico y ayudar a My Digital Life Forums Mi vida digital Foros .
Related Articles Artículos relacionados
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 1 Instalar Web Server en Windows XP con Apache 2, PHP5 y MySQL4 - Parte 1
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4 Instalar Web Server en Windows XP con Apache 2, PHP5 y MySQL4 - Parte 4
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Instalar Web Server en Windows XP con Apache 2, PHP5 y MySQL4 - Parte 2
- Using phpMyAdmin for Effective MySQL Management in Windows XP El uso de phpMyAdmin para una eficaz gestión de MySQL en Windows XP
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5 Instalación de Web Server en FreeBSD 6,0 con Apache 2,2, 5,0 MySQL y PHP 5 - Parte 5
- Install, Setup and Configure CGI and Perl in Windows XP Instalación, configuración y Configurar CGI y Perl en Windows XP
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4 Instalación de Web Server en FreeBSD 6,0 con Apache 2,2, 5,0 MySQL y PHP 5 - Parte 4
- Install phpBB 2 in Windows XP running on Apache 2, PHP 5 and MySQL 4 Instalar phpBB 2 de Windows XP corriendo en Apache 2, PHP 5 y MySQL 4
- Easily Set Up Web Server with XAMPP Fácil de configurar tu servidor con XAMPP
- Subversion (SVN) Issues and Problems on mod_dav_svn in FreeBSD Subversion (SVN) Cuestiones y problemas en mod_dav_svn en FreeBSD





May 20th, 2006 03:42 20 de Mayo de 2006 03:42
well, I have followed your directions and everyone else’s before this, but no luck. así, he seguido sus instrucciones y todos los demás antes de esto, pero no suerte. After adding the module declaration in the httpd.conf file, when I restart apache i get - syntax error: cannot load specific module. Después de añadir el módulo de declaración en el archivo httpd.conf, cuando reinicie apache i get - error de sintaxis: no puede cargar módulo específico. all of my paths are correct what is the problem? todos mis caminos son correctos, ¿cuál es el problema?
May 20th, 2006 14:33 20 de Mayo de 2006 14:33
Hi Todd, the issue might be related to mod_perl (if you’re using it as ActivePerl). Hola Todd, el problema podría estar relacionado con mod_perl (si está utilizando como ActivePerl). If you install Apache/2.2, please use mod_perl that is compiled with Apache 2.2 and not Apache 2.0 for compatibility issue. Si instala Apache/2.2, por favor, utilice mod_perl que está compilado con Apache 2,2 y no 2,0 Apache para problema de compatibilidad.
July 12th, 2006 19:10 Julio 12, 2006 19:10
I have the server set up and i can read a php file if i start it withhtml tags but it doesnt read the php script i put in. if i dont use the html tags i get a download box when i click on the link to test the php?? Tengo el servidor creado y puedo leer un archivo php i si se inicia el withhtml etiquetas, pero no funciona leer el script php i poner pulg i dont si el uso de etiquetas HTML i obtener un cuadro de descarga al hacer clic en el enlace para poner a prueba el PHP? can u help me!! puede ayudar u me!
July 12th, 2006 19:46 Julio 12, 2006 19:46
Looks like your web server doesn’t parse PHP file and treat it as text file, follow the steps carefully. Parece que tu servidor web no analizar el archivo PHP y lo tratan como archivo de texto, siga los pasos cuidadosamente.
July 13th, 2006 07:32 Julio 13, 2006 07:32
ok i reset it and now the server cannot find php5apache2.dll? ok i restaurarla y ahora el servidor no puede encontrar php5apache2.dll? It is in the php folder. Es en la carpeta php. I am using php5.1.4 and apache2.2.2! Estoy utilizando php5.1.4 y apache2.2.2!
July 13th, 2006 08:43 Julio 13, 2006 08:43
I got it to work i uninstalled apache 2.2 and installed 2.0 and followed your steps again and now it is all working:) Lo tengo de trabajar i desinstalado apache instalado y 2,2 y 2,0 seguido sus pasos de nuevo y ahora es trabajo de todos:)
Thank you for the help! Gracias por la ayuda!
September 10th, 2006 20:48 10 de Septiembre de 2006 20:48
There seems to be a problem with Apache 2.2 and the PHP dll modules (on Windows obviously, don’t know if there are any problems on unix). Parece que hay un problema con Apache 2,2 y los módulos de PHP dll (en Windows, obviamente, no sé si hay algún problema en unix). I fixed it by going to Me fijo que por ir a http://www.apachelounge.com/download/ and downloading their version of the php4apache2.dll file. y descargar su versión del archivo php4apache2.dll. This also comes with another file which you have to put in your Apache/bin directory, and you will also need to download a MS Visual C++ Package if you don’t have the .NET framework installed. Esto también viene con otro archivo que usted tiene que poner en tu Apache / bin directorio, y puede que también quiera descargar un MS Visual C + + paquete si no lo tiene. NET Framework instalado. This is all explained in the readme file that comes with the DLL. Todo esto es explicado en el archivo readme que viene con la DLL.
October 7th, 2006 07:18 7 de Octubre de 2006 07:18
With Apache 2.2, you will need PHP 5.2.x. Con 2,2 Apache, necesitará PHP 5.2.x. It has the php5apache2_2.dll that is compiled for the new version. Tiene la php5apache2_2.dll que se compila para la nueva versión. You can download a stable build at Puede descargar una construcción estable en http://snaps.php.net/
February 19th, 2007 17:11 Febrero 19, 2007 17:11
You said… Usted ha dicho…
…
Search for the line of extension_dir = “./”. Buscar la línea de extension_dir = "./". Change it to extension_dir = “C:\php5\ext”. Cambiar a extension_dir = "C: \ php5 \ ext". Also, uncomment the line of extension=php_mysql.dll. Por otra parte, descomentar la línea de extensión = php_mysql.dll.
Save the php.ini. Save the php.ini. Restart the Apache server. Reinicie el servidor Apache. Re-try to access Vuelva a intentar el acceso http://localhost/php5_info.php . It should working fine. Se debe trabajar bien. If not try to Si no se tratan de
….. … ..
….. … ..
“C:\php5\ext”. "C: \ php5 \ ext". ?????? — the correct line is -- La línea correcta es
“C:\php\ext”. "C: \ php \ ext".
February 19th, 2007 17:23 Febrero 19, 2007 17:23
u forgot a thing, for the apache.. u olvidado una cosa, para el apache ..
modify DirectoryIndex and put index.php modificar y poner DirectoryIndex index.php
in rest is a good tutorial en el resto es un buen tutorial
February 25th, 2007 01:30 25 de febrero de 2007 01:30
I am trying to connect mysql5 from apache2 but Estoy tratando de conectar de mysql5 pero apache2
browser showing an error navegador que muestra un error
” "
Warning: require(/config/db_config.php) [function.require]: failed to open stream: No such file or directory in C:\webroot\dbconnect.php on line 2 Advertencia: exigir (/ config / db_config.php) [function.require]: no se puede abrir stream: No existe el archivo o directorio en C: \ webroot \ dbconnect.php en la línea 2
Fatal error: require() [function.require]: Failed opening required ‘/config/db_config.php’ (include_path=’.;C:\php5\pear’) in C:\webroot\dbconnect.php on line 2 Fatal error: exigir () [function.require]: no requiere la apertura de '/ config / db_config.php' (include_path = '.; C: \ php5 \ pear') en C: \ webroot \ dbconnect.php en la línea 2
I am using,MySQL5, PHP5 and Apache2.2 running windows xp Estoy utilizando, MySQL5, PHP5 y Apache2.2 ejecuta Windows xp
Request your help Solicitar su ayuda
Thanking you Gracias
******
February 25th, 2007 01:30 25 de febrero de 2007 01:30
I am trying to connect mysql5 from apache2 but Estoy tratando de conectar de mysql5 pero apache2
browser showing an error navegador que muestra un error
” "
Warning: require(/config/db_config.php) [function.require]: failed to open stream: No such file or directory in C:\webroot\dbconnect.php on line 2 Advertencia: exigir (/ config / db_config.php) [function.require]: no se puede abrir stream: No existe el archivo o directorio en C: \ webroot \ dbconnect.php en la línea 2
Fatal error: require() [function.require]: Failed opening required ‘/config/db_config.php’ (include_path=’.;C:\php5\pear’) in C:\webroot\dbconnect.php on line 2 Fatal error: exigir () [function.require]: no requiere la apertura de '/ config / db_config.php' (include_path = '.; C: \ php5 \ pear') en C: \ webroot \ dbconnect.php en la línea 2
I am using,MySQL5, PHP5 and Apache2.2 running windows xp Estoy utilizando, MySQL5, PHP5 y Apache2.2 ejecuta Windows xp
Request your help Solicitar su ayuda
Thanking you Gracias
Asokan
June 21st, 2007 13:10 21 de junio de 2007 13:10
I have succes install apache 2, php5 and MySQL 5. He sucesion de instalar Apache 2, php5 y MySQL 5. I can display php info. Me puede mostrar php info. But, why php script that I make can not run in the IE browser. Pero, ¿por qué script php que hago no puedo ejecutar en el navegador IE. this simple script like this: este sencillo script de este modo:
I use Windows XP. Utilizo Windows XP.
Thank you for your attention. Gracias por su atención.