Apache Server configuration support - Newbie - Internal Server Error when using fopen()

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > February 2006 > Newbie - Internal Server Error when using fopen()





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Newbie - Internal Server Error when using fopen()
Marsel

2006-02-19, 5:52 pm

I just installed php 4.4.2.2 and Apache 2.0.55 on WXP5.1sp2.

Everything seems to work fine, but when I use fopen(), file(), etc., I get an error.

Browser returns:
"Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request."

On the server, a window pops up saying
"PHP Script Interpreter has encountered a problem and needs to close. "

The error_log file reports: "[error] Premature end of script headers: php.exe"

I am running the server from my ordinary ADSL connection with only port 80 open. Could that be the problem?
How do I verify?

Any help greatly appreciated!
/Marsel


J.O. Aho

2006-02-19, 5:52 pm

Marsel wrote:
> I just installed php 4.4.2.2 and Apache 2.0.55 on WXP5.1sp2.
>
> Everything seems to work fine, but when I use fopen(), file(), etc., I get an error.
>
> Browser returns:
> "Internal Server Error
> The server encountered an internal error or misconfiguration and was unable to complete your request."
>
> On the server, a window pops up saying
> "PHP Script Interpreter has encountered a problem and needs to close. "
>
> The error_log file reports: "[error] Premature end of script headers: php.exe"
>
> I am running the server from my ordinary ADSL connection with only port 80 open. Could that be the problem?
> How do I verify?


No, this ain't the problem.

I would suggest you get your hands on a unmodified php.ini and tested with it
to see if your settings are bad, if not, then I would suggest you reinstall
php, using one of the packages that provides apache/php/mysql for microsoft
would be the best idea IMHO. But I really think the best had to been switching
to an OS that does include apache/php/mysql by default, as those are a lote
better suited to run as server than microsoft.


//Aho
Marsel

2006-02-20, 5:57 pm

On Sun, 19 Feb 2006 13:06:16 +0100, "J.O. Aho" <user@example.net> wrote:

>Marsel wrote:
>
>No, this ain't the problem.
>
>I would suggest you get your hands on a unmodified php.ini and tested with it
>to see if your settings are bad, if not, then I would suggest you reinstall
>php, using one of the packages that provides apache/php/mysql for microsoft
>would be the best idea IMHO. But I really think the best had to been switching
>to an OS that does include apache/php/mysql by default, as those are a lote
>better suited to run as server than microsoft.
>
>
> //Aho


Thanks, Aho,

You're right, I reinstalled a version 4.3.9 and everything works just fine now.
Seems stable, but I know I should take look at Linux at some point. It was just
too much to grasp at this point, had to get the server up fast.

Another question, not sure where to post it, so I'll try here:
Now that the site is up and running I would like to see it on the web (not locally,
because some pages are integrated on 3rd party pages).
This does not seem possible through the router, only when I establish a new
modem connection. Firewall confusion? Any fix?

/Marsel

J.O. Aho

2006-02-20, 5:57 pm

Marsel wrote:

> Another question, not sure where to post it, so I'll try here:
> Now that the site is up and running I would like to see it on the web (not locally,
> because some pages are integrated on 3rd party pages).
> This does not seem possible through the router, only when I establish a new
> modem connection. Firewall confusion? Any fix?


If you run a firewall on the machine with the Apache running, you need to open
port 80 (for TCP packages). For router you need to see to port forward port 80
to the machines on which Apache is running (see your route documentation).


See to not bind to an ip-number in your apache configuration, as if you do
this, apache will wait for connections only on that ip-number and refuse those
forwarded from the router as these will have the external ip-number in the
HTTP-requester. Binding to an ip-name is okey, as long as it points on the
apache server on itself in the hosts file and that the external DNS points at
your public ip-number.


//Aho
Marsel

2006-02-21, 7:50 am

On Mon, 20 Feb 2006 23:11:21 +0100, "J.O. Aho" <user@example.net> wrote:

>Marsel wrote:
>
>
>If you run a firewall on the machine with the Apache running, you need to open
>port 80 (for TCP packages). For router you need to see to port forward port 80
>to the machines on which Apache is running (see your route documentation).
>
>
>See to not bind to an ip-number in your apache configuration, as if you do
>this, apache will wait for connections only on that ip-number and refuse those
>forwarded from the router as these will have the external ip-number in the
>HTTP-requester. Binding to an ip-name is okey, as long as it points on the
>apache server on itself in the hosts file and that the external DNS points at
>your public ip-number.
>
>
> //Aho


Thanks, but that does not seem to be it.

There is no firewall on the Apache server, and the router forwards port 80
correctly.
Apache is set to listen on port 80 with the line "listen 80" in httpd.conf.
Everything runs ok from a modem connection or when accessed from
anywhere outside my local network. Thus *you* should be able to see
php setup at http://exxelan.com/phpinfo.php, but *I* am not...
The browser attempts to open the correct ip-number, but after a while reports
"Cannot find server or DNS Error".

//Marsel
J.O. Aho

2006-02-21, 7:50 am

Marsel wrote:

> There is no firewall on the Apache server, and the router forwards port 80
> correctly.
> Apache is set to listen on port 80 with the line "listen 80" in httpd.conf.
> Everything runs ok from a modem connection or when accessed from
> anywhere outside my local network. Thus *you* should be able to see
> php setup at http://exxelan.com/phpinfo.php, but *I* am not...
> The browser attempts to open the correct ip-number, but after a while reports
> "Cannot find server or DNS Error".


Okey, this is a routing problem, I assume that your internal ip-number for the
server is 192.168.0.2 (make adjustments), then you will need to add the
following to your hosts file on the client machine

192.168.0.2 exxelan.com



//Aho
Marsel

2006-02-21, 5:56 pm

On Tue, 21 Feb 2006 14:24:54 +0100, "J.O. Aho" <user@example.net> wrote:

>Marsel wrote:
>
>
>Okey, this is a routing problem, I assume that your internal ip-number for the
>server is 192.168.0.2 (make adjustments), then you will need to add the
>following to your hosts file on the client machine
>
>192.168.0.2 exxelan.com
>
>
>
> //Aho


Doh! Of course, thanks!!

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com