LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   no browser open index.php files but other *.php files working (http://www.linuxquestions.org/questions/linux-server-73/no-browser-open-index-php-files-but-other-%2A-php-files-working-4175442592/)

gal 12-22-2012 03:17 PM

no browser open index.php files but other *.php files working
 
I read about same problems but still didn't receive solution to my problem.
When I change the index.php to index2.php . the browser operate the file. but if it remain "index.php" the browser does't operate it ?
I need your simple help.

"""" the apache2.conf""""
#


#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
##<Files ~ "^\.ht">
## Order allow,deny
## Deny from all
## Satisfy all
##</Files>

#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain


#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostNameLookups off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf

# Include all the user configurations:
Include httpd.conf

# Include ports listing
Include ports.conf

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
Include conf.d/

# Include the virtual host configurations:
Include sites-enabled/

Include /etc/squirrelmail/apache.conf
<Directory "/var">
DirectoryIndex index.html
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/prh
ServerName www.prh.co.il
<Directory "/var/www/prh">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/prh"
ServerName mail.prh.co.il
<Directory "/var/www/prh">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/prh"
ServerName prh.co.il
<Directory "/var/www/prh">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www
ServerName cpg.co.il
<Directory /var/www>
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www
ServerName mail.cpg.co.il
<Directory /var/www>
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/elharar"
ServerName el.prh.co.il
<Directory "/var/www/elharar">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/elharar"
ServerName elh.cpg.co.il
<Directory "/var/www/elharar">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/elharar"
ServerName elha.citrine-group.co.il
<Directory "/var/www/elharar">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/elharar"
ServerName elharar.cpg.co.il
<Directory "/var/www/elharar">
allow from all
Options +Indexes
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/fcl"
ServerName fcl.co.il
<Directory "/var/www/fcl">
allow from all
Options +Indexes
</Directory>
Alias any "www.fcp.co.il"
Redirect any "http://www.fcp.co.il"
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /var/www
ServerName www.citrine-group.co.il
<Directory /var/www>
allow from all
Options +Indexes
</Directory>
</VirtualHost>

AddType application/x-httpd-php .php
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>"""""
"""

""""the httpd.conf """
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
"""""

j-ray 12-23-2012 08:09 AM

Welcome to LQ!

What do you experience when loading
http://somedomain.org/index.php? Browser window remains white or does it show the content of index.php file?

Do you call the script explicitly or smply type http://somedomain.org?

gal 12-24-2012 05:54 AM

remains white
I tried both...

j-ray 12-24-2012 06:40 AM

if it remains white then it is probably processed with an error. Set display_error = 1 in php ini or in the script write at the top
error_reporting(1);

Hope this helps
j


All times are GMT -5. The time now is 06:52 AM.