LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-16-2017, 01:00 PM   #31
phipm1
LQ Newbie
 
Registered: May 2017
Posts: 20

Original Poster
Rep: Reputation: Disabled

yes I have
 
Old 06-16-2017, 01:16 PM   #32
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,425

Rep: Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054
Quote:
Originally Posted by phipm1 View Post
yes I have
Yes, you have changed the DocumentRoot to /formtest2 ?? But the file is in /htdocs/formtest2/templates/ ?
So, the directory/file is still not in the web space ?

Please be very explicit about what changes you've made...all of them.

The version of formmail I'm using (1.92) doesn't have a reference to a variable template_name, and neither does the latest version (1.93) so we'd need to know what mods have been made to the script to want that page/html file, and how the script is using the value being passed into it.
 
Old 06-16-2017, 01:29 PM   #33
phipm1
LQ Newbie
 
Registered: May 2017
Posts: 20

Original Poster
Rep: Reputation: Disabled
The docroot has to be stay at /htdocs/formtest2/

there has been no mods done to the formmail file.


This completely works on our unix server httpserver we are migrating over to Linux and that is when the problems started.
 
Old 06-16-2017, 02:20 PM   #34
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,425

Rep: Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054
Quote:
Originally Posted by phipm1 View Post
The docroot has to be stay at /htdocs/formtest2/

there has been no mods done to the formmail file.


This completely works on our unix server httpserver we are migrating over to Linux and that is when the problems started.
Yes, it can be very challenging to migrate to another OS. That's why my current installation still reflects defaults from apache 1.1, even tho we're not running that version anymore. What we did was replicate the directory structure when changing versions or distributions, then copied over the config files, making only minimal, if any changes.

Are you allowed to check for the file from the command line:
Code:
ls -la /htdocs/formtest2/templates
then review for existence, permissions, ownership. Be sure the . entry is 755.

No mods to formmail script begs the question:
Why are you then passing in a value for template_name? It doesn't hurt to pass in a value the script doesn't use...but why do it?
 
Old 07-10-2017, 09:05 AM   #35
phipm1
LQ Newbie
 
Registered: May 2017
Posts: 20

Original Poster
Rep: Reputation: Disabled
So, I finally got the form to work (yeah!!!!) very painful

I'm still getting error in the log when hitting the home page of the site

File does not exist: /htdocs/thesource/corp/corp, referer: http://thesourceqa.stholdco.com/tool...ack_reply.html

doc root is thesource/corp
home.shtml is in the corp directory correct ownership and properties
/tools/feedback_reply.html is also there

I can't figure out why its repeating the corp directory. I've checked the web server conf file

DocumentRoot "/htdocs/thesource/corp/"
#
<Directory />
Options Indexes FollowSymLinks +ExecCGI +Includes
XBitHack full
AllowOverride None
Order allow,deny
Allow from all
</Directory>

#
DirectoryIndex index.html home.shtml
IndexOptions FancyIndexing VersionSort

Last edited by phipm1; 07-10-2017 at 09:13 AM.
 
Old 07-11-2017, 05:22 PM   #36
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.8.2003
Posts: 5,425

Rep: Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054Reputation: 2054
Quote:
Originally Posted by phipm1 View Post
So, I finally got the form to work (yeah!!!!) very painful

I'm still getting error in the log when hitting the home page of the site

File does not exist: /htdocs/thesource/corp/corp, referer: http://thesourceqa.stholdco.com/tool...ack_reply.html

doc root is thesource/corp
home.shtml is in the corp directory correct ownership and properties
/tools/feedback_reply.html is also there

I can't figure out why its repeating the corp directory. I've checked the web server conf file

DocumentRoot "/htdocs/thesource/corp/"
#
<Directory />
Options Indexes FollowSymLinks +ExecCGI +Includes
XBitHack full
AllowOverride None
Order allow,deny
Allow from all
</Directory>

#
DirectoryIndex index.html home.shtml
IndexOptions FancyIndexing VersionSort
Is the error from the execution of the feedback form? What does the action= on the html page (feedback_reply.html) contain?

It looks like it contains "/corp/something", which would repeat the corp. The action (or any DocumentRoot based reference) needs to assume the
Code:
/htdocs/thesource/corp/
part of the path to the file. This means that the corp/ directory should never be mentioned in the html at all.

For example, knowing the DocumentRoot, we can also know that the file feedback_reply.html is physically located at
/htdocs/thesource/corp/tools/feedback_reply.html -- but any reference to it in the code should just say /tools/feedback_reply.html.

Last edited by scasey; 07-11-2017 at 05:24 PM.
 
Old 07-12-2017, 06:38 AM   #37
phipm1
LQ Newbie
 
Registered: May 2017
Posts: 20

Original Poster
Rep: Reputation: Disabled
The form works properly, emails etc.

The error first starts when you are hitting the home page ([Wed Jul 12 05:24:12 2017] [error] [client 10.226.40.1:55142] File does not exist: /htdocs/thesource/corp/corp, referer: http://thesourceqa.stholdco.com/home.shtml)

This is from the page where the source_feedback.htm form is

<input type="hidden" name="recipient" value="webserver.admins@****.com"/>
<input type="hidden" name="subject" value="Source Feedback"/>
<input type="hidden" name="template_name" value="../cgi-bin/templates/source_feedback.html"/>
<input type="hidden" name="required" value="Your_Name, Last_Name, YOUR_EMAIL, Feedback"/>
<input type="hidden" name="redirect" value="http://thesourceqa.stholdco.com/tools/feedback_reply.html"/>
<input type="hidden" name="email_format" value="html"/>


feedback_reply.html just sends a thankyou in the browser after the form has been completed.

there is no pathing in the home.shtml to corp either
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Premature End of Script Headers yuri16 Linux - Newbie 3 05-26-2009 03:03 AM
Premature end of script headers: CGI fatturi Linux - Newbie 4 07-19-2007 04:55 PM
Premature end of script headers bhomass Debian 1 12-02-2005 05:31 PM
Premature end of script headers webhead Red Hat 5 09-22-2004 01:56 AM
Perl/CGI Problem "Premature Premature end of script headers: countdown.pl" newuser455 Linux - Software 2 07-18-2004 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration