Operating System - HP-UX
1843996 Members
2511 Online
110226 Solutions
New Discussion

Re: Javascript: Premature end of script header

 
Wörz
New Member

Javascript: Premature end of script header

Hello,

I am in the process of migrating a site from Apache 1.3 to Apache2. HTML works without problems. But the pages include an external javascript file, which does not explicitly output anything, but just defines some functions.
When the javascript file gets imported, I get the "Premature end of script header" message in the error log.
Because I did not find anything, I even tusced the server and saw, that apache2 tries to execute the javascript file. I have no idea, why that. According to my knowledge the javascript file should just be copies to the client, not executed by the server.
I attached an excerpt of one of the headers, where the script gets executed.
I hope somebody can tell me, what is wrong.

Thanks in advance

Dieter
6 REPLIES 6
Michael Schulte zur Sur
Honored Contributor

Re: Javascript: Premature end of script header

Hi,

Can you post the script as attachment?

Michael
Wörz
New Member

Re: Javascript: Premature end of script header

Hi Michael,

I don't think the problem is in the script, because it does not even get opened according to tusc. I have attached the head part of the page. Probably the error is in there.

Thanks in advance for your answer.

Dieter
Paula J Frazer-Campbell
Honored Contributor

Re: Javascript: Premature end of script header

Hi
In your script you have :-
HP-UX B.10.01 9000/725

If this is true its is time to upgrade the OS.

Paula
If you can spell SysAdmin then you is one - anon
Wörz
New Member

Re: Javascript: Premature end of script header

Hello,

as I said, the site is to be upgraded, but we did not change the headers yet, that is where is that old OS information. We are on 11.x (not 11i).

Thanks, Dieter
Michael Schulte zur Sur
Honored Contributor

Re: Javascript: Premature end of script header

Hi Dieter,

would you please post the first part anyway?
It seems odd, that the html file should be opened and the java script not.

Michael
Wörz
New Member

Re: Javascript: Premature end of script header

Hello Michael,

as I already wrote, apache2 seems not recognize it as a javascript file, that is to be sent to the browser. If I make the script executable, it tries to start it and for sure does not find the proper interpreter for that. If I leave it without execute permission, it say "permission denied" within tusc, even without opening the script beforehad.

Anyway, here comes the requested script.

By the way, from the html-File, the script should load normally, or is there something wrong in there already?

Thanks in advance

Regards,

Dieter