Re: [users@httpd] Received 404 not found error on existing CGI script

2020-07-06 Thread Mike Rumph
Try the following link for basic info on using CGI with Apache httpd:
- http://httpd.apache.org/docs/trunk/howto/cgi.html

On Fri, Jun 26, 2020 at 1:03 AM angel Hall-Coulston
 wrote:

> Hi,
> Check your config file with the command 'httpd -V' but speaking from a
> 'Mac users' perspective it’s usually found here:
> /etc/apache2/httpd.conf
> About 3/4 down you’ll find log formats etc and several suggested log
> levels. You can change back after you have solved the issue because 'debug'
> can/will fill your log files up pretty quickly with the extra info.
> Angel Hall-Coulston
> Scotland.
>
> On 25 Jun 2020, at 19:58, barry kimelman  wrote:
>
>
> Hello,
>
> Thanks for your reply. I solved the not being able to run a Perl CGI
> script issue. I now have several of my old Perl CGI scripts up and running.
>
> Now one of my other CGI scripts is failing badly. The mysql error log does
> not show anything useful. All I see on my screen is a '500 internal server
> error'. I checked the syntax of my perl script and it is ok.
>
> Your message stated that setting "my log file level to debug" was a good
> debugging idea. I have been trying to figure out how to accomplish this
> task with no success. Which config file do I need to change and what
> specific change do I need to make to the config file ?
>
> Thanks/
>
> On Wed, Jun 24, 2020 at 11:15 AM angel Hall-Coulston <
> rammstein...@me.com.invalid> wrote:
>
>> Try setting your log file level to debug, you will get far more
>> information. Also at the end of the 'log format' code in your configuration
>> file (easy double check by command 'httpd -V' which will double check your
>> conf file) add '%L' which when added to both access_log file formats AND
>> error_log formats will give matches between the two easily found with the
>> 'grep' command 'grep
>> "[long-scrambled-unique-characters-for-that-particular-error] '*_log' .
>> Make sure you first are in the log directory.
>>
>> Another helpful tip… your apache comes with it’s VERY OWN manual pages
>> which when enabled in your 'includes' section of your config file, will
>> allow you to access MUCH quicker than going online, where you will find
>> everything you need to know.
>>
>> Angel Hall-Coulston
>> Scotland.
>>
>> On 24 Jun 2020, at 00:35, barry kimelman  wrote:
>>
>> my system is an ubuntu 20.04 lts laptop.
>>
>> I successfully installed apache2. I verified the installation by visiting
>>  http://localhost:80 
>>
>> Now I am having problems trying to run a Perl CGI script which I had
>> running under Windows 10 on  Apache 2.4
>>
>> I modified the sites-enabled/000-default.conf file by removing the '#'
>> from the start of the "Include conf-available/serve-cgi-bin.conf" line. I
>> then created the /usr/lib/cgi-bin directory. I next put a small Perl CGI
>> script named "printenv.cgi" under /usr/lib/cgi-bin. I then restarted the
>> apache2 server. When I attempted to run my newly created CGI script gy
>> visiting localhost:80/cgi-bin/printenv.cgi
>>  all that happened was I received
>> a "404 Not Found" error. I looked at the apache logfile and it provided no
>> further info.
>>
>> I even tried using the "wget" command. same 404 error.
>>
>> What have I done wrong?
>>
>> --
>>
>> Barrry Kimelman
>> Winnipeg, Manitoba, Canada
>>
>>
>>
>
>
>


Re: [users@httpd] Received 404 not found error on existing CGI script

2020-06-26 Thread angel Hall-Coulston
Hi,
Check your config file with the command 'httpd -V' but speaking from a 'Mac 
users' perspective it’s usually found here:/etc/apache2/httpd.conf
About 3/4 down you’ll find log formats etc and several suggested log levels. 
You can change back after you have solved the issue because 'debug' can/will 
fill your log files up pretty quickly with the extra info.
Angel Hall-Coulston
Scotland.
> On 25 Jun 2020, at 19:58, barry kimelman  wrote:

> 
> Hello,
> 
> Thanks for your reply. I solved the not being able to run a Perl CGI script 
> issue. I now have several of my old Perl CGI scripts up and running.
> 
> Now one of my other CGI scripts is failing badly. The mysql error log does 
> not show anything useful. All I see on my screen is a '500 internal server 
> error'. I checked the syntax of my perl script and it is ok.
> 
> Your message stated that setting "my log file level to debug" was a good 
> debugging idea. I have been trying to figure out how to accomplish this task 
> with no success. Which config file do I need to change and what specific 
> change do I need to make to the config file ?
> 
> Thanks/
> 
> On Wed, Jun 24, 2020 at 11:15 AM angel Hall-Coulston 
>  wrote:
> Try setting your log file level to debug, you will get far more information. 
> Also at the end of the 'log format' code in your configuration file (easy 
> double check by command 'httpd -V' which will double check your conf file) 
> add '%L' which when added to both access_log file formats AND error_log 
> formats will give matches between the two easily found with the 'grep' 
> command 'grep "[long-scrambled-unique-characters-for-that-particular-error] 
> '*_log' . Make sure you first are in the log directory.
> 
> Another helpful tip… your apache comes with it’s VERY OWN manual pages which 
> when enabled in your 'includes' section of your config file, will allow you 
> to access MUCH quicker than going online, where you will find everything you 
> need to know. 
> 
> Angel Hall-Coulston
> Scotland.
> 
>> On 24 Jun 2020, at 00:35, barry kimelman > > wrote:
>> 
>> my system is an ubuntu 20.04 lts laptop.
>> 
>> I successfully installed apache2. I verified the installation by visiting 
>> http://localhost:80 
>> 
>> Now I am having problems trying to run a Perl CGI script which I had running 
>> under Windows 10 on  Apache 2.4
>> 
>> I modified the sites-enabled/000-default.conf file by removing the '#' from 
>> the start of the "Include conf-available/serve-cgi-bin.conf" line. I then 
>> created the /usr/lib/cgi-bin directory. I next put a small Perl CGI script 
>> named "printenv.cgi" under /usr/lib/cgi-bin. I then restarted the apache2 
>> server. When I attempted to run my newly created CGI script gy visiting 
>> localhost:80/cgi-bin/printenv.cgi  
>> all that happened was I received a "404 Not Found" error. I looked at the 
>> apache logfile and it provided no further info.
>> 
>> I even tried using the "wget" command. same 404 error.
>> 
>> What have I done wrong?
>> 
>> -- 
>> 
>> Barrry Kimelman
>> Winnipeg, Manitoba, Canada
> 
> 
> 



Re: [users@httpd] Received 404 not found error on existing CGI script

2020-06-25 Thread Jim Albert
Check your Apache error log. It's unlikely anything in your mysql log 
will be useful here. Apache will print any STDERR messages to the Apache 
error log. You shouldn't need your Apache logging at anything other than 
the default logging level to be useful to debug your Perl CGI issue.


Jim

On 6/25/2020 2:58 PM, barry kimelman wrote:

Hello,

Thanks for your reply. I solved the not being able to run a Perl CGI 
script issue. I now have several of my old Perl CGI scripts up and 
running.


Now one of my other CGI scripts is failing badly. The mysql error log 
does not show anything useful. All I see on my screen is a '500 
internal server error'. I checked the syntax of my perl script and it 
is ok.


Your message stated that setting "my log file level to debug" was a 
good debugging idea. I have been trying to figure out how to 
accomplish this task with no success. Which config file do I need to 
change and what specific change do I need to make to the config file ?


Thanks/

On Wed, Jun 24, 2020 at 11:15 AM angel Hall-Coulston 
 wrote:


Try setting your log file level to debug, you will get far more
information. Also at the end of the 'log format' code in your
configuration file (easy double check by command 'httpd -V' which
will double check your conf file) add '%L' which when added to
both access_log file formats AND error_log formats will give
matches between the two easily found with the 'grep' command 'grep
"[long-scrambled-unique-characters-for-that-particular-error]
'*_log' . Make sure you first are in the log directory.

Another helpful tip… your apache comes with it’s VERY OWN manual
pages which when enabled in your 'includes' section of your config
file, will allow you to access MUCH quicker than going online,
where you will find everything you need to know.

Angel Hall-Coulston
Scotland.


On 24 Jun 2020, at 00:35, barry kimelman mailto:perlmaste...@gmail.com>> wrote:

my system is an ubuntu 20.04 lts laptop.

I successfully installed apache2. I verified the installation by
visiting http://localhost:80 

Now I am having problems trying to run a Perl CGI script which I
had running under Windows 10 on  Apache 2.4

I modified the sites-enabled/000-default.conf file by removing
the '#' from the start of the "Include
conf-available/serve-cgi-bin.conf" line. I then created the
/usr/lib/cgi-bin directory. I next put a small Perl CGI script
named "printenv.cgi" under /usr/lib/cgi-bin. I then restarted the
apache2 server. When I attempted to run my newly created CGI
script gy visiting localhost:80/cgi-bin/printenv.cgi
 all that happened was I
received a "404 Not Found" error. I looked at the apache logfile
and it provided no further info.

I even tried using the "wget" command. same 404 error.

What have I done wrong?

-- 


Barrry Kimelman
Winnipeg, Manitoba, Canada




--

Barrry Kimelman
Winnipeg, Manitoba, Canada





Re: [users@httpd] Received 404 not found error on existing CGI script

2020-06-25 Thread barry kimelman
Hello,

Thanks for your reply. I solved the not being able to run a Perl CGI script
issue. I now have several of my old Perl CGI scripts up and running.

Now one of my other CGI scripts is failing badly. The mysql error log does
not show anything useful. All I see on my screen is a '500 internal server
error'. I checked the syntax of my perl script and it is ok.

Your message stated that setting "my log file level to debug" was a good
debugging idea. I have been trying to figure out how to accomplish this
task with no success. Which config file do I need to change and what
specific change do I need to make to the config file ?

Thanks/

On Wed, Jun 24, 2020 at 11:15 AM angel Hall-Coulston
 wrote:

> Try setting your log file level to debug, you will get far more
> information. Also at the end of the 'log format' code in your configuration
> file (easy double check by command 'httpd -V' which will double check your
> conf file) add '%L' which when added to both access_log file formats AND
> error_log formats will give matches between the two easily found with the
> 'grep' command 'grep
> "[long-scrambled-unique-characters-for-that-particular-error] '*_log' .
> Make sure you first are in the log directory.
>
> Another helpful tip… your apache comes with it’s VERY OWN manual pages
> which when enabled in your 'includes' section of your config file, will
> allow you to access MUCH quicker than going online, where you will find
> everything you need to know.
>
> Angel Hall-Coulston
> Scotland.
>
> On 24 Jun 2020, at 00:35, barry kimelman  wrote:
>
> my system is an ubuntu 20.04 lts laptop.
>
> I successfully installed apache2. I verified the installation by visiting
> http://localhost:80 
>
> Now I am having problems trying to run a Perl CGI script which I had
> running under Windows 10 on  Apache 2.4
>
> I modified the sites-enabled/000-default.conf file by removing the '#'
> from the start of the "Include conf-available/serve-cgi-bin.conf" line. I
> then created the /usr/lib/cgi-bin directory. I next put a small Perl CGI
> script named "printenv.cgi" under /usr/lib/cgi-bin. I then restarted the
> apache2 server. When I attempted to run my newly created CGI script gy
> visiting localhost:80/cgi-bin/printenv.cgi
>  all that happened was I received
> a "404 Not Found" error. I looked at the apache logfile and it provided no
> further info.
>
> I even tried using the "wget" command. same 404 error.
>
> What have I done wrong?
>
> --
>
> Barrry Kimelman
> Winnipeg, Manitoba, Canada
>
>
>

-- 

Barrry Kimelman
Winnipeg, Manitoba, Canada


Re: [users@httpd] Received 404 not found error on existing CGI script

2020-06-24 Thread Nick Kew



> On 24 Jun 2020, at 00:35, barry kimelman  wrote:
> 
> 
> What have I done wrong?

You've had some good advice from others.  But also check your shebang line.

-- 
Nick Kew

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



Re: [users@httpd] Received 404 not found error on existing CGI script

2020-06-24 Thread John
It seems a bit self-evident, but have you checked that Apache has permission to
access your cgi-bin directory?
John==On Wed, 2020-06-24 at 17:14
+0100, angel Hall-Coulston wrote:
> Try setting your log file level to debug, you will get far more information.
> Also at the end of the 'log format' code in your configuration file (easy
> double check by command 'httpd -V' which will double check your conf file) add
> '%L' which when added to both access_log file formats AND error_log formats
> will give matches between the two easily found with the 'grep' command 'grep
> "[long-scrambled-unique-characters-for-that-particular-error] '*_log' . Make
> sure you first are in the log directory.
> Another helpful tip… your apache comes with it’s VERY OWN manual pages which
> when enabled in your 'includes' section of your config file, will allow you to
> access MUCH quicker than going online, where you will find everything you need
> to know. 
> 
> Angel Hall-Coulston
> Scotland.
> 
> > On 24 Jun 2020, at 00:35, barry kimelman  wrote:
> > 
> > my system is an ubuntu 20.04 lts laptop.
> > 
> > I successfully installed apache2. I verified the installation by visiting 
> > http://localhost:80
> > 
> > Now I am having problems trying to run a Perl CGI script which I had running
> > under Windows 10 on  Apache 2.4
> > 
> > I modified the sites-enabled/000-default.conf
> >  file by removing the '#' from the start of the "Include 
> > conf-available/serve-cgi-bin.conf" line. I then created the 
> > /usr/lib/cgi-bin directory. I next put a small Perl CGI script named 
> > "printenv.cgi" under /usr/lib/cgi-bin. I then restarted the apache2 
> > server. When I attempted to run my newly created CGI script gy visiting 
> >  localhost:80/cgi-bin/printenv.cgi
> >  all that happened was I received a "404 Not Found" error. I looked at 
> > the apache logfile and it provided no further info.
> > 
> > 
> > I even tried using the "wget" command. same 404 error.
> > 
> > 
> > 
> > What have I done 
> > wrong?
> > 
> > -- 
> > 
> > Barrry Kimelman
> > Winnipeg, Manitoba, Canada


Re: [users@httpd] Received 404 not found error on existing CGI script

2020-06-24 Thread angel Hall-Coulston
Try setting your log file level to debug, you will get far more information. 
Also at the end of the 'log format' code in your configuration file (easy 
double check by command 'httpd -V' which will double check your conf file) add 
'%L' which when added to both access_log file formats AND error_log formats 
will give matches between the two easily found with the 'grep' command 'grep 
"[long-scrambled-unique-characters-for-that-particular-error] '*_log' . Make 
sure you first are in the log directory.

Another helpful tip… your apache comes with it’s VERY OWN manual pages which 
when enabled in your 'includes' section of your config file, will allow you to 
access MUCH quicker than going online, where you will find everything you need 
to know. 

Angel Hall-Coulston
Scotland.

> On 24 Jun 2020, at 00:35, barry kimelman  wrote:
> 
> my system is an ubuntu 20.04 lts laptop.
> 
> I successfully installed apache2. I verified the installation by visiting 
> http://localhost:80 
> 
> Now I am having problems trying to run a Perl CGI script which I had running 
> under Windows 10 on  Apache 2.4
> 
> I modified the sites-enabled/000-default.conf file by removing the '#' from 
> the start of the "Include conf-available/serve-cgi-bin.conf" line. I then 
> created the /usr/lib/cgi-bin directory. I next put a small Perl CGI script 
> named "printenv.cgi" under /usr/lib/cgi-bin. I then restarted the apache2 
> server. When I attempted to run my newly created CGI script gy visiting 
> localhost:80/cgi-bin/printenv.cgi  all 
> that happened was I received a "404 Not Found" error. I looked at the apache 
> logfile and it provided no further info.
> 
> I even tried using the "wget" command. same 404 error.
> 
> What have I done wrong?
> 
> -- 
> 
> Barrry Kimelman
> Winnipeg, Manitoba, Canada