473,471 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Errors running cgi program

I am getting this error when I try to run a program in my cgi-bin directory
(don't know what I'm still missing to make it work):

***
Authentication required!

This server could not verify that you are authorized to access the URL
"/~group3/cgi-bin/ack.cgi". You either supplied the wrong credentials (e.g.,
bad password), or your browser doesn't understand how to supply the
credentials required.

In case you are allowed to request the document, please check your user-id
and password and try again.

If you think this is a server error, please contact the webmaster

Error 401
***

--

As far as I know, I have the correct entries in my http.conf file and have
created a .htaccess file and a .htpasswd file for access requirements (and
both the directories and programs are allowing read/execute access to
'other').

When I run the program from an html page (from a submit button) I get a
popup window asking me to enter an ID and password (btw is this window
supposed to come up? I thought the .htpasswd file was supposed to allow for
the apache user id to have access to programs in cgi-bin?). If I enter an
entry in the .htpasswd file it just the window continues to popup
indefinitely... if I cancel the window, then I get the 'Authentication
required!' error (details below).

ALSO, if I remove the .htaccess file from the cgi-bin dir I get these errors
(followed by the log errors):

***
Server error!

The server encountered an internal error and was unable to complete your
request.

Error message:
Premature end of script headers: ack.cgi

If you think this is a server error, please contact the webmaster

Error 500

---

suexec.log:
[2004-02-19 17:59:50]: uid: (501/group3) gid: (501/501) cmd: ack.cgi
[2004-02-19 17:59:50]: target uid/gid (501/501) mismatch with directory
(0/0) or program (0/0)
***

---
---

OTHER DETAILS:

..htaccess contents (in dir with CGI programs):
----------------------------------------------
AuthType Basic
AuthUserFile /home/group3/.htpasswd
AuthName "Secret"
require valid-user
..httpd.conf contents (re: the dir I have my cgi-bin programs in):
-----------------------------------------------------------------
#~added for group3 project
<Directory "/home/*/public_html/cgi-bin">
AllowOverride All
Options Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/home/group3/public_html/cgi-bin">
AllowOverride All
Options +ExecCGI
</Directory>

<Directory "/home/*/public_html">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#~~
---
---
Any idea what might still be missing in my setup?

Thx,
__________________
l8r,
M.
Jul 19 '05 #1
1 4375
Well, I tried copying everything to my main apache cgi-bin directory and
from there the programs DO run (so this has to be a setup problem in the
conf file or with htaccess or perhaps something else when it comes to the
/home/group3 /cgi-bin for a particular user setup). Still wondering what's
not complete there?

--

Now, regarding running it from the main cgi-bin, the problem
I'm having there is accessing the PostGres database. I think I've setup the
correct user access to the database (I've added the group3 and apache users
to it) BUT when I try to open it I get a
"Internal error in server: could not access database"
error. Any idea why I might be missing to allow access to it? PostGres IS
running as a service.

My code to access the DB is:
***
PgDatabase conn ("host=localhost dbname=group3");
if ( conn.ConnectionBad() )
{
HTMLstream reply;
reply << "Internal error in server: could not access
database";
reply.send();
}
else
....
***
Thx for any suggestions!

--

===============================================
Mike S. Nowostawsky:
Email: mi******@sympatico.ca, mi******@yahoo.ca
Home Page: http://www3.sympatico.ca/mikenowo/
Lachine (Montreal), Quebec, Canada

"Mike S. Nowostawsky" <mi******@sympatico.ca> wrote in message
news:nZ*********************@news20.bellglobal.com ...
I am getting this error when I try to run a program in my cgi-bin directory (don't know what I'm still missing to make it work):

***
Authentication required!

This server could not verify that you are authorized to access the URL
"/~group3/cgi-bin/ack.cgi". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the
credentials required.

In case you are allowed to request the document, please check your user-id
and password and try again.

If you think this is a server error, please contact the webmaster

Error 401
***

--

As far as I know, I have the correct entries in my http.conf file and have
created a .htaccess file and a .htpasswd file for access requirements (and
both the directories and programs are allowing read/execute access to
'other').

When I run the program from an html page (from a submit button) I get a
popup window asking me to enter an ID and password (btw is this window
supposed to come up? I thought the .htpasswd file was supposed to allow for the apache user id to have access to programs in cgi-bin?). If I enter an
entry in the .htpasswd file it just the window continues to popup
indefinitely... if I cancel the window, then I get the 'Authentication
required!' error (details below).

ALSO, if I remove the .htaccess file from the cgi-bin dir I get these errors (followed by the log errors):

***
Server error!

The server encountered an internal error and was unable to complete your
request.

Error message:
Premature end of script headers: ack.cgi

If you think this is a server error, please contact the webmaster

Error 500

---

suexec.log:
[2004-02-19 17:59:50]: uid: (501/group3) gid: (501/501) cmd: ack.cgi
[2004-02-19 17:59:50]: target uid/gid (501/501) mismatch with directory
(0/0) or program (0/0)
***

---
---

OTHER DETAILS:

.htaccess contents (in dir with CGI programs):
----------------------------------------------
AuthType Basic
AuthUserFile /home/group3/.htpasswd
AuthName "Secret"
require valid-user
.httpd.conf contents (re: the dir I have my cgi-bin programs in):
-----------------------------------------------------------------
#~added for group3 project
<Directory "/home/*/public_html/cgi-bin">
AllowOverride All
Options Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
<Directory "/home/group3/public_html/cgi-bin">
AllowOverride All
Options +ExecCGI
</Directory>

<Directory "/home/*/public_html">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
#~~
---
---
Any idea what might still be missing in my setup?

Thx,
__________________
l8r,
M.


Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Aaron | last post by:
I would like to write a program that finds all asp.net errors in iis logs? what characteristics should i look for? (a line in the log that has the error?) what about sql errors? Thanks in...
12
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current...
2
by: Kavitha Rao | last post by:
Hi, I am getting the following errors while trying to run this snippet in Microsoft Visual C++.Can't seem to print the crc value stored. /* +++Date last modified: 05-Jul-1997 */ /* Crc - 32...
0
by: HBrothers | last post by:
I have a web service running on W2003, IIS 6.0 with a client program running on XP sp 2. The web service is called often and repeatedly by the client program, and it spends some time inserting...
7
by: iclinux | last post by:
Environment: WinXP SP2 + Python 2.4.2, with SOAPpy-0.11.6.zip, fpconst-0.7.2.zip, and PyXML-0.8.4.win32-py2.4.exe installed. Problem: I'm reading DiveIntoPython these days. When running code...
0
by: robpimentel | last post by:
Hi, I've been using DB2 for about 1 week, so please bear with me. DB2 Connect Enterprise Edition v8.1 FixPack 5 Windows Server 2003 Standard Edition SP1 Here is an error that continues to...
4
by: daivdh | last post by:
I recently tried to download and install a Gadget called "Piano" which would put a piano keyboard on the screen. It downloaded and installed okay. When I dragged the keyboard from the sidebar onto...
14
by: Martin Wells | last post by:
When I have errors in a program, whether they be compiler errors, linker errors, or if the program crashes when running, I have a list of things I check for initially. If I get an error for...
9
by: Keith G Hicks | last post by:
I'm having a lot of trouble with "file in use" errors in my "folder watcher" project. Starting and stopping the watcher and reading my XML file work fine. Once the watcher is started, I'm reading...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
1
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...
0
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.