Re: [cgiwrap-users] CGIWrap / PHP / override of variables
Brought to you by:
nneul
From: Tuc at T-B-O-H.N. <ml...@t-...> - 2007-05-01 20:47:10
|
Hi, Already did that, didn't seem to like it. Even used : /usr/local/bin/php-cgi -c/usr/home/phpwebsite $* and /usr/local/bin/php-cgi -c/usr/home/phpwebsite/php.ini $* and it was like it didn't even exist. :-/ I saw that, and there was something later on that made me think it was just a way to have it ignore the directives, not process them. I'll take a closer look. Believe me, I've been using CGIWRAP for forever minus about a week, even gave NN a few bucks to put some features in we really wanted... "Tuc/TTSG Internet Services, Inc: Sponsored most of the vhosting and script authorization changes in 3.8.0 release. Changes are highly useful for ISP installations of cgiwrap where execution is through apache handlers to make the use of cgiwrap as transparent as possible to the customer." so we really feel comfy with it and know how to make it sit up and beg. We previously were turning a blind eye to the php situation (Most of our customers didn't use it, and the ones that did agreed to take responsibility for problems...) But now I need to get a bit more into the recent century and of course I pick a DOOZY of a project to do it with. I really think I'd have this beat if it wasn't for the php-cgi apparently not reading the variables I pass or the new ini file... I'll keep looking at suphp though........... Thanks, Tuc > > You can drop a php.ini file in the docroot of the site which contains > the variables you want. Assuming this isn't a directory end-users > maintain (read: some idiot deleting the .ini file :) ), this should > work. > > Another solution would be to use the PECL htscanner module mentioned > in the suphp FAQ: > > http://www.suphp.org/FAQ.html > > I'm not trying to dissuade you from using cgiwrap (we use it ourselves, > and it's fantastic), but there's pros and cons to both solutions. > > -- > | Jeremy Chadwick jdc at parodius.com | > | Parodius Networking http://www.parodius.com/ | > | UNIX Systems Administrator Mountain View, CA, USA | > | Making life hard for others since 1977. PGP: 4BD6C0CB | > > On Tue, May 01, 2007 at 04:27:41PM -0400, Tuc at T-B-O-H.NET wrote: > > Hi, > > > > I forgot all about php-cgi! It takes care of it, but then leaves > > me with another problem. Although it claims to be able to override either > > a single variable, or the entire config.... She no seemsa to be working > > that way. If I convert back to php, variables changed. Go to php-cgi, > > variables unchanged but get get headers. Just loverly. > > > > suPHP is going to get me into trouble too, since it won't honor > > the php_value statements. :-/ > > > > So close, yet so far far away............ > > > > Thanks, Tuc > > > > > > > > I believe that's one of the caveats, yes. > > > > > > There is an alternative to cgiwrap for handling PHP scripts, called > > > suPHP, which may be able to help you better than cgiwrap. It's a matter > > > of preference. > > > > > > -- > > > | Jeremy Chadwick jdc at parodius.com | > > > | Parodius Networking http://www.parodius.com/ | > > > | UNIX Systems Administrator Mountain View, CA, USA | > > > | Making life hard for others since 1977. PGP: 4BD6C0CB | > > > > > > On Tue, May 01, 2007 at 01:14:46PM -0400, Tuc at T-B-O-H.NET wrote: > > > > Hi, > > > > > > > > Yup, understood. > > > > > > > > With the CGI's I write I do put in a Content-Type type header and > > > > sometimes other things. > > > > > > > > Because I've stopped using the Apache PHP module, and now because > > > > of CGIWRAP am using the php command line module, will that now mean I have > > > > to modify the PHP to put in its own Content-Type headers? > > > > > > > > Thanks, Tuc > > > > > > > > > <html> is a tag, thus the start of the content. It is not a header. > > > > > > > > > > The term "header" refers to HTTP headers, e.g. stuff that comes *before* > > > > > content. > > > > > > > > > > -- > > > > > | Jeremy Chadwick jdc at parodius.com | > > > > > | Parodius Networking http://www.parodius.com/ | > > > > > | UNIX Systems Administrator Mountain View, CA, USA | > > > > > | Making life hard for others since 1977. PGP: 4BD6C0CB | > > > > > > > > > > On Tue, May 01, 2007 at 12:59:53PM -0400, Tuc at T-B-O-H.NET wrote: > > > > > > Hi Nathan, > > > > > > > > > > > > Unfortunately, not in a position to do that. > > > > > > > > > > > > So in the absence of that, any ideas how to wrangle cgiwrap? > > > > > > > > > > > > I've implemented what I mentioned, making a "php4phpwebsite" > > > > > > that looked like : > > > > > > > > > > > > #!/bin/sh > > > > > > /usr/local/bin/php -d session.auto_start=0 $* > > > > > > > > > > > > And in debug mode I see the following... But the problem is that > > > > > > when I take the debug off, I get an error 500 of : > > > > > > > > > > > > [Tue May 1 12:27:50 2007] [error] [client 69.249.95.230] malformed header from > > > > > > script. Bad header=<html>: /usr/local/www/cgi-bin/phpwebsite-php-cgiwrap > > > > > > > > > > > > > > > > > > Why would <HTML> be a bad header? > > > > > > > > > > > > Tuc > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > OUTPUT : > > > > > > > > > > > > Initializing Logging > > > > > > Redirecting STDERR to STDOUT > > > > > > > > > > > > Setting SIGXCPU to default behaviour > > > > > > > > > > > > > > > > > > Environment Variables: > > > > > > QUERY_STRING: '' > > > > > > SCRIPT_NAME: '/gcgi-bin/phpwebsite-php-cgiwrapd' > > > > > > SCRIPT_FILENAME: '/usr/local/www/cgi-bin/phpwebsite-php-cgiwrapd' > > > > > > REDIRECT_URL: '/setup/index.php' > > > > > > PATH_INFO: '/phpweb/setup/index.php' > > > > > > PATH_TRANSLATED: '/home/phpwebsite/phpweb/setup/index.php' > > > > > > REMOTE_USER: '<NULL>' > > > > > > REMOTE_HOST: '<NULL>' > > > > > > REMOTE_ADDR: '69.249.95.230' > > > > > > > > > > > > > > > > > > Trying to extract user from PATH_INFO. > > > > > > Retrieved User Name: 'phpweb' > > > > > > > > > > > > User Data Retrieved: > > > > > > UserID: 'phpweb' > > > > > > UID: '1019' > > > > > > GID: '1019' > > > > > > Home Dir: '/home/phpwebsite' > > > > > > Checking user minimum uid. > > > > > > Checking for required REDIRECT_URL. > > > > > > Checking for CGIWRAP_REQUIRE_USER in environment. > > > > > > > > > > > > Script Base Directory: '/home/phpwebsite/' > > > > > > Fetching script string > > > > > > > > > > > > Trying to extract script from PATH_INFO > > > > > > Extracted PATH_INFO '/setup/index.php' > > > > > > Building script path > > > > > > > > > > > > Condensing slashes. > > > > > > > > > > > > Script Relative Path: 'setup/index.php' > > > > > > Script Absolute Path: '/home/phpwebsite//setup/index.php' > > > > > > Checking for special interpreted script (php). > > > > > > Interpreter Path: '/usr/local/bin/php4phpwebsite' > > > > > > > > > > > > Fixing Environment Variables. > > > > > > > > > > > > Environment Variables: > > > > > > QUERY_STRING: '' > > > > > > SCRIPT_NAME: '/gcgi-bin/phpwebsite-php-cgiwrapd/phpweb/setup/index.php' > > > > > > SCRIPT_FILENAME: '/home/phpwebsite//setup/index.php' > > > > > > REDIRECT_URL: '/setup/index.php' > > > > > > PATH_INFO: '<NULL>' > > > > > > PATH_TRANSLATED: '/home/phpwebsite/phpweb/setup/index.php' > > > > > > REMOTE_USER: '<NULL>' > > > > > > REMOTE_HOST: '<NULL>' > > > > > > REMOTE_ADDR: '69.249.95.230' > > > > > > > > > > > > Logging Request (syslog) > > > > > > > > > > > > UIDs/GIDs Changed To: > > > > > > RUID: '1019' > > > > > > EUID: '1019' > > > > > > RGID: '1019' > > > > > > EGID: '1019' > > > > > > > > > > > > Changing current directory to '/home/phpwebsite//setup' > > > > > > Executing: '/usr/local/bin/php4phpwebsite' > > > > > > Arguments: > > > > > > 0: '/usr/local/bin/php4phpwebsite' > > > > > > 1: 'index.php' > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Output of script follows: > > > > > > ===================================================== > > > > > > <html> > > > > > > <head> > > > > > > <title>phpWebSite 1.1.0 - Directory Permissions</title> > > > > > > > > > > > > > > > > > > > > > > > > > > I would probably change the app to not require changing php.ini, that's > > > > > > > seems ugly as an installation requirement. > > > > > > > > > > > > > > -- Nathan > > > > > > > > > > > > > > ------------------------------------------------------------ > > > > > > > Nathan Neulinger EMail: nn...@um... > > > > > > > University of Missouri - Rolla Phone: (573) 341-6679 > > > > > > > UMR Information Technology Fax: (573) 341-4216 > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > From: cgi...@li... [mailto:cgiwrap- > > > > > > > > use...@li...] On Behalf Of Tuc at T-B-O- > > > > > > > > H.NET > > > > > > > > Sent: Tuesday, May 01, 2007 11:07 AM > > > > > > > > To: cgi...@li... > > > > > > > > Subject: [cgiwrap-users] CGIWrap / PHP / override of variables > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > I'm trying to install PHPWebSite. The first issue I ran into > > > > > > > > was > > > > > > > > they wanted a variable set in the php.ini. Since I didn't want to > > > > > > > > break > > > > > > > > EVERYTHING ELSE, I used the "php_value BLAH 1" syntax. All was > > > > > > > > good. > > > > > > > > > > > > > > > > Then I realized it needed to write to all sorts of > > > > > > > > directories, > > > > > > > > and said "Um, I need to cgiwrap this". So I did. But then it > > > > > > > > started > > > > > > > > to complain about the variable not being set in php.ini. > > > > > > > > > > > > > > > > So now I'm stuck. Any hints on what to do? Right now the only > > > > > > > > thing I can think of is create another version of cgiwrap that will > > > > > > > > have "/usr/local/bin/php -c /usr/local/etc/sitespecific.php.ini" > > > > > > > > as the --with-php= . Is there a better/different way to do it? > > > > > > > > > > > > > > > > Thanks, Tuc > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > cgiwrap-users mailing list > > cgi...@li... > > https://lists.sourceforge.net/lists/listinfo/cgiwrap-users > |