Jump to content

Please Help-Problem in Configuring Apache in Win98


shilpa_dev

Recommended Posts

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]

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.