473,569 Members | 2,691 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 1882
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
6385
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
3256
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
10263
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
4146
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
7619
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
13470
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
7612
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...
0
8122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7673
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
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
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
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
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.