Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Installing PHP5 with Apache2 |
|
Author |
|
dscarola
Joined: 03 Sep 2007 Posts: 3
|
Posted: Mon 03 Sep '07 4:00 Post subject: Installing PHP5 with Apache2 |
|
|
Hi,
I've been working on getting these two programs to work together the last two days. I am able to get php to execute from a '.html' file. That is, if I put a '.html' file in my htdocs directory & call it from the browser, it executes the simple php script just fine.
However, putting the same exact script into a file with extension '.php' in the htdocs directory gives me the error that the file cannot be found!
I have the following directorives for php file extensions in my httpd.config file:
PHPIniDir "C:/Web/WebServer/PHP/"
AddType application/x-httpd-php .php .html
AddType application/x-httpd-php-source .phps
I just can't figure this out. Any ideas?
Thanks very much
Dave |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7404 Location: EU, Germany, Next to Hamburg
|
Posted: Mon 03 Sep '07 9:25 Post subject: |
|
|
Are you sure that you saved the file as file.php and not as file.php.txt ? Windows does not show known file extensions by default. |
|
Back to top |
|
dscarola
Joined: 03 Sep 2007 Posts: 3
|
Posted: Mon 03 Sep '07 16:46 Post subject: File extension |
|
|
Yes, just double checked. It is a .php file extension. Thanks |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7404 Location: EU, Germany, Next to Hamburg
|
Posted: Mon 03 Sep '07 17:12 Post subject: |
|
|
If you open it with notepad and choose "Save as..." What is shown than?
Second idea: There must be a file in that path, but apache says: file not found. So you may open command line (cmd) browse to that folder
and type dir and [ENTER] to find out what that file is! Cause you say it is there. |
|
Back to top |
|
dscarola
Joined: 03 Sep 2007 Posts: 3
|
Posted: Tue 04 Sep '07 5:16 Post subject: Ended up going with XAMMP |
|
|
I ended up coming across XAMMP and using it to install the whole package. It went pretty smoothly. Am still having a bit of a problem with .php files that I create. I think the issue is that even though they have .php extensions they are being saved by Windows as text files. I should be able to sort this out. Thanks for your help. |
|
Back to top |
|
|
|
|
|
|