Problem in using OCC using SSH on 3rd party web hosting

Dear Nextcloud developers,

I was using owncloud for almost 10 months now and yesterday I upgraded to NextCloud. I am quite happy to see most of the developments happened in last few months. I wish to point out first my experience of migrating and then current issues.

For the moment i am hosting the cloud in a shared cPannel from a 3rd party hoster. The reason being I dont have too much money or a great internet connection or experience in configuring and maintaining a server. Due to this i have some limitations and I am stuck. I need your help to get out of the bottle neck.

Firstly I want to point out about easy web migration tool
Before migrating to NextCloud i was using ownCloud 9.1.6.2. I used the web migrator as shown in the youtube video. The problem is even though NextCloud new update is out, the web migrator still takes NextCloud 10.0.5 update. Therefore I updated manually by deleting all the files except config and data folders. I connected my hosting website through Putty and in terminal i used the commands to copy NextCloud 10.0.6 are suggested. Once i wanted to update, NextCloud shows a error that it cant migrate from ownCloud 9.1.6.2. So i changed config/config.php to 9.1.6.1 and it worked.

Can you please make sure that people from 9.1.6.2 can also smoothly migrate using webtool?

Now coming to the actual problem which I am facing.

After i migrated to NextCloud 10.0.6 everything was working fine. I can use the SSH to access OCC. Till then everything was smooth and easy. But then i got a update request for NextCloud 11.0.4. So i accepted the request and the web installation happened smoothly.

Now the problem is when i am using SSH command line to execute OCC it says

“This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.4.45. Please update your PHP version.”

I spoke with my web hosting company, they say they have installed and configured PHP 7.0.18 (phpinfo.jpg) for my website. Since we are on a shared cPannel they cant change the PHP version of cPannel. In such case what should i do to access OCC commands using SSH.

after migration other error is

“Error PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set ‘always_populate_raw_post_data’ to ‘-1’ in php.ini and use the php://input stream instead. at Unknown#0 2017-08-09T05:48:10+0200”

can you also give some solution to this one.

Nextcloud version : 11.0.4
Operating system and version : linux cPannel version 60 (x86_64)
Apache or nginx version: 2.2.31
PHP version: 5.4.45

Is this the first time you’ve seen this error?: Yes

.

sometimes they have different binaries installed at the same time, instead of just php, it could be php7 or php7.0. But that depends on how your hoster installed it and he is the only one who can answer this. Perhaps the output of ls -la /usr/bin | grep php could give you the available commands (path can differ for each distribution)

thanks you @tflidd. I tried php7 and also php7.0 it didnt work. secondly /usr is not found (or rather i dont have access to). I will try to contact the file hosting support and i will explain what you just said. Lets see if they can answer me. Just in case, any other suggestion will be deeply appreciated.

@tflidd

Well i finally figured it out. For the cPanel servers the php is installed in /opt/phpXX/bin/php in my casr XX is 70.

later i added this path as alias php='/opt/php70/bin/php' in /.bash_profile. Now it is working.

Thanks a lot.

@tflidd but i still have this error

“Error PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set ‘always_populate_raw_post_data’ to ‘-1’ in php.ini and use the php://input stream instead. at Unknown#0 2017-08-09T05:48:10+0200”“Error PHP Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set ‘always_populate_raw_post_data’ to ‘-1’ in php.ini and use the php://input stream instead. at Unknown#0 2017-08-09T05:48:10+0200”

can you help me ?

P.S: i read that in this link. quite useful for people using file hosting cPanel server https://stackoverflow.com/questions/34250739/change-php-5-4-to-5-5-on-hostgator

Did you try this?

it did work thanks a lot @tflidd