4579 Posts in 1388 Topics by 1378 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1537 Views |
-
Blank screen after migration, devmode shows error

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 /adminLine 304 in /home/brandc/public_html/test/sapphire/core/control/HTTPRequest.php
Source295
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.phpAny 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.
-
Re: Blank screen after migration, devmode shows error

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.
-
Re: Blank screen after migration, devmode shows error

9 March 2010 at 9:20pm Last edited: 9 March 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. 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
-
Re: Blank screen after migration, devmode shows error

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.
Appreciated.
Linsey
-
Re: Blank screen after migration, devmode shows error

9 March 2010 at 9:28pm
Let them know PHP 5.2.13 is the latest in the 5.2.x line.
-
Re: Blank screen after migration, devmode shows error

11 March 2010 at 2:36pm
Well that fixed it! Job done.
Many thanks.
(",)
| 1537 Views | ||
|
Page:
1
|
Go to Top |


