.oO(matthew stuart)
>I am occasionally getting an internal server error 500 on
some pages in IE and
>Dreamweaver. I have made a connection to a MySQL DB and
test the connection and
>data from it. But, I have just gone to create a new
recordset and all of a
>sudden, there were no tables in the DB.
>
> I tested the page and got the 500 error and something
about restricted access!!
>
> So, I googled it and I found this on the net (Indian
University)
>
http://webmaster.iu.edu/PHPlanguage/index.shtml
>
> ---
>
> When the file/directory permissions are set correctly,
and you are still
>getting a 500 error, it is likely due to line
compatibility between the program
>used to create/upload the file and the Linux server. To
correct this, login to
>the account on Webserve via an SSH client that provides a
command line
>interface and do the following:
PHP doesn't have such line incompatibilities. PHP is not
Perl. SCNR
> Move to the directory where your php file is using the
'cd' command (e.g., cd
>www).
> Open the file using an editor such as nano and save it
by typing Ctrl + o
> This simple steps may solve your problem because it
converts Windows CR/LF
>(carriage return/line feed) to Unix LF (line feed) or Mac
CR to Unix LF.
Totally unnecessary. My own scripts are always written with
Linux line
endings (\n) and work well on both Linux and Windows servers.
And even if there would be such a problem, the suggestion
above is just
stupid. On a *nix box there are better tools to fix such
issues.
> I am using PHP on IIS rather than Apache because I
usually develop in ASP.
>Why? ASP is stable; easy to set up; works straight away;
doesn't make me cry
>every five minutes; doesn't make me have fits of rage
because it doesn't want
>to work and so on...
Well, I can say the same about PHP. And Apache would have the
benefit of
telling you (usually) what caused the 500 in its error log.
The poor little PHP interpreter would also feel much more
comfortable in
the environment he's used to. IIS just doesn't feel anything
like home.
> Could this line break thing be one of the reasons for
the erratic behaviour of
>PHP. To get rid of the problem I have to restart and it
goes away.
If it would be a line ending problem, don't you think it
would remain
even after a restart?
Actually I can't help you with IIS. Any chance to get this
running on
Apache? As said, it's the much more common environment for
PHP, even on
a Windows box. Not to mention that Apache is the better
server ... ;)
Micha