Fatal error after migration

eric.langley

Member
Mar 2, 2013
8
0
1
cPanel Access Level
Root Administrator
Hello All,

Testing using cPanel. My configuration is CloudLinux running on a VMware ESXi virtual machine.

Migrating a WordPress site to a newly created hosting account returns this error when visiting the site:
Fatal error: Call to undefined function mb_convert_case() in /home/sample/public_html/wp-content/plugins/bp-group-documents/include/widgets.php on line 41

We use BackupBuddy to clone sites and have never had an issue with it on our existing hosting setup (CentOS running in EC2). This site was setup by creating a database, uploading a BackupBuddy backup file and the ImportBuddy php script and then running the script. The script did not report any problems.

Any help would be appreciated as this is how we'll be migrating our sites to cPanel.

Thanks in advance,

~eric
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

It seems like this may be an issue with the script as opposed to any issue with cPanel itself. Check to make sure all of it's required PHP modules (e.g. Mbstring) are installed on your system with EasyApache.

Thank you.
 

eric.langley

Member
Mar 2, 2013
8
0
1
cPanel Access Level
Root Administrator
Michael and Fabin,

I ran the Easy Apache wizard, the Mbstring was not enabled, and checked it off and completed.

Now, even after several hours, the panel says that Easy Config is still running.

Concerned to reboot and brick the box...

~eric
 

eric.langley

Member
Mar 2, 2013
8
0
1
cPanel Access Level
Root Administrator
The Easy Apache update finally finished, very slow though.

I ran the restore again and still receive a similar error when visiting the site or the wp-admin page:
Warning: Cannot modify header information - headers already sent by (output started at /home/netsysco/sites/ci-template-a/wp-content/themes/bp-social-child/bp-functions.php:218) in /home/netsysco/sites/ci-template-a/wp-includes/pluggable.php on line 875

~eric
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Warning: Cannot modify header information - headers already sent by (output started at /home/netsysco/sites/ci-template-a/wp-content/themes/bp-social-child/bp-functions.php:218) in /home/netsysco/sites/ci-template-a/wp-includes/pluggable.php on line 875
This actually seems like a different error message because there are no further references to "mb_convert_case". You might want to try using a different templates to see if that makes a difference as this seems like an issue isolated to the script itself.

Thank you.
 

eric.langley

Member
Mar 2, 2013
8
0
1
cPanel Access Level
Root Administrator
It seems that there are various files and plugins that have malformed php blocks like;
<?php
some code;
?>

<?php
some other codes;
?>

I fixed a few of them and deleted some plugins and was able to get the site to load from the front-end, (but not wp-admin).

This coding structure was never an issue with my hold hosting server running PHP 5.3.3

>>Is there any way to modify the cPanel configuration to operate like my old server?

There are too many sites to go in and fix all these php files.

~eric
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
The cPanel configuration should already be the same if you are running the same version of Apache and PHP, and have installed all of the PHP modules that were installed on the previous server. You could try matching up the php.ini file but it seems more like an issue with the Wordpress application itself. You mentioned malformed PHP blocks. Could you elaborate on that? Were there any errors during the backup or restore process?

Thank you.
 

eric.langley

Member
Mar 2, 2013
8
0
1
cPanel Access Level
Root Administrator
Comments inline

The cPanel configuration should already be the same if you are running the same version of Apache and PHP, and have installed all of the PHP modules that were installed on the previous server. You could try matching up the php.ini

ESL:
I am not sure that the PHP modules are exactly the same. I can have my technician check that.

As for the php.ini I found this cPanel forum post:
http://forums.cpanel.net/f5/warning...eaders-already-sent-output-started-17772.html
where it mentions adding 'output_buffering On' to php.ini
I did that but the site still does not work properly.

'output_buffering On' does not exist in my old php.ini
I don't have enough technical knowledge to compare the two php.ini files to look for differences.

You wrote:
it seems more like an issue with the Wordpress application itself. You mentioned malformed PHP blocks. Could you elaborate on that?

ESL:
The WordPress Codex refers to it here:
FAQ Troubleshooting « WordPress Codex

When I did a Google search it seems to be a fairly common problem with cPanel with various hosts, GoDaddy, etc..
There are many php files that are not formatted the way this Codex suggests, but again, it wasn't a problem on my old server.
One php file with less than ideal coding can kill an entire site...

You wrote:
Were there any errors during the backup or restore process?

ESL:
Only the headers already sent by...' error during the restore process, that were from the BackupBuddy script not following the WordPress Codex. Otherwise the restore completed successfully.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
It seems like this might be an issue with how the custom backup script restored the websites. Have you tried transferring an account using the transfer options in Web Host Manager to see if you get the same results?

Thank you.
 

eric.langley

Member
Mar 2, 2013
8
0
1
cPanel Access Level
Root Administrator
Possibly, however if that were the case then iThemes/BackupBuddy should fix it and make it work. So far they have not provided any solution to the problem.

The old server is running zPanel so that won't be an option.

I can always restore the server by backing up the db and simply copying the files over.

But BackupBuddy is our backup and domain name change migration solution. It needs to work either way we use it every day for this type of thing now.

~eric
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
You may want to try uploading a fresh copy of WordPress on a new website or subdomain to see if that works as expected. That way, you can rule out any issues with the third-party application you are using.

Thank you.