Re: Strange problem with mime-type
| From: | Chris | Date: | Tue, 04 Dec 2001 09:33:09 +0000 |
| Subject: | Re: Strange problem with mime-type | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-5182@lists.php.net to get a copy of this message | ||
Hello Veronica,
Read below...
> Hi again,
>
> Actually, after the ISP refused to do anything, I realised on
> reflection that the problem isn't exactly that -- it's something
> weirder; and the effects have changed slightly. If I have a directory
> with no index.html, but an index.php, and I access it specifying only
> the directory, not the filename, the server does go and get the
> index.php. But instead of executing the code, hey presto, it displays
> the source in the browser.
That's what happens when you don't specify index.php in the index
section of your httpd.conf file... but you already knew that. ;-)
> If I specify the directory and the filename,
> the code is executed correctly. And the same thing happens with
> index.shtml files: if I just give the directory name, the file is
> displayed but any include directives are not parsed. If I specify the
> filename, they are.
Actually, you could do an http redirect with a setting of 0 to the
actual file your attempting to post. It would work. But all of this
sure seems like too much work, just to host some pages. :-\ Maybe
your efforts would be better spent finding a *real* ISP. Sounds like
your's is a dog - no offense to you, of course.
> So maybe I'm posting this question in the wrong
> place -- it must be an Apache configuration problem, not a PHP
> problem??
See above... it's an ISP problem. If (s)he would add the names to the
index section of the hhpd.conf file. There would be *no* problems for
you (others?).
Take care, and best wishes,
Chris
> I'm lost ...
>
> Veronica
>
> Chris <cth@fastmail.dnswatch.com> a écrit dans le message :
> 3173.209.16.169.89.1007344196.dnswatchWebMail@www.dnswatch.com...
>> Hello,
>> This is an easy answer. You MUST define this in addition to the
>> others
>> listed in the httpd.conf file:
>>
>> index.php index.php3 index.php4 index.phtml index.phps
>>
>> this(ese) lines are found under the heading:
>> <IfModule mod_dir.c>
>> DirectoryIndex index.html index.htm index.php default.html
>> default.htm
>> </IfModule>
>>
>> Your ISP should know this. Simply tell him/ her to add them. :-)
>>
>> Best wishes,
>> Chris
>>
>>
>> > Hi
>> >
>> > I am using PHP on a remotely-hosted server so don't have access to
>> > the httpd.conf file. The host has installed both PHP3 and PHP4 and
>> > instructed us to use .php extensions for PHP3 files, and .php4
>> > extensions for PHP 4. This is fine, but I have encountered a weird
>> > problem. If the home page in a particular directory is called
>> > index.html I can access it fine using
>> > http://www.mydomain.com/directoryname/. But if the
>> > index file is
>> > called index.php or index.php4, and I use the above syntax (i.e. not
>> > specifying the filename), instead of the page displaying I am
>> > prompted to download a file of type x-httpd-php. Yet, if I instead
>> > go to http://www.mydomain.com/directoryname/index.php
>> > the page is
>> > correctly interpreted and displayed as it should be. Tech support
>> > have been no help at all, and I'm no Apache expert. Can anyone
>> > suggest what I should do to fix this problem??
>> >
>> > Thanks!
>> >
>> > Veronica
>> >
>> >
>> >
>> >
>> > --
>> > PHP Install Mailing List (http://www.php.net/)
>> > To unsubscribe, e-mail: php-install-unsubscribe@lists.php.net
>> > For additional commands, e-mail: php-install-help@lists.php.net To
>> > contact the list administrators, e-mail:
>> > php-list-admin@lists.php.net
>>
>>
>> --
>> end
>>
>>
>> ............................................
>> This email was sent using DNSWATCH WebMail.
>> "Get an account today!"
>> http://www.dnswatch.com/dnswm112/
>>
>>
>
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-install-unsubscribe@lists.php.net
> For additional commands, e-mail: php-install-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
--
H.R. Communications Corp.
http://www.dnswatch.com
............................................
This email was sent using DNSWATCH WebMail.
"Get an account today!"
http://www.dnswatch.com/dnswm112/