kai
By:
kai

How can I build a virtualmin server with the same variables and function as major web host providers?

May 25, 2014 1.9k views
I have a Joomla website with some custom development in PHP that has been easily backed up and restored (using Akeeba) from Hostgator to GoDaddy and back. All elements function fine when I do this restore. I wanted to take the performance leap to a VPS, so I fired up my first droplet and chose Virtualmin as my control panel product for creating my different virtual servers. I followed a guide that Digital Ocean has for setting up Virtualmin on Ubuntu 14.04. Once set up I was able to restore one of my basic Joomla sites fine, but when I tried to restore my second site (which has some custom PHP development) I found some of the functions and renderings are not working correctly. My question is what other variables, parameters, or apache modules do I need to install, set, enable for my Virtualmin instance to behave like a GoDaddy or HostGator platform from a functionality perspective? As an example of the errors I encounter, I am seeing the following error in my Apache error log when I try to run one of the functions. This function has no problems on the two other hosting providers when restored the exact same way. [Sat May 24 21:41:32.637127 2014] [fcgid:warn] [pid 28182] [client 187.253.190.37:63570] mod_fcgid: stderr: PHP Fatal error: Call to undefined function imagecreatetruecolor() in /home/perfectprofiler/public_html/components/com_perfectpro/frontend_pages/quiz_finished.php on line 807 I am not a Linux noob, but I am not exactly well seasoned either. Any type of feedback on how I can finish building this virtualmin host so it can accept sites that were hosted fine on other providers would be great.
2 Answers
I discovered that I do need the GD PHP module, so I installed that (apt-get install php5-gd), but now I get other errors (in mass now).

Anyone know what modules I need for this. Here are the new errors:

[Sun May 25 10:10:55.876034 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined offset: 1 in /home/perfectprofiler/public_html/administrator/components/com_perfectpro/kernel/Entity/_QuestionEntity/class.singlequestion.php on line 49, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:10:55.876039 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined offset: 1 in /home/perfectprofiler/public_html/administrator/components/com_perfectpro/kernel/Entity/_QuestionEntity/class.singlequestion.php on line 49, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:10:55.876045 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined offset: 1 in /home/perfectprofiler/public_html/administrator/components/com_perfectpro/kernel/Entity/_QuestionEntity/class.singlequestion.php on line 49, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:10:55.876050 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined offset: 1 in /home/perfectprofiler/public_html/administrator/components/com_perfectpro/kernel/Entity/_QuestionEntity/class.singlequestion.php on line 49, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:10:55.876055 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined offset: 1 in /home/perfectprofiler/public_html/administrator/components/com_perfectpro/kernel/Entity/_QuestionEntity/class.singlequestion.php on line 49, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:10:55.876061 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined offset: 1 in /home/perfectprofiler/public_html/administrator/components/com_perfectpro/kernel/Entity/_QuestionEntity/class.singlequestion.php on line 49, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:10:55.876071 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined offset: 1 in /home/perfectprofiler/public_html/administrator/components/com_perfectpro/kernel/Entity/_QuestionEntity/class.singlequestion.php on line 49, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:11:00.868923 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined property: stdClass::$birthdate in /home/perfectprofiler/public_html/components/com_perfectpro/frontend_pages/quiz_finished.php on line 541, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:11:00.868975 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined index: HTTPS in /home/perfectprofiler/public_html/components/com_perfectpro/frontend_pages/quiz_finished.php on line 685, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:11:00.868981 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined offset: 1 in /home/perfectprofiler/public_html/administrator/components/com_perfectpro/kernel/Entity/_QuestionEntity/class.singlequestion.php on line 49, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
[Sun May 25 10:11:00.868987 2014] [fcgid:warn] [pid 27697] [client 187.253.190.37:51210] mod_fcgid: stderr: PHP Notice: Undefined offset: 1 in /home/perfectprofiler/public_html/administrator/components/com_perfectpro/kernel/Entity/_QuestionEntity/class.singlequestion.php on line 49, referer: http://www.perfectprofiler.com/ru/?option=com_perfectpro&task=question&ticketId=1731548912&t=uv_5381f9e500688&Itemid=191
Hi kai,

Those are warning messages about the php code you are using. They don't look like anything that would lead to your code not working though. For instance, the PHP Notice: Undefined index is letting you know that you are using a variable before checking if it has been defined. From the PHP documentation:

Relying on the default value of an uninitialized variable is problematic in the case of including one file into another which uses the same variable name. It is also a major security risk with register_globals turned on. E_NOTICE level error is issued in case of working with uninitialized variables, however not in the case of appending elements to the uninitialized array. isset() language construct can be used to detect if a variable has been already initialized.

See: http://www.php.net/manual/en/language.variables.basics.php
Have another answer? Share your knowledge.