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.

Link to comment
Share on other sites

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 by jazzman1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.