WebFaction
Community site: login faq

Pardon me for this question, as I'm clearly missing some basic info regarding Webfaction sites. On other servers, the php_value command in .htaccess can be used to modify php.ini settings in specific directories. In my Static/CGI/PHP-5.4 application, such a directive throws an "Invalid command" error. Is there a way to apply PHP_INI_PERDIR directives to a specific directory?

asked 08 Jun '15, 16:12

bvbb
11215
accept rate: 0%


php_value (and php_flag) cannot be used on most of our servers, because the majority of our machines are not using mod_php to serve PHP sites.

Instead, just create a php.ini file in the root of your PHP application directory, and put your PHP configuration directives there.

If you need directory-specific configuration, then create a .user.ini (don't forget the leading dot) in whatever directory and put your configuration there.

More information is available in our documentation: Configuring PHP

permanent link

answered 08 Jun '15, 19:09

seanf
12.2k31836
accept rate: 37%

edited 08 Jun '15, 22:04

Thanks. I read, understand, and am using all that info. My question is specific: Given that php_value isn't supported, is there a different way to apply PHP_INI_PERDIR directives to a specific subdirectory, overriding the PHP.INI value?

(08 Jun '15, 21:03) bvbb

Ok, I've updated my answer to include that info. Hope it helps!

(08 Jun '15, 22:04) seanf

Thanks, Sean. The doc only mentions .user.ini once, in connection with FastCGI, but I'll follow your instructions.

(08 Jun '15, 23:15) bvbb
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×33
×29
×1
×1

question asked: 08 Jun '15, 16:12

question was seen: 2,106 times

last updated: 08 Jun '15, 23:22

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM