SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Set up issues

  1. #1
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Set up issues

    Hi there,

    I am an experienced programmer but new to web development. The actual
    scripting I have no issue with ( yet! ) but I cant get my php files to run from my current working directory.
    I have tried adding an alias to my conf file as suggested in one of the many useful articles on the subject but to no avail
    OS is XP. I downloaded Apache, PHP and MySQL as a bundle in the form of XAMPP. They all run happily and I have managed to run a test script in the htdocs subdirectory.
    I have set up my alias, call it FRED and tried to access it thus
    http://localhost/FRED/myfile.php but it doesnt work.
    How DO i set it up correctly and how do I address it.
    Also how would I address it if I didnt want to use the alias?
    Simple question but i'm having real difficulty getting my system set up.
    Any help much appreciated!

    Incidentally, when I type in http://localhost it goes to http://localhost/xampp/. Could this be causing problems?

  2. #2
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    To use the url http://localhost/FRED/myfile.php

    You must make a dir called FRED in the apache htdocs dir, and then place myfile.php in there.
    Edit:


    Just seen your last line.
    In that case you'll probably need to to put the FRED dir in the XAMPP dir not the htdocs dir
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming

  3. #3
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Lets start again

    Go into your htdocs/xampp directory, create dir FRED. Now put your php script in FRED, then try your URL http://localhost/FRED/myfile.php

    Hope thats clearer
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming

  4. #4
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that works fine ...
    but do you know how to get a directory alias working so I dont have to copy my whole web project under htdocs to test it?

    In the httpd conf file I have added the equivalent of

    Alias /FRED "C:/myworkarea/myworkfolder/fred/"
    <Directory "C:/myworkarea/myworkfolder/fred">
    DirectoryIndex index.html
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    ( not really sure if I need the <Directory> bit or not! )
    From the instructions I used, I believed that would allow me to then type
    http://localhost/FRED/myfile.php to run the myfile.php file from the C:/myworkarea/myworkfolder/fred/ subdirectory.

    Any ideas??

  5. #5
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No, sorry, I code manually in Dreamweaver, so I set my working directory to whatever, then set my project server info within DW to the directory in htdocs that I want it to appear in, when I upload to server it copies all the files from a to b.
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming


Bookmarks

Posting Permissions

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