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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you run things on apache?

Status
Not open for further replies.

StealerAce

Programmer
Jul 18, 2005
8
US
Ok I got apache set up. How do I use it as the side server I am suppose to??? I mean how do I send files to it so I can test my .php script.
 
Are you asking how to get PHP script files onto your server so that they can be run?

If so, you will have to use whatever means your server provides. FTP and Samba are the first two things to come to mind.





Want the best answers? Ask the best questions!

TANSTAAFL!!
 
That is a good idea. :) Well I want to know how to run things off of my appache. I don't know any type of programming yet and am trying to get my server set up. Which I think it is... Yes I want to know how to test my .php scripts threw my appache program.
 
Once you have a virtual server set up and the server itself configured to run PHP scripts, just use FTP or whatever to put the scripts in the appropriate directory. Then point your web browser to that script via your web site.

Conversely, depending on how you installed PHP, you may have a command-line interpreter available. If you can get to a command-prompt on your Apache-running server, you might be able to run PHP scripts from there.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Open your browser and type localhost or depending on the browser. It should take you to a test page on your web server. If it does, then you have installed apache correctly and it is ready to server your web pages. The page you are looking at is in your DocumentRoot. This is where all your web pages and sub directories go. To change the DocumentRoot or any other configuration of your web server, you will need to edit httpd.conf. Depending on whether you install apache by itself or as a wamp bundle, you will find it in something like C:/Program Files/Apache2/conf/httpd.conf. That is just a guess on my part. I don't use windows. When you find it, the first thing you should do is make a backup copy of it. That way you can always fall back to one that was working. If you istalled php yourself, then you will need to setup your system and apache to use it. How this is done depends on if you are using it as a module or as cgi. If you didn't use one of the wamp packages, we'll have to go one step at a time and test each step as we go along.
 
Well I got a test page. So apperently it is set up and all. What I was asking is were do I put the files when I want them tested and is their a specific place. I just want to get started and with this last peice of information I could. Thank you guys again for your help :)
 
for a starter script create a plain web page and add the following to the body
<?php phpinfo(); ?> in the body. Save it as phpinfo.php in the apache document root as specified in httpd.conf.

You will likely need to install the php product as it is usually separate, esp on windows platform.

\0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top