John Davidson

php version in cpanel is 5.6 but show version 7 in project

0 comments
Message:


I have a codeigniter project that is live and when i check php version in cpanel cli for the domain of project it shows 5.6 but if i do


<?php
phpinfo();
?>

It gives PHP Version 7.4.29


I want it to be php 5.6 I have tried changing it from php multi manager in cpanel



My Answer:
php -v

in the command line interface of the server where the project is hosted, it shows version 7. This discrepancy may be due to the fact that cPanel allows you to set different PHP versions for different domains on the same server.

To ensure that your CodeIgniter project is running on PHP version 7, you can create a phpinfo file in your project directory and access it through a web browser. This file will display detailed information about the PHP configuration being used by your project, including the version number.

To create a phpinfo file, simply create a new file named phpinfo.php in your project directory with the following content:

php
phpinfo();
?>


Save the file and access it through a web browser by navigating to http://yourdomain.com/phpinfo.php. This will display detailed information about the PHP configuration being used by your project, including the version number. If it shows PHP version 7, then your project is indeed running on PHP version 7 despite the discrepancy in cPanel.

Rate this post

4 of 5 based on 7888 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us