Re: [Mod-fcgid-users] DESPERATE need for help with suexec. (php-cgi wrapper 'saying no input file')

2008-06-17 Thread Anton - Valqk
Oky,
so far, so good,
mod_fcgid is passing the path to the php(or any other script/bin) it's
trying to run and php searches in the wrong path,
because in suexec I strip out the CHROOTBASE path.
I'll have to patch mod_fcgid with the same striping code so the path to
the command being run is the one without CHROOTBASE path.

Any tips/ideas where in the code I can find the variable so I can
dispatch it?

thank you,
valqk.

cheers!


Anton - Valqk wrote:
 Hi group,

 I'm trying to run mod_fcgid with custom suexec and fcgiwrapper.

 I have it running without the  suexec, but when I get to this point I'm
 stuck,
 debugging for over a week.
 The main problem is that if I run mod_fcgid with original apache suexec
 it works,
 as expected,
 If I'm using _custom_ written from scratch suexec that makes chroot and
 chuid/gid it won't work.
 The problem appears when I enable it, the php is saying 'no input file
 specified'.
 I can't understand how the file/dir(php script) to be run from the php
 interpretator is passed.
 If I run apache+custom suexec(no mod_fcgid) I have DOCUMENT_ROOT and
 SCRIPT_FILENAME evn set,
 and that's how php knows where to look for the php file(eventually if
 not passed as argument which file to run as 3rd param to suexec).
 As far as I saw when mod_fcgid calls suexec the third param is
 fcgiwrapper file and no 4th param is passed(which file to run?),
 no DOCUMENT_ROOT and SCRIPT_NAME is set too, so it's understandable that
 php can't find/exec .php file...

 Can anyone help me what should I do in my suexec (I use execve(argv[3],
 *argv, enviorn) to exec the script wrapper);
 Please give me any ideas, hints because I'm desperate!
 If more info is needed pls tell me.

 cheers,
 valqk.



   


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users


Re: [Mod-fcgid-users] DESPERATE need for help with suexec. (php-cgi wrapper 'saying no input file')

2008-06-16 Thread Alli Quaknaa
Well,
if you're really desperate, I have a solution with mod_php and
mod_ruid, but I don't know if it realyl does what you want. It does no
chroot, but it does change uid/gid. What specifically are you looking
for?
Sorry, but doN expect any help regarding suexec modification from me,
I have no experience in this area.
al-Quaknaa

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users


Re: [Mod-fcgid-users] DESPERATE need for help with suexec. (php-cgi wrapper 'saying no input file')

2008-06-16 Thread Starhost - Noël Elsten
I'm running mod_fcgid on freebsd and it is working fine. Here you find 
my apache config files and the way suexec is build.

IfModule fcgid_module
 # Set config options for FCGID
 PHP_Fix_Pathinfo_Enable 1
 PASSHEADER AUTHORIZATION
 MaxRequestsPerProcess 500
 FastCgiAuthenticatorAuthoritative off
/IfModule

IfModule !fcgid_module
 FilesMatch \.(php|php5|pl|cgi)$
 Order allow,deny
 Deny from all
 Satisfy All
 /FilesMatch

/IfModule

VirtualHost *:80
 ServerAdmin [EMAIL PROTECTED]
 DocumentRoot /home/example/web
 ServerName web.example.com
 SuexecUserGroup cinergi foobaz
 Directory /
 IfModule fcgid_module
 AddHandler fcgid-script .php
 AddHandler cgi-script .cgi .pl
 AddType text/html php
 FCGIWrapper /home/example/fcgi-bin/php5 .php
 /IfModule
 AllowOverride All
 Options +Indexes +FollowSymLinks +ExecCGI
 Order allow,deny
 Allow from all
 /Directory
/VirtualHost


# suexec -V
  -D AP_DOC_ROOT=/home
  -D AP_GID_MIN=1000
  -D AP_HTTPD_USER=www
  -D AP_LOG_EXEC=/var/log/httpd-suexec.log
  -D AP_SAFE_PATH=/usr/local/bin:/usr/local/bin:/usr/bin:/bin
  -D AP_UID_MIN=1000
  -D AP_USERDIR_SUFFIX=public_html

# cat /home/starhost/fcgi-bin/php5
#!/bin/sh
PHPRC=/home/example
export PHPRC
PHP_FCGI_CHILDREN=0
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/local/bin/php-cgi


Noël Elsten

on 16-6-2008 22:45 Anton - Valqk wrote:
 Alli Quaknaa wrote:
 Well,
 if you're really desperate, I have a solution with mod_php and
 mod_ruid, but I don't know if it realyl does what you want. It does no
 chroot, but it does change uid/gid. What specifically are you looking
 for?
   
 is there freebsd port?
 Sorry, but doN expect any help regarding suexec modification from me,
 I have no experience in this area.
 al-Quaknaa
   
 I need to use my suexec because it's pretty custom and nothing will work
 if not used.
 sorry, is there anyone else that can help?
 I simply need to understand the mechanism of passing .php file and
 directory to the wrapper...
 thanks.
 -
 Check out the new SourceForge.net Marketplace.
 It's the best place to buy or sell services for
 just about anything Open Source.
 http://sourceforge.net/services/buy/index.php
 ___
 Mod-fcgid-users mailing list
 Mod-fcgid-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users

   
 
 

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Mod-fcgid-users mailing list
Mod-fcgid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mod-fcgid-users