Hi,
I have seen lots of posts with this same problem, but none of the solutions offered have helped me so far.
I’m using Windows2000, Apache and MySQL.
I get through the installation process fine, I have inserted the aliases into the httpd.conf file, and when I click on the link that takes me to http://localhost/_admin I get a page not found error.
I’ve tried every solution I could find in the forums to no avail and am getting to the end of my tether. I’m pretty new at the server end stuff, so can someone please help me out in really simple terms? (Talk to me like I’m stupid).
Thanks in anticipation.
Is it the matrix URL does not exist error? Or an actual apache 404 error?
Can you check your apache log file (Not sure where it's stored on windows, I think it's in the apache/logs directory) to see if it gives you any hints?
(PS: you did restart apache after editing the httpd.conf didn't you? :D)
Yes, I have restarted, reinstalled, regoneinsane…
It's the 404 not found error. I checked the Apache log to confirm.
As mentioned, I am pretty green with all this stuff, but learning fast.
Any suggestions would be welcome.
Could you paste the error in the apache log, and the parts of your apache conf that show the alias settings?
This is what I get from the access log from the last time I tried:
127.0.0.1 - - [17/Dec/2004:16:11:04 +1030] "GET /_admin HTTP/1.0" 404 25
This is what I get from the error log:
[Fri Dec 17 16:10:54 2004] [notice] Parent: Created child process 4024 [Fri Dec 17 16:10:54 2004] [notice] Child 4024: Child process is running [Fri Dec 17 16:10:54 2004] [notice] Child 4024: Acquired the start mutex. [Fri Dec 17 16:10:54 2004] [notice] Child 4024: Starting 250 worker threads.
This is the alias part of my httpd.conf (pasted in from the installation):
Alias "/__data" "c:/php4win/matrix/data/public" Alias "/__lib" "c:/php4win/matrix/core/lib" Alias "/__fudge" "c:/php4win/matrix/fudge" Alias "/" "c:/php4win/matrix/core/web/index.php/"
The logs mean very little to me, so I hope you can help!
Remove the trailing slash so the last line of alias directives looks like this:
Alias "/" "c:/php4win/matrix/core/web/index.php"
Also, maybe you should be using "\" instead of "/" in the local filepaths on a windows box, but I doubt it.
Tried, but no luck. Same result.
Some questions that will help:
Which version of Apache are you running?
Which version of PHP are you running?
Have you checked that mod_alias is turned on properly in httpd.conf?
Have you been able to serve any ordinary (html) pages out of your Apache installation?
Have you checked that the DocumentRoot variable in httpd.conf matches where you are installing Matrix to?
Check where you have placed the "alias" directives, they should be with al the other alias directives after the line "# Aliases: Add here as many aliases as you need (with no limit)." and between the lines "<IfModule mod_alias.c>" and "</IfModule>".
If you change anything in httpd.conf, remember to restart Apache
I thought this might have been the problem, so I adjusted where the alias lines were, and put them between the lines you suggested and…
What a surprise! No result. Same old same old. D'oh!
PS Running Apache 2.0.52 and PHP 4.3.9 on Windows2000
Try accessing http://localhost/ for a sec, without the “_admin” at the end of it. (This is not the admin interface, this is what would be the home page of your site if )
Do you get Apache’s “404” error as before, or a Matrix error (which is a green box saying ‘URL “localhost” not found’)?
PS:
Alias "/" "c:/php4win/matrix/core/web/index.php/"
should have the trailing slash at the end - if you have a slash at the end of one but not the other, Apache won't translate things properly (it'd go looking for something like "c:/php4win/matrix/core/web/index.php_admin" without the trailing slash). Also forward and backward slashes are allowed in Apache/Win's config file, makes no difference.
PPS:
I thought I was able to reproduce the problem on my box (Win XP-SP2, Apache 2.0.48, PHP 4.3.3), but then I got it working and have since been unable to reproduce it no matter how hard I tried. :blink:
I just tried a fresh install with the matrix directory moved somewhere else, and got pretty much the same result.
Although, now when I try http://localhost/ by itself I get an internal server error.
This is going to be a DUMB question, but should I have the DocumentRoot in Apache conf set to c:/phpWeb or c:/phpWeb/matrix ?
However, I’ve tried both and neither work. sigh
The Alias lines override the DocumentRoot setting, so you can pretty much ignore it. If you're getting an Internal Server Error, can you post the full error from your Apache error_log file?
The internal server error was only coming up when I did as was suggested above by Sam Bauers (adding <IfModule mod_alias.c> and </IfModule> around my alias code lines. When I remove that, it goes back to being a 404 not found error.
Does anyone have any other ideas for me? I'm supposed to be setting this installation up on a local machine in our office so that staff can test it and see if they want to adopt it. At this stage I'm looking at having to chuck the idea of using matrix because it's just not working.
Your best bet is to grab a WAMP installer (Windows, Apache, MySQL and PHP), which handles all the non-Matrix stuff. Search with Google, there are plenty. This will make it much simpler to get all the Apache/PHP stuff working. Once that's running, its pretty easy to get Matrix to work.
If this is not an option, can you get a simple phpinfo.php file to work with your installation? Create a file called phpinfo.php with the following text:
<?php phpinfo() ?>and put it in your DocumentRoot directory. Then remove the aliases you added for Matrix and restart Apache. Once that's done, visit http://localhost/phpinfo.php -- if you get anything besides the PHP information screen, there is something wrong with your Apache/PHP configuration.
Hope that helps!
Thanks! Will give that a try. Here's hoping!
If you search the forums, I know other people have posted on the success they've had with particular WAMP installers.
I tried both WAMP server and XAMPP, but no luck. Different errors with both, and I got less far than I did with my own efforts. XAMPP shuts down MySQL before I can get to populating the database, and WAMP comes up with so many errors that I just turfed it. Plus it's WAY easier to configure pear when you do it yourself.
So anyway I wiped everything and reinstalled the different components individually. I have checked out the configuration and can serve PHP pages and access the database, so I can't for the life of me work out what is wrong with the matrix install.
AAAAARGH!
I'm pretty sure the trouble I'm having with matrix is all to do with the aliases. I know Apache, PHP and MySQL are all working fine, and according to the installer I have everything required for matrix except PSpell (which I don't need at this stage).
If I comment out the aliases I can browse through to the core/web/index.php but when I get there I get a matrix green error box saying:
[quote]MySource Notice
URL "localhost/matrix/core/web/index.php" not found.[/quote]
I know you're not supposed to access this file directly, but I wanted to see what would happen. Does this response indicate that anything is wrong?
I have to get this thing up and running before Christmas.
The aliases are the only mechanism that works on a Windows platform (you can use mod_rewrite rules with symbolic links on Linux). The aliases should look like this:
Alias "/__data" c:/path/to/mysource_matrix/public/data Alias "/__fudge" c:/path/to/mysource_matrix/fudge Alias "/__lib" c:/path/to/mysource_matrix/core/lib Alias "/" c:/path/to/mysource_matrix/core/web/index.php/
Once you've added those, you should run an Apache configtest to ensure that the config file is valid. If you're running virtual hosts or any other more complex Apache configuration, let us know. Otherwise, you should be OK just putting these lines at the end of your httpd.conf file.
If this doesn't work, please email your httpd.conf file, plus your access_log and error_log files to avi dot miller at squiz dot net and I'll take a look at them.