Hello,
Thank you for your cooperation.
--
Regards,
Felix O.
Announcement
Collapse
No announcement yet.
Different PHP versions per directory (WHM error)
Collapse
X
-
It appears cpanel use own syntax checker when processing any includes from WHM. I was able to cheat it wrapping around with IfModule, use this:
Code:<IfModule mod_suphp.c> <Directory /> suPHP_AddHandler application/x-httpd-php52 suPHP_AddHandler application/x-httpd-php53 suPHP_AddHandler application/x-httpd-php54 suPHP_AddHandler application/x-httpd-php55 suPHP_AddHandler application/x-httpd-php56 </Directory> </IfModule>
Thanks for reporting!
Leave a comment:
-
Hello,
Yes, sure. We use suphp. Please take a look at the listing bellow:
Code:$ /usr/local/cpanel/bin/rebuild_phpconf --current Available handlers: suphp cgi none DEFAULT PHP: 5 PHP4 SAPI: none PHP5 SAPI: suphp SUEXEC: enabled RUID2: not installed $ grep alt /opt/suphp/etc/suphp.conf application/x-httpd-php52="php:/opt/alt/php52/usr/bin/php-cgi" application/x-httpd-php53="php:/opt/alt/php53/usr/bin/php-cgi" application/x-httpd-php54="php:/opt/alt/php54/usr/bin/php-cgi" application/x-httpd-php55="php:/opt/alt/php55/usr/bin/php-cgi" application/x-httpd-php56="php:/opt/alt/php56/usr/bin/php-cgi" $ cat /usr/local/apache/conf/includes/pre_main_global.conf suPHP_AddHandler application/x-httpd-php52 suPHP_AddHandler application/x-httpd-php53 suPHP_AddHandler application/x-httpd-php54 suPHP_AddHandler application/x-httpd-php55 suPHP_AddHandler application/x-httpd-php56 $ /usr/local/apache/bin/apachectl -t Syntax OK $ /usr/local/cpanel/cpanel -V 11.48.4 (build 4)
Thanks in advance.
--
Regards,
Felix O.
Leave a comment:
-
Do you really use suphp? Could you please post full output from /usr/local/cpanel/bin/rebuild_phpconf --current command?
Not sure if it works if you edit the file manually, maybe you just do not notice an error.
Leave a comment:
-
Different PHP versions per directory (WHM error)
Hello,
We are trying to use the following guide in order to implement multiple per directory php versions functional ( https://www.cloudlinux.com/blog/clne...p-selector.php ). As we can see it works perfectly when we edit /usr/local/apache/conf/includes/pre_main_global.conf using SSH console, but we have noticed an error when we use WHM. We use the following menu cPanel => Apahce Configuration => Inclde Editor -> "Pre Main Include" and "All Version", then we put the following block into editor:
Code:suPHP_AddHandler application/x-httpd-php52 suPHP_AddHandler application/x-httpd-php53 suPHP_AddHandler application/x-httpd-php54 suPHP_AddHandler application/x-httpd-php55 suPHP_AddHandler application/x-httpd-php56
> Clearing post_virtualhost_2.conf
>
> Clearing post_virtualhost_global.conf
>
> Clearing pre_main_2.conf
>
> Saving pre_main_global.conf
> Sorry, your changes have introduced a syntax error in pre_main_global.conf. Please correct the issue.
> Error:
> Configuration problem detected on line 2 of file /usr/local/apache/conf/includes/pre_main_global.conf.tmp: Invalid command suPHP_AddHandler, perhaps misspelled or defined by a module not included in the server configuration --- /usr/local/apache/conf/includes/pre_main_global.conf.tmp --- 1 2 ===> suPHP_AddHandler application/x-httpd-php52 <=== 3suPHP_AddHandler application/x-httpd-php53 4suPHP_AddHandler application/x-httpd-php54 5suPHP_AddHandler application/x-httpd-php55 6suPHP_AddHandler application/x-httpd-php56 7 --- /usr/local/apache/conf/includes/pre_main_global.conf.tmp ---
>
> Clearing pre_virtualhost_2.conf
>
> Clearing pre_virtualhost_global.conf
> Apache Version: 2.4.10
As it has been noticed before this functional works without any problem if we ipmplement this via remote console, but what WHM error can be related with?
Thanks in advance.
--
Regards,
Felix O.Tags: None
Leave a comment: