Switch from PHP-CGI-FGI to PHP-CLI
Hello, so basically, I had php-cli installed on my server.
When I Was running the command php-v there was the output
PHP 7.3.25 (cli) (built: Dec 9 2020 03:04:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
But after installing cPanel there is the new output
PHP 7.3.25 (cgi-fcgi) (built: Dec 9 2020 03:04:52)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.25, Copyright (c) 1998-2018 Zend Technologies
How do I get back to
PHP 7.3.25 (cli) (built: Dec 9 2020 03:04:08) ( NTS )
Thank you
-
Hey there! I don't believe there's going to be a way to do that as cPanel always processes PHP with the handler assigned to that version. It's also worth mentioning that cPanel should not be installed on anything but a brand new machine, so there should not be an existing PHP version before cPanel is installed. 0 -
I tried both either installing php before or installing php after. It is still the same thing. It is not working the way you are talking about. I have been trying what you are talking about and when I try to run a php script using the command php -r on php-cgi-fgi it says -r is not a valid parameter 0 -
Can you send me the output of this command on your system? which php
That will tell us where the command line tool is looking for the PHP binary.0 -
/bin/php 0 -
Any news ? 0 -
It seems there is an issue with the PHP configuration on the system, as that would normally find the binary located in /usr/local/bin/php. I would not expect either configuration you mentioned to work properly, as cPanel installs PHP for you so you don't need to manually install software after the cPanel installation has completed. If you have a brand new server and then install cPanel it will include PHP by default, and then you can add other versions through EasyApache, but there won't be a way to make it look like your non-cPanel system. 0
Please sign in to leave a comment.
Comments
6 comments