Problema ao abrir index.php [RESOLVIDO]

1. Problema ao abrir index.php [RESOLVIDO]

Luiz Paulo Monteiro
lupamont

(usa Debian)

Enviado em 24/03/2009 - 17:51h

quando eu digito no browser http://127.0.0.1/index.php">http://127.0.0.1/index.php funciona blz, mas qdo coloco somente http://127.0.0.1/ ele não consegue rodar o script e pede pra fazer o download do arquivo php bruto

no arquivo:
/usr/local/apache2/conf/http.conf
alterei a linha DirectoryIndex index.html para
DirectoryIndex index.html index.php default.php main.php

e inclui as linhas:
LoadModule php4_module modules/libphp4.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

mas o problema continua , alguém por favor poderia me ajudar?

Abraços,
Luiz Paulo Monteiro





  


2. Re: Problema ao abrir index.php [RESOLVIDO]

Sérgio Abrantes Junior
pelo

(usa Debian)

Enviado em 24/03/2009 - 18:18h

Meu caro,

Veja se no httpd.conf existe a linha abaixo comentada Include /etc/httpd/mod_php.conf

e se no arquivo mod_php.conf existe algo do tipo

#
# mod_php - PHP Hypertext Preprocessor module
#

# Load the PHP module:
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so

# Tell Apache to feed all *.php files through PHP. If you'd like to
# parse PHP embedded in files with different extensions, comment out
# this line and see the example below.
AddType application/x-httpd-php .php

# Tell Apache to feed all *.php, *.html, and *.htm files through
# the PHP module. Add or subtract extensions here as desired. Please
# note that running pages through PHP for no reason can be both slow
# and insecure, so be sure to know what you're doing. It's a convenient
# shortcut, but probably isn't suitible for high-traffic sites if you
# write any of your pages in straight HTML.
AddType application/x-httpd-php .php .html .htm

# This will display PHP files in colored syntax form. Use with caution.
AddType application/x-httpd-php-source .phps


Sérgio Abrantes
[]'s


3. Re: Problema ao abrir index.php [RESOLVIDO]

Sérgio Abrantes Junior
pelo

(usa Debian)

Enviado em 25/03/2009 - 17:30h

E ai meu caro, deu certo?

[]'s


4. (RESOLVIDO)

Luiz Paulo Monteiro
lupamont

(usa Debian)

Enviado em 13/05/2009 - 16:50h

Bem pessoal, no meu caso como estavam instalados tanto o php4 como o php5, sendo que os dois estavam em conflito....

fiz os seguintes procedimentos (debian):

no arquivo:
/usr/local/apache2/conf/http.conf
alterei a linha DirectoryIndex index.html para
DirectoryIndex index.html index.php default.php main.php

e inclui as linhas:
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

porém como estavam instalados os dois PHP4 e PHP5

desabilitei os modulos PHP4 PHP5
#a2dismod php4 php5
depois habilitei o modulo do PHP5
#a2enmod php5
Reestartei o Apache2
#/etc/init.d/apache2 restart

pronto, funcionou!!!
no meu caso era questao de conflito mesmo pois as configs estavam corretas....

Obrigado Sérgio pela ajuda!!

espero tbm ajudar alguém!!
Abraços
Luiz Paulo Monteiro