Forum Moderators: phranque

Message Too Old, No Replies

Changing PHP configuration in httpd.conf

         

awaken

5:58 pm on Jul 2, 2008 (gmt 0)

10+ Year Member



Hi,

I'm having some trouble installing shopping cart software for one of my sites. There is one PHP directive (register_long_arrays) that needs to be turned "On" in order for everything to work properly. I'm on a shared server, so I don't have access to php.ini, and when I tried to override using .htaccess, I get a 500 internal error. I do have access to the httpd.conf file, and I think I need to add the AllowOverride function to have the .htaccess override ability. Is that true?

Also, when adding anything to httpd.conf, does one need to restart the server?

Thanks for any and all the help.

jdMorgan

8:03 pm on Jul 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure whether the register_long_arrays can be set in .htaccess -- It's a matter of privileges and the scope of the directive. If not, you could use a <Directory> container in httpd.conf to apply that configuration to only part of your directory structure.

Unlike changes in .htaccess, changes to httpd.conf do not take effect until the server is restarted.

Jim

eelixduppy

9:06 pm on Jul 2, 2008 (gmt 0)



register_long_arrays is PHP_INI_PERDIR, which means it can be defined in php.ini, .htaccess, and httpd.conf files.

Also note that this directive only became available with PHP 5 and is set to TRUE as default. If you are running PHP 4 it should already work.

eelixduppy

9:11 pm on Jul 2, 2008 (gmt 0)



Sorry, one more thing that may be causing issues. Outside of PHP constants aren't defined. So if you are setting this directive in .htaccess, for example, you have to use the boolean value "1" instead of TRUE:

register_long_arrays = 1