NTS Forums

Please login or register.

Login with username, password and session length
 

News:

Welcome to the Newtek Technology Services Forum!


Author Topic: Local php.ini  (Read 2794 times)

Offline systemarchitecture

  • Hosting Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Local php.ini
« on: February 25, 2015, 06:59:40 PM »
Is it possible to create a php.ini file? I'm looking to set my own max_input_vars value.

Offline darrenhlive

  • Hosting Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • Calibre Apparel
Re: Local php.ini
« Reply #1 on: February 08, 2016, 09:30:33 AM »
if your hosting allows it you can add php.ini in www or public_html directory
Calibre Apparel High Calibre Apparels

Offline Chris G [NTS]

  • Global Moderator
  • Hosting Newbie
  • *****
  • Posts: 1
  • Karma: +0/-0
Re: Local php.ini
« Reply #2 on: February 08, 2016, 01:13:46 PM »
With our Linux shared environment adding your own php.ini file will not have an effect on the PHP settings for your site, but there is a couple other ways to update the PHP settings as you need.

The first option would be to go into the PHP settings located within cPanel itself. To get there, you will want to head to Select PHP Version located under the Software and Services section. If your PHP version is set to a native version of PHP like 5.4 native, you will want to make sure that you change the PHP version to just plain old 5.4 and set it as the current version. On the left, there will then be a link for switching to PHP settings that you will want to click. From there, you can select and change some PHP values by selecting the gray link for the option you want to change. Make sure to click save at the bottom once you make your changes!

A second option would be creating a .user.ini file in the root of your site which is located in the public_html folder. In the .user.ini file, you can set what you want for your variables similar to changing the variables in a .htaccess file.
Chris G.
Server Operations
Newtek Technology Solutions
Phone: (602) 263-0300 Opt. 4
Customer Forums: http://forums.thesba.com
URL: http://webservices.thesba.com

Ron

  • Guest
Re: Local php.ini
« Reply #3 on: February 09, 2016, 11:55:21 AM »
With our Linux shared environment adding your own php.ini file will not have an effect on the PHP settings for your site, but there is a couple other ways to update the PHP settings as you need.

The first option would be to go into the PHP settings located within cPanel itself. To get there, you will want to head to Select PHP Version located under the Software and Services section. If your PHP version is set to a native version of PHP like 5.4 native, you will want to make sure that you change the PHP version to just plain old 5.4 and set it as the current version. On the left, there will then be a link for switching to PHP settings that you will want to click. From there, you can select and change some PHP values by selecting the gray link for the option you want to change. Make sure to click save at the bottom once you make your changes!

A second option would be creating a .user.ini file in the root of your site which is located in the public_html folder. In the .user.ini file, you can set what you want for your variables similar to changing the variables in a .htaccess file.


To add to this, I generally use the .user.ini file (make sure your cPanel File Manager is set to see invisible files, as the leader period changes this file to a 'hidden' file). Here are a couple of useful settings I've kept in my notes for working with Wordpress sites that have run into issues with specific settings needing to be increased:

max_input_vars=3980
upload_max_filesize=20MB
memory_limit=128M
post_max_size=20MB

Each of these can be added to their own seperate line on a .user.ini file to alter the setting for your hosting space on a shared server.