Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where to put php/html files in apache

Status
Not open for further replies.

janise

Technical User
May 25, 2003
161
US
This is an extreme newbie question.
I have just started learning php.
I have installed and configured apache web server.
Wrote a simple hello world php code.
My question is where do you put your php/html files in apache server.
With iis, you will put the files in directory.
Do I put the php/html files in apache2 or htdocs subdirectory?
Please help!
 
Hi,
My question isn't really about apache setup and/or configuration.
It is about php.
I am using a php editor called phpEdit to write my php code but when I click the run button, it does nothing.
So surely there is a place where your php files are stored to be recognized as a php code and run.
You can't just put your PHP files "somewhere in the web document tree of your web site."
It can be a little bit more specific than that.
 
So your question is about setting up phpEdit, not Apache.
Did you follow the instructions in the phpEdit setup as layed out in the documentation?

phpEdit is just a tool that makes use of technologies such as Apache and PHP. Since it is on your client machine you need to configure it properly for the PHP to execute.

If you get stuck I recommend to become a member in the phpEdit community or start using a different development environment.
 
BTW, on Apache (if not reconfigured) the web document root is called htdocs...

Look for the DocumentRoot entry in httpd.conf in the apache/conf directory. That will tell you where to put your web files.

I use a bundle called FoxServ, that comes with Apache2, PHP4, Perl, MySQL etc. It's soooo easy to install on a Windows PC. Below you'll find a link you can follow, if your time is too precious to spend on manual configuration:


Good Luck §;O)


Jakob
 
DRJ478,
Your response still did not address my question but you gave me an important information in that I asked a friend about a php editor and he just sent me that software to install without documentations.
So your response did me good in that I can do some things right with it.

dkdude,
You have clearly answered my question.
I wanted to know where to put my PHP files.
I believe that once that problem is resolved, I can then focus on how to find it and execute it with an editor.

I do, however, want to thank all of you for taken your precious time to try and help because I am sure I will back for moore questions.

By the way, can php run on IIS?
I told you I am total newbie!
 
Yes, you can run PHP on IIS.
However, I personally prefer to run PHP on Apache as an Apache module on a LINUX type OS for reasons of dependability.

BTW, I just read your second post and skipped your first. Sorry. Feel free to ask any questions that come up. Sometimes the answers given in this forum are kind of "matter of fact", so, don't be discouraged.
 

So surely there is a place where your php files are stored to be recognized as a php code and run.
You can't just put your PHP files "somewhere in the web document tree of your web site."
It can be a little bit more specific than that.


It really isn't any more specific than that, in your webserver setup you will specify how the webserver should handle different file types, you should tell it to put any .php files through the php interpreter.

-Rob
 
personally i use IBserver which has apache/mysql and php in an easy install and the path to the docs is easy to find and no messing with configs. of course if you have linux then this won't be much use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top