A custom website could not run in WHM/cPanel in a VPS

steitieh

Well-known member
Joined
Apr 23, 2014
Messages
113
Points
18
I have websites in different WHMs in differnet VPS companies. The strange thing is, one of custom my sites could run on VPS1 with WHM/cPanel but it could not run on VPS2 also using WHM/cPanel. I think it has different configurations between hosting companies or PHP & MySQL have been not compatible with my custom website for VPS2. Which parts in WHM would you suggest me to check and fix the problem?
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
how do you mean it could not run, what error are you getting ?
 

steitieh

Well-known member
Joined
Apr 23, 2014
Messages
113
Points
18
how do you mean it could not run, what error are you getting ?
The web pages is showing

[an error occurred while processing this directive]
I did some researches on Google with the type of this error and they suggested to change folder/file permissions in public_html and I chmod 755 for all files and folder in Public_html, it immediately redirect a my search file with blank page. I am searching for this file. I supposed our custom codes are not compatible with server configs on VPS2.
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
You should be using the following permissions:

owner should be 'accountname' group 'nobody'

The public_html folder should always have 0750 permissions.
All folders inside the public_html folder should have 0755 permissions.
All files inside the public_html folder should have 0755 or 0644 permissions.
 

steitieh

Well-known member
Joined
Apr 23, 2014
Messages
113
Points
18
You should be using the following permissions:

owner should be 'accountname' group 'nobody'

The public_html folder should always have 0750 permissions.
All folders inside the public_html folder should have 0755 permissions.
All files inside the public_html folder should have 0755 or 0644 permissions.
VPS2 should also be able to run your website regardless. I see that you said the public_html folder is 755 could you make sure the files inside also have the right permissions.
I don't think it is the problem on setting up permissions for files or folders because on VPS1, I have not set anything for files/folders on VPS2 but it ran.
I installed WHM/cPanel and leave default setting for VPS2 while my hosting provider has installed WHM/cPanel on my VPS1 for me and they sent me the account but not full features.
 

Nixtree

Well-known member
Registered
Joined
Jul 16, 2016
Messages
133
Points
28
Hi

I will suggest you to check whether both servers are having same webserver as Apache and same php handler as Suphp. If there is any change in any of these, then permissions will be changed a bit.

Did you tried contacting the support team about the same ?
 

steitieh

Well-known member
Joined
Apr 23, 2014
Messages
113
Points
18
steitieh
Yes I am contacting to ask for which they did on the VPS1
But I think that it is hard cos most of web hosting companies will hide which they did on their hosting.
 

steitieh

Well-known member
Joined
Apr 23, 2014
Messages
113
Points
18
[Update]

I could fix the problem on the VPS 2, I did a comparison with the VPS1 although my hosting provider disabled phpinfo() on my VPS1 but from SSH I could check components on VPS1 as

Check PHP version
Code:
[~]# php -v
PHP Warning:  Module 'suhosin' already loaded in Unknown on line 0
PHP 5.5.33 (cli) (built: Mar 24 2016 16:02:30) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd., and
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Suhosin v0.9.36, Copyright (c) 2007-2014, by SektionEins GmbH
Check apache version
Code:
[~]# httpd -v
Server version: Apache/2.4.18 (Unix)
Server built:   Mar 24 2016 15:56:47
Cpanel::Easy::Apache v3.32.11 rev9999
Check mysql version
Code:
[~]# mysql -V
mysql  Ver 15.1 Distrib 10.1.16-MariaDB, for Linux (x86_64) using readline 5.1
and do comparisons on php.ini (compare by content) between VPS1 and VPS2 with the following command
Code:
php -i
I knew which modules/software I missed and I installed them into VPS2

hence my custom website worked on the VPS2

Thanks you guys for supporting my question :)
 

Luxin Host

Well-known member
Registered
Joined
Jun 26, 2016
Messages
543
Points
43
Fantastic, glad to see its fixed.
in these situations it is most likely the versions/software being different which doesnt take that much of a fixing.
 
Older Threads
Recommended Threads
Replies
7
Views
3,683
jms
Replies
11
Views
4,761
Replies
5
Views
8,001

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top