HostSEO Blog

Stories and News from IT Industry, Reviews & Tips | Technology Blog


LSPHP directive for php.ini on shared servers

 

LSPHP  is a php handler that combines mod_lsapi+PHP. LSPHP provides an opportunity to use server level caching and ensures a better performance.
 
It offers excellent PHP performance, low memory footprint coupled with great security and support for opcode caching.
 

For the settings from the chosen php.ini file to work, specific directive should be added to your .htaccess file:

lsapi_phpini /home/USER/public_html/php.ini


NOTE:
Make sure you replace USER with your cPanel username. By default, public_html is the root folder for the main domain. In case you want to change the LSPHP directive for a subdomain/an addon domain, replace public_html with the corresponding root folder.

This option specifies which path to pass on to the PHP-interpreter and which folder to execute php.ini from.



Follow the instructions below to proceed with the setup.



1. To add these lines to .htaccess file, go to cPanel >> Files section >> File Manager menu:
 
For cPanel Basic Theme:


 
For cPanel Retro Theme:
 

 
2. Navigate to public_html directory:




3. Click on Settings in the right top corner and enable Show Hidden Files (dotfiles) in the pop-up window, that will allow you to see .htaccess file:






4. If there is no .htaccess file in the document root, you need to create it using +File option:






5. Right-click on .htaccess file >> Edit or use Edit option located in the toolbar:




6. Add the lines provided below into .htaccess file and Save Changes.

 

lsapi_phpini /home/USER/public_html/php.ini




If you have done it right, the designed php.ini will take immediate effect.



7. If you need to load php.ini for/from subdirectory, make sure you edit ConfigPath accordingly.




That's it!

Need any help? Contact our Hostseo Limited Helpdesk today!

Subscribe Now

10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!

Archive Calendar

SatSunMonTueWedThuFri
 1
2345678
9101112131415
16171819202122
23242526272829
30 

Born in 2004 ... Trusted By Clients n' Experts

SEO Stars

They never made me feel silly for asking questions. Help me understand how to attract more people and improve my search engine ranking.

Read More

Emily Schneller Manager at Sabre Inc
SEO Stars

Took advantage of Hostseo's superb tech support and I must say, it is a very perfect one. It is very fast, servers reliability is incredible.

Read More

Leena Mäkinen Creative producer
SEO Stars

We're operating a worldwide network of servers with high quality standards requirements, we’ve choose hostseo to be our perfect partner.

Read More

Ziff Davis CEO at Mashable
SEO Stars

It’s very comfortable to know I can rely about all technical issues on Hostseo and mostly that my website and emails are safe and secured here.

Read More

Isaac H. Entrepreneur
SEO Stars

With hostseo as a hosting partner we are more flexible and save money due to the better packages with great pricing, free SEO n' free SSL too!

Read More

Madeline E. Internet Professional