Re: Apache CGI problem

2002-09-28 Thread Unix Tools

Your httpd.conf seems to be configured with mod_cgi.
Now do one thing.
Comment out the mod_cgi lines in httpd.conf and let cgi be handled
seperately and not as an apache module.

Check whether this works.

Thank You.




- Original Message -
From: "Ihsan Junaidi Ibrahim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 27, 2002 12:45 AM
Subject: Re: Apache CGI problem


> Hello all,
>
> Error 500 : Internal server error.
>
> --
> Thank you for your time,
> Ihsan
>
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Apache CGI problem

2002-09-28 Thread Matthew Seaman

On Sat, Sep 28, 2002 at 05:49:52AM +0800, Ihsan Junaidi Ibrahim wrote:

>I finally found the cause of the problem.  PHP 4.2.3. I commented
>the LoadModule and AddModule clauses in httpd.conf and bam!, all
>CGIs and Perls work as healthy as they can be. Solved a problem
>only to bring up another.

>Can someone verify whether my case is an anomaly or something
>previously undocumented?

Yup.  I saw this right before leaving my old job, which is why I
haven't had an opportunity to follow it up.  It affects the
apache13-modssl port, but not the apache2 port.  I don't know about
any of the other apache variants.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
  Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re : Apache CGI problem

2002-09-27 Thread Ihsan Junaidi Ibrahim

Hello all,

Saturday, September 28, 2002, 5:49:52 AM, freebsd-questions wrote:

> Hello all,

>I  finally  found  the  cause  of  the  problem.  PHP  4.2.3. I commented the
>LoadModule  and  AddModule clauses in httpd.conf and bam!, all CGIs and Perls
>work as healthy as they can be. Solved a problem only to bring up another.

>I  installed  the  latest  PHP  from  the  ports about a week ago and did not
>noticed the problem (I used the scripts sparingly since I have to concentrate
>on something else) until two nights ago. 4.2.2 AFAIK, worked correctly. I did
>not  suspect  PHP  to  be  the cause because everything PHP is working right,
>cookie management, DB through phpma, phpBB et al.

>I  used php.ini-recommended edition from my windows edition since 4.2.0, that
>since about two  months  ago,  on my FreeBSD box and I had noticed no glaring
>exception to any application I run on Apache with 4.2.0, .1, .2 ...until 4.2.3.

>Module installed on 4.2.3
>GD2,  pdflib, pspell, bcmath, mysql, openssl, DOM, gettext, FTP, CURL, bzip2,
>crypto,   mhash,   XML-RPC,  mcrypt,  WDDX,  XSLT,  XML,  iconv,  sysvshm and
>sysvsem.
   
>Can  someone  verify  whether  my  case  is  an  anomaly or something previously 
>undocumented?

 An update to the situation and a rather weird situation.

 I  commented  the  LoadModule php4 line and start the server and the CGIs would
 work  well  but  the  PHP  as  predicted  did not BUT if I edited httpd.conf to
 uncomment  the  PHP  module  while  the server is running and subsequently do a
 RESTART through apachectl restart, both PHP and CGIs worked! Amazing.

 However  if  I  do  a full stop and subsequently start the server, only the PHP
 would  go  while  the  CGIs kept returning "Invalid Server Error". The same old
 situation.

 I  thought  it would the order of the module loaded that is causing the mishap,
 so  I  replaced  PHP  LoadModule  clause  at the very last line of the list but
 still, no go.

 So  right  now,  if  I  were  to get the both CGI AND PHP running, I would have
 to  comment  the PHP LoadModule statement, start the server, uncomment it back,
 restart (apachectl restart) and the cylinders is all fired up.
 
-- 
Thank you for your time,
Ihsan

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Apache CGI problem

2002-09-27 Thread Ihsan Junaidi Ibrahim

Hello all,

   I  finally  found  the  cause  of  the  problem.  PHP  4.2.3. I commented the
   LoadModule  and  AddModule clauses in httpd.conf and bam!, all CGIs and Perls
   work as healthy as they can be. Solved a problem only to bring up another.

   I  installed  the  latest  PHP  from  the  ports about a week ago and did not
   noticed the problem (I used the scripts sparingly since I have to concentrate
   on something else) until two nights ago. 4.2.2 AFAIK, worked correctly. I did
   not  suspect  PHP  to  be  the cause because everything PHP is working right,
   cookie management, DB through phpma, phpBB et al.

   I  used php.ini-recommended edition from my windows edition since 4.2.0, that
   since about two  months  ago,  on my FreeBSD box and I had noticed no glaring
   exception to any application I run on Apache with 4.2.0, .1, .2 ...until 4.2.3.

   Module installed on 4.2.3
   GD2,  pdflib, pspell, bcmath, mysql, openssl, DOM, gettext, FTP, CURL, bzip2,
   crypto,   mhash,   XML-RPC,  mcrypt,  WDDX,  XSLT,  XML,  iconv,  sysvshm and
   sysvsem.
   
   Can  someone  verify  whether  my  case  is  an  anomaly or something previously 
undocumented?

-- 
Thank you for your time,
Ihsan Junaidi Ibrahim

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Apache CGI problem

2002-09-26 Thread Fernando Gleiser

On Fri, 27 Sep 2002, Ihsan Junaidi Ibrahim wrote:

> Hello all,
>
> Error 500 : Internal server error.

Internal Server Error usually means your script has crashed, or it hasn't
produced a complete output. What does apache's error-log say?


Fer

>
> --
> Thank you for your time,
> Ihsan
>
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Apache CGI problem

2002-09-26 Thread Ihsan Junaidi Ibrahim

Hello all,

Error 500 : Internal server error.

-- 
Thank you for your time,
Ihsan

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Apache CGI problem

2002-09-26 Thread Unix Tools

what is the error
page cannot be displayed
OR
Forbidden
OR internal server error
??
was it working before

check dmesg



- Original Message -
From: "Ihsan Junaidi Ibrahim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 26, 2002 03:05 PM
Subject: Re: Apache CGI problem


> Hello all,
>
> Unix wrote:
> > Is your apache server doing virtual hosting
> > Could you provide me your httpd.conf file
>
> OK,  here's  the  file plus the offending virtual hosts. These are the two
hosts
> that  use  the cgi-bin. Yes I use virtual hosting. I do a local lan-based
sites
> using local name server, just to get the hang of it first.
>
> httpd.conf
> ---
> ##
> ## httpd.conf -- Apache HTTP server configuration file
> ##
>
> #
> # This is the main Apache server configuration file.
> #
>
> ### Section 1: Global Environment
> #
> # The directives in this section affect the overall operation of Apache,
> # such as the number of concurrent requests it can handle or where it
> # can find its configuration files.
> #
>
> #
> # ServerType is either inetd, or standalone.
> #
> ServerType standalone
>
> #
> # ServerRoot: The top of the directory tree under which the server's
> # configuration, error, and log files are kept.
> #
> ServerRoot "/usr/local"
>
> #
> # PidFile: The file in which the server should record its process
> # identification number when it starts.
> #
> PidFile /var/run/httpd.pid
>
> #
> # ScoreBoardFile: File used to store internal server process information.
> # Not all architectures require this.
> #
> ScoreBoardFile /var/run/httpd.scoreboard
>
> #
> # Ignore srm.conf & access.conf.
> #
> ResourceConfig /dev/null
> AccessConfig   /dev/null
>
> #
> # Timeout: The number of seconds before receives and sends time out.
> #
> Timeout 300
>
> #
> # KeepAlive: Whether or not to allow persistent connections (more than
> # one request per connection). Set to "Off" to deactivate.
> #
> KeepAlive On
>
> #
> # MaxKeepAliveRequests: The maximum number of requests to allow
> # during a persistent connection.
> #
> MaxKeepAliveRequests 100
>
> #
> # KeepAliveTimeout: Number of seconds to wait for the next request from
the
> # same client on the same connection.
> #
> KeepAliveTimeout 15
>
> #
> # Server-pool size regulation.
> #
> MinSpareServers 5
> MaxSpareServers 10
>
> #
> # Number of servers to start initially --- should be a reasonable ballpark
> # figure.
> #
> StartServers 2
>
> #
> # Limit on total number of servers running, i.e., limit on the number
> # of clients who can simultaneously connect --- if this limit is ever
> # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW..
> #
> MaxClients 150
>
> #
> # MaxRequestsPerChild: the number of requests each child process is
> # allowed to process before the child dies.
> #
> MaxRequestsPerChild 0
>
> #
> # Dynamic Shared Object (DSO) Support
> #
> LoadModule mmap_static_module libexec/apache/mod_mmap_static.so
> LoadModule vhost_alias_module libexec/apache/mod_vhost_alias.so
> LoadModule env_module libexec/apache/mod_env.so
> LoadModule define_module  libexec/apache/mod_define.so
> LoadModule config_log_module  libexec/apache/mod_log_config.so
> LoadModule mime_magic_module  libexec/apache/mod_mime_magic.so
> LoadModule mime_modulelibexec/apache/mod_mime.so
> LoadModule negotiation_module libexec/apache/mod_negotiation.so
> LoadModule status_module  libexec/apache/mod_status.so
> LoadModule info_modulelibexec/apache/mod_info.so
> LoadModule includes_modulelibexec/apache/mod_include.so
> LoadModule autoindex_module   libexec/apache/mod_autoindex.so
> LoadModule dir_module libexec/apache/mod_dir.so
> LoadModule cgi_module libexec/apache/mod_cgi.so
> LoadModule asis_modulelibexec/apache/mod_asis.so
> LoadModule imap_modulelibexec/apache/mod_imap.so
> LoadModule action_module  libexec/apache/mod_actions.so
> LoadModule speling_module libexec/apache/mod_speling.so
> LoadModule userdir_module libexec/apache/mod_userdir.so
> LoadModule alias_module   libexec/apache/mod_alias.so
> LoadModule rewrite_module libexec/apache/mod_rewrite.so
> LoadModule access_module  libexec/apache/mod_access.so
> LoadModule auth_modulelibexec/apache/mod_auth.so
> LoadModule anon_auth_module   libexec/apache/mod_auth_anon.so
> LoadModule db_auth_module libexec/apache/mod_auth_db.so
> LoadModule digest_module  libexec/apache/mod_digest.so
> LoadModule proxy_module  

Re: Apache CGI problem

2002-09-26 Thread Ihsan Junaidi Ibrahim

Hello all,

Unix wrote:
> Is your apache server doing virtual hosting
> Could you provide me your httpd.conf file

OK,  here's  the  file plus the offending virtual hosts. These are the two hosts
that  use  the cgi-bin. Yes I use virtual hosting. I do a local lan-based sites
using local name server, just to get the hang of it first.

httpd.conf
---
##
## httpd.conf -- Apache HTTP server configuration file
##

#
# This is the main Apache server configuration file.
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerType is either inetd, or standalone.
#
ServerType standalone

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
ServerRoot "/usr/local"

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile /var/run/httpd.pid

#
# ScoreBoardFile: File used to store internal server process information.
# Not all architectures require this.
#
ScoreBoardFile /var/run/httpd.scoreboard

#
# Ignore srm.conf & access.conf.
#
ResourceConfig /dev/null
AccessConfig   /dev/null

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

#
# Server-pool size regulation.
#
MinSpareServers 5
MaxSpareServers 10

#
# Number of servers to start initially --- should be a reasonable ballpark
# figure.
#
StartServers 2

#
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW..
#
MaxClients 150

#
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies.
#
MaxRequestsPerChild 0

#
# Dynamic Shared Object (DSO) Support
#
LoadModule mmap_static_module libexec/apache/mod_mmap_static.so
LoadModule vhost_alias_module libexec/apache/mod_vhost_alias.so
LoadModule env_module libexec/apache/mod_env.so
LoadModule define_module  libexec/apache/mod_define.so
LoadModule config_log_module  libexec/apache/mod_log_config.so
LoadModule mime_magic_module  libexec/apache/mod_mime_magic.so
LoadModule mime_modulelibexec/apache/mod_mime.so
LoadModule negotiation_module libexec/apache/mod_negotiation.so
LoadModule status_module  libexec/apache/mod_status.so
LoadModule info_modulelibexec/apache/mod_info.so
LoadModule includes_modulelibexec/apache/mod_include.so
LoadModule autoindex_module   libexec/apache/mod_autoindex.so
LoadModule dir_module libexec/apache/mod_dir.so
LoadModule cgi_module libexec/apache/mod_cgi.so
LoadModule asis_modulelibexec/apache/mod_asis.so
LoadModule imap_modulelibexec/apache/mod_imap.so
LoadModule action_module  libexec/apache/mod_actions.so
LoadModule speling_module libexec/apache/mod_speling.so
LoadModule userdir_module libexec/apache/mod_userdir.so
LoadModule alias_module   libexec/apache/mod_alias.so
LoadModule rewrite_module libexec/apache/mod_rewrite.so
LoadModule access_module  libexec/apache/mod_access.so
LoadModule auth_modulelibexec/apache/mod_auth.so
LoadModule anon_auth_module   libexec/apache/mod_auth_anon.so
LoadModule db_auth_module libexec/apache/mod_auth_db.so
LoadModule digest_module  libexec/apache/mod_digest.so
LoadModule proxy_module   libexec/apache/libproxy.so
LoadModule cern_meta_module   libexec/apache/mod_cern_meta.so
LoadModule expires_module libexec/apache/mod_expires.so
LoadModule headers_module libexec/apache/mod_headers.so
LoadModule usertrack_module   libexec/apache/mod_usertrack.so
LoadModule unique_id_module   libexec/apache/mod_unique_id.so
LoadModule setenvif_modulelibexec/apache/mod_setenvif.so
LoadModule php4_modulelibexec/apache/libphp4.so
LoadModule perl_modulelibexec/apache/libperl.so
LoadModule gzip_modulelibexec/apache/mod_gzip.so

LoadModule ssl_module libexec/apache/libssl.so


#  Reconstruction of the complete module list from all available modules
#  (static and shared ones) to achieve correct module execution order.
#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
ClearModuleList
AddModule mod_mmap_static.c
AddModule mod_vhost_alias.c
AddModule mod_env.c
AddModule mod_define.c
AddModule mod_log_config.c
AddModule mod_mime_magic.c
AddModule mod_mime.c
A

Re: Apache CGI problem

2002-09-26 Thread Matthew Seaman

On Thu, Sep 26, 2002 at 03:15:00AM +0800, Ihsan Junaidi Ibrahim wrote:

> Weird problem I'm having here. I can't execute any script in
> ScriptAlias directory.  500 Internal Server Error always came
> out. I'm pretty sure the scripts are all right. I ran them on
> shell, they executed well. Could it be that Apache lost the
> path?

Have you installed mod_php4 on your server?  And you're maybe loading
it into apache13-modssl ?

Try commenting out the lines that load the php module in httpd.conf,
and see if that restores the ability of your server to run CGI
scripts.  That's not going to be hugely helpful to you if you're
running PHP based sites, but it would confirm a suspected bug in the
latest mod_php4 port.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
  Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Apache CGI problem

2002-09-25 Thread Unix Tools

1) Check /vsr/log/messages for any fatal erors when teh script is run
2) also /var/log/httpd-error.log
3) does your perl scripts run chrooted
4) if yes chmod the scripts 755




- Original Message -
From: "Ihsan Junaidi Ibrahim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 26, 2002 07:49 AM
Subject: Re: Apache CGI problem


> Hello all,
>
> > Personally, the only time I've ever seen error 500 is when either the
> > script had syntax errors, the permissions were set incorrectly, or the
> > script was transferred as a binary file when it should've been
> > transferred as ASCII. If you're sure that all three of those issues
> > don't pertain to your situation, then I'm not sure what the problem
> > is.
>
> > Did you possibly make some system changes on the day they quit working?
>
> I  believe  so.  I  did  change a few ipfw rules, a make world and
reworking the
> quotas. The scripts was done on the system itself, the permissions were
right
> and the syntax were definitely correct.
>
> I  can't  log  in into my qmailadmin, sqwebmail and do administrative
tasks now.
> I'm going to reinstall apache if that's going to help in any way.
>
> --
> Thank you for your time,
> Ihsan
>
> __
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Apache CGI problem

2002-09-25 Thread Ihsan Junaidi Ibrahim

Hello all,

Thursday, September 26, 2002, 10:41:30 AM, freebsd-questions wrote:

> Ihsan Junaidi Ibrahim <[EMAIL PROTECTED]> writes:

>> I can't log in into my qmailadmin, sqwebmail and do administrative
>> tasks now. I'm going to reinstall apache if that's going to help in
>> any way.

> Well, let us know if that fixes your problem. I'm sorry that I
> couldn't help you more.

Reinstalling did not make the situation any good.

Anyway, thanks for your concern, Mike. Anyone has a suggestion?

-- 
Thank you for your time,
Ihsan

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Apache CGI problem

2002-09-25 Thread Ihsan Junaidi Ibrahim

Hello all,

> Personally, the only time I've ever seen error 500 is when either the
> script had syntax errors, the permissions were set incorrectly, or the
> script was transferred as a binary file when it should've been
> transferred as ASCII. If you're sure that all three of those issues
> don't pertain to your situation, then I'm not sure what the problem
> is.

> Did you possibly make some system changes on the day they quit working?

I  believe  so.  I  did  change a few ipfw rules, a make world and reworking the
quotas. The scripts was done on the system itself, the permissions were right
and the syntax were definitely correct.

I  can't  log  in into my qmailadmin, sqwebmail and do administrative tasks now.
I'm going to reinstall apache if that's going to help in any way.

-- 
Thank you for your time,
Ihsan

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re[]: Apache CGI problem

2002-09-25 Thread Ihsan Junaidi Ibrahim

Hello all,

Thursday, September 26, 2002, 9:02:45 AM, freebsd-questions wrote:

> I think the problem may be with your scripts. Make sure the scripts
> are sending the correct HTTP headers to Apache before trying to print
> any output. For example:

> #!/usr/bin/perl
> print "Content-type: text/html\n\n";# <- This has to precede your output.
> foreach $key ( sort keys(%ENV) ) {
> print "$key = $ENV{$key}";
> }

> If you're getting output from the test-cgi script, but not from your
> own, then the problem has to be with your script or your config file,
> as long as you have their perms set correctly.

> HTH,

Thanks  for  your  tips. As I had already mentioned before it fubar'ed, all the
scripts worked. The system has been up for a month now and it's only until two
nights  ago,  I  couldn't  get the scripts to work. I wrote quite a few Perl and
CGI  progs  and  tested  them  on this very platform weeks ago and they executed
well. For some inexplicable reason, I couldn't get them to work now. I even used
my backup httpd.conf copy and still the problem persists.

-- 
Thank you for your time,
Ihsan

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message