Welcome to WebmasterWorld Guest from 54.158.166.6

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP Suddenly stopped working

Trouble with displaying a PHP page

   
9:56 am on Jan 12, 2009 (gmt 0)

5+ Year Member



I have 2 php scripts on my site, one of them is for a very simple contact form and the other is for a custom quote form: suddenly neither of them work. I'm sure its something very simple, but I can't figure it out.
The address of the contact form is
http://www.example.co.uk/home/contact_us.html
which should take you to my php response page which is
http://www.example.co.uk/home/sendeail2.php
but it doesn't get there and the page doesn't display, instead I get a misconfiguration message. Does anybody have an idea what could have happened?

[edited by: coopster at 1:27 pm (utc) on Jan. 12, 2009]
[edit reason] please use example.com, thanks! [/edit]

10:05 am on Jan 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



sendeail2.php might not exist. Are you sure the file is inside the home directory? could the name be sendmail2.php?
10:06 am on Jan 12, 2009 (gmt 0)

5+ Year Member



not sure if you have noticed there is a possible typo in your second link you have "sendeail2.php" not "sendmail2.php"

not the E instead of an m possibly for mail.

hope that helps

10:19 am on Jan 12, 2009 (gmt 0)

5+ Year Member



Yes, good spotting, that was a typo I made a long time ago, but I carried it through, so the php is really called sendeail2.php, and it exists in the home folder, but when you locate to its address, it doesn't show......
11:08 am on Jan 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try using the full url

<form method="post" action="http://www.example.co.uk/home/sendeail2.php">

you will need the full url for the graphics too otherwise they will not show

[edited by: coopster at 1:27 pm (utc) on Jan. 12, 2009]
[edit reason] exemplified url [/edit]

11:37 am on Jan 12, 2009 (gmt 0)

5+ Year Member



Tried that, still doesn't show!
12:15 pm on Jan 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



have you uploaded your PHP files in Text or ASCII mode, it could of been transfered in binary mode by your FTP client which can give a server error
12:25 pm on Jan 12, 2009 (gmt 0)

5+ Year Member



I uploaded the php as a Dreamweaver file, is that correct?
12:44 pm on Jan 12, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



dreamweaver will upload in auto mode but it could be uploading in the wrong mode for your PHP files

other than that do you have a .htaccess file in the root of your webspace ?

12:56 pm on Jan 12, 2009 (gmt 0)

5+ Year Member



No, what is an .htaccess file for?
1:20 pm on Jan 12, 2009 (gmt 0)

5+ Year Member



Can a website have both asp & php scripts running? I am no guru, but my host will let me have either asp or php scripts running on a server.
2:14 pm on Jan 12, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Lets go back to very basic. Do you have other php pages that are working?
If you dont have any other php pages in your site then just make the traditional

<?php
echo "Hello, world";
?>

and see if that works, if it doesnt then you know that php is dead.

<edit>
What is the error message you are getting?

[edited by: PHP_Chimp at 2:15 pm (utc) on Jan. 12, 2009]

3:05 pm on Jan 12, 2009 (gmt 0)

5+ Year Member



I put this on my site as info.php
<html>
<head>
<title> PHP Test Script </title>
</head>
<body>
<?php
phpinfo( );
?>
</body>
</html>
and when I accessed it through my browser, I got this message:
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@example.co.uk and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

[edited by: eelixduppy at 9:18 pm (utc) on Jan. 12, 2009]
[edit reason] exemplified [/edit]

3:32 pm on Jan 12, 2009 (gmt 0)

5+ Year Member



I have just checked my server and it looks like they have updated their PHP to 5.2.8 from 4.4.8. I uploaded the pages to another site that was running 4.4.8 and they displayed! Help!
3:35 pm on Jan 12, 2009 (gmt 0)

5+ Year Member



I suspect you do not have php enabled on your server.
3:42 pm on Jan 12, 2009 (gmt 0)

5+ Year Member



Could it have got disabled somehow when the server upgraded their version? Do you know how I would switch it back on?
4:24 pm on Jan 12, 2009 (gmt 0)

5+ Year Member



Hmm...I would contact the host company and see what they have to say, I'm sure they have a technical support dept that can help you with this.