sKunKbad Posted September 13, 2014 Share Posted September 13, 2014 I'm working on a website (for free) and the website owner has shared hosting w/ cPanel. When logged in to cPanel, the PHP version can be set to PHP5.5. So I did that. When logged in via SSH, scripts are still running on PHP5.3. I found that /opt/alt/php55/usr/bin/php is a location of php5.5, but when I run my script, it gives an error that mysqli is not found. As far as I know, this is probably just a typical cPanel install. If anyone can point me to the right way to run PHP5.5 from the command line, I'd appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/291039-running-cpanels-php55-from-ssh-which-wants-to-use-a-different-php-version/ Share on other sites More sharing options...
QuickOldCar Posted September 13, 2014 Share Posted September 13, 2014 Try adding the shebang the top of the php script #!/opt/alt/php55/usr/bin/php -q Quote Link to comment https://forums.phpfreaks.com/topic/291039-running-cpanels-php55-from-ssh-which-wants-to-use-a-different-php-version/#findComment-1490978 Share on other sites More sharing options...
jazzman1 Posted September 13, 2014 Share Posted September 13, 2014 (edited) Cpanel running by a regular user ( by default ) gets effected only onto the user/public_html home directory not to entire system. You need to go there to check, what happens.The easiest way for you is just to create a file for instance - phpinfo.php with phpinfo() function in it, open it up in your browser and check what version you're using to this particular directory. They probably change (handle) their installed versions of php using the apache "addhandler" directive, so check for .htaccess file in the same directory. And post out the result if you don't understand something. Edited September 13, 2014 by jazzman1 Quote Link to comment https://forums.phpfreaks.com/topic/291039-running-cpanels-php55-from-ssh-which-wants-to-use-a-different-php-version/#findComment-1491008 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.