|
|
 |
CapÃtulo 53. Preguntas Frecuentes de Instalación
Esta sección contiene preguntas comunes sobre el modo de
instalar PHP. PHP se encuentra disponible para casi cualquier SO
(excepto quizás por MacOS antes de OSX), y casi cualquier
servidor web.
Para instalar PHP, siga las instrucciones en Parte II en Manual de PHP.
- 1.
¿Porqué no debo usar Apache 2 con un módulo
de multi-procesamiento (MPM) multi-hilos en un entorno en
producción?
- 2.
Unix/Windows: ¿En dónde debe estar ubicado mi
archivo php.ini?
- 3.
Unix: Instalé PHP, ¡pero cada vez que cargo un
documento, recibo el mensaje 'Document Contains No Data'!
¿Qué está pasando aqu�
- 4.
Unix: Instalé PHP usando RPMS, ¡pero Apache no
está procesando las páginas PHP¡
¿Qué está pasando aqu�
- 5.
Unix: Instalé PHP 3 usando RPMS, ¡pero no compila
con el soporte de bases de datos que necesito!
¿Qué está pasando?
- 6.
Unix: He aplicado el parche de extensiones FrontPage a Apache, y
de pronto PHP dejó de funcionar. ¿Es PHP
incompatible con las extensiones FrontPage de Apache?
- 7.
Unix/Windows: He instalado PHP, pero cuando intento acceder a un
script PHP a través de mi navegador, recibo una pantalla
en blanco.
- 8.
Unix/Windows: He instalado PHP, pero cuando intento acceder a un
script PHP a través de mi navegador, recibo un error 500
de servidor.
- 9.
Algunos sistemas operativos: He instalado PHP sin errores, pero
cuando intento iniciar apache, recibo errores de sÃmbolos
indefinidos:
[mi_maquina:usuario /src/php4] root# apachectl configtest
apachectl: /usr/local/apache/bin/httpd Undefined symbols:
_compress
_uncompress |
- 10.
Windows: He instalado PHP, pero cuando intento acceder a un
script PHP a través de mi navegador, recibo el error:
cgi error:
The specified CGI application misbehaved by not
returning a complete set of HTTP headers.
The headers it did return are: |
- 11.
Windows: He seguido todas las instrucciones, ¡pero aun no
logro que PHP e IIS trabajen juntos!
- 12.
Cuando corro PHP como CGI con IIS, PWS, OmniHTTPD o Xitami,
recibo el siguiente error: Security Alert! PHP CGI
cannot be accessed directly..
- 13.
¿Cómo se si mi php.ini está siendo
encontrado y leÃdo? Pareciera que mis cambios no
están siendo implementados.
- 14.
¿Cómo agrego mi directorio de PHP a la variable
PATH en Windows?
- 15.
¿Cómo hago que el archivo php.ini se encuentre
disponible para PHP en windows?
- 16.
¿Es posible usar la negociación de contenido de
Apache (opción MultiViews) con PHP?
- 17.
¿PHP se limita a procesar los métodos de
petición GET y POST solamente?
1.
¿Porqué no debo usar Apache 2 con un módulo
de multi-procesamiento (MPM) multi-hilos en un entorno en
producción?
PHP es pegamento. Es el pegamento usado para construir
interesantes aplicaciones web, uniendo docenas de bibliotecas
externas y haciéndolas parecer una entidad coherente a
través de una interfaz de lenguaje intuitiva y
fácil de aprender. La flexibilidad y poder de PHP depende
de la estabilidad y robustez de la plataforma
subyacente. Necesita de un SO que funcione, un servidor web que
funcione y unas bibliotecas externas que funcionen para unirlo
todo. Cuando uno cualquiera de estos elementos deja de trabajar,
PHP necesita identificar los problemas y solucionarlos
rápidamente. Al hacer más complejo el marco de
referencia base, no disponiendo de hilos de ejecución
completamente separados, segmentos de memoria completamente
separados y una caja de arena segura para que cada
petición trabaje, se introduce una base débil al
sistema de PHP.
Si siente que necesita usar un MPM multi-hilos, puede echarle un
vistazo a la configuración FastCGI, en donde PHP corre en
su propio espacio de memoria.
Y finalmente, note que esta advertencia contra el uso de un MPM
multi-hilos no tiene tanta fuerza en sistemas Windows, ya que la
mayorÃa de bibliotecas en esa platafarma tienden a ser
seguras en entornos multi-hilo.
2.
Unix/Windows: ¿En dónde debe estar ubicado mi
archivo php.ini?
Por defecto, en Unix debe estar en
/usr/local/lib, lo que es,
<ruta-instalacion>/lib. La
mayorÃa de personas querrán modificar éste
valor en tiempo de compilación con la bandera --with-config-file-path.
PodrÃa, por ejemplo, definirla como:
--with-config-file-path=/etc |
Y luego copiarÃa php.ini-dist desde
su distribución a /etc/php.ini y lo
editarÃa para hacer cualquier modificación local
que desee.
--with-config-file-scan-dir=PATH |
En windows, la ruta predeterminada para el archivo php.ini es
el directorio de windows. Si está usando el servidor web
Apache, php.ini será buscado primero en el directorio
de instalación de Apache, p.ej. c:\program
files\apache group\apache. De este modo, puede contar
con diferentes archivos php.ini para diferentes versiones de
Apache en la misma máquina.
Vea también el capÃtulo sobre el archivo de
configuración.
3.
Unix: Instalé PHP, ¡pero cada vez que cargo un
documento, recibo el mensaje 'Document Contains No Data'!
¿Qué está pasando aqu�
Esto probablemente quiere decir que PHP está sufriendo
algún tipo de dificultad y está produciendo
volcados de memoria. Eche un vistazo a su registro de errores
del servidor para ver si éste es el caso, y luego trate
de reproducir el problema con un pequeño caso de
prueba. Si sabe cómo usar 'gdb', es muy útil
cuando puede proveer un backtrace con su reporte de fallo para
ayudar a los desarrolladores a ubicar el problema. Si
está usando PHP como módulo de Apache, intente
algo como:
Detener todos sus procesos httpd
gdb httpd
Detener todos sus procesos httpd
> run -X -f /ruta/hacia/httpd.conf
Luego recuperar la URL que causa el problema con su navegador
> run -X -f /ruta/hacia/httpd.conf
Si está recibiendo un volcado de memoria, gdb debe
informarle de ésto.
escriba: bt
Ahora debe incluir su backtrace en su reporte de
fallo. Éste debe ser enviado desde http://bugs.php.net/
Si su script usa las funciones de expresiones regulares
(ereg() y amigas), debe asegurarse de que
compiló PHP y Apache con el mismo paquete de expresiones
regulares. Esto debe pasar automáticamente con PHP y
Apache 1.3.x
4.
Unix: Instalé PHP usando RPMS, ¡pero Apache no
está procesando las páginas PHP¡
¿Qué está pasando aqu�
Asumiendo que ha instalado tanto Apache como PHP desde paquetes
RPM, necesita remover los caracteres de comentario, o agregar
algunas o todas de las siguientes lÃneas en su archivo
httpd.conf:
# Modulos Extra
AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perl.c
# Modulos Extra
LoadModule php_module modules/mod_php.so
LoadModule php3_module modules/libphp3.so # para PHP 3
LoadModule php4_module modules/libphp4.so # para PHP 4
LoadModule perl_module modules/libperl.so |
Y agregar:
AddType application/x-httpd-php3 .php3 # para PHP 3
AddType application/x-httpd-php .php # para PHP 4 |
... a las propiedades globales, o a las propiedades del
VirtualDomain para el cual desea tener soporte de PHP.
5.
Unix: Instalé PHP 3 usando RPMS, ¡pero no compila
con el soporte de bases de datos que necesito!
¿Qué está pasando?
Debido a la forma en que se compila PHP 3, no es sencillo crear
un RPM de PHP flexible completo. Este problema es atendido en
PHP 4. Para PHP 3, actualmente le sugerimos que use el mecanismo
descrito en el archivo INSTALL.REDHAT en la distribución
de PHP. Si insiste en usar una versión RPM para PHP 3,
continúe leyendo...
Los empaquetadores de RPM están configurando los RPMS
para ser instalados sin soporte de bases de datos para
simplificar las instalaciones y porque los
RPMS usan /usr/ en lugar del directorio /usr/local/
estándar para los archivos. Usted necesita decirle al
archivo spec del RPM cuáles bases de datos soportar y la
ubicación del nivel más alto de su servidor de
bases de datos.
Este ejemplo explicará el proceso de agregar soporte para
el popular servidor de bases de datos MySQL, usando la
instalación de módulo para Apache.
Por supuesto, toda esta información puede ser ajustada
para cualquier servidor de bases de datos soportada por
PHP. Asumiremos que ha instalado MySQL y Apache completamente
con RPMS para este ejemplo también.
Primero remueva mod_php3 :
Luego obtenga el rpm fuente e INSTÃLELO, NO use
--rebuild
rpm -Uvh mod_php3-3.0.5-2.src.rpm |
Luego edite el archivo
/usr/src/redhat/SPECS/mod_php3.spec
En la sección %build agrege el soporte de bases de
datos que desea, y la ruta.
Para MySQL, usted agregarÃa --with-mysql=/usr La sección
%build se verá algo como:
./configure --prefix=/usr \
--with-apxs=/usr/sbin/apxs \
--with-config-file-path=/usr/lib \
--enable-debug=no \
--enable-safe-mode \
--with-exec-dir=/usr/bin \
--with-mysql=/usr \
--with-system-regex |
Una vez está hecha esta modificación, compile
el rpm binario de este modo:
rpm -bb /usr/src/redhat/SPECS/mod_php3.spec |
Luego instale el rpm
rpm -ivh /usr/src/redhat/RPMS/i386/mod_php3-3.0.5-2.i386.rpm |
Asegúrese de reiniciar Apache, y ahora tendrá PHP
3 con soporte para MySQL usando RPM's. Note que probablemente es
mucho más fácil simplemente compilar a partir del
tarball de distribución de PHP 3 y seguir las
instrucciones encontradas
en INSTALL.REDHAT.
6.
Unix: He aplicado el parche de extensiones FrontPage a Apache, y
de pronto PHP dejó de funcionar. ¿Es PHP
incompatible con las extensiones FrontPage de Apache?
No, PHP trabaja bien con las extensiones FrontPage. El problema
es que el parche de FrontPage modifica varias estructuras de
Apache en las que depende PHP. Recompilar PHP (usando 'make
clean ; make') después de que se ha aplicado el parche FP
debe solucionar el problema.
7.
Unix/Windows: He instalado PHP, pero cuando intento acceder a un
script PHP a través de mi navegador, recibo una pantalla
en blanco.
Seleccione la acción 'ver código fuente' en el
navegador web y probablemente encontrará el código
fuente de su script PHP. Esto quiere decir que el servidor web
no envió el script a PHP para su
interpretación. Algo está mal en la
configuración del servidor - revise cuidadosamente la
configuración del servidor con las instrucciones de
instalación de PHP.
8.
Unix/Windows: He instalado PHP, pero cuando intento acceder a un
script PHP a través de mi navegador, recibo un error 500
de servidor.
Algo falló cuando el servidor intentó ejecutar
PHP. Para poder ver un mensaje de error más útil,
desde la lÃnea de comandos, vaya al directorio que
contiene el ejecutable PHP (php.exe en
Windows) y ejecute php -i. Si PHP tiene
algún problema corriendo, entonces se desplegará
un mensaje de error apropiado, el cual le dará una pista
sobre lo que debe hacer a continuación. Si recibe una
pantalla llena de códigos HTML (la salida de la
función phpinfo()) entonces PHP
está funcionando, y su problema puede estar relacionado
con la configuración de su servidor, la cual debe revisar
de nuevo.
9.
Algunos sistemas operativos: He instalado PHP sin errores, pero
cuando intento iniciar apache, recibo errores de sÃmbolos
indefinidos:
[mi_maquina:usuario /src/php4] root# apachectl configtest
apachectl: /usr/local/apache/bin/httpd Undefined symbols:
_compress
_uncompress |
Esto no tiene nada que ver con PHP en realidad, sino con las
bibliotecas de cliente de MySQL. Algunas necesitan --with-zlib, otras no. Esto tema
también se cubre en el FAQ sobre MySQL.
10.
Windows: He instalado PHP, pero cuando intento acceder a un
script PHP a través de mi navegador, recibo el error:
cgi error:
The specified CGI application misbehaved by not
returning a complete set of HTTP headers.
The headers it did return are: |
El mensaje de error significa que PHP falló en su intento
de producir una salida. Para poder ver un mensaje de error
más útil, desde la lÃnea de comandos, vaya
al directorio que contiene el ejecutable de PHP
(php.exe en Windows) y ejecute php
-i. Si PHP tiene algún problema
ejecutándose, entonces se desplegará un mensaje de
error apropiado, el cual le dará una pista sobre lo que
necesita hacer a continuación. Si recibe una pantalla
llena de códigos HTML (la salida de la función
phpinfo()) entonces PHP está
funcionando.
Una vez PHP esté trabajando desde la lÃnea de
comandos, intente acceder al script desde el navegador
nuevamente. Si aun falla, entonces la causa puede ser alguna de
las siguientes:
Los permisos de archivo en su script
PHP, php.exe, php4ts.dll,
php.ini o cualquier extensión PHP que esté
tratando cargar son de tal forma que el usuario anónimo
de internet ISUR_<nombre_maquina> no
tiene acceso a éstos recursos.
El archivo del script no existe (o posiblemente no se
encuentra en donde cree que está, relativo a su
directorio web raÃz). Note que para IIS, puede atrapar
este error seleccionando la caja 'check file exists' cuando
esté configurando la gestión de scripts bajo
Internet Services Manager. Si un archivo de script no existe,
entonces el servidor devolverán un error 404 en su
lugar. También existe el beneficio adicional de que IIS
se encargará de cualquier autenticación
requerida por usted, basado en los permisos NTLanMan en su
archivo de script.
11.
Windows: He seguido todas las instrucciones, ¡pero aun no
logro que PHP e IIS trabajen juntos!
¡Asegúrese de que cualquier usuario que necesite
ejecutar un script PHP tenga los permisos para
ejecutar php.exe! IIS usa un usuario
anónimo que es agregado al momento de instalar IIS. Este
usuario necesita privilegios
sobre php.exe. También, cualquier
usuario autenticado necesitará permisos para
ejecutar php.exe. Y para IIS4, necesita
decirle que PHP es un motor de scripts. Asimismo, querrá
leer
este faq.
12.
Cuando corro PHP como CGI con IIS, PWS, OmniHTTPD o Xitami,
recibo el siguiente error: Security Alert! PHP CGI
cannot be accessed directly..
Debe definir la directiva cgi.force_redirect
como 0. Su valor predeterminado
es 1, asà que asegúrese de que
la directiva no se encuentre comentada (con
un ;). Como todas las directivas, ésta
se define en php.ini
Debido a que su valor predeterminado es 1, es
importante que esté 100% seguro de que el archivo
php.ini correcto está siendo leÃdo. Lea este faq para
más detalles.
13.
¿Cómo se si mi php.ini está siendo
encontrado y leÃdo? Pareciera que mis cambios no
están siendo implementados.
Para asegurarse de que su php.ini está siendo
leÃdo por PHP, haga un llamado
a phpinfo(), y cerca del comienzo
encontrará un listado llamado Configuration File
(php.ini). Éste le dirá en dónde
está buscando PHP el archivo php.ini y si está
siendo leÃdo o no. Si sólo existe un directorio
PATH, entonces no está siendo leÃdo y debe colocar
su php.ini en ese directorio. Si php.ini es incluido con la
ruta PATH, entonces está siendo leÃdo.
Si php.ini está siendo leido y está ejecutando
PHP como un módulo, entonces asegúrese de
reiniciar su navegador web después de hacer cambios a
php.ini
14.
¿Cómo agrego mi directorio de PHP a la variable
PATH en Windows?
En Windows NT, 2000, XP y 2003:
DirÃjase al Panel de Control y abra el Ãcono de
Sistema (Inicio -> Configuración -> Panel de
Control -> Sistema, o simplemente Inicio -> Panel de
Control -> Sistema en Windows XP/2003)
Vaya a la solapa Avanzado
Pulse el botón 'Variables de Entorno'
Consulte el panel de 'Variables de Sistema'
Encuentre la entrada Path (puede que tenga que desplazarse por
la lista para encontrarla)
Haga doble clic sobre la entrada Path
Ingrese su directorio PHP al final, incluyendo ';' al
comienzo (p.ej. ;C:\php)
Presione Aceptar y reinicie su máquina
En Windows 98/Me necesita editar el archivo
autoexec.bat:
Abra el Bloc de Notas (Inicio -> Ejecutar y escriba notepad)
Abra el archivo C:\autoexec.bat
Ubique la lÃnea con
PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;..... y agregue:
;C:\php al final de la lÃnea
Guarde el archivo y reinicie su máquina
Nota:
Asegúrese de reiniciar después de seguir los
anteriores pasos para asegurarse de que los cambias a
PATH sean aplicados.
El manual de PHP solÃa promover la copia de archivos al
directorio system de Windows, esto es porque el directorio
(C:\Windows, C:\WINNT,
etc.) se encuentra por defecto en el valor PATH del
sistema. Copiar archivos en el directorio system de Windows se
considera obsoleto desde hace bastante tiempo, y puede causar
problemas.
15.
¿Cómo hago que el archivo php.ini se encuentre
disponible para PHP en windows?
Existen varias formas de lograr esto. Si está usando
Apache, lea sus instrucciones especÃficas de
instalación (Apache 1, Apache 2), o de lo
contrario debe definir la variable de entorno
PHPRC:
En Windows NT, 2000, XP y 2003:
DirÃjase al Panel de Control y abra el Ãcono de
Sistema (Inicio -> Configuración -> Panel de
Control -> Sistema, o simplemente Inicio -> Panel de
Control -> Sistema para Windows XP/2003)
Vaya a la solapa de Avanzado
Pulse sobre el botón 'Variables de Entorno'
Consulte el panel de 'Variables de sistema'
Pulse sobre 'Nueva' e ingrese 'PHPRC' como el nombre de
variable y el directorio en donde se encuentra php.ini como
el valor de la variable (p.ej. C:\php)
Pulse aceptar y reinicie su máquina
En Windows 98/Me necesita editar el archivo
autoexec.bat:
Abre el Bloc de Notas (Inicio -> Ejecutar e
ingrese notepad) Abra el
archivo C:\autoexec.bat
Agrege una nueva
lÃnea al final del archivo: set
PHPRC=C:\php (reemplace C:\php
con el directorio en donde se encuentra php.ini). Por favor
note que la ruta no puede contener espacios. Por ejemplo si
tiene instalado PHP en C:\Archivos de
Programa\PHP, usted deberÃa ingresar
C:\ARCHIV~1\PHP en su lugar.
Guarde el archivo y reinicie su máquina
16.
¿Es posible usar la negociación de contenido de
Apache (opción MultiViews) con PHP?
Si los enlaces a archivos PHP incluyen la extensión, todo
trabaja perfectamente. Este FAQ es sólo para el caso en
el que los enlaces a archivos PHP no incluyen la
extensión y se desea usar la negociación de
contenido para elegir archivos PHP de una URL sin
extensión. En este caso reemplace la lÃnea
AddType application/x-httpd-php .php con:
# PHP 4
AddHandler php-script php
AddType text/html php
# PHP 5
AddHandler php5-script php
AddType text/html php |
Esta solución no funciona con Apache 1 ya que el
módulo PHP no atrapa php-script.
17.
¿PHP se limita a procesar los métodos de
petición GET y POST solamente?
No, es posible manejar cualquier método de
petición, p.ej. CONNECT. La respuesta de status apropiada
puede ser enviada con header(). Si solo los
métodos GET y POST debieran ser manejados, puede
conseguirse con esta configuración de Apache:
<LimitExcept GET POST>
Deny from all
</LimitExcept> |
add a note
User Contributed Notes
Preguntas Frecuentes de Instalación
emzeperx at emzeper dot hu
01-Jan-2006 12:36
You do not have to restart the whole system make effect of changing the PATH env var. For me (sbs2003) worked automatically.
on older systems you can use
set $Path=%path%;c:\php
command to extend immediately the path var.
JUSTANOTHERUSER
14-Aug-2005 11:23
<LimitExcept GET POST>
Deny from all
</LimitExcept>
Does not work with Apache2+ & PHP5 . Apache Refuses to start
per dot fikse at ipj dot no
12-Jul-2005 01:22
Installing PHP 4 or 5 on Windows Server 2003 x64 results in http error 505. This is not a PHP bug. It is due to running a 32-bit ISAPI DLL under the 64-bit version of IIS 6, as documented here: http://support.microsoft.com/?id=895976
Solution: Flip the Metabase flag for Enable32bitAppOnWin64 as described in http://support.microsoft.com/?id=894435 ,
like this: CSCRIPT ADSUTIL.VBS SET W3SVC/AppPools/Enable32bitAppOnWin64 1
(Alternatively with full path: cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1)
patrick hat paddyworks dot com
23-May-2005 09:52
In setting up PHP 5.0.4 + IIS 6 I can concur with vlad at vkelman dot com that setting the environment variable PHPRC is ineffective at telling IIS where to look for php.ini. The only place PHP5 seems to successfully find php.ini is in C:\Windows. Using PHPIniDir with Apache2 works like a charm, however.
vlad at vkelman dot com
01-Mar-2005 08:45
In addition of what jimo at mail dot azhsv dot com said:
I don't know which idiot at Microsoft wrote those Knowledge Base articles (http://support.microsoft.com/kb/328360/EN-US/) - maybe the same idiot who created "Web Server Extensions". But the same - adding extensions and enabling them may be achived much simplier: just open III Manager, go to "Web Server Extensions" and add what you need interactively.
I'm trying to make both PHP 4 and PHP 5 running as modules on my machine, PHP 4 under IIS and PHP 5 under Apache 2. It turns out that it much easier to work with Apache. In particular, it allows to use PHPIniDir directive to point PHP to php.ini file. IIS is supposed to allow it with setting the PHPRC environment variable, but for some reason it doesn't work on my machine so far.
barry dot fagin at usafa dot af dot mil
04-Jan-2005 09:22
Fixing 404 (file not found) errors with PHP 5.0.3 and IIS 6.0
IIS 6.0 is installed with security settings that don't permit dynamic content. This means that even if all the hints in the FAQ are paid attention to (.ini modified correctly, security and permissions correct for IUSR_xxx user, etc), you still get 404 errors for all php files.
To fix this: IIS Manager -> expand local computer -> Web Services Extensions -> Add web service or extension -> .php, browse to c:\php\php-cgi.exe or wherever you had the php executable installed. That plus setting the doc_root in the .ini file solved the problem.
--BF
furrycod at hotmail dot com
07-Sep-2004 09:35
Great WAMP 1.4.4 (Apache 1.*, MySql 4.*, PHP 4.*) installation article at http://www.circaware.com/articles.php?id=2
This article details how to install these onto a USB stick--which means changing *nothing* on the host PC, such as registry entries, environment variables, files in the Windows path, NT services, ini files, etc.
The USB stick install seems awkward, but I installed WAMP to my harddrive using this article as a guide (essentially replacing E:\ with C:\), and it works fine. No more trying to decide where the *real* php.ini or my.ini file is that needs to be changed.
masternuthin diespammer at yahoo dot com
23-Jun-2004 03:33
PHP 4.3.7.7 and IIS 6 (w2k3 standard)
Followed note from nigel dot salt at hotmail dot com
but had to modify "Script Map" to "ScriptMap"
Also, had to follow note from jimo at mail dot azhsv dot com
after all that - it worked.
jeff_graham at datacenterservices dot net
01-Feb-2004 01:51
As stated within the note "jimo at mail dot azhsv dot com
29-Nov-2003 04:33
PHP 4 and IIS 6.0 (Windows Server 2003)," I found the same steps were requiered for installation of PhP 5 beta 3 on my Windows 2003 server (Standard Edition)
nigel dot salt at hotmail dot com
13-Dec-2003 05:00
Finally got IIS 5 and PHP 5 to talk.
What worked for me was:
1) Set
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
W3SVC\Parameters\Script Map]
".php"="your path to php\\php.exe"
2) ensure there is not a php.ini in the windows system folder and that there is one wherever you've put PHP
3) edit php.ini and set cgi force redirect to 0 and cgi.rfc2616_headers = 1
4) Put the PHP scripts in their own folder underneath the inetpub root
5) Open the IIS console, right click your new php folder
In the Directory tab
set application name to the name of the folder
set executable and script as permission
set application protection to low
Click configuration and check that .php is mapped to wherever you put
PHP
Restart IIS
Try a very simple PHP page and it should work
Nigel
jimo at mail dot azhsv dot com
29-Nov-2003 07:33
PHP 4 and IIS 6.0 (Windows Server 2003)
Had difficulty getting PHP 4.3.3 to work with Win2003 Ent Server for use with SquirrelMail. Problem found and believed solved. Appears to be something New with IIS 6.0 (More security by Micro$oft) Was getting 404 error and php was not being run as a cgi even though it was in extensions and IIS user had rights to execute it. (php from command line operated correctly)
If you are installing on Windows Server 2003 (only have Enterprise Edition – Not sure if this applies to standard edition), and you have done the normal procedures for inclusion of PHP scripts (either ISAPI or CGI) in IIS, you will still get a 404 error when attempting to execute those scripts even though IIS has rights and the extension points to the correct file. To alleviate this problem, perform the following:
1. Open a command prompt window
2. Change to C:\windows\system32
3. Execute the command: cscript iisext.vbs /AddFile c:\php\php.exe 1 php 0 php
4. Execute the command: cscript iisext.vbs /EnFile c:\php\php.exe
5. To check for correct execution of the above,
6. Execute the command: cscript IisExt.vbs /ListFile – the php extension should be listed
If you try just step 4 without step 3 you get an error that the file is not in the list (and won’t be there till you do step 3 above)
After this, IIS seems to like the php extension and work normally.
For additional reference, see the below 3 Micro$oft KB Articles:
HOWTO: Enable and Disable ISAPI Extensions and CGI Applications in IIS 6.0 (MS KB Article 328360)
HOWTO List Web Server Extensions and Extension Files in IIS 6.0 (MS KB Article 328505)
HOWTO Add and Remove Web Service Extension Files in IIS 6.0 (MS KB Article 328419)
peter dot mosinskisNOSPAM at csuci dot edu
06-Mar-2003 12:36
Running Win2K AS + IIS5.0 + PHP 4.3.1, I ran into a nasty problem that I mistakenly thought had to do with something in the php.ini configuration. When I would try to submit a form using the HTTP method GET it would work, but I would get a "404 Page Not Found" error using the POST method.
All my permissions were set correctly, the php.ini was configured correctly. It had to do with URLScan being installed on IIS (see below)
Page 404 File Not Found Error When Using POST method in PHP (and Perl, and otherwise)
-------------------------------------------
This is related to the Microsoft URLScan utility. If you have this problem, the IIS administrator has probably run the IIS Lockdown tool as well as configured URLScan to reject this type of HTTP method when sent in a URL. These tools are meant to enhance web server security.
URLScan configuration files can be found in the \WINNT\system32\inetsrv\urlscan folder on the web server. Specifically, the file to modify is urlscan.ini.
The changes to make are as follows:
1. Make sure UseAllowVerbs=1 under [options]
2. Under the [AllowVerbs] section, list your allowed HTTP methods to include:
GET
POST
For more information on the IIS Lockdown tool and URLScan, visit http://technet.microsoft.com
monroe at peoplego dot com
17-May-2002 10:32
INSTALLATION ON OPENBSD 3.1 VIA PORTS COLLECTION
Would have succeed but no mysql support.
I commented out the FLAVORS+= dbase filepro mysql mysql_bundled postgresql iodbc in the /usr/ports/www/php4/Makefile and in the configure options added
--with-mysql=/usr/local and it worked.
Good Luck
rodent at mighty dot co dot za
17-Apr-2002 04:46
On windows 2000 installation I've had PHP simply hanging when running a PHP script.
To see exactly what is going wrong with PHP in the context of the IUSR_MACHINENAME account create a shortcut on your desktop to point to cmd.exe.
Right click on the shortcut, and select properties.
Then check the 'run as a different user' checkbox of the property pages of the shortcut.
Double click then shortcut, and you will be prompted for a user account to run the cmd.exe shell under.
Enter IUSR_MACHINENAME (replace machine name with the machine name of your system), and enter the password for the account.
If you don't know the password for the IUSR account you might need to go change it in Administrative Tools->Computer Management.
Enter the password, and you will be dropped into a command prompt.
Now run c:\php\php.exe -i and see if you can catch any error messages.
On my system it had a problem accessing c:\winnt\system32\browscap.ini which I was then able to sort out.
Running PHP as the Administrator user didn't give this problem, so being able to impersonate the IIS account was a very useful diagnostic tool.
tanis22 at hotmail dot com
12-Nov-2001 11:01
I figured out why i get this error with just a virtual directory and not the root:
8. Windows: I have installed PHP, but when I to access a PHP script file via my browser, I get the error: cgi error:
The specified CGI application misbehaved by not
returning a complete set of HTTP headers.
The headers it did return are:
---------------------
Look at the php.ini file and look for
doc_root =
set it to nothing so that it does not only look for that directory. I hope it helps people with IIS and PHP
rggonzalez at iname dot com
09-Nov-2000 05:40
Notes on installing PHP (3.x.x or 4.x.x) on a RedHat 6.x Linux box using glibc 2.1.x. When you install it as a DSO module for Apache (--with-apxs) with the standard RPM's from RedHat for Apache and MySQL, the httpd daemon dies without giving any error message, and without sending any message to the console.
From a comment by Rasmus Ledorf: this is caused "probably due to a glibc-2.1.x bug related to dynamically loading a library
linked against pthreads into a binary that isn't linked against
pthreads. Try it using --without-mysql and see if it works. If it does
then you know it is a mysql-related problem. To fix it you will need the
non-threaded mysql client rpm available from www.mysql.com".
You can also download the source code for MySQL and recompiled it statically, using this configuration options:
--with-client-ldflags=-all-static
--with-mysqld-ldflags=-all-static
You must then re-run the ./configure; make; make install in your PHP source tree to get the PHP shared module working with the new MySQL support.
Regards,
Rodolfo Gonzalez.
rggonzalez@iname.com
| |
| | Citas célebres | Primero, elijo los papeles excelentes; si no llega ninguno, elijo los mediocres; y si no llegan, elijo los que me pagan el alquiler. Michael Caine Actor británico (n. 1933) | | Citas en tu mail | | ©Contenidos Gratis |
| Chiste de... Médicos | | Tres pechos | - Doctor, doctor, que veníamos porque mi mujer tiene tres pechos.
- ¡Ah! Y quiere que le extirpe uno de ellos, ¿verdad?
- No, que me implante a mí otra mano | | Chistes en tu mail | | ©ContenidosGratis |
| Inicio | Acción | Estrategia | Palabras | Puzzles | Solitarios | Foro Trucos |  | Cake Mania Jugadores: 6835 Categoría del juego: Acción Objetivo del juego: Ayuda a Jill a recuperar la pastelería de su abuela llevando su propia pastelería; consigue clientes y gana dinero. |
|  | Rainbow Web Jugadores: 2199 Categoría del juego: Puzzles Objetivo del juego: Rompe un pegajoso hechizo y salva un reino de fantasía en Rainbow Web. Tendrás toneladas de diversión mientras juegas a este mágico desafío para la mente. |
|  | Mahjongg Fortuna Jugadores: 12462 Categoría del juego: Solitarios Objetivo del juego: Velocidad y habilidad mental son las armas más importantes en esta versión de un antiguo juego asiático. Despeja el tablero lo antes posible haciendo clic en las fichas iguales y gánate la fama eterna de la puntuación más alta. |
|  | Chainz 2 Jugadores: 6955 Categoría del juego: Puzzles Objetivo del juego: Entra en el mundo de las combinaciones con Chainz 2: Relinked, emocionante secuela del exitazo del año pasado, Chainz. Gira eslabones y crea combinaciones de 3 ó más. |
|  | Delicious Jugadores: 4405 Categoría del juego: Acción Objetivo del juego: ¿Eres un as de la multitarea? ¿Quieres que tus clientes estén contentos? ¡Pues Delicious es tu juego! Sacia el apetito de los clientes y tenlos contentos; ¡no te arriesgues! |
|  | Bookworm Jugadores: 4568 Categoría del juego: Palabras Objetivo del juego: Junta las letras para formar palabras. ¡Las palabras más largas valen más puntos! |
|  | Zuma Jugadores: 4976 Categoría del juego: Acción Objetivo del juego: Controla el ídolo de la rana de piedra de los antiguos Zuma en este intrigante enigma de acción. ¡Dispara bolas para formar conjuntos de tres, pero si dejas que lleguen a la calavera dorada morirás! |
|  | Jewel of Atlantis Jugadores: 3798 Categoría del juego: Puzzles Objetivo del juego: Descubre la ciudad hundida de la Atlántida y busca valiosos tesoros. Viaja más allá de las profundidades del mar y vive trepidantes aventuras en Jewel of Atlantis. |
|  | Jewel Quest Jugadores: 3727 Categoría del juego: Puzzles Objetivo del juego: Convierte la arena de la antigua selva en oro tan rápido como puedas juntando grupos de 3 elementos. ¡Los grupos más grandes valen más puntos! |
|  | Bejeweled 2 Jugadores: 3659 Categoría del juego: Puzzles Objetivo del juego: Con cuatro modos de juego únicos y fascinantes, nuevas piezas de juego explosivas e imponentes fondos planetarios, Bejeweled 2 es mucho más adictivo que nunca. |
|
|