Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
PHP scripts problem
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Re: PHP scripts problem
PHP scripts problem
11-03-2012 10:11 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I'm having trouble running some PHP scripts I've downloaded. The creator believes there's no problem with the scripts, and suggests a server.configuration error. PlusNet Tech Support referred me here. One of the problem scripts called testforphp.php reads
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
<html>
<head>
<title>PHP test</title>
</head>
<body>
<h1>Does PHP work?</h1>
<?php echo "<h2>Yes, it does. PHP Version " . phpversion() ."</h2>";
echo "<p>To run the WXGRAPHIC script, you need GD enabled in PHP.\n";
echo "<br />Current GD status:</p>\n";
echo describeGDdyn();
// Retrieve information about the currently installed GD library
// script by phpnet at furp dot com (08-Dec-2004 06:59)
// from the PHP usernotes about gd_info
function describeGDdyn() {
echo "\n<ul><li>GD support: ";
if(function_exists("gd_info")){
echo "<font color=\"#00ff00\">yes</font>";
$info = gd_info();
$keys = array_keys($info);
for($i=0; $i<count($keys); $i++) {
if(is_bool($info[$keys[$i]])) echo "</li>\n<li>" . $keys[$i] .": " . yesNo($info[$keys[$i]]);
else echo "</li>\n<li>" . $keys[$i] .": " . $info[$keys[$i]];
}
} else { echo "<font color=\"#ff0000\">NO</font>"; }
echo "</li></ul>";
}
function yesNo($bool){
if($bool) return "<font color=\"#00ff00\"> yes</font>";
else return "<font color=\"#ff0000\"> no</font>";
}
?>
<p>If you don't see "Yes, it does." in large font above, then PHP is not enabled.</p>
</body>
</html>
Each time the script is run it returns
"Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: testforphp.php
If you think this is a server error, please contact the webmaster.
Error 500"
I have other scripts from the same source that are giving the same problem. Can anyone suggest what might be causing the problem?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
<html>
<head>
<title>PHP test</title>
</head>
<body>
<h1>Does PHP work?</h1>
<?php echo "<h2>Yes, it does. PHP Version " . phpversion() ."</h2>";
echo "<p>To run the WXGRAPHIC script, you need GD enabled in PHP.\n";
echo "<br />Current GD status:</p>\n";
echo describeGDdyn();
// Retrieve information about the currently installed GD library
// script by phpnet at furp dot com (08-Dec-2004 06:59)
// from the PHP usernotes about gd_info
function describeGDdyn() {
echo "\n<ul><li>GD support: ";
if(function_exists("gd_info")){
echo "<font color=\"#00ff00\">yes</font>";
$info = gd_info();
$keys = array_keys($info);
for($i=0; $i<count($keys); $i++) {
if(is_bool($info[$keys[$i]])) echo "</li>\n<li>" . $keys[$i] .": " . yesNo($info[$keys[$i]]);
else echo "</li>\n<li>" . $keys[$i] .": " . $info[$keys[$i]];
}
} else { echo "<font color=\"#ff0000\">NO</font>"; }
echo "</li></ul>";
}
function yesNo($bool){
if($bool) return "<font color=\"#00ff00\"> yes</font>";
else return "<font color=\"#ff0000\"> no</font>";
}
?>
<p>If you don't see "Yes, it does." in large font above, then PHP is not enabled.</p>
</body>
</html>
Each time the script is run it returns
"Server error!
The server encountered an internal error and was unable to complete your request.
Error message:
Premature end of script headers: testforphp.php
If you think this is a server error, please contact the webmaster.
Error 500"
I have other scripts from the same source that are giving the same problem. Can anyone suggest what might be causing the problem?
Message 1 of 4
(1,880 Views)
3 REPLIES 3
Re: PHP scripts problem
11-03-2012 12:19 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi hobjohns,
Can you please confirm where you are uploading this file to? Are you using the CGI webspace on your account?
If you are nor using this, you may need to activate this <a href="https://portal.plus.net/my.html?IvgvlGnZ6Jm%2FlgSXYspudxGvNgoXUgKqC3f0fFmIgOsmrrsujjYNOs1jIhDFyttD">here</a>
Can you please confirm where you are uploading this file to? Are you using the CGI webspace on your account?
If you are nor using this, you may need to activate this <a href="https://portal.plus.net/my.html?IvgvlGnZ6Jm%2FlgSXYspudxGvNgoXUgKqC3f0fFmIgOsmrrsujjYNOs1jIhDFyttD">here</a>
Message 2 of 4
(425 Views)
Re: PHP scripts problem
11-03-2012 8:39 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for the reply. I'm uploading the php scripts to my CGI webspace.
Message 3 of 4
(425 Views)
Re: PHP scripts problem
11-03-2012 8:52 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I've just found the problem - I hadn't realised I needed to change the permissions on the php script. All now working fine.
Message 4 of 4
(425 Views)
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Re: PHP scripts problem