SitePoint Sponsor

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 25 of 42
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    which page is the starting one

    Hi,
    1) I'm not sure if the following HTML file is the starting one to call the site
    2) when I double click this, it then prompt me to download the file - 'index.php'. Any advice?

    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Expires" CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
    <META HTTP-EQUIV="refresh" CONTENT="0; URL=index.php">
    </HEAD>
    </HTML>
    Many Thanks & Best Regards,
    HuaMin Chen

  2. #2
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <META HTTP-EQUIV="refresh" CONTENT="0; URL=index.php">

    this one will redirect you to index.php so if you are running the page locally then it will download the index.php. But if you run it on a webserver it will serve you index.php
    Don't Panic

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks. How can I know which file is for starting the site? How can I try to start the site from that folder?
    Many Thanks & Best Regards,
    HuaMin Chen

  4. #4
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    an index file like index.php or index.asp or index.html
    Don't Panic

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    should I just double click the index.html/index.php to start the site? How can I escape if it prompts to download index.php after I've double clicked index.html?
    Many Thanks & Best Regards,
    HuaMin Chen

  6. #6
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IF this :

    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Expires" CONTENT="Tue, 04 Dec 1993 21:29:02 GMT">
    <META HTTP-EQUIV="refresh" CONTENT="0; URL=index.php">
    </HEAD>
    </HTML>

    is in your index file then remove
    <META HTTP-EQUIV="refresh" CONTENT="0; URL=index.php">

    If it isn't then I don't see why you are having any problems.
    Don't Panic

  7. #7
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by HuaMin View Post
    Many thanks. How can I know which file is for starting the site? How can I try to start the site from that folder?
    hello I'm assuming you are running the site in your local computer and calling it inside a windows/mac folder...is that right? If that is the case then I'm afraid it won't work as .php is a sever side file. you need to run it on a localhost or on a live server.
    Don't Panic

  8. #8
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I remove it, how can it call index.php?
    Many Thanks & Best Regards,
    HuaMin Chen

  9. #9
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by HuaMin View Post
    should I just double click the index.html/index.php to start the site? How can I escape if it prompts to download index.php after I've double clicked index.html?
    Normally the Web Servers like Apache, IIS, etc. serve you the web pages and they have defined somewhere which file to show at first. So check in your web server, if it is PHP website and Apache is the web server then index.php or index.html should be the default pages to be loaded.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  10. #10
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As an example to what rajug said:

    This is a folder in my site that doesn't have an index file http://www.i-mediaconcepts.net/kierulf/ It display the files inside the folder because there is no index file

    This folder has an index file http://www.i-mediaconcepts.net/mash/ it runs the index.html inside the /mash folder

    Cheers
    Don't Panic

  11. #11
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many many thanks to all. Which version of Apaches should we use for WinXP for testing that? If we have set up Apaches on one machine, is it true that we can call the site within any folders? I am asking for instance if we can have several versions on one machine for testing the program.
    Many Thanks & Best Regards,
    HuaMin Chen

  12. #12
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use xammp easy to install just extract it to c:// delete everything on the htdocs folder and copy paste your files there start xammp and go to http://localhost

    http://www.apachefriends.org/en/xampp-windows.html
    goodluck
    Don't Panic

  13. #13
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    uhmm for multiple site create folders inside the htdocs folder example for a folder named "Site1" you can access it by going to http://localhost/Site1
    Don't Panic

  14. #14
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great appreciations for your nice help! By the way, which is a very good forum for MySql? The following one does not have many feedbacks!
    http://forums.mysql.com/
    Many Thanks & Best Regards,
    HuaMin Chen

  15. #15
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stonedeft View Post
    uhmm for multiple site create folders inside the htdocs folder example for a folder named "Site1" you can access it by going to http://localhost/Site1
    Better to just create virtual hosts. You can add them in xampp\apache\conf\extra\httpd-vhosts.conf
    Code:
    # test.loc
    <VirtualHost test.loc:80>
    DocumentRoot E:\xampp\htdocs\pathto\test
    ServerName text.loc
    ServerAdmin admin@test.loc
    </VirtualHost>
    You'll have to edit the windows hosts file as well (location varies I think)
    Code:
    127.0.0.1       localhost
    127.0.0.1       test.loc

  16. #16
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks to all!
    After I've extracted 'Xammp' to one folder, I then run this batch - 'apache_start'. But finally I've got this

    Now we start Apache
    Starting "apache"...
    "apache" is not started.
    Many Thanks & Best Regards,
    HuaMin Chen

  17. #17
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you run the setup batch file first? I think it runs fine from a root (c:\xampp or d:\xampp etc), but needs to set itself up if anywhere else.

  18. #18
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After I've set up XAMPP, do I need to restart WinXP (the machine)?
    Many Thanks & Best Regards,
    HuaMin Chen

  19. #19
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are these steps correct for starting the site?

    1) after I've setup XAMPP to d: root, I put the following item to 'D:\xampp\apache\conf\extra\httpd-vhosts'

    <VirtualHost test.loc:80>
    DocumentRoot d:\dev2\my_proc\admin
    ServerName text.loc
    ServerAdmin admin@test.loc
    </VirtualHost>

    2) all of the files of the site are located at d:\dev2\my_proc

    3) I now double click this (but nothing is special)
    D:\dev2\html\admin\index.html

    I want to know the correct way to start the site!
    Many Thanks & Best Regards,
    HuaMin Chen

  20. #20
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Since you are just learning now (so i will say you as a beginner), do nothing, but
    - just install XAMPP
    - open the XAMPP control panel
    - start Apache, MySQL (and others if you really need them).

    Then create a folder 'mysite' inside XAMPP's htdocs folder (which i assume you have already found it inside XAMPP installation folder) and put all the files in it. If your site uses the database then you need to import/create database in mysql from phpmyadmin (to manipulate databases you have phpmyadmin too with XAMPP so browse http://localhost/phpmyadmin). Now browse your site in your favorite browser as http://localhost/mysite/.

    This is enough.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  21. #21
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You don't start a site by double clicking a file, you start it by visiting through a browser. After you unzip xampp (and if necessary run setup) and start the server you can go to http://localhost

    If you make another virtual site, say, test.loc, then you go to http://test.loc in the browser. This is a web server, not a file that you run

    E: didn't see your post there rajug, yes, you can also just make a folder in htdocs and visit it in a browser with http://localhost/folder

  22. #22
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks. I have set up Apache properly using XAMPP.

    1) within the control panel I don't know why Apache Module will stop by itself every time I started
    2) Mysql module is always with 'running' status once I've opened the control panel

    After I've copied all of the files of the site to D:\xampp\htdocs\mysite, I then start 'http://localhost/mysite/'. But I've got this

    The page cannot be found
    The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

    --------------------------------------------------------------------------------

    Please try the following:

    If you typed the page address in the Address bar, make sure that it is spelled correctly.

    Open the 10.96.5.88 home page, and then look for links to the information you want.
    Click the Back button to try another link.
    HTTP 404 - File not found
    Internet Information Services


    --------------------------------------------------------------------------------

    Technical Information (for support personnel)

    More information:


    It's the same even if I directly put the IP of my machine for that.
    Many Thanks & Best Regards,
    HuaMin Chen

  23. #23
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by HuaMin View Post
    1) within the control panel I don't know why Apache Module will stop by itself every time I started
    There might be some problems, either the apache is not installed properly or the port that the apache normally uses '80' is used by some other programs in your system. Skype is the main evil in such cases which unknowingly uses the port 80 or IIS may also be using it. If you can run the apache after clicking the 'Start' button in the XAMPP control panel then that's fine. Otherwise see the apache error log and find the problem why apache is not running.

    Quote Originally Posted by HuaMin View Post
    After I've copied all of the files of the site to D:\xampp\htdocs\mysite, I then start 'http://localhost/mysite/'. But I've got this
    If your apache is running correctly and you created a folder named 'mysite' then it must work work for you. But be sure you typed in the browser the same folder name that you created inside htdocs folder.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  24. #24
    SitePoint Enthusiast
    Join Date
    Apr 2009
    Location
    China
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks. If there's any program that is using 80, how can I change the port for Apache?

    I've checked that I did set up IIS 7 there for .net.
    Many Thanks & Best Regards,
    HuaMin Chen

  25. #25
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    590
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hash View Post
    Better to just create virtual hosts. You can add them in xampp\apache\conf\extra\httpd-vhosts.conf
    Code:
    # test.loc
    <VirtualHost test.loc:80>
    DocumentRoot E:\xampp\htdocs\pathto\test
    ServerName text.loc
    ServerAdmin admin@test.loc
    </VirtualHost>
    You'll have to edit the windows hosts file as well (location varies I think)
    Code:
    127.0.0.1       localhost
    127.0.0.1       test.loc
    This one is very helpful if you have mod rewrites and need your paths to be on the root

    Thanks for the info
    Don't Panic


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
  •