Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-07-03 Thread Edgar Pettijohn

On 06/30/2014 01:28 PM, Remco Poelstra wrote:
 Op 30 jun. 2014, om 20:23 heeft Miles Fidelman mfidel...@meetinghouse.net 
 het volgende geschreven:

 Remco Poelstra wrote:
 Op 30 jun. 2014, om 19:56 heeft Miles Fidelman mfidel...@meetinghouse.net 
 mailto:mfidel...@meetinghouse.net het volgende geschreven:

 Remco Poelstra wrote:
 Hi,

 I'm migrating a mailman server to a newer machine. The new machine runs 
 apache 2.4. My problem is that the mailman cgi scripts are served instead 
 of being executed.
 My configuration looks like the following:
 VirtualHost *:80
 ServerName lists.xxx
 DocumentRoot /home/www/lists.xxx
 ScriptAlias /mailman/ /var/www/w-lists/

 SuexecUserGroup w-lists w-lists

 Directory /home/www/lists.xxx
 Require all granted
 AddHandler fcgid-script .php
 Options +ExecCGI
 FCGIWrapper /var/www/w-lists/php5-cgi .php
 /Directory
 /VirtualHost

 In the document root there is a php script that redirects to 
 /mailman/listinfo. The php5-cgi wrapper is in /var/www/w-lists. The php 
 script gets properly executed, but the mailman scripts (also in 
 /var/www/w-lists) are served directly instead of being executed.

 I've tried adding a SetHandler fcgid-script on the /var/www/w-lists 
 directory, but that gives me a server error.
 Basically the same configuration works nicely on the old machine (running 
 apache 2.2).

 Silly question: are the any chance that the scripts aren't executable 
 (chmod +x)?  Permissions can screw you - they're the first thing I always 
 check.
 They are all -rwxr-xr-x and w-lists:w-lists, so I believe that's OK.

 hmm

 Just to be clear - you're saying that SOME php scripts in /var/www/w-lists 
 execute properly, and others (the mailman scripts) do not?

 If that's the case, you might want to really carefully examine what's 
 different between the scripts that run and the ones that download - things 
 like perhaps .php vs. php5 suffixes, and such.

 You might also want to look around for extraneous .htaccess files that have 
 conflicting information than what's in your config file.

 I guess you should also see if the .php setup is different on your new 
 machine.
 To be more clear, ONLY the php script gets executed. The others are ELF 
 binaries and have no extension. So it's difficult to compare why the php 
 script works and the others do not. Maybe the difference is that the php 
 script itself is in the document root and only the wrapper is in the scripts 
 folder, while the other scripts are called directly.
 There are no errors or warnings generated, apache just happily hands over the 
 binary file.

 Remco


 -
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org

This is my mailman related entries in my apache 2.2 config.  I know
there are some differences between 2.2 and 2.4, but hopefully this helps
you out some.

ScriptAlias /mailman /usr/local/mailman/cgi-bin

Directory /usr/local/mailman/cgi-bin
AllowOverride None
Options ExecCGI FollowSymLinks
Order Allow,Deny
Allow from all
/Directory
 Alias /pipermail /usr/local/mailman/archives/public
AcceptPathInfo On
Directory /usr/local/mailman/archives/public
AllowOverride None
Order Allow,Deny
Allow from all
/Directory


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-07-03 Thread Edgar Pettijohn

On 07/03/2014 05:11 PM, Edgar Pettijohn wrote:
 On 06/30/2014 01:28 PM, Remco Poelstra wrote:
 Op 30 jun. 2014, om 20:23 heeft Miles Fidelman mfidel...@meetinghouse.net 
 het volgende geschreven:

 Remco Poelstra wrote:
 Op 30 jun. 2014, om 19:56 heeft Miles Fidelman mfidel...@meetinghouse.net 
 mailto:mfidel...@meetinghouse.net het volgende geschreven:

 Remco Poelstra wrote:
 Hi,

 I'm migrating a mailman server to a newer machine. The new machine runs 
 apache 2.4. My problem is that the mailman cgi scripts are served 
 instead of being executed.
 My configuration looks like the following:
 VirtualHost *:80
 ServerName lists.xxx
 DocumentRoot /home/www/lists.xxx
 ScriptAlias /mailman/ /var/www/w-lists/

 SuexecUserGroup w-lists w-lists

 Directory /home/www/lists.xxx
 Require all granted
 AddHandler fcgid-script .php
 Options +ExecCGI
 FCGIWrapper /var/www/w-lists/php5-cgi .php
 /Directory
 /VirtualHost

 In the document root there is a php script that redirects to 
 /mailman/listinfo. The php5-cgi wrapper is in /var/www/w-lists. The php 
 script gets properly executed, but the mailman scripts (also in 
 /var/www/w-lists) are served directly instead of being executed.

 I've tried adding a SetHandler fcgid-script on the /var/www/w-lists 
 directory, but that gives me a server error.
 Basically the same configuration works nicely on the old machine 
 (running apache 2.2).

 Silly question: are the any chance that the scripts aren't executable 
 (chmod +x)?  Permissions can screw you - they're the first thing I always 
 check.
 They are all -rwxr-xr-x and w-lists:w-lists, so I believe that's OK.

 hmm

 Just to be clear - you're saying that SOME php scripts in /var/www/w-lists 
 execute properly, and others (the mailman scripts) do not?

 If that's the case, you might want to really carefully examine what's 
 different between the scripts that run and the ones that download - things 
 like perhaps .php vs. php5 suffixes, and such.

 You might also want to look around for extraneous .htaccess files that have 
 conflicting information than what's in your config file.

 I guess you should also see if the .php setup is different on your new 
 machine.
 To be more clear, ONLY the php script gets executed. The others are ELF 
 binaries and have no extension. So it's difficult to compare why the php 
 script works and the others do not. Maybe the difference is that the php 
 script itself is in the document root and only the wrapper is in the scripts 
 folder, while the other scripts are called directly.
 There are no errors or warnings generated, apache just happily hands over 
 the binary file.

 Remco


 -
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org

 This is my mailman related entries in my apache 2.2 config.  I know
 there are some differences between 2.2 and 2.4, but hopefully this helps
 you out some.

 ScriptAlias /mailman /usr/local/mailman/cgi-bin

 Directory /usr/local/mailman/cgi-bin
 AllowOverride None
 Options ExecCGI FollowSymLinks
 Order Allow,Deny
 Allow from all
 /Directory
  Alias /pipermail /usr/local/mailman/archives/public
 AcceptPathInfo On
 Directory /usr/local/mailman/archives/public
 AllowOverride None
 Order Allow,Deny
 Allow from all
 /Directory


 -
 To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
 For additional commands, e-mail: users-h...@httpd.apache.org

In regards to the permissions there should a program included with
mailman to set the permissions correctly bin/check_perms.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-07-01 Thread Remco Poelstra
Op 30 jun. 2014, om 21:39 heeft Miles Fidelman mfidel...@meetinghouse.net het 
volgende geschreven:

 Remco Poelstra wrote:
 Op 30 jun. 2014, om 20:23 heeft Miles Fidelman mfidel...@meetinghouse.net 
 het volgende geschreven:
 
 Remco Poelstra wrote:
 Op 30 jun. 2014, om 19:56 heeft Miles Fidelman mfidel...@meetinghouse.net 
 mailto:mfidel...@meetinghouse.net het volgende geschreven:
 
 Remco Poelstra wrote:
 Hi,
 
 I'm migrating a mailman server to a newer machine. The new machine runs 
 apache 2.4. My problem is that the mailman cgi scripts are served 
 instead of being executed.
 My configuration looks like the following:
 VirtualHost *:80
 ServerName lists.xxx
 DocumentRoot /home/www/lists.xxx
 ScriptAlias /mailman/ /var/www/w-lists/
 
 SuexecUserGroup w-lists w-lists
 
 Directory /home/www/lists.xxx
 Require all granted
 AddHandler fcgid-script .php
 Options +ExecCGI
 FCGIWrapper /var/www/w-lists/php5-cgi .php
 /Directory
 /VirtualHost
 
 In the document root there is a php script that redirects to 
 /mailman/listinfo. The php5-cgi wrapper is in /var/www/w-lists. The php 
 script gets properly executed, but the mailman scripts (also in 
 /var/www/w-lists) are served directly instead of being executed.
 
 I've tried adding a SetHandler fcgid-script on the /var/www/w-lists 
 directory, but that gives me a server error.
 Basically the same configuration works nicely on the old machine 
 (running apache 2.2).
 
 Silly question: are the any chance that the scripts aren't executable 
 (chmod +x)?  Permissions can screw you - they're the first thing I always 
 check.
 They are all -rwxr-xr-x and w-lists:w-lists, so I believe that's OK.
 
 hmm
 
 Just to be clear - you're saying that SOME php scripts in /var/www/w-lists 
 execute properly, and others (the mailman scripts) do not?
 
 If that's the case, you might want to really carefully examine what's 
 different between the scripts that run and the ones that download - things 
 like perhaps .php vs. php5 suffixes, and such.
 
 You might also want to look around for extraneous .htaccess files that have 
 conflicting information than what's in your config file.
 
 I guess you should also see if the .php setup is different on your new 
 machine.
 To be more clear, ONLY the php script gets executed. The others are ELF 
 binaries and have no extension. So it's difficult to compare why the php 
 script works and the others do not. Maybe the difference is that the php 
 script itself is in the document root and only the wrapper is in the scripts 
 folder, while the other scripts are called directly.
 There are no errors or warnings generated, apache just happily hands over 
 the binary file.
 
 
 Now that's a whole other kettle of fish:
 - So the AddHandler fcgid-script .php line is working properly, but,
 - ScriptAlias /mailman/ /var/www/w-lists/  is not
 
 Maybe try upping your log level and looking at what happens when you try to 
 access one of the scripts - it might give you some clues.
 
 And.. I think I just figured out what's happening: There's no handler defined 
 for files that don't have a suffix.
 
 You might try replacing the AddHandler line with SetHandler fcgid-script - 
 which should make EVERYTHING in that directory executable.
 
 On the other hand, if some files in that directory are NOT executable, then 
 maybe do this instead
 - add a .fcgi extension to each of your binary scripts
 - change the AddHandler fcgid-script .php to AddHandler fcgid-script .php 
 .fcgi

Adding an extension to the binaries had the same effect as adding the entry:
Directory /var/www/w-lists
SetHandler fcgid-script
/Directory

I now get an Internal Server Error page and when I check the error.log I see 
the output of the script, which is a basic html page. It’s followed by:
(104)Connection reset by peer: [client 127.0.0.1:56565] mod_fcgid: error 
reading data from FastCGI server
[client 127.0.0.1:56565] End of script output before headers: listinfo

The php wrapper keeps functioning like it should.
Is this a step forward or a step backward?


Remco


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-07-01 Thread Jens-U. Mozdzen

Hi Remco,

Zitat von Remco Poelstra re...@beryllium.net:

Op 30 jun. 2014, om 21:39 heeft Miles Fidelman  
mfidel...@meetinghouse.net het volgende geschreven:



Remco Poelstra wrote:
Op 30 jun. 2014, om 20:23 heeft Miles Fidelman  
mfidel...@meetinghouse.net het volgende geschreven:



Remco Poelstra wrote:
Op 30 jun. 2014, om 19:56 heeft Miles Fidelman  
mfidel...@meetinghouse.net mailto:mfidel...@meetinghouse.net  
het volgende geschreven:



Remco Poelstra wrote:

Hi,

I'm migrating a mailman server to a newer machine. The new  
machine runs apache 2.4. My problem is that the mailman cgi  
scripts are served instead of being executed.

My configuration looks like the following:
VirtualHost *:80
ServerName lists.xxx
DocumentRoot /home/www/lists.xxx
ScriptAlias /mailman/ /var/www/w-lists/

SuexecUserGroup w-lists w-lists

Directory /home/www/lists.xxx
Require all granted
AddHandler fcgid-script .php
Options +ExecCGI
FCGIWrapper /var/www/w-lists/php5-cgi .php
/Directory
/VirtualHost

In the document root there is a php script that redirects to  
/mailman/listinfo. The php5-cgi wrapper is in  
/var/www/w-lists. The php script gets properly executed, but  
the mailman scripts (also in /var/www/w-lists) are served  
directly instead of being executed.


I've tried adding a SetHandler fcgid-script on the  
/var/www/w-lists directory, but that gives me a server error.
Basically the same configuration works nicely on the old  
machine (running apache 2.2).


Silly question: are the any chance that the scripts aren't  
executable (chmod +x)?  Permissions can screw you - they're the  
first thing I always check.

They are all -rwxr-xr-x and w-lists:w-lists, so I believe that's OK.


hmm

Just to be clear - you're saying that SOME php scripts in  
/var/www/w-lists execute properly, and others (the mailman  
scripts) do not?


If that's the case, you might want to really carefully examine  
what's different between the scripts that run and the ones that  
download - things like perhaps .php vs. php5 suffixes, and such.


You might also want to look around for extraneous .htaccess files  
that have conflicting information than what's in your config file.


I guess you should also see if the .php setup is different on  
your new machine.
To be more clear, ONLY the php script gets executed. The others  
are ELF binaries and have no extension. So it's difficult to  
compare why the php script works and the others do not. Maybe the  
difference is that the php script itself is in the document root  
and only the wrapper is in the scripts folder, while the other  
scripts are called directly.
There are no errors or warnings generated, apache just happily  
hands over the binary file.




Now that's a whole other kettle of fish:
- So the AddHandler fcgid-script .php line is working properly, but,
- ScriptAlias /mailman/ /var/www/w-lists/  is not

Maybe try upping your log level and looking at what happens when  
you try to access one of the scripts - it might give you some clues.


And.. I think I just figured out what's happening: There's no  
handler defined for files that don't have a suffix.


You might try replacing the AddHandler line with SetHandler  
fcgid-script - which should make EVERYTHING in that directory  
executable.


On the other hand, if some files in that directory are NOT  
executable, then maybe do this instead

- add a .fcgi extension to each of your binary scripts
- change the AddHandler fcgid-script .php to AddHandler  
fcgid-script .php .fcgi


Adding an extension to the binaries had the same effect as adding the entry:
Directory /var/www/w-lists
SetHandler fcgid-script
/Directory

I now get an Internal Server Error page and when I check the  
error.log I see the output of the script, which is a basic html  
page. It’s followed by:
(104)Connection reset by peer: [client 127.0.0.1:56565] mod_fcgid:  
error reading data from FastCGI server

[client 127.0.0.1:56565] End of script output before headers: listinfo


are those binaries actually FastCGI binaries, or just CGI programs?  
FastCGI programs would run in a loop, handling one request after the  
other, by serving a specific API. Plani CGI programs are invoked once  
per HTTP request and output the complete response.



The php wrapper keeps functioning like it should.
Is this a step forward or a step backward?


Sideways, I'd say. You now get the programs called, but probably via  
the wrong interface ;)


Regards,
Jens


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-07-01 Thread Remco Poelstra

Op 1 jul. 2014, om 11:20 heeft Jens-U. Mozdzen jmozd...@nde.ag het volgende 
geschreven:

 Hi Remco,
 
 Zitat von Remco Poelstra re...@beryllium.net:
 
 Adding an extension to the binaries had the same effect as adding the entry:
 Directory /var/www/w-lists
  SetHandler fcgid-script
 /Directory
 
 I now get an Internal Server Error page and when I check the error.log I see 
 the output of the script, which is a basic html page. It’s followed by:
 (104)Connection reset by peer: [client 127.0.0.1:56565] mod_fcgid: error 
 reading data from FastCGI server
 [client 127.0.0.1:56565] End of script output before headers: listinfo
 
 are those binaries actually FastCGI binaries, or just CGI programs? FastCGI 
 programs would run in a loop, handling one request after the other, by 
 serving a specific API. Plani CGI programs are invoked once per HTTP request 
 and output the complete response.
 
 The php wrapper keeps functioning like it should.
 Is this a step forward or a step backward?
 
 Sideways, I'd say. You now get the programs called, but probably via the 
 wrong interface ;)

Yes, that fixes it all. Enabled the cgi module and set the handler to normal 
cgi and it’s all up and running now.

Thanks!

Remco



-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] Mailman CGI scripts served instead of executed

2014-06-30 Thread Remco Poelstra
Hi,

I'm migrating a mailman server to a newer machine. The new machine runs apache 
2.4. My problem is that the mailman cgi scripts are served instead of being 
executed.
My configuration looks like the following:
VirtualHost *:80
ServerName lists.xxx
DocumentRoot /home/www/lists.xxx
ScriptAlias /mailman/ /var/www/w-lists/

SuexecUserGroup w-lists w-lists

Directory /home/www/lists.xxx
Require all granted
AddHandler fcgid-script .php
Options +ExecCGI
FCGIWrapper /var/www/w-lists/php5-cgi .php
/Directory
/VirtualHost

In the document root there is a php script that redirects to /mailman/listinfo. 
The php5-cgi wrapper is in /var/www/w-lists. The php script gets properly 
executed, but the mailman scripts (also in /var/www/w-lists) are served 
directly instead of being executed.

I've tried adding a SetHandler fcgid-script on the /var/www/w-lists 
directory, but that gives me a server error.
Basically the same configuration works nicely on the old machine (running 
apache 2.2).

How can I solve this problem?

Thanks in advance.

Kind regards,

Remco Poelstra
-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-06-30 Thread Miles Fidelman

Remco Poelstra wrote:

Hi,

I'm migrating a mailman server to a newer machine. The new machine runs apache 
2.4. My problem is that the mailman cgi scripts are served instead of being 
executed.
My configuration looks like the following:
VirtualHost *:80
ServerName lists.xxx
DocumentRoot /home/www/lists.xxx
ScriptAlias /mailman/ /var/www/w-lists/

SuexecUserGroup w-lists w-lists

Directory /home/www/lists.xxx
Require all granted
AddHandler fcgid-script .php
Options +ExecCGI
FCGIWrapper /var/www/w-lists/php5-cgi .php
/Directory
/VirtualHost

In the document root there is a php script that redirects to /mailman/listinfo. 
The php5-cgi wrapper is in /var/www/w-lists. The php script gets properly 
executed, but the mailman scripts (also in /var/www/w-lists) are served 
directly instead of being executed.

I've tried adding a SetHandler fcgid-script on the /var/www/w-lists 
directory, but that gives me a server error.
Basically the same configuration works nicely on the old machine (running 
apache 2.2).



Silly question: are the any chance that the scripts aren't executable 
(chmod +x)?  Permissions can screw you - they're the first thing I 
always check.


Miles Fidelman

--
In theory, there is no difference between theory and practice.
In practice, there is.    Yogi Berra


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-06-30 Thread Remco Poelstra
Op 30 jun. 2014, om 19:56 heeft Miles Fidelman mfidel...@meetinghouse.net het 
volgende geschreven:

 Remco Poelstra wrote:
 Hi,
 
 I'm migrating a mailman server to a newer machine. The new machine runs 
 apache 2.4. My problem is that the mailman cgi scripts are served instead of 
 being executed.
 My configuration looks like the following:
 VirtualHost *:80
  ServerName lists.xxx
  DocumentRoot /home/www/lists.xxx
  ScriptAlias /mailman/ /var/www/w-lists/
 
  SuexecUserGroup w-lists w-lists
 
  Directory /home/www/lists.xxx
  Require all granted
  AddHandler fcgid-script .php
  Options +ExecCGI
  FCGIWrapper /var/www/w-lists/php5-cgi .php
  /Directory
 /VirtualHost
 
 In the document root there is a php script that redirects to 
 /mailman/listinfo. The php5-cgi wrapper is in /var/www/w-lists. The php 
 script gets properly executed, but the mailman scripts (also in 
 /var/www/w-lists) are served directly instead of being executed.
 
 I've tried adding a SetHandler fcgid-script on the /var/www/w-lists 
 directory, but that gives me a server error.
 Basically the same configuration works nicely on the old machine (running 
 apache 2.2).
 
 
 Silly question: are the any chance that the scripts aren't executable (chmod 
 +x)?  Permissions can screw you - they're the first thing I always check.

They are all -rwxr-xr-x and w-lists:w-lists, so I believe that's OK.

Remco



Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-06-30 Thread Miles Fidelman

Remco Poelstra wrote:
Op 30 jun. 2014, om 19:56 heeft Miles Fidelman 
mfidel...@meetinghouse.net mailto:mfidel...@meetinghouse.net het 
volgende geschreven:



Remco Poelstra wrote:

Hi,

I'm migrating a mailman server to a newer machine. The new machine 
runs apache 2.4. My problem is that the mailman cgi scripts are 
served instead of being executed.

My configuration looks like the following:
VirtualHost *:80
ServerName lists.xxx
DocumentRoot /home/www/lists.xxx
ScriptAlias /mailman/ /var/www/w-lists/

SuexecUserGroup w-lists w-lists

Directory /home/www/lists.xxx
Require all granted
AddHandler fcgid-script .php
Options +ExecCGI
FCGIWrapper /var/www/w-lists/php5-cgi .php
/Directory
/VirtualHost

In the document root there is a php script that redirects to 
/mailman/listinfo. The php5-cgi wrapper is in /var/www/w-lists. The 
php script gets properly executed, but the mailman scripts (also in 
/var/www/w-lists) are served directly instead of being executed.


I've tried adding a SetHandler fcgid-script on the 
/var/www/w-lists directory, but that gives me a server error.
Basically the same configuration works nicely on the old machine 
(running apache 2.2).




Silly question: are the any chance that the scripts aren't executable 
(chmod +x)?  Permissions can screw you - they're the first thing I 
always check.


They are all -rwxr-xr-x and w-lists:w-lists, so I believe that's OK.


hmm

Just to be clear - you're saying that SOME php scripts in 
/var/www/w-lists execute properly, and others (the mailman scripts) do not?


If that's the case, you might want to really carefully examine what's 
different between the scripts that run and the ones that download - 
things like perhaps .php vs. php5 suffixes, and such.


You might also want to look around for extraneous .htaccess files that 
have conflicting information than what's in your config file.


I guess you should also see if the .php setup is different on your new 
machine.


Miles Fidelman

--
In theory, there is no difference between theory and practice.
In practice, there is.    Yogi Berra


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-06-30 Thread Remco Poelstra
Op 30 jun. 2014, om 20:23 heeft Miles Fidelman mfidel...@meetinghouse.net het 
volgende geschreven:

 Remco Poelstra wrote:
 Op 30 jun. 2014, om 19:56 heeft Miles Fidelman mfidel...@meetinghouse.net 
 mailto:mfidel...@meetinghouse.net het volgende geschreven:
 
 Remco Poelstra wrote:
 Hi,
 
 I'm migrating a mailman server to a newer machine. The new machine runs 
 apache 2.4. My problem is that the mailman cgi scripts are served instead 
 of being executed.
 My configuration looks like the following:
 VirtualHost *:80
 ServerName lists.xxx
 DocumentRoot /home/www/lists.xxx
 ScriptAlias /mailman/ /var/www/w-lists/
 
 SuexecUserGroup w-lists w-lists
 
 Directory /home/www/lists.xxx
 Require all granted
 AddHandler fcgid-script .php
 Options +ExecCGI
 FCGIWrapper /var/www/w-lists/php5-cgi .php
 /Directory
 /VirtualHost
 
 In the document root there is a php script that redirects to 
 /mailman/listinfo. The php5-cgi wrapper is in /var/www/w-lists. The php 
 script gets properly executed, but the mailman scripts (also in 
 /var/www/w-lists) are served directly instead of being executed.
 
 I've tried adding a SetHandler fcgid-script on the /var/www/w-lists 
 directory, but that gives me a server error.
 Basically the same configuration works nicely on the old machine (running 
 apache 2.2).
 
 
 Silly question: are the any chance that the scripts aren't executable 
 (chmod +x)?  Permissions can screw you - they're the first thing I always 
 check.
 
 They are all -rwxr-xr-x and w-lists:w-lists, so I believe that's OK.
 
 hmm
 
 Just to be clear - you're saying that SOME php scripts in /var/www/w-lists 
 execute properly, and others (the mailman scripts) do not?
 
 If that's the case, you might want to really carefully examine what's 
 different between the scripts that run and the ones that download - things 
 like perhaps .php vs. php5 suffixes, and such.
 
 You might also want to look around for extraneous .htaccess files that have 
 conflicting information than what's in your config file.
 
 I guess you should also see if the .php setup is different on your new 
 machine.

To be more clear, ONLY the php script gets executed. The others are ELF 
binaries and have no extension. So it's difficult to compare why the php script 
works and the others do not. Maybe the difference is that the php script itself 
is in the document root and only the wrapper is in the scripts folder, while 
the other scripts are called directly.
There are no errors or warnings generated, apache just happily hands over the 
binary file.

Remco


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] Mailman CGI scripts served instead of executed

2014-06-30 Thread Miles Fidelman

Remco Poelstra wrote:

Op 30 jun. 2014, om 20:23 heeft Miles Fidelman mfidel...@meetinghouse.net het 
volgende geschreven:


Remco Poelstra wrote:

Op 30 jun. 2014, om 19:56 heeft Miles Fidelman mfidel...@meetinghouse.net 
mailto:mfidel...@meetinghouse.net het volgende geschreven:


Remco Poelstra wrote:

Hi,

I'm migrating a mailman server to a newer machine. The new machine runs apache 
2.4. My problem is that the mailman cgi scripts are served instead of being 
executed.
My configuration looks like the following:
VirtualHost *:80
ServerName lists.xxx
DocumentRoot /home/www/lists.xxx
ScriptAlias /mailman/ /var/www/w-lists/

SuexecUserGroup w-lists w-lists

Directory /home/www/lists.xxx
Require all granted
AddHandler fcgid-script .php
Options +ExecCGI
FCGIWrapper /var/www/w-lists/php5-cgi .php
/Directory
/VirtualHost

In the document root there is a php script that redirects to /mailman/listinfo. 
The php5-cgi wrapper is in /var/www/w-lists. The php script gets properly 
executed, but the mailman scripts (also in /var/www/w-lists) are served 
directly instead of being executed.

I've tried adding a SetHandler fcgid-script on the /var/www/w-lists 
directory, but that gives me a server error.
Basically the same configuration works nicely on the old machine (running 
apache 2.2).


Silly question: are the any chance that the scripts aren't executable (chmod 
+x)?  Permissions can screw you - they're the first thing I always check.

They are all -rwxr-xr-x and w-lists:w-lists, so I believe that's OK.


hmm

Just to be clear - you're saying that SOME php scripts in /var/www/w-lists 
execute properly, and others (the mailman scripts) do not?

If that's the case, you might want to really carefully examine what's different 
between the scripts that run and the ones that download - things like perhaps 
.php vs. php5 suffixes, and such.

You might also want to look around for extraneous .htaccess files that have 
conflicting information than what's in your config file.

I guess you should also see if the .php setup is different on your new machine.

To be more clear, ONLY the php script gets executed. The others are ELF 
binaries and have no extension. So it's difficult to compare why the php script 
works and the others do not. Maybe the difference is that the php script itself 
is in the document root and only the wrapper is in the scripts folder, while 
the other scripts are called directly.
There are no errors or warnings generated, apache just happily hands over the 
binary file.



Now that's a whole other kettle of fish:
- So the AddHandler fcgid-script .php line is working properly, but,
- ScriptAlias /mailman/ /var/www/w-lists/  is not

Maybe try upping your log level and looking at what happens when you try 
to access one of the scripts - it might give you some clues.


And.. I think I just figured out what's happening: There's no handler 
defined for files that don't have a suffix.


You might try replacing the AddHandler line with SetHandler 
fcgid-script - which should make EVERYTHING in that directory executable.


On the other hand, if some files in that directory are NOT executable, 
then maybe do this instead

- add a .fcgi extension to each of your binary scripts
- change the AddHandler fcgid-script .php to AddHandler fcgid-script 
.php .fcgi


Cheers,

Miles Fidelman

--
In theory, there is no difference between theory and practice. In 
practice, there is.  Yogi Berra


-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org