Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Apache mod_rewrite install test failure again...


Go to End


3 Posts   5287 Views

Avatar
cames

Community Member, 9 Posts

7 March 2008 at 1:24pm

Edited: 09/03/2008 3:23pm

Update: Fixed I think? See post below...

I can see this issue has been raised over and over again on this Forum, but I can't find a decent answer...

Can anybody tell me what the installation mod_rewrite test is for?

Using the PHP installer, I can set up the install page to show green all the way down, including mod_rewrite enabled = OK

Click "Install Silverstripe", and after a few seconds I'm informed that mod_rewrite is not working.

This isn't true - I can rewrite URLs using .htaccess files in the same directory using the 'Bob and Alice' examples http://www.workingwith.me.uk/articles/scripting/mod_rewrite suggested by this site.

After a couple of notices about undefined variables, I get "click here to proceed anyway", and Silverstripe writes the .htaccess file and finishes the install.

As far as I can tell, the basic CMS is working, and as it depends on the ability to rewrite URLs, I guess the .htaccess file is driving the mod_rewrite function that the Silverstripe Installer has just told me is faulty.

Now if the above makes sense, you're cleverer than me. So:

Why does the installer claim mod_rewrite isn't working if it is?
If the installer mod_rewrite test has a purpose, does it act on it's findings, and if so, how?
If you can "click here to proceed anyway" and finish the install, what's the point of the test?
If the CMS works, why tell users to worry about a condition that they don't need to worry about?

I'm conscious that even at this early stage of development, Silverstripe is miles better than anything I could achieve from scratch, which is why I'm interested, and why I'm posting. It is visually more attractive, and much more intuitive to administer 'out of the box' than the dozens of other CMS offerings that appear and then disappear a few months later - which is why I've spent over a day trying to figure out this mod_rewrite nonsense. Previous CMSs would have been wiped from my hard drive hours ago, and I'd be safely back with Joomla and Drupal again.

There, that's the rant over. I want to be able to figure this out because Silverstripe looks full of potential. I can't believe that the US Democratic National Convention site advertised on the Silverstripe Homepage had "must get a CMS with a meaningless and distracting install error message" at the top of its wish list!

Help me out someone?

Server setup is:

Ubuntu Server 7.10 Linux
Apache 2.2.8
PHP 5.2.5
MySQL 5.0.51a

All other advertised server requirements are met or exceeded.

Avatar
Fuzz10

Community Member, 791 Posts

8 March 2008 at 6:02am

If the CMS itself works, then I believe you are fine.

On all our servers, SS also starts yammering about mod_rewrite. Just ignore it. I think it has to something with Apache and (mass)-Vhosts.

Avatar
cames

Community Member, 9 Posts

9 March 2008 at 2:57pm

Edited: 09/03/2008 3:28pm

OK - I think it's fixed, for me at least. The problem was a case sensitive function name...

There were some pointers about where to look in rewritetest.php, but I admit the solution was found by accident when I was retyping some changes:

edit:- sapphire/testing/InstallerTest.php
change:- function testRewrite()
to:- function testrewrite()

The installer will now run without error if all options on the install page are green (there are some PHP Notices, ignore them). If mod_rewrite is then disabled, it will report the error correctly. Re-enable mod_rewrite and the message goes away.

So the test now works on my system. The question is, why?! I thought PHP function names were case insensitive? Is it because it's in a class? I need to do some homework...

Fuzz10, you're right - if it works, then fine. But inconsistencies annoy me, and in other new CMSs I've tried, it's inevitably a warning of bigger bugs around the corner. Roll on Silverstripe...

Server setup is:

Ubuntu Server 7.10 Linux
Apache 2.2.8
PHP 5.2.5
MySQL 5.0.51a