Author |
|
HoibE
Joined: 11 Jan 2009 Posts: 22
|
Posted: Sun 11 Jan '09 18:54 Post subject: Apache - 404 error |
|
|
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: 7373 Location: Germany, Next to Hamburg
|
Posted: Sun 11 Jan '09 19:38 Post subject: |
|
|
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
|
Posted: Sun 11 Jan '09 20:13 Post subject: OK, here's what I have set... |
|
|
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
|
Posted: Sun 11 Jan '09 20:54 Post subject: |
|
|
apache uses this /
ie. c:/wordpress/
your docroot should be c:/wordpress/ |
|
Back to top |
|
HoibE
Joined: 11 Jan 2009 Posts: 22
|
Posted: Sun 11 Jan '09 21:49 Post subject: |
|
|
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: 7373 Location: Germany, Next to Hamburg
|
Posted: Sun 11 Jan '09 23:08 Post subject: |
|
|
What are you getting when you type http://localhost ? |
|
Back to top |
|
HoibE
Joined: 11 Jan 2009 Posts: 22
|
Posted: Mon 12 Jan '09 3:13 Post subject: Now I see... |
|
|
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
|
Posted: Mon 12 Jan '09 6:03 Post subject: |
|
|
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
|
Posted: Mon 12 Jan '09 15:12 Post subject: They are turned on |
|
|
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: 7373 Location: Germany, Next to Hamburg
|
Posted: Mon 12 Jan '09 16:42 Post subject: |
|
|
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
|
Posted: Tue 13 Jan '09 1:13 Post subject: |
|
|
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
|
Posted: Tue 13 Jan '09 7:33 Post subject: |
|
|
<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
|
Posted: Tue 13 Jan '09 8:10 Post subject: PHP problems.. |
|
|
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
|
|
Back to top |
|
bentogoa
Joined: 09 Feb 2007 Posts: 66 Location: GOA
|
Posted: Tue 13 Jan '09 8:21 Post subject: Re: PHP problems.. |
|
|
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
|
what happens ?
Are us using Apache 2.2.1 or Apache2.2.11 ? |
|
Back to top |
|
monkeyBones
Joined: 13 Jan 2009 Posts: 2
|
Posted: Tue 13 Jan '09 16:15 Post subject: |
|
|
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: 7373 Location: Germany, Next to Hamburg
|
|
Back to top |
|
HoibE
Joined: 11 Jan 2009 Posts: 22
|
Posted: Wed 14 Jan '09 0:52 Post subject: |
|
|
@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
|
Posted: Sat 17 Jan '09 15:46 Post subject: |
|
|
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
|
Posted: Sat 17 Jan '09 21:37 Post subject: OK, I solved it |
|
|
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 |
|