473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 4369
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.