tasairis wrote:Okay. From the top.
Your production server is running PHP the most secure way possible and that's via CGI (likely FastCGI to be specific). It's like calling the php program with a script name every time a script needs to be run, but more efficient. You can configure PHP on a per-directory level by putting a php.ini in a directory and PHP will read and parse each one.
Your development server is running PHP the easiest way and that's via a handler in Apache. Every time Apache sees a .php file it knows to call this one module and that will handle the rest. To configure PHP there you put stuff in a .htaccess file using a php_value directive.
Both are configured from a base php.ini file somewhere. If you run phpinfo() it'll tell you right at the top of the output where this file is.
There is where you need to set display_errors=on - just for the development server.
jcobban wrote:And why is it so bloody difficult to find any configuration method that actually works!
Because you're not looking in the right places. Places such as
Google or
the PHP manual.
Thank you for the explanation of what the different Server API settings mean. However the existence of all of these different configurations is not a good reason for requiring each configuration to have a different configuration
mechanism. Why could they not all use a single configuration mechanism so users would not have to know so much about how their system was configured?
In any event the documentation that you point me to is vague and incomplete. For example you point me to the PHP manual. But under configuration there are only 4 section headings, none of which, by their titles, would suggest that they describe per-directory configuration. Only when I finally get to the fourth section do I find anything that
seems applicable. However this section assumes knowledge that I do not have, and that should not be expected of
users of PHP, that is information on how the Server is configured. Most users of PHP are not themselves the administrators of their web server, and even if they are, for example myself with respect to the Apache server running on my own computer, that does not mean that they are knowledgeable about the server. I did not configure the Apache and PHP servers on my computer, the Ubuntu install did. So this section of the PHP manual is deficient in that it does not include an explanation of how the PHP
user can determine the mode of operation of their server, and hence where the configuration options should be put.
Having determined, by using phpinfo that the Ubuntu install has configured PHP 5 to run with Server Api = 'Apache 2.0 Handler ', this 4th section of the manual directs me to the .htaccess file. So I put my PHP settings into a .htaccess file, and they
still do not take effect!
I have now tried putting my options in php.ini, .user.ini, and .htaccess, and every attempt has been an unmitigated failure. The documentation is clearly at fault if a reasonably experienced programmer cannot get something this basic to work! So let's just assume that I am completely ignorant, and just explain to me why the following .htaccess file does nothing, and what I have to do to get it to work.
<IfModule mod_php5.c>
include_path = ".:/usr/lib/php:/usr/local/lib/php:/home/jcobban/php"
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
magic_quotes_gpc = "0"
extension="suhosin.so"
suhosin.post.max_vars = 2000
suhosin.request.max_vars = 5000
display_errors = "On"
</IfModule>