Jump to content

Running cPanel's PHP5.5 from SSH (which wants to use a different PHP version)


sKunKbad

Recommended Posts

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.

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. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.