If PHP running in command line then read here site PHP settings command line. Just see the guide to understand how to change site PHP setting command line and specify php.ini file. However, if you are not using command line then you can read the below article how to change site PHP settings command line (article link)
First Specify php.ini File in Command Line /(Site PHP Settings Command Line)
Now first specify php.ini file in command line / (site PHP setting command line).
- First, the server connects via SSH. You can see method by scrolling down.
- Specify php.ini file in command line by using the below line.
php -c [Path to php.ini file] [Path to .php file]
- Just see the below example.
php -c /home/userna5/public_html/php.ini /home/userna5/public_html/example.php
Change PHP Settings CPanel / Site PHP Settings Command Line
- Connect your site’s server through SSH. You can see the method to connect site’s server through SSH by click on the link which has placed on the end of the article.
- Now just specify php.ini setting using the below line.
php -c [Path to php.ini file] [Path to .php file] -d [PHP setting]
- Try to understand with the help of an example.
php -c /home/userna5/public_html/php.ini /home/userna5/public_html/example.php -d memory_limit=256M
- If you see the above example. Then in which memory limit set to 256 megabytes. Here some other settings suggestions. If you want to make a change in it.
max_execution_time max_input_time upload_max_filesize
That’s the method to site PHP settings command line. If you face any difficulty doing Site PHP setting command line then share in the comment section. If you like this then don’t forget to follow our blog for upcoming posts. Furthermore, just read the below helpful articles for rid of errors in your site. I have shared to connect server using SSH the below link will help you for server connection.