Jump to:

4938 Posts in 16827 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Blank screen after migration, devmode shows error

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

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

Page: 1
Go to End
Author Topic: 1847 Views
  • LinseyM
    Avatar
    Community Member
    99 Posts

    Blank screen after migration, devmode shows error Link to this post

    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
    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

    * 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.

  • LinseyM
    Avatar
    Community Member
    99 Posts

    Re: Blank screen after migration, devmode shows error Link to this post

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

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Blank screen after migration, devmode shows error Link to this post

    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. http://php.net/substr_count 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.

    Sean

  • LinseyM
    Avatar
    Community Member
    99 Posts

    Re: Blank screen after migration, devmode shows error Link to this post

    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.

    Appreciated.

    Linsey

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Blank screen after migration, devmode shows error Link to this post

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

  • LinseyM
    Avatar
    Community Member
    99 Posts

    Re: Blank screen after migration, devmode shows error Link to this post

    Well that fixed it! Job done.

    Many thanks.

    (",)

    1847 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.