Author |
|
toetbrech
Joined: 15 Feb 2010 Posts: 5 Location: Germany
|
Posted: Mon 15 Feb '10 23:07 Post subject: installing php on apache ends in "index of/" |
|
|
hi, i've win xp (home) and i've installed php 5.31 manually on apache 2.2.14. php is indicated on the baseline of apache monitor, but when i try to open the simple test.php <? php phpinfo(); ?> by my web browser with
127.0.0.1 only
Index of /
test.php
is shown. Surely, this has quite simple reasons, but i cannot find them.
thx for any help |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 16 Feb '10 5:30 Post subject: |
|
|
is there an index.html file in there too? |
|
Back to top |
|
toetbrech
Joined: 15 Feb 2010 Posts: 5 Location: Germany
|
Posted: Tue 16 Feb '10 10:32 Post subject: |
|
|
thx, glsmith. no, it isn't. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7298 Location: Germany, Next to Hamburg
|
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
|
Back to top |
|
toetbrech
Joined: 15 Feb 2010 Posts: 5 Location: Germany
|
Posted: Tue 16 Feb '10 23:14 Post subject: |
|
|
James:in both cases it doesn't work
glsmith:i'd options Indexes FollowSymLinks before
and i've changed it to options All but that brought no effect.
i almost believe that php is not installed correctly but
in Apache Service Monitor one can read apache/ 2.2.14(win32)php/5.3.1...
many thx for your answers |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7298 Location: Germany, Next to Hamburg
|
Posted: Wed 17 Feb '10 0:08 Post subject: |
|
|
toetbrech wrote: | James:in both cases it doesn't work
|
Doesn't work? Which error do you get? 404 File not found? Forbidden? Blank page?
So if you think you did not install php correct, please post your line you added into httpd.conf to make php working. |
|
Back to top |
|
toetbrech
Joined: 15 Feb 2010 Posts: 5 Location: Germany
|
Posted: Wed 17 Feb '10 1:14 Post subject: |
|
|
james: there's a popup window saying:test.php-do you want to download this file? ......
i've added
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpdphp .php
PHPIniDir "c:/php"
to httpd.conf and changed the path into "c:/public_html" in DocumentRoot
and <Directory>. In the folder C:\php i renamed php.ini-production to php.ini and also changed doc_root into "c:\public_html" in this folder. |
|
Back to top |
|
Millennium
Joined: 17 Apr 2006 Posts: 179 Location: Leiderdorp, NL, EU
|
Posted: Wed 17 Feb '10 10:04 Post subject: |
|
|
While using AddType should work (if you correctly insert the type) is using AddHandler the correct way.
Code: |
LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType text/html .php
AddHandler application/x-httpd-php .php
PHPIniDir "c:/php
|
|
|
Back to top |
|
toetbrech
Joined: 15 Feb 2010 Posts: 5 Location: Germany
|
Posted: Wed 17 Feb '10 10:57 Post subject: |
|
|
Millenium: Thank you very much. Your advice resolved the issue.
Thx to all, once more. |
|
Back to top |
|