PDA

View Full Version : PHP does not work


tcatrainer
4-24-02, 12:18 PM
Yes, Ive done all the things you are supposed to.

I created a file in note tab lite
saved it as ASCII
uploaded it to the server
using dreamweaver 4
in the site ftp log
"site chmod 755 /htdocs/testing/"
AND
"site chmod 755 /htdocs/testing/phptesttwo.php"

Here is the file (also attached)

+++++++++++++++++begin code ++++++++++++++++++++

#!/usr/local/bin/php

<?
echo "powweb php support sucks!";

?>

+++++++++++++++++++++ end code +++++++++++++++++

I get a 500 server error

here is the error log:

failed to open log file
fopen: Permission denied
[Tue Apr 23 18:51:33 2002] [error] [client 24.47.220.211] Premature end of script headers: /www/r/raccess/htdocs/testing/phptest2.php
failed to open log file
fopen: Permission denied
[Wed Apr 24 08:47:21 2002] [error] [client 162.83.184.192] Premature end of script headers: /www/r/raccess/htdocs/testing/phptesttwo.php
failed to open log file
fopen: Permission denied
[Wed Apr 24 08:50:36 2002] [error] [client 162.83.184.192] Premature end of script headers: /www/r/raccess/htdocs/testing/phptesttwo.php
failed to open log file
fopen: Permission denied
[Wed Apr 24 08:50:43 2002] [error] [client 162.83.184.192] Premature end of script headers: /www/r/raccess/htdocs/testing/phptesttwo.php

Any help?

I am so close to going to www.ipowerweb.com
they have 7.95 a month hosting with MySQL and SSL included shoping cart etc
looks like a better deal to me.

MannInc
4-24-02, 12:31 PM
Make sure that Dreamweaver's FTP is set to upload in ASCII mode. Saving the file in ASCII isn't the same thing.

Hope this helps!

Here's a sample page using your coding <changed the output text>

http://pwsupport.manninc.com/php/phptest.php

tcatrainer
4-24-02, 01:15 PM
Thanks,

I had thought there might be a problem with dreamweaver in how it uploaded.

here is dreamwevers answer on verifing this is set properly:

"You can also define whether the types of files that you want to transfer should be transferred as ASCII (text) or binary. To do so, open the FTPExtensionMap.txt file in the Configuration folder (on the Mac, FTPExtensionMapMac.txt). You can modify and delete the list of which file types are transferred in each format, as well as add your own file types. If a file's extension is not defined in this file, Dreamweaver automatically transfers the file in binary mode. "

/ProgramFiles/Dreamweaver4/Configuration/FTPExtensionMap.txt

I edited this file in notepad
PHP was not listed so I added it as

PHP ASCII

The FTP log did not seem to change from uploading in BINARY right away even after I closed dreamweaver

I did a shut down and restart

it now seems to upload in ASCII

here is the site FTP log:
++++++++++++++++++++++++++++++++++++++++++++

200 NOOP command successful.
CWD /htdocs
250 CWD command successful.
PORT 192,168,2,10,4,232
200 PORT command successful.
NLST
150 Opening ASCII mode data connection for 'file list'.
index.html
linkstyle.css
sitemap.html
links.html
old.index.html
inventory
about
images
quote
webstats
bookstore
news.html
_testavioconfig.txt
_testraterequest.htm
soupermail.allow
ratetest.html
phpMyAdmin-2.2.6-rc1
testing
souperfinder.html
index.html.LCK
links.html.LCK
testimage.html
specials
226 Transfer complete.
CWD /htdocs/testing
250 CWD command successful.
PWD
257 "/htdocs/testing" is current directory.
PORT 192,168,2,10,4,233
200 PORT command successful.
LIST
150 Opening ASCII mode data connection for '/bin/ls'.
total 48
drwxr-xr-x 2 1132 500 512 Apr 22 22:34 _notes
-rwxr-xr-x 1 1132 500 173 Apr 17 20:18 phptest.html
-rwxr-xr-x 1 1132 500 105 Apr 23 20:58 phptest.php
-rwxr-xr-x 1 1132 500 64 Apr 24 01:50 phptest2.php
-rwxr-xr-x 1 1132 500 61 Apr 24 16:55 phptest3.php
-rwxr-xr-x 1 1132 500 62 Apr 24 16:59 phptest4.php
-rw-r--r-- 1 1132 500 76 Apr 24 15:49 phptesttwo.bak
-rwxr-xr-x 1 1132 500 67 Apr 24 16:41 phptesttwo.php
-rw-r--r-- 1 1132 500 101 Apr 23 20:58 phptestwurs.php
-rw-r--r-- 1 1132 500 8462 Apr 22 22:34 search.html
-rw-r--r-- 1 1132 500 45 Apr 22 22:34 search.html.LCK
-rw-r--r-- 1 1132 500 4814 Apr 14 08:40 searchresults.php
-rw-r--r-- 1 1132 500 45 Apr 22 22:34 searchresults.php.LCK
-rw-r--r-- 1 1132 500 6675 Apr 22 22:34 tomtest.php
-rw-r--r-- 1 1132 500 45 Apr 17 20:04 tomtest.php.LCK
226 Transfer complete.
CWD /
250 CWD command successful.
RNFR htdocs/testing/_notes/phptest4.php.mno
550 htdocs/testing/_notes/phptest4.php.mno: No such file or directory.
DELE htdocs/testing/_notes/phptest4.php.mno
550 htdocs/testing/_notes/phptest4.php.mno: No such file or directory.
CWD /htdocs/testing
250 CWD command successful.
PWD
257 "/htdocs/testing" is current directory.
PORT 192,168,2,10,4,234
200 PORT command successful.
LIST
150 Opening ASCII mode data connection for '/bin/ls'.
total 48
drwxr-xr-x 2 1132 500 512 Apr 22 22:34 _notes
-rwxr-xr-x 1 1132 500 173 Apr 17 20:18 phptest.html
-rwxr-xr-x 1 1132 500 105 Apr 23 20:58 phptest.php
-rwxr-xr-x 1 1132 500 64 Apr 24 01:50 phptest2.php
-rwxr-xr-x 1 1132 500 61 Apr 24 16:55 phptest3.php
-rwxr-xr-x 1 1132 500 62 Apr 24 16:59 phptest4.php
-rw-r--r-- 1 1132 500 76 Apr 24 15:49 phptesttwo.bak
-rwxr-xr-x 1 1132 500 67 Apr 24 16:41 phptesttwo.php
-rw-r--r-- 1 1132 500 101 Apr 23 20:58 phptestwurs.php
-rw-r--r-- 1 1132 500 8462 Apr 22 22:34 search.html
-rw-r--r-- 1 1132 500 45 Apr 22 22:34 search.html.LCK
-rw-r--r-- 1 1132 500 4814 Apr 14 08:40 searchresults.php
-rw-r--r-- 1 1132 500 45 Apr 22 22:34 searchresults.php.LCK
-rw-r--r-- 1 1132 500 6675 Apr 22 22:34 tomtest.php
-rw-r--r-- 1 1132 500 45 Apr 17 20:04 tomtest.php.LCK
226 Transfer complete.
site chmod 755 /htdocs/testing/
200 CHMOD command successful.
site chmod 755 /htdocs/testing/phptest4.php
200 CHMOD command successful.

++++++++++++++++++++++++++++++++++++

I still get a 500 Internal Server Error

+++++++++++++++++++++++++++++++++++++

here is the error log file:

failed to open log file
fopen: Permission denied
[Wed Apr 24 10:08:54 2002] [error] [client 162.83.184.192] Premature end of script headers: /www/r/raccess/htdocs/testing/phptest4.php
failed to open log file
fopen: Permission denied
[Wed Apr 24 10:08:55 2002] [error] [client 162.83.184.192] Premature end of script headers: /www/r/raccess/htdocs/testing/phptest4.php
failed to open log file
fopen: Permission denied
[Wed Apr 24 10:08:57 2002] [error] [client 162.83.184.192] Premature end of script headers: /www/r/raccess/htdocs/testing/phptest4.php

MannInc
4-24-02, 02:36 PM
Ok, now that the files appear to be uploading in ASCII, did you redo the CHMOD to 755? If so and it didn't work, try deleting the PHP files from the server, reuploading them in ASCII mode and CHMOD them to 755.

tcatrainer
4-24-02, 04:25 PM
Thanks for your advice

yes i had changed the chmod

"site chmod 755 /htdocs/testing/
200 CHMOD command successful.
site chmod 755 /htdocs/testing/phptest4.php
200 CHMOD command successful.
"

I tried deleting it and reuploading it

and then changed the chmod

still 500 error

xero-infinity
4-24-02, 05:25 PM
inside your PHP file is #!/usr/local/bin/php at the top? most the time that is needed

tcatrainer
4-24-02, 05:37 PM
yes ive tried everything i can think of (and the responses i ve gotten).

I have php and mysql working fine on my other site which is on saturn.powweb.com

but nothing works on pulsar.powweb.com

Is it possible that the server isnt configured correctly for PHP?

Tech support is just giving me canned answers now.

ive been trying to rectify this problem for weeks.
I ve had my first website with powweb for almost 2 years now

www.ipowerweb.com (http://www.qksrv.net/click-589249-1200208" target="_blank" onmouseover="window.status='http://www.ipowerweb.com';return true;" onmouseout="window.status=' ';return true;) offers a better deal

7.95 incluses SSL PHP mysql

+++++++++++++++++++ code +++++++++++++++++

#!/usr/local/bin/php

<?

echo "this does not work";

?>

+++++++++++++++++++ code +++++++++++++++++www.ipowerweb.com (http://www.qksrv.net/click-589249-1200208" target="_blank" onmouseover="window.status='http://www.ipowerweb.com';return true;" onmouseout="window.status=' ';return true;)

tcatrainer
4-24-02, 06:47 PM
i tried ws ftp also
deleted file on server

uploaded in ascii

chmodded to 777

still 500 error

xero-infinity
4-24-02, 06:54 PM
Well, my php files have to be chmod'd to 755 or it won't work.

tcatrainer
4-24-02, 07:07 PM
i changed it to (777 less secure ) because WS_ftp did not offer a 755

I am just so frustrated
ive tried everything i can think of
and all you who have responded can think of

any suggestions?

xero-infinity
4-24-02, 07:11 PM
What do you mean? [QUOTE]Originally posted by tcatrainer
[B]i changed it to (777 less secure ) because WS_ftp did not offer a 755 [QUOTE]
On my WS_FTP LE it does. You can't type it in. You have to set it with the check boxes or whatever.