Aller au contenu

Passage de php4 a 5 probleme config avec index.htm a racine


Sujets conseillés

Posté

Bonjour,

J'ai un ami qui me prete son dedié freebox/plesk j'ai upgrader php4 à 5 dessus seulement maintenant le fichiers index.htm à la racine d'un de mes sites n'est pas accessible (erreur interne serveur), si je renomme ce fichier index.htm en index.html ca marche, je suppose que c'est mon php.ini a modifier mais je ne sais pas exactement ou et comment je dois faire la modif...

Ci dessous un extrait de mon phpinfo, peut etre ca peut aider à trouver une explication?

System  Linux servidor.com 2.6.18.1dedibox_r6_final #1 Mon Oct 16 14:05:25 CEST 2006 i686  
Build Date May 10 2008 10:31:53
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/apache2/php.ini
Scan this dir for additional .ini files /etc/php5/apache2/conf.d
additional .ini files parsed /etc/php5/apache2/conf.d/curl.ini, /etc/php5/apache2/conf.d/gd.ini, /etc/php5/apache2/conf.d/imap.ini, /etc/php5/apache2/conf.d/mysql.ini, /etc/php5/apache2/conf.d/mysqli.ini, /etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_mysql.ini, /etc/php5/apache2/conf.d/xsl.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, convert.iconv.*, bzip2.*, zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright © 1998-2006 Zend Technologies



--------------------------------------------------------------------------------

PHP Credits

--------------------------------------------------------------------------------

Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
allow_url_include On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_globals_jit On On
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 6135 6135
expose_php On On
extension_dir /usr/lib/php5/20060613+lfs /usr/lib/php5/20060613+lfs
file_uploads On On
highlight.bg #FFFFFF #FFFFFF
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .: .:
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
mail.force_extra_parameters no value no value
max_execution_time 30 30
max_input_time 60 60
memory_limit 32M 32M
open_basedir /var/www/vhosts/****.com/httpdocs:/tmp no value
output_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 12 12
realpath_cache_size 16K 16K
realpath_cache_ttl 120 120
register_argc_argv On On
register_globals On On
register_long_arrays On On
report_memleaks On On
report_zend_debug On On
safe_mode Off On
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On
zend.ze1_compatibility_mode Off Off


apache2handler
Apache Version Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8
Apache API Version 20051115
Server Administrator ****@gmail.com
Hostname:Port ****.com:80
User/Group www-data(33)/33
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 300 - Keep-Alive: 15
Virtual Server Yes
Server Root /etc/apache2
Loaded Modules core mod_log_config mod_logio prefork http_core mod_so mod_alias mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_fcgid mod_include mod_mime mod_negotiation mod_perl mod_php5 mod_rewrite mod_setenvif mod_ssl mod_status mod_suexec mod_userdir

Directive Local Value Master Value
engine 1 1
last_modified 0 0
xbithack 0 0


Apache Environment
Variable Value
SCRIPT_URL /phpinfo.php
SCRIPT_URI -http://www.*****.com/phpinfo.php
HTTP_ACCEPT */*
HTTP_ACCEPT_LANGUAGE fr
HTTP_UA_CPU x86
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)
HTTP_HOST -www.****.com
HTTP_CONNECTION Keep-Alive
PATH /usr/local/bin:/usr/bin:/bin
SERVER_SIGNATURE <address>Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8 Server at www.weissdaniel.com Port 80</address>
SERVER_SOFTWARE Apache/2.2.3 (Debian) PHP/5.2.0-8+etch11 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_perl/2.0.2 Perl/v5.8.8

SERVER_PORT 80
DOCUMENT_ROOT /var/www/vhosts/***.com/httpdocs
SERVER_ADMIN ***@gmail.com
SCRIPT_FILENAME /var/www/vhosts/***.com/httpdocs/phpinfo.php
REMOTE_PORT 50581
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING no value
REQUEST_URI /phpinfo.php
SCRIPT_NAME /phpinfo.php


HTTP Headers Information
HTTP Request Headers
HTTP Request GET /phpinfo.php HTTP/1.1
Accept */*
Accept-Language fr
UA-CPU x86
Accept-Encoding gzip, deflate
User-Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)
Connection Keep-Alive
HTTP Response Headers
X-Powered-By PHP/5.2.0-8+etch11
Keep-Alive timeout=15, max=100
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html

Posté

Hello,

pour moi ce serait plutôt la configuration d'Apache qui coince : déjà le fait qu'il fasse interpréter les fichiers .htm à PHP n'est pas forcément normal, est ce bien ce que tu veux ?

Ensuite regarde dans les logs d'Apache, il y a probablement un joli message d'erreur indiquant la cause du problème.

Posté

solution:

nano /etc/apache2/httpd.conf

ajouter cette ligne:

DirectoryIndex index.html index.html.var index.htm index.php

redemmarrer apache

merci

Veuillez vous connecter pour commenter

Vous pourrez laisser un commentaire après vous êtes connecté.



Connectez-vous maintenant
×
×
  • Créer...