PDA

View Full Version : Php not working for me... help


jbenalluch
1-3-02, 04:19 AM
Hi,
I have been trying to make my php work, and they definately don't seem to work on the server of Powweb.

I get the 500 Internal Server Error, i read the Faqs; i even made a testing script, that goes like this:

********tst.php************

<?php
#!/usr/local/bin/php
echo "this is a test";
?>
*********eof**************

(i have also tried like this:

***********tst.php********

#!/usr/local/bin/php
<?php
echo "this is a test";
?>
*********eof**********
)

and i still get the 500 Internal Server Error.

The permission of the file is 755 and the file is located in /htdocs/tst.php .

from the error log is get this:

[Wed Jan 2 16:07:32 2002] [error] [client 67.161.44.26] Premature end of script headers: /www/p/pi2korg/htdocs/log.php
failed to open log file
fopen: Permission denied
[Wed Jan 2 16:10:32 2002] [error] [client 67.161.44.26] Premature end of script headers: /www/p/pi2korg/htdocs/tst.php

If anyone has any idea of what i could be doing wrong or what to do, i would be thankful.

creek
1-14-02, 11:09 PM
Hi,

I am having the same problem. Did you ever get yours corrected? If so could you share with me what you ended up doing to get it to run?

Thanks in advance!!

fcsnc
1-14-02, 11:56 PM
FYI -

Powweb uses the CGI version of PHP; therefore your .php files must be made executable.

SITE CHMOD 755 tst.php

Please see the documentation in your FTP software to learn how to view and change permissions on your site.

The directory / directories in which your PHP files reside must also be searchable (755).

Of course, like any html or script document, you should upload these files using the ASCII mode in your FTP software. This mode removes carriage-return characters, which are nonsense in Unix text files.