logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache - 404 error
Author
HoibE



Joined: 11 Jan 2009
Posts: 22

PostPosted: Sun 11 Jan '09 18:54    Post subject: Apache - 404 error Reply with quote

Have installed Apache 2.2.11 and it's running and working according to the tests I've performed. I also installed PHP and find that my text.php puts out the right page. I can see that Apache is running by reviewing the Monitor app in the systray.

I'm trying to install WordPress 2.7 on this local machine so that I can test various processes in WordPress without having to bother the live production system hosted elsewhere. I've unzipped the WP package to c:\wordpress I'm directed by the WP installation to point the browser to /wordpress/wp-admin/install.php to start the WP install. But if I type in IE7's address bar:: http://localhost/wordpress/wp-admin/install.php I get a 404 error. I've looked through httpd.conf and tried to set DocumentRoot to point at c:/wordpress/wp-admin/. I've also played with <Directory> entries trying to get Apache to look in the right folder. Still 404 errors out.

Can someone please help me to set up Apache so I can call install.php and move on to WP?

Thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7355
Location: Germany, Next to Hamburg

PostPosted: Sun 11 Jan '09 19:38    Post subject: Reply with quote

What did you set DocumentRoot ? Is DocumentRoot and in Directory the same?
If C:\wordpress is the DocumentRoot you should open it with http://localhost/wp-admin/install.php
Back to top
HoibE



Joined: 11 Jan 2009
Posts: 22

PostPosted: Sun 11 Jan '09 20:13    Post subject: OK, here's what I have set... Reply with quote

Hello! Thanks very much for the reply.

Both DocumentRoot and <Directory> are set to:
c:\wordpress

After looking through the conf, I thought those two were all that was needed and so I set those vals making sure to comment out the defaults brought in by the install. The other vals in the <Directory> section, I have left at their defaults.

I just tried it again, carefully looking at my typing, syntax, etc. And I am making sure to Save the conf file (I believe I can still leave it up on screen) and then Restart the Apache server which goes through with no error. Then pull up IE and type in the address. Still yields a 404.

Uhhh - just a thought - this wouldn't be a firewall issue, would it??? I think not.

Would it be a good idea to perhaps post httpd.conf here so you could take a look?

H
Back to top
bentogoa



Joined: 09 Feb 2007
Posts: 66
Location: GOA

PostPosted: Sun 11 Jan '09 20:54    Post subject: Reply with quote

apache uses this /

ie. c:/wordpress/

your docroot should be c:/wordpress/
Back to top
HoibE



Joined: 11 Jan 2009
Posts: 22

PostPosted: Sun 11 Jan '09 21:49    Post subject: Reply with quote

Here's the two lines: (Copy/pasted right out of the conf file...)

DocumentRoot "C:/wordpress/"
<Directory "C:/wordpress/">

I'm still missing something...

H
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7355
Location: Germany, Next to Hamburg

PostPosted: Sun 11 Jan '09 23:08    Post subject: Reply with quote

What are you getting when you type http://localhost ?
Back to top
HoibE



Joined: 11 Jan 2009
Posts: 22

PostPosted: Mon 12 Jan '09 3:13    Post subject: Now I see... Reply with quote

Guess part of my problem is I don't know a lot about Apache command structure. Your suggestion opened the door more for me.

I think what happened is the localhost variable is already set to "c:/wordpress/" inside the conf file. So in the browser, I really only have to enter http://localhost/wp-admin-install.php omitting the string c:/wordpress from the entry.

The call to install.php now works -but- I'm getting a rather cryptic error that says:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

And, sadly, I see by Googling, this error is a somewhat hard one to crack. I probably shouldn't bother you folks with this error as it's somewhat related to Apache but more related to mySQL (I think).

At least I'm confident now that Apache and PHP are working/playing together. And I learned a few things along the way.

Thanks again.
Back to top
bentogoa



Joined: 09 Feb 2007
Posts: 66
Location: GOA

PostPosted: Mon 12 Jan '09 6:03    Post subject: Reply with quote

you have not loaded mysql Extension

Do this in php.ini:

Code:

extension_dir = "F:/php/ext/"
;change this for your php installation
extension=php_mysql.dll


Don't copy and paste this search and change it.
Back to top
HoibE



Joined: 11 Jan 2009
Posts: 22

PostPosted: Mon 12 Jan '09 15:12    Post subject: They are turned on Reply with quote

Actually both of those lines are indeed already "turned on". So if there's something else I need to do beside those two lines, I don't know what it is.

Right now, I'm just struggling to figure out why my WP website isn't showing. I created the blog and can definitely get into it as Admin and adjust/edit/modify. But when I'm finished editting it and try to go to the "site" using http://localhost/blog (set as the DocumentRoot) - all I get is a 404. If I change the DocRoot to "c:/wordpress" I wind up with "The Index of/", the directory structure showing, ie. "Parent Directory", etc. I don't know where in localhost the website pages are being saved. I'm sure it's something in the way I'm addressing the Apache server or the way it's referring to the filesystem.

Scratching my head....
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7355
Location: Germany, Next to Hamburg

PostPosted: Mon 12 Jan '09 16:42    Post subject: Reply with quote

Please post your apache config at http://apache.pastebin.ca/ and give us the link to it. Otherwise we can only guess what is going on.

Secondly: Where are your wordpress files located on your file system?
Back to top
HoibE



Joined: 11 Jan 2009
Posts: 22

PostPosted: Tue 13 Jan '09 1:13    Post subject: Reply with quote

Here's the link to pastebin: http://apache.pastebin.ca/1306875 This conf file is the result of adjustments based on instructions from three different websites - before I found this one. I have commented my changes.

WordPress fileset at c:\wordpress and subfolders beneath.

I know this has got to be something to do with the exact placement of the fileset(s) and where things are pointed to.
Back to top
bentogoa



Joined: 09 Feb 2007
Posts: 66
Location: GOA

PostPosted: Tue 13 Jan '09 7:33    Post subject: Reply with quote

<Directory "C:/wordpress">

# Your php in dir should be OR php will not able to find php.ini file
PHPIniDir "c:/php/"
# you have missed the tailing slash
Back to top
monkeyBones



Joined: 13 Jan 2009
Posts: 2

PostPosted: Tue 13 Jan '09 8:10    Post subject: PHP problems.. Reply with quote

Im New to Php. I have downloaded Php5.2.8, Mysql5.1.30, and Apache2.2.1. I have followed all the instructions, but when i try to run my test.php page in my browser Firefox. Can anyone help? Thanks

Confused
Back to top
bentogoa



Joined: 09 Feb 2007
Posts: 66
Location: GOA

PostPosted: Tue 13 Jan '09 8:21    Post subject: Re: PHP problems.. Reply with quote

monkeyBones wrote:
Im New to Php. I have downloaded Php5.2.8, Mysql5.1.30, and Apache2.2.1. I have followed all the instructions, but when i try to run my test.php page in my browser Firefox. Can anyone help? Thanks

Confused


what happens ?

Are us using Apache 2.2.1 or Apache2.2.11 ?
Back to top
monkeyBones



Joined: 13 Jan 2009
Posts: 2

PostPosted: Tue 13 Jan '09 16:15    Post subject: Reply with quote

I am using Apache2.2.11, Php5.2.8, and Mysql5.1.30 on Windows XP. I'm still getting 404 Error URL test.php not found on this server.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7355
Location: Germany, Next to Hamburg

PostPosted: Tue 13 Jan '09 16:32    Post subject: Reply with quote

Please read Basic PHP Troubleshooting
Back to top
HoibE



Joined: 11 Jan 2009
Posts: 22

PostPosted: Wed 14 Jan '09 0:52    Post subject: Reply with quote

@bentagoa

OK, well, it doesn't seem to make any difference at all whether I leave both slashes in or out! I've also tried reversing them individually to see if there's any difference. I truly wish I could just see the test sites files but unfortunately from what I can tell, WordPress doesn't set them out in accordance with what you've named the blog. If I could figure that out, then I'd maybe know how to address a browser session. Right now when I attempt to click on a link (in the Admin for the blog which I can indeed get to) all I get is another page with "Index of /" and a list of php files and parent directories/folders.

This is really really confusing because there are so many things to juggle - all at the same time.

I should be able to accomplish this in a standalone configuration - right? I just want to make sure I'm not barking up the wrong tree. Would it be a good idea to maybe just take everything - PHP, MySQL, Apache and re-install them all under one folder instead of c:\ wordpress, c:\mySQL, c:\PHP ?? The server software I think can happily live under Program Files\Apache Software Group etc..etc...etc... - right?
Back to top
HoibE



Joined: 11 Jan 2009
Posts: 22

PostPosted: Sat 17 Jan '09 15:46    Post subject: Reply with quote

Hello again. No reply to my last post - hope I'm not wearing out my welcome...

I've changed this around a bit - still can't get the blog to surface. I now have set the file structure under c:/svdp/wordpress All the subfolders follow this. httpd.conf: Doc Root = c:/svdp/wordpress and <Directory "c:/svdp/wordpress"> I can get to the Admin/Dashboard and adjust my settings but I be dog-gone if I can get the blog to come up. In my further reading I do see that you can run this off of /localhost/ so that I'm sure of. As I understand it the call to /localhost/ is just a substitution for the string: c:/svdp/wordpress - right?

Someone earlier mentioned about the trailing slashes being missing. My experiments told me it doesn't seem to make any difference but let me broach the subject once more. Slashes in or out? Would someone want to venture a guess as to whether or not mySQL might be messed up? Would someone want to venture a guess as to whether or not PHP mySQL might be messed up?
Back to top
HoibE



Joined: 11 Jan 2009
Posts: 22

PostPosted: Sat 17 Jan '09 21:37    Post subject: OK, I solved it Reply with quote

in httpd.conf:


#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
# I modified this jan12 changing to ...
# DirectoryIndex index.html
DirectoryIndex index.php index.html
</IfModule>

I commented out: DirectoryIndex index.html
and removed # on DirectoryIndex index.php index.html

Now works properly by simply calling /http://localhost/ in the browser.

I'll now have one other question. If I want to have a second website on localhost on this same machine, a website totally unrelated to my SVdP website, it appears that httpd.conf is only going to permit Apache to recognize one set of values for my work. I assume that Apache is able to handle many more than just one at a time. But then how does one edit httpd.conf to point to two different entities so that both will run??? Is it even possible to do so???

Thanks all, first problem is solved.
Back to top


Reply to topic   Topic: Apache - 404 error View previous topic :: View next topic
Post new topic   Forum Index -> Apache