About PHP5 settings


#1

I have a package of scripts that requires some detail of dreamhost server, and I really don’t know where to check all these things.

1 Apache web server with mod_rewrite enabled.
2 MySQL version 4.0+
3 GD Library 2+ with freetype support.
4 PHP4 or PHP5 with the following configuration
4.1 safe_mode = off
4.2 short_open_tag = on
4.3 output_buffering = on
4.4 register_argc_argv = On
4.5 session.gc_maxlifetime = 15000 (Recommended or higher)
4.6 register_globals = off
4.7 magic_quotes_gpc = on

Any help would be appreciated.


#2

phpinfo() tells you most of this:
http://kb.mediatemple.net/questions/764/How+can+I+create+a+phpinfo.php+page%3F

mod_rewrite is enabled
MySQL is 4.1 on old databases, and 5.0 on newer ones.


#3

Thanks sdayman.

I have already put a phpinfo file into my website and find most of these answers. Just a little more to ask.

Can I change those settings? like ession.gc_maxlifetime, the default is just 1440 and it requires 15000+. I really don’t know anything about the code.


#4

There are two ways on DreamHost to change PHP settings. You can either compile your own PHP for use on your domain, or you can just make a copy of our binary, and wrap it for use on your domain with your own php.ini file. Which way you go depends on what you want to change (whether your change requires compiling PHP again, or whether it can be done by changing a setting in php.ini).

The wiki has information about both these methods:

http://wiki.dreamhost.com/PHP.ini
http://wiki.dreamhost.com/Installing_PHP5
http://wiki.dreamhost.com/Advanced_PHP_configuration


#5

Hello,

You seem to know your stuff on this discussion board, so I thought I’d ask if you can help with a problem I’m having with php5 replacing php4. I’m using X-Cart on a client site that uses long arrays. As you know, long arrays are defaulted to “off” in php5. So, I followed the instructions found on this board to create a custom php.ini file, however, I couldn’t get it to work. X-Cart support, too, tried to create the custom .ini from these instructions and had the same fate as me. I’m wondering if X-Cart will work within DH’s php5 environment, or I’m missing something. I would truly appreciate any help you can provide.

Kenny