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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

Blank screen after migration, devmode shows error

Go to End

6 Posts   2334 Views


Community Member, 99 Posts

9 March 2010 at 8:37pm

Hi there,

Just migrated a site to a new server and having problems.

Uploaded the db and all files, set permissions etc and was just getting blank white screen with no output. (done this before on other server setups with no problem!)

Can't run a clean isntall either.

Put site into devmode and get following error:

[Warning] Wrong parameter count for substr_count()
GET /admin

Line 304 in /home/brandc/public_html/test/sapphire/core/control/HTTPRequest.php

296 // Special case for the root URL controller
297 if(!$pattern) {
298 return ($this->dirParts == array()) ? array('Matched' => true) : false;
299 }
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);
309 } else {
310 $patternParts = explode('/', $pattern);


* substr_count(admin/security//$Action/$ID/$OtherID,/,0,14)
Line 304 of HTTPRequest.php
* HTTPRequest->match(admin/security//$Action/$ID/$OtherID,1)
Line 244 of Director.php
* Director::handleRequest(Object id #8,Session)
Line 121 of Director.php
* Director::direct(/admin)
Line 118 of main.php

Any suggestions? I can see from the php.ini that the PHP version is 5.0.4 - is this really likely to be what is causing the error? Cannot rebuild database, so unsure what to do.

When I uploaded the origianl .htaccess and _config.php and tried to do a clean install in a blank db it tried to install but just sat at install.php and couldn't get passed it.


Community Member, 99 Posts

9 March 2010 at 8:44pm

Don't know that it makes any difference, but I've got the TwitterWidgetPack and UserForms add-ons uploaded.


Forum Moderator, 922 Posts

9 March 2010 at 9:20pm

Edited: 09/03/2010 9:26pm

PHP 5.0.4 is very old. This is most definitely the cause of the problem. Is there any way you can use _at least_ 5.1? 5.2 is highly recommended, as PHP was terrible before this version! You might want to ask your host nicely to upgrade, as 5.0.4 is ridiculously old!

EDIT: Confirmed. reports 2 additional arguments were added to this function in PHP 5.1.0. Any version before this only accepted two.

If you _really_ need it to work, you could try adding @ to the start of substr_count() to ignore the warning and the execution should continue. I can't guarantee the site will still operate correctly, however.



Community Member, 99 Posts

9 March 2010 at 9:25pm

Hi Sean,

Thanks very much for the swift reply. I'll pass this information to the hosting company and ask them to put it on a server with 5.2

I'll get back and update the post on how this goes.


Linsey :)


Forum Moderator, 922 Posts

9 March 2010 at 9:28pm

Let them know PHP 5.2.13 is the latest in the 5.2.x line. :-)


Community Member, 99 Posts

11 March 2010 at 2:36pm

Well that fixed it! Job done.

Many thanks.