logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: Installing PHP5 with Apache2
Author
dscarola



Joined: 03 Sep 2007
Posts: 3

PostPosted: Mon 03 Sep '07 4:00    Post subject: Installing PHP5 with Apache2 Reply with quote

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: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 03 Sep '07 9:25    Post subject: Reply with quote

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

PostPosted: Mon 03 Sep '07 16:46    Post subject: File extension Reply with quote

Yes, just double checked. It is a .php file extension. Thanks
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 03 Sep '07 17:12    Post subject: Reply with quote

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

PostPosted: Tue 04 Sep '07 5:16    Post subject: Ended up going with XAMMP Reply with quote

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


Reply to topic   Topic: Installing PHP5 with Apache2 View previous topic :: View next topic
Post new topic   Forum Index -> Other Software