Setting PHP version for subdomain issue
I am using cent os 6.9 in VPS server and having the root administrator access.I stored all my applications in /home/(cpanel-name)public_html folder.I have already set the default System php version as 7.1 in WHM.
But when creating the new sub domain into the public_html folder it sets the php version as 5.6.So i unable to run composer in my Default php version.
-
Hi @Karthikeyan18 If you go to cPanel>>Software>>MultiPHP Manager you should be able to update the php version for any domain in the account there. You should also be able to change this through WHM>>Software>>MultiPHP Manager How are you creating accounts? By default, they should be set to inherit unless you have a custom configuration determining the PHP version or PHP-FPM. Thanks! 0 -
Hi Lauren, I already did that WHM multiPHP manager as 7.1 for sub domain i have set.I tried to check the PHP version using php -v command in SSH,it showed as 5.6. My subdomain's application folder exists in this path /home/Username/public_html/.But when i check that creating the another sub domain's folder into /home/Username it shows my default version as 7.1 in ssh. 0 -
Hi Lauren, It show the php version 7.1.19. Thanks 0 -
HI @Karthikeyan18 That proves that you're running php 7.1 on that domain. Do you get different output when you run /usr/bin/php -v /bin/php -v0 -
Hi Lauren, I am getting the following output using the "/usr/bin/php -v", PHP 7.0.30 (cgi-fcgi) (built: Jun 26 2018 20:34:46) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies and "/bin/php -v" shows -bash: /bin/php: No such file or directory I have put this subdomain's directory as subdirectory(eg. /home/username/public_html/(Anothor domain's Projectfiles) with sub domain directory) Will this make problem?.Because i already set the sub domain php version as default 7.0 but when checking in ssh at the subdomain directory path php version shows incorrectly. Otherwise, changing the sub domain directory path will fix this Issue? 0 -
Hi @Karthikeyan18 There is some strangeness occurring with the PHP versions - if you set 7.1 as the default it shouldn't be returning as 7.0 when running /usr/bin/php -v
Can you please open a ticket for this using the link in my signature? Once opened please update this thread with the Ticket ID so we can follow up here on the outcome of the ticket. Thanks!0
Please sign in to leave a comment.
Comments
7 comments