Softaculous


Topic : Auto-detect *actual* version of PHP on customer's account (and install folder)


Posted By: electric on January 29, 2013, 4:02 pm
Hello, We are using CloudLinux PHP Selector to allow our customers to choose what version of PHP they want for their account.    The problem is that Softaculous does not recognize what version of PHP customer has selected, so if (for example) customer tries to install Joomla 3.x.. then Softaculous failes with a "PHP version must be PHP 5.3 or higher" message. But... the customer IS using PHP 5.3 (or PHP 5.4 or PHP 5.5 if selected). I know this can be "fixed" by hard-coding a PHP version into Softaculous, but that is not a good solution because... well, it involves hard-coding a fake PHP version into softaculous.  ("Fake", in that the customer could have any other version installed, regardless of what is hardcoded into the softaculous hook file.)  Perhaps a better solution might be if Softaculous did a simple function call to the phpinfo() command on a test file in the customer's account, to see what is the actual version of PHP running on their account.  For example: - Create test file called "/home/username/public_html/path/to/test_file_phpinfo.php" (with only phpinfo() function.  (Note, this file should be located in whatever folder user selected to install the app in, since it's possible to have multiple versions of PHP in an account, even different versions in different folders. - Call "get_file_contents("/home/username/public_html/test_file_phpinfo.php"). - Parse out the actual PHP version that is running in that folder.
This problem with softaculous is just going to get more frequent as more and more people start using CloudLinux (or other method) of switching PHP for either an entire account or individual folders.  Manual "fixing" of softaculous with a hardcoded version in the hook file is not good... Thanks.

Posted By: Brijesh on February 1, 2013, 5:27 am | Post: 1
Hi,

Sorry for the delay. We are in talks with the CloudLinux team on how to detect the appropriate PHP version and we will modify the version check accordingly.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: electric on March 20, 2013, 10:17 am | Post: 2
Quote From : Brijesh February 1, 2013, 5:27 am
Hi,

Sorry for the delay. We are in talks with the CloudLinux team on how to detect the appropriate PHP version and we will modify the version check accordingly.
Is there any progress on this?  Our customers are finding this problem more and more, and it's very annoying.  Their account *is* using PHP 5.3, but yet they are unable to use Softaculous to install some software. Thanks.

Posted By: electric on March 20, 2013, 2:40 pm | Post: 3
Just to clarify, I am using Softaculous latest version (v4.2.0) and this problem is still occurring.

Please let me know if this is planned to be fixed.

Posted By: Brijesh on March 21, 2013, 4:53 am | Post: 4
Hi,

Sorry for the delay. The fix should be available by today.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: Brijesh on March 21, 2013, 8:22 am | Post: 5
Hi,

The hook for CageFS is available here :
http://softaculous.com/docs/Detect_PHP_Version_on_CageFS

This hook will detect correct PHP version for user on CageFS and enable the required version as well.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: electric on March 21, 2013, 8:30 am | Post: 6
Thanks a lot!

Can you tell me exactly what the last part of the hook file does? 

Will it actually change their PHP version if the software being installed needs a different version?


Posted By: electric on March 21, 2013, 8:32 am | Post: 7
Oh.. I am an idiot.  I just read the documentation page a little more closely.

The script will ask if you wants to change their PHP version.

Great! 

Thanks again.  :)

Posted By: VincentLeclerc on May 21, 2013, 7:02 am | Post: 8
Our customers are looking for more and more problems, and it is very annoying. Their account * is * PHP5.3, but they can not use Softaculous to install some software.

Posted By: Brijesh on May 21, 2013, 7:15 am | Post: 9
Hi,

Sir can you please confirm if the pre-install hook for cagefs was added to Softaculous :
http://softaculous.com/docs/Detect_PHP_Version_on_CageFS

If you still face the issue please open a support ticket with us we will check it :
https://www.softaculous.com/support/

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: elecor on July 6, 2013, 11:58 am | Post: 10
Which versions of softaculous are not affected by this?

I mean what's the first version without this issue.


-----------------------
Free hosting

Posted By: Brijesh on July 8, 2013, 5:40 am | Post: 11
Hi,

The issue is when you have installed CageFS on your server as it allows users to change their PHP version.

A simple solution to the issue would be simply unzipping the below hook :
http://softaculous.com/docs/Detect_PHP_Version_on_CageFS

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.