J
J
johnny_show2011-02-28 10:59:04
PHP
johnny_show, 2011-02-28 10:59:04

PHP interpreter does not understand index.php

If you enter the address as www.site.ru/index.php - the server works out and shows the script, but if you enter it without explicitly specifying the www.site.ru file - Apache spits out an index file to me without processing.

Please tell me what is this miracles and how to cure it?

ubuntu 10.04
php 5.3 (mod_fcgid), apache2

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
Kindman, 2011-07-26
@Kindman

index.php can be given as a "file" if you forget to write
<?php at the very beginning

N
Nikolai Vasilchuk, 2011-02-28
@Anonym

.htaccess
DirectoryIndex index.php

D
Dzuba, 2011-02-28
@Dzuba

Enable php server processing for the domain.
In VirtualHost or .htaccess add:

RemoveHandler .php
AddType application/x-httpd-php .php

O
Oleg Batishchev, 2011-07-26
@z0rg

If index is given as a file, then Apache gives it as static without passing it through php, dig in this direction. See the Apache settings for a link with php, maybe there is no handler and type

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question