server API: Apache or CGI?

neorder

Verified User
Joined
Oct 1, 2003
Messages
392
i have seen many host's phpinfo, one thing i found is the default server API setting for DirectAdmin server is Apache, while i saw many others are set as CGI.

for example this one is CGI

http://69.93.90.50/phpinfo.php

may i know what's the difference? which one is better for web hosting?

thanks.
 
The example you gave there seems a wierd beast. It is showing the CGI version of PHP yet with a file with a .php extension. The server appears to be setup to handle .php using CGI in place of an apache module. Not a sensible thing to do!

If you want to use PHP as CGI on a DirectAdmin box, make the first line of the script:

#!/usr/local/bin/php

and use the file extension '.CGI'
 
Back
Top