0

I recently just moved servers with a multisite install and kept the same domain.

I can access all the backend features and logins for each subdomain but when trying to visit each subdomain site, it just loads a blank white page.

I have setup wildcard subdomains in cpanel and checked the wp options and wp config.

Has anyone else ever had this issue when migrating servers?

  • White blank pages normally indicate a PHP Fatal error has occurred, but the error isn't being displayed on the frontend. Can you look through your error logs and find the error message? – Tom J Nowell Aug 7 '14 at 18:48
  • I have not been able to find or setup error logs yet. I just find it strange that only the subdomains on the account are getting the white screen and the entire backend works fine. I don't see anything wrong with the theme files either. – user3630457 Aug 7 '14 at 19:02
  • Ah without knowing what the error is there's not a lot that can be done to help – Tom J Nowell Aug 7 '14 at 19:03
  • Parse error: syntax error, unexpected '[', expecting ',' or ';' in /home/radiobra/public_html/wp-content/themes/radioresponsive/index.php on line 15 – user3630457 Aug 7 '14 at 19:34
  • I checked the theme file and it looks fine. – user3630457 Aug 7 '14 at 19:35
0

Your comments state that the line in question that gives the fatal error causing your white pages is this line:

<div id="whatstrending"><h1><?php echo get_option('radio_options')['blog-header'];?></h1></div>

Most notably:

get_option('radio_options')['blog-header'];

Or more specifically:

functioncall()[]

This is invalid PHP up until recently, and your new host doesn't run a version of PHP that supports this.

You can fix it by refactoring it from:

echo get_option('radio_options')['blog-header'];

to:

$options = get_option('radio_options');
echo $options['blog-header'];

Rinse repeat in any other situation that follows the same pattern. As a sidenote, the function()['arrayaccess'] pattern is an anti-pattern, a single line should do a single thing, and calling a function then accessing its return value is 2 things. Not to mention that it will fail if the function doesn't return an array.

  • Or he could update his php version via his cpanel easy Apache options. But I also agree with your last point. – Howard E Apr 1 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.