473,573 Members | 3,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What are the pros and cons of running php as a regular CGI

I am considering going with the ISP Dreamhost because they offers both
php4 and php5 support. However, I recently learned php4 runs as a
regular CGI by default. This can be change, so it will runs as an
Apache module. But if you want to run php5, you must run as PHP-CGI.
Dreamhost states there are:

"There are a FEW VERY MINOR drawbacks to running PHP-CGI. They are:

* Custom 404 pages won't work for .php files with PHP-CGI.

* Variables in the URL which are not regular ?foo=bar variables
won't work without using mod_rewrite
(example.com/blah.php/username/info/variable).

* Custom php directives in .htaccess files (php_include_di r
/home/user;/home/user/example_dir) won't work.

* The $_SERVER['SCRIPT_NAME'] variable will return the php.cgi
binary rather than the name of your script"

But are these really minor drawbacks? What if, for example, you really
do need to override a php directive? Any feedback would be appreciated.
Thanks,
Kurt

Oct 16 '05 #1
4 1883
kurt.krueckeber g wrote:
What if, for example, you really do need to override a php directive?


ini_set(); ?

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Oct 16 '05 #2
Personally I would not accept these "drawbacks" . I expect any web hosting
company to offer PHP as an Apache module so I can have the FULL power of
Apache and PHP at my disposal. Anything else would be unacceptable.

But that's just my personal opinion.

--
Tony Marston
http://www.tonymarston.net

<ku************ **@gmail.com> wrote in message
news:11******** *************@g 49g2000cwa.goog legroups.com...
I am considering going with the ISP Dreamhost because they offers both
php4 and php5 support. However, I recently learned php4 runs as a
regular CGI by default. This can be change, so it will runs as an
Apache module. But if you want to run php5, you must run as PHP-CGI.
Dreamhost states there are:

"There are a FEW VERY MINOR drawbacks to running PHP-CGI. They are:

* Custom 404 pages won't work for .php files with PHP-CGI.

* Variables in the URL which are not regular ?foo=bar variables
won't work without using mod_rewrite
(example.com/blah.php/username/info/variable).

* Custom php directives in .htaccess files (php_include_di r
/home/user;/home/user/example_dir) won't work.

* The $_SERVER['SCRIPT_NAME'] variable will return the php.cgi
binary rather than the name of your script"

But are these really minor drawbacks? What if, for example, you really
do need to override a php directive? Any feedback would be appreciated.
Thanks,
Kurt

Oct 16 '05 #3
ku************* *@gmail.com wrote:
I am considering going with the ISP Dreamhost because they offers both
php4 and php5 support. However, I recently learned php4 runs as a
regular CGI by default. This can be change, so it will runs as an
Apache module. But if you want to run php5, you must run as PHP-CGI.
Dreamhost states there are:
"There are a FEW VERY MINOR drawbacks to running PHP-CGI. They are:
Not sure what their problem is. My host (Page-zone) runs Php as a CGI
module.

(I don't know if they offer Php5 anywhere yet, but I don't need it. I'm
sure they will in good time.)
* Custom 404 pages won't work for .php files with PHP-CGI.

I have no such restriction. Custom 404 pages work as they should.
* Variables in the URL which are not regular ?foo=bar variables
won't work without using mod_rewrite
(example.com/blah.php/username/info/variable).

This seems to work also (I can access them from the REQUEST_URI global).
* Custom php directives in .htaccess files (php_include_di r
/home/user;/home/user/example_dir) won't work.

The alternative on my server is to put them in php.ini files in any
directory I need them in.
* The $_SERVER['SCRIPT_NAME'] variable will return the php.cgi
binary rather than the name of your script"

Works as expected on my server.
But are these really minor drawbacks? What if, for example, you really
do need to override a php directive? Any feedback would be appreciated.

Try using a php.ini file

--
*************** **************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Integrity is obvious.
The lack of it is common.
*************** **************
Oct 17 '05 #4
Chuck Anderson wrote:
ku************* *@gmail.com wrote:
I am considering going with the ISP Dreamhost because they offers both
php4 and php5 support. However, I recently learned php4 runs as a
regular CGI by default. This can be change, so it will runs as an
Apache module. But if you want to run php5, you must run as PHP-CGI.
Dreamhost states there are:
"There are a FEW VERY MINOR drawbacks to running PHP-CGI. They are:

Not sure what their problem is. My host (Page-zone) runs Php as a CGI
module.

(I don't know if they offer Php5 anywhere yet, but I don't need it. I'm
sure they will in good time.)
* Custom 404 pages won't work for .php files with PHP-CGI.

I have no such restriction. Custom 404 pages work as they should.
* Variables in the URL which are not regular ?foo=bar variables
won't work without using mod_rewrite
(example.com/blah.php/username/info/variable).

This seems to work also (I can access them from the REQUEST_URI global).
* Custom php directives in .htaccess files (php_include_di r
/home/user;/home/user/example_dir) won't work.

The alternative on my server is to put them in php.ini files in any
directory I need them in.
* The $_SERVER['SCRIPT_NAME'] variable will return the php.cgi
binary rather than the name of your script"

Works as expected on my server.
But are these really minor drawbacks? What if, for example, you really
do need to override a php directive? Any feedback would be appreciated.

Try using a php.ini file

i've tried using a php.ini in a web root, but still i can't have
register_global turned on for that site
Oct 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

52
6387
by: Tony Marston | last post by:
Several months ago I started a thread with the title "What is/is not considered to be good OO programming" which started a long and interesting discussion. I have condensed the arguments into a single article which can be viewed at http://www.tonymarston.net/php-mysql/good-bad-oop.html I fully expect this to be the start of another flame...
28
3262
by: David MacQuigg | last post by:
I'm concerned that with all the focus on obj$func binding, &closures, and other not-so-pretty details of Prothon, that we are missing what is really good - the simplification of classes. There are a number of aspects to this simplification, but for me the unification of methods and functions is the biggest benefit. All methods look like...
112
10274
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please, share your experience in using IDENTITY as PK .
2
1816
by: Mike Hennessy | last post by:
I'm looking for people's opinions and feedback regarding the design of the application tier, and how to best logically separate out the Data Access from the Business Object's. Per the Microsoft prescriptive architecture documents, they recommend creating a completely separate logical Data Access Tier of components. Then creating a separate...
44
4161
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there must be many know the answer here. thanks
5
7621
by: Fred | last post by:
Not much expertise on XSLT and trying to understand it's uses when creating apps in VS.NET? If I wanted flexibility on the UI (View aspect of M.V.C.): - How does it compare with creating business components that can be consumed by WebForms, WinForms, mobile devices, etc? Is it even fair to compare the such technologies? - How about for...
3
4220
by: Andrea | last post by:
Hello everyone, I'd like to know which are the main pros and cons of using XML implementation in business organizations. >From a technical perspective, I find XML powerful, but looks like it is being pushed more from technical people than from businessmen... So, some questions: 1. Pros and cons
5
13473
by: =?GB2312?B?17/HvyBaaHVvLCBRaWFuZw==?= | last post by:
Hi, I would like to have someone comments on what's the best practice defining error codes in C. Here's what I think: solution A: using enum pros: type safe. better for debug (some debugger will show the name not only the value) cons: enum can not be forward declared which makes all error codes
0
7777
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7686
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7773
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8061
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5289
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3731
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2197
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1297
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1038
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.