dcsimg
Results 1 to 4 of 4

Thread: Trying to run a PHP script?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    4,857

    Trying to run a PHP script?

    I have apache server installed on my machine. I'm playing around here so this isn't serious. I created an "index.html" file in the following directory structure: "C:\IT\Training\PHP\".

    Now, I have my apache server to run on port 1234. So, I'm in Chrome and in the address, I enter "localhost:1234/index.html". The result shows "It Works!" on the webpage...which isn't my page. My page is suppose to show "Hello World!". Is this because I need to have all web apps in the same directory that apache is in, which is "C:\apache"?
    Blake

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    31,836

    Re: Trying to run a PHP script?

    No. It's because there is a config file (http.config I think it's called...) that apache is looking at that tells it what folder to look at for the web root. Argh... I can't remember what it is off the top of my head, it's one of those things I know instincively when I see it, and I'm on a machine that doesn't have it installed. At any rate, you either need to move your files into that folder, or change the config file to point to a different folder (stop & restart the apache service if you do that though).

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    Fanatic Member
    Join Date
    Dec 2014
    Location
    VB6 dinosaur land
    Posts
    900

    Re: Trying to run a PHP script?

    If apache is installed in C:\Apache then httpd.conf should be in C:\Apache\conf folder.

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    4,857

    Re: Trying to run a PHP script?

    I think I figured it out on my own. I think the file you are referring to is "httpd.conf". In my case it's in C:\Apache\conf directory. So I'm guessing all web projects outside of Visual Studio or just .Net Platform, should be made as a subdirectory under C:\Apache\htdocs, which is where I put my files?

    Thanks for the clarification!
    Blake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width