Jump to content


Photo

Please Help-Problem in Configuring Apache in Win98


  • Please log in to reply
5 replies to this topic

#1 shilpa_dev

shilpa_dev
  • Members
  • Pip
  • Newbie
  • 3 posts
  • LocationIndia

Posted 13 October 2003 - 11:20 AM

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][list]
SHILPA

#2 pauper_i

pauper_i
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts
  • LocationPhoenix, AZ, USA

Posted 13 October 2003 - 08:49 PM

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!
Genius is one percent inspiration, and ninety-nine percent perspiration. [br]Thomas Alva Edison

#3 shilpa_dev

shilpa_dev
  • Members
  • Pip
  • Newbie
  • 3 posts
  • LocationIndia

Posted 14 October 2003 - 04:15 AM

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.
SHILPA

#4 pauper_i

pauper_i
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts
  • LocationPhoenix, AZ, USA

Posted 14 October 2003 - 06:13 AM

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
Genius is one percent inspiration, and ninety-nine percent perspiration. [br]Thomas Alva Edison

#5 shilpa_dev

shilpa_dev
  • Members
  • Pip
  • Newbie
  • 3 posts
  • LocationIndia

Posted 14 October 2003 - 09:56 AM

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.]
SHILPA

#6 pauper_i

pauper_i
  • Members
  • PipPipPip
  • Advanced Member
  • 59 posts
  • LocationPhoenix, AZ, USA

Posted 15 October 2003 - 12:48 AM

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
Genius is one percent inspiration, and ninety-nine percent perspiration. [br]Thomas Alva Edison




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users