ALL Perl Scripts - "Premature End Of Script Headers"?
Feb 10, 2008
It's been a LONG time since I've used Perl scripts, since almost everything these days is PHP-based. But there is one old Perl script that I dusted off and decided to attempt to use today on my server, and to my surprise I can NOT get it working. I've come to discover it's not just this script, it's ALL Perl scripts on the server right now that aren't working (at least within Apache).
Here's what I know for sure:
1. Path to Perl on all scripts IS correct (/usr/local/bin/perl)
2. File permissions on the Perl scripts is correct (755, also tried 777 for testing)
3. Scripts are not C compiled scripts, they're straight Perl code and they have been uploaded properly (ASCII mode).
So now for whatever reason, I'm getting the following Apache error each time I try to run any simple Perl script: "Premature end of script headers".
Here's the simplest of scripts I'm attempting to run:
";
print "Hello, World.";
Something as simple as this script is even triggering the error. I've searched through this forum and on Google for an easy solution, but I can't seem to come across anything.
Any possible ideas on this one? Again, it's been so long since I've run anything Perl that it's very likely my server has been this way since day one - but I just didn't realize it.
My wordpress installation in plesk some times give me:
[Sun Apr 12 14:26:08 2015] [warn] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun Apr 12 14:26:08 2015] [error] Premature end of script headers: index.php
Recently our network of servers all started to prematurely disconnect in middle of data download. This can be download of pictures or files.
Eg: [url]
You'll notice on first go it only downloads +-5% of the images. Then you gotta keep pressing F5 many times for images to complete downloading.
Having attempted many solutions to correct this (so that it downloads data 100%), I though I ask on forums since there's always somewhere here that knows more then admins.
Would you please share any solutions that would solve this challange? Or any guidence on what to adjust.
SErvers specs: Linux 2.6 kernel (latest) Apache 2.0
Recently our network of servers all started to prematurely disconnect in middle of data download. This can be download of pictures or files.
Eg: [url]
You'll notice on first go it only downloads +-5% of the images. Then you gotta keep pressing F5 many times for images to complete downloading.
Having attempted many solutions to correct this (so that it downloads data 100%), I though I ask on forums since there's always somewhere here that knows more then admins.
I've been working on a project that I am trying to utilize some of the new functions from PHP 5.5 so I changed the PHP version from 5.3 to 5.5 on this domain, but I am getting a 500 error. I've found this kb: [URL] .... which is my exact issue, but the resolution doesn't work for me.
All of the permissions are set right, all of the modules are compiled and registered correctly, but I'm still getting a 500 error.
From error_log:
Code:
[Sun May 31 20:32:31 2015] [warn] [client] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Sun May 31 20:32:31 2015] [error] [client] Premature end of script headers: adduser-exec.php # /usr/local/psa/admin/bin/php_handlers_control --list :
I always presumed the Expires: date is part of the page cache instructions, however I was told its to do with the cookie. I thought the cookie expire was set as expires=date in the set cookie line and not on a new line with the :
I have a dedicated server and I am using the SMTP of one of my domain names to send mail. The IP of this domain name ends in .25 and the server hostname IP ends in .24.
The emails that are received list the server hostname and IP in the message headers instead of the IP of the domain name that is sending the email. Is there something that can be done about this? I read that a message could be mistaken as spam if it doesn't originate from the exact IP of the domain in the 'from' field.
I'd love to contact the domain registrars of the recipient spammers who are barraging me with the latest "google riches", or "ebay success" sales pitch emails, but I lack the knowledge of how to reveal the email headers and interpret them.
Is there a particular email client program that would allow me to view all parts of the email ? Maybe I'm using the wrong client (outlook), that would not allow me to view the more technical parts of the email, but but I don't know.
If I go ahead and click on their "unsub me" links at their bottom, that's their tricky way of finding out what emails are active and possibly make it worse for me. I know that it's illegal to send me email that I didn't opt into, in the first place, even if they do provide the unsubscribe link at the bottom, with the usual "Icann" spam disclaimer that they include.
We are facing this problem on a Plesk (serverpsa v8.6.0_build86080910.19 os_CentOS 5) The scenario is that on this server we have around 5 domains, one of them is the main domain that is also in the hostname.
On the main domain some custom social networking PHP script is running that sends out mails using SMTP authentication, now when welcome mail or invites or notification mails or any such mail are sent through the script, it includes other domains in the headers randomly:
Received: (qmail 15896 invoked from network); 24 Nov 2008 18:45:05 -0500 Received: from somedomain.com (HELO server.maindomain.com) (xyz.xyz.xyz.xyz).....
How can I force sendmail to ignore it when a user sets the From: and Reply-to: headers for an email, such as a PHP script? I would like to force it so it always uses whatever email I set.
I cannot seem to find how to do this... sendmail config is quite difficult.
I am attempting to change the host headers on my site that take my domains and forward them out to another domain.
My problem is that if a person type in [url], it brings them to my site and every link of the site is then [url]instead of redirecting it to my intended [url]
I have a problem with my site where users log in (vbulletin) and yet the script doesn't log them in. After some research i found out this happens due to http headers.
I own a dedicated server which has plesk as the control panel, i do not know where to go and find the option to enable Http Headers.
I am setting up Expires headers for my site. The site allows users to upload photos of themselves. The photos are stored as <user id number>.jpeg. I want these to be cached, but updated when the user uploads a new photo. From what I understand, new browsers use ETags to make sure this happens (since if they upload a new file, the inode and/or mtime will change). However for older browsers, I plan to add ?file-mtime to the end of the file name. This should allow caching but it will change when the user uploads a new image. Will the cause any technical problems with caches that would not be a problem if I changed the filename to be user_id.mtime.jpeg when the user uploads the file? The trade-off is that if I just append ?file-mtime to the end of the filename, I don't have to track these images in a database or use file globs (cpu-expensive for large directories) to find the filename to output.
I was running into a problem where PHP was automatically sending the following HTTP headers:
Code: Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache This caused a problem in that my browser (Camino) would not let me view source without reloading the page. For state-based pages, that was a nightmare and meant I couldn't use my main browser for development!
Now that I have identified the problem, I am wondering what the point of those headers are, and whether I need them. I can definitely overwrite them but am not sure if I should.
My web app does set cookies (uses PHP sessions). I believe that it is the setting of the cookie that triggers PHP to send those headers. If I don't set a cookie on a PHP script, those headers are not sent.
how I can manage cache-control properly so that I can view source in Camino? Is no-cache etc. really important if you're setting cookies?
I maintain a server with a few domains. The server runs Plesk and Mailman. There are about 50 mailing lists with number of subscribers ranging from a couple people to a few hundred people. All work fine.
There is an additional list with around 2500 subscribers. Messages sent to this list are being received with nearly 500 identical "Received-SPF: pass" lines. Besides seeming odd, it's particularly problematic as some domains are bouncing the emails because the header is too large.
This behavior started after I upgraded from Plesk 11.x to 12.x.
The SPF lines look like this:
Received-SPF: pass (SERVER-HOSTNAME-HERE: localhost is always allowed.) client-ip=127.0.0.1; envelope-from=BOUNCE-LIST-ADDRESS-HERE; helo=SERVER-HOSTNAME-HERE;
Where SERVER-HOSTNAME-HERE is our hostname and BOUNCE-LIST-ADDRESS-HERE is the list's bounce address.
For what it's worth the server hostname and the domain of the list do not match.
This issue seems to be tied to the number of subscribers. We made a new list with a few subscribers and messages looked fine. We added the 2500 subscribers to the new list and then we saw the plentiful Received-SPF: pass entries.
i installed the latest version of the mail scanner on my linux server. It has been tested to be scanning and running properly. But one thing that is unusual is that the emails that is being processed by the mailscanner does not get tagged as its being processed by it. Hence i do not really know whether it has been processed.
When i check the email full headers, i am missing information like spam score, spam information and spam status. I did a check in the mailscanner.conf and the configuration was done correctly.
how can we set these information to show on the email header that it has been processed.
I have also enabled SSL in the apache http server using mod_ssl. The load balancing works fine, but in all the response headers these connection attributes are added "Connection: keep-alive keep-alive: timeout=5"
Is there a way to remove these headers? I do not want these headers to be added in the response. I have also tried mod_header to unset these headers, but no use. HTTP/1.1 protocol is being used, so eventhough the connection is not present in the header, the connection would should be considered as persistent. Why is apache sending these attributes explicitly in each response. I just want to get rid of these attribute...
TEST 1: Without <FilesMatch> directive, the headers are set to all requested content as it should. This includes content served from apache server and content from a separate application server.
TEST 2: If I use the above configuration example, I can see that static content comes with correct headers only