Creating a custom php.ini file on shared server

On shared server you dont have an access to "root", so your su command will not work.  Now if you have to add anything or modify the settings in php.ini file, you have to create a local copy of php.ini file for your website on root.

To do this, you have to login into SSH (Secure Shell) by using a program like putty  .

After you login, copy your php.ini file using cp command 

cp /web/etc/php.ini  /var/www/vhosts/sitename/php.ini

You might have different paths, if you dont know where is your php.ini file over the server, you can use the following command to find the file

find . -type f -name 'php.ini' 

Now you can change anything in your php.ini file and save it. You can view the changes by going here admin/reports/status/php in your drupal website.