473,606 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ 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 4386
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=localhos t dbname=group3") ;
if ( conn.Connection Bad() )
{
HTMLstream reply;
reply << "Internal error in server: could not access
database";
reply.send();
}
else
....
***
Thx for any suggestions!

--

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

"Mike S. Nowostawsky" <mi******@sympa tico.ca> wrote in message
news:nZ******** *************@n ews20.bellgloba l.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
1803
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 advance, Aaron
12
2508
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 one is a permission error. The project is a VC++ Web Service. It works fine when the service is hosted on the old W2K dev machine, but on the new XP machine I get a permission error when the service tries to open a text file on the Windows...
2
2584
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 BIT ANSI X3.66 CRC checksum files */ #include <stdio.h> #include "crc.h"
0
8373
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 rows into a SQL database on another server. Occasionally, the web service returns this error message to the client: The request failed with HTTP status 503: Service Unavailable I have tried running with sessions enabled and disabled in the Web...
7
4025
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 of "Example 12.11. Calling A Web Service Through A WSDL Proxy", I got some errors as follow. Will you please give me some suggestion? IDLE 1.1.2's Output:
0
3228
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 appear on our domain controllers (Security event log): Event Type: Failure Audit Event Source: Security
4
2416
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 the screen it enlarged as expected but when I tried to play the keyboard I began getting Run Time Errors and it didn't work at all. In frustration I simply deleted the Gadget. Since then, I have been getting Run Time Errors at random times, usually...
14
1757
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 something undeclared, the first thing I do is go through my header files and check that the inclusion-guard macro is specific to that header file. For instance, if the header file is called "data.h", I make sure the inclusion guard is "H__DATA" and...
9
2908
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 the text files from the watched folder line by line into variables and then posting them to a SQL table. All of the code for the form is shown below. And it works fine except for 2 issues. First issue: In the Finally of the Try for teh SQL...
0
8015
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7951
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8305
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6770
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5966
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5465
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3930
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1296
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.