Hello everybody. I'm currently trying to install SilverStripe in my Ubuntu with many problems and really does not know how to fix them. Please help me with this issue.
Environment:
-Ubuntu 9.10
-LAMP: (XAMPP 1.7.3a: PHP 5.3.1 & MySQL 5.1.41
At SS install it just stops with the following error:
Friendly URLs are not working. This is most likely because mod_rewrite isn't configuredcorrectly on your site. Please check the following things in your Apache configuration; you may need to get your web host or server administrator to do this for you:
* mod_rewrite is enabled
* AllowOverride All is set for your directory
Refreshing install.php just happens exactly the same. So I tried looking at ".../home/successfullyinstalled?flush=1" just to verify the installation and the following error appears:
[Warning] mb_substr_count() expects at most 3 parameters, 4 given
GET /silverstripe/home/successfullyinstalled?flush=1
Line 304 in /opt/lampp/htdocs/silverstripe/sapphire/core/control/HTTPRequest.php
Source
295
296 // Special case for the root URL controller
297 if(!$pattern) {
298 return ($this->dirParts == array()) ? array('Matched' => true) : false;
299 }
300
301 // Check for the '//' marker that represents the "shifting point"
302 $doubleSlashPoint = strpos($pattern, '//');
303 if($doubleSlashPoint !== false) {
304 $shiftCount = substr_count($pattern, '/', 0, $doubleSlashPoint) + 1;
305 $pattern = str_replace('//', '/', $pattern);
306 $patternParts = explode('/', $pattern);
307
308
309 } else {
310 $patternParts = explode('/', $pattern);
Trace
* mb_substr_count(admin/security//$Action/$ID/$OtherID,/,0,14)
Line 304 of HTTPRequest.php
* HTTPRequest->match(admin/security//$Action/$ID/$OtherID,1)
Line 247 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/home/successfullyinstalled)
Line 118 of main.php
By the way:
-Of course mod_rewrite is enabled (
LoadModule rewrite_module modules/mod_rewrite.so
) at my httpd.conf-Also, I added:
<Directory "/opt/lampp/htdocs/silverstripe">
Options FollowSymLinks SymLinksifOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
to the file. (Even I tested with the root directory <Directory /> allowing override All)
Searching the install.php file of SS, this is the function where things go wrong:
function checkModRewrite() {
...
if(typeof $ == 'undefined') {
...
} else {
$.ajax({
method: 'get',
url: 'InstallerTest/testrewrite',
complete: function(response) {
if(response.responseText == 'OK') {
...
} else { HERES THE PROBLEM
$('#ModRewriteResult').html("Friendly URLs are not working. This is most likely because mod_rewrite isn't configured"
+ "correctly on your site. Please check the following things in your Apache configuration; "
+ " you may need to get your web host or server administrator to do this for you:"
+ "<ul><li>mod_rewrite is enabled</li><li>AllowOverride All is set for your directory</li></ul>");
But I did not found any help in the help site or any similar reference (answered) in the forums. I will really appreciate if someone could help me.