Difference between revisions of "Php.ini"
From Hostek.com Wiki
Line 16: | Line 16: | ||
#Check the Enable custom php.ini checkbox | #Check the Enable custom php.ini checkbox | ||
*<b>Note</b> - You can also change many common settings used in your PHP.ini here | *<b>Note</b> - You can also change many common settings used in your PHP.ini here | ||
+ | |||
+ | ==Linux/cPanel VPS PHP.ini== | ||
+ | |||
+ | This is if you need specific functions enabled, and you don't have the feature to do this in your cPanel. | ||
+ | |||
+ | #Copy your <code>/usr/local/lib/php.ini</code> file to the domain's root folder. | ||
+ | #*Example SSH Command: <code>cp /usr/local/lib/php.ini /home/cpusername/public_html</code> | ||
+ | #*#'''Replace "cpusername" with the domain's actual cPanel username.''' | ||
+ | #Make sure the file is owned by the domain's cPanel user. | ||
+ | #*Example SSH Command: <code>chown cpusername:cpusername php.ini</code> | ||
+ | #*#'''Replace "cpusername" with the domain's actual cPanel username.''' | ||
+ | #*You should be able to reset the permissions on the PHP.ini file via your cPanel's File Manager feature too. | ||
+ | #Edit the new PHP.ini file as you see fit. | ||
+ | #*You can 'comment out' a line to disable a function by adding a Number Sign ('''#''') at the start of the line. | ||
+ | #Add the following to the domain's .htaccess file: <code>SetEnv PHPRC /home/cpusername/public_html/php.ini</code> | ||
+ | ##'''Replace "cpusername" with the domain's actual cPanel username.''' | ||
+ | #*You should be able to see this file through FTP and SSH by default. | ||
+ | #**If you can't see the .htaccess file through the cPanel File Manager, you'll need to follow either of these steps depending on which cPanel Theme you have: | ||
+ | #***Paper Lantern Theme | ||
+ | #***#In File Manager click on '''Settings''' | ||
+ | #***#Tick the '''Show Hidden Files (dotfiles)''' box | ||
+ | #***#Click '''Save''' | ||
+ | #***x3 Theme | ||
+ | #***#Click on the '''File Manager''' button to be prompted for some options. | ||
+ | #***#*If you aren't prompted for more options you'll need to click on "Reset All Interface Settings" at the very bottom of the page. | ||
+ | #***#Tick the '''Show Hidden Files (dotfiles)''' box | ||
+ | #***#Click '''Go''' | ||
+ | |||
[[Category:Tutorials]] | [[Category:Tutorials]] | ||
[[Category:Windows]] | [[Category:Windows]] | ||
[[Category:Linux]] | [[Category:Linux]] |
Revision as of 14:55, 20 September 2016
Windows Custom PHP.ini
- Log into the Control Panel at wcp.hostek.com
- Click on PHP Settings
- Select the domain or subdomain you want to have a custom PHP.ini for
- There will be a checkbox that says 'Custom php.ini'
- Check this and it will create the Custom PHP.ini file for you.
- Note - You can also change the PHP version that is used from the drop down menu.
Linux Custom PHP.ini
- Log into your control panel
- Click on PHP.ini Settings
- Check the Enable custom php.ini checkbox
- Note - You can also change many common settings used in your PHP.ini here
Linux/cPanel VPS PHP.ini
This is if you need specific functions enabled, and you don't have the feature to do this in your cPanel.
- Copy your
/usr/local/lib/php.ini
file to the domain's root folder.- Example SSH Command:
cp /usr/local/lib/php.ini /home/cpusername/public_html
- Replace "cpusername" with the domain's actual cPanel username.
- Example SSH Command:
- Make sure the file is owned by the domain's cPanel user.
- Example SSH Command:
chown cpusername:cpusername php.ini
- Replace "cpusername" with the domain's actual cPanel username.
- You should be able to reset the permissions on the PHP.ini file via your cPanel's File Manager feature too.
- Example SSH Command:
- Edit the new PHP.ini file as you see fit.
- You can 'comment out' a line to disable a function by adding a Number Sign (#) at the start of the line.
- Add the following to the domain's .htaccess file:
SetEnv PHPRC /home/cpusername/public_html/php.ini
- Replace "cpusername" with the domain's actual cPanel username.
- You should be able to see this file through FTP and SSH by default.
- If you can't see the .htaccess file through the cPanel File Manager, you'll need to follow either of these steps depending on which cPanel Theme you have:
- Paper Lantern Theme
- In File Manager click on Settings
- Tick the Show Hidden Files (dotfiles) box
- Click Save
- x3 Theme
- Click on the File Manager button to be prompted for some options.
- If you aren't prompted for more options you'll need to click on "Reset All Interface Settings" at the very bottom of the page.
- Tick the Show Hidden Files (dotfiles) box
- Click Go
- Click on the File Manager button to be prompted for some options.
- Paper Lantern Theme
- If you can't see the .htaccess file through the cPanel File Manager, you'll need to follow either of these steps depending on which cPanel Theme you have: