shilpa_dev Posted October 13, 2003 Share Posted October 13, 2003 This is the first time ,I am about to use Apache-php combination in win98 & i dont\'t know administration parts. .I have installed php 4.3.3 & apache1.3 in windows98 platform. I have simply followed the instruction comes with php bundle. After running apache, if i type http://localhost in the url, it shows error-access denied where as if i type http://127.0.0.1/anyphpfile.php (.php kept at ../apache/htdocs) ,it executes .php file perfectly. Where am I wrong? How to get the root directory, when \'http://localhost\' will be typed in the url? Thanks in advance. ?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/1159-please-help-problem-in-configuring-apache-in-win98/ Share on other sites More sharing options...
pauper_i Posted October 13, 2003 Share Posted October 13, 2003 Check your hosts file and make sure that there is an entry for localhost in it. Does it work if you type http://localhost/anyphpfile.php ? What is the default file type set to in your httpd.conf ? Here\'s mine for a comparison: # DirectoryIndex: sets the file that Apache will serve if a directory# is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.php index.html index.html.var Note that this is from my test server, so the index.htm option is left off deliberately - a lazy way of allowing directory browsing when I need it! Quote Link to comment https://forums.phpfreaks.com/topic/1159-please-help-problem-in-configuring-apache-in-win98/#findComment-3900 Share on other sites More sharing options...
shilpa_dev Posted October 14, 2003 Author Share Posted October 14, 2003 Thanks for your reply & advice. I couldn\'t get your advice -\'Check hosts file and make sure that there is an entry for localhost in it. \'. Please be elaborate. If i type http;//localhost in the url itead of showing welcome page it showing error- Access Denied. Same For if i typed http://localhost/anyfile.php. But if i replace localhost with 127.0.0.1 it works. Also how to configure root-directory, i mean it should show the directory of files. I donn\'t know whether i am clear or not. Please Help. Quote Link to comment https://forums.phpfreaks.com/topic/1159-please-help-problem-in-configuring-apache-in-win98/#findComment-3904 Share on other sites More sharing options...
pauper_i Posted October 14, 2003 Share Posted October 14, 2003 If i type http;//localhost in the url itead of showing welcome page it showing error- Access Denied. Same For if i typed http://localhost/anyfile.php. But if i replace localhost with 127.0.0.1 it works. OK, you have a problem with your hosts file. This file tells the machine who it is - don\'t panic, its just a text file! Assuming you have a standard installation, the file should be located in c:windowssystemdriversetc It will be named HOSTS and has no extension. When you double click it, select NOTEPAD to open it with (do NOT use wordpad or any other word processor!!) The very first entry should be 127.0.0.1 localhost The number of spaces is not important so long as there is at least one. Check to make sure that that is where it should be - if you change it, you will need to reboot the machine to make the changes stick. Then you can retry the http://localhost and see what comes up. D Quote Link to comment https://forums.phpfreaks.com/topic/1159-please-help-problem-in-configuring-apache-in-win98/#findComment-3905 Share on other sites More sharing options...
shilpa_dev Posted October 14, 2003 Author Share Posted October 14, 2003 Hi Pauper, I am really frustrated now because i cann\'t able to do the easy thing what you told. I found the HOSTS file in the c:windows directory, but there is no c:/windows/system/drivers/etc folder, though i made it and copy the HOSTS file in that directory. and restrart the computer but,it doesn\'t work. Secondly while i start apache,it shows one warning-\"[warn] (2) no such file or directory-exec() may not be safe\' Next- When I executing simple .php file, the form variable not available in the second page directly. eg. first page I have one text field name tname, on submission second page is called where $tname is not available, whereas $_POST[\'tname\'] is available. I don\'t know all these are interlinked or not. Please note that On wrilling http://localhost/shilpa/a.php on url of browser it, shows error messahge- \"Access Denied\" whereas in case of http://127.0.0.1/shilpa/a.php it works [a.php in in the .apachehtdocsshilpa Please Help me out.] Quote Link to comment https://forums.phpfreaks.com/topic/1159-please-help-problem-in-configuring-apache-in-win98/#findComment-3907 Share on other sites More sharing options...
pauper_i Posted October 15, 2003 Share Posted October 15, 2003 Whoops! My goof! I\'ve been playing with NT too much lately and have barely even booted up and of the Win9x boxes! hosts should be in c:windows the rest of the details are as I gave you: 127.0.0.1 localhost should be on the first line or at least under the commented lines (comment lines start with \'#\') Once you fix this, everything else should start falling into place. D Quote Link to comment https://forums.phpfreaks.com/topic/1159-please-help-problem-in-configuring-apache-in-win98/#findComment-3924 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.