PHP issue - mailserver blacklisted
My hosting company is now saying that their "(8)Exec format error: exec of '/home/ failed" is that "the mailserver ip is blacklisted"
WTF does that mean and how do i fix it? please, i am about to tear my hair out. thank you.
Previous issue solved: *My hosting company has disabled several PHP functions. This is really of no consequence to me however I seem to be getting one of their disabled function errors. The error is "(13)Permission denied: exec of '/home/exampledomain/public_html/cgi-bin/emailscript.php' failed" I have been over my PHP over a dozen times, and I have no exec() function. The only function I have is mail() which they swear works just fine. I have been through their customer support and they refuse to tell me what is going on.*
I am posting my code for review. Please help. Thanks.
<?php
/* Subject and Email Variables */
$emailSubject = 'Appointment Inquiry';
$webMaster = 'info@exampledomain.com';
/* Gathering Data Variables */
$nameField = $_POST['name'];
$cellField = $_POST['cell'];
$emailField = $_POST['email'];
$dateField = $_POST['date'];
$timeField = $_POST['time'];
$lengthField = $_POST['length'];
$detailsField = $_POST['details'];
$otherField = $_POST['other'];
$screennameField = $_POST['screenname'];
$companyField = $_POST['company'];
$worknoField = $_POST['workno'];
$switchboardnoField = $_POST['switchboardno'];
$memoField = $_POST['memo'];
$subscribeField = $_POST['subscribe'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Cellphone: $cell <br>
Email: $email <br>
Date: $date <br>
Time: $time <br>
Length of appointment: $length <br>
Details: $details <br>
Other: $other <br>
Screen Name: $screenname <br>
Company: $company <br>
Direct Line: $workno <br>
Switchboard: $switchboardno <br>
Memo: $memo <br>
Subscribe Me: $subscribe <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Hosting Company Sucks</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<style type="text/css">
<!--
body {
background-color: #401857;
background-image: url(Images/bg.jpg);
background-repeat: repeat-x;
}
-->
</style>
</head>
<body ondragstart="return
false" onselectstart="return false">
<div id="wrapper">
<div id="logo"><a href="index.html"><img src="Images/logo.jpg" width="800" height="250" alt="logo" /></a></div>
<div id="navigation">
<p> </p>
<p class="link_cls"><a href="index.html"> Page1</a> | <a href="page2.html">Page2</a> | <a href="page3.html">Page3</a> | <a href="page4.html">Page4</a> | <a href="page5.html">Page5</a> | <a href="page6.html">Page6</a></p>
<开发者_开发知识库;/div>
<div id="bodyArea">
<div id="center">
<p> </p>
<p> </p>
<p><img src="images/thankyou.jpg" alt="thanks" width="579" height="502" align="middle" /></p>
</div>
</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
The error isn't referring to the exec()
function, but to the actual execution of the php file itself. PHP files need to be treated as executable by the file system in order for them to be processed by the server. It seems like your file permissions are off on the file. The standard is permission level is 755.
You should check the file permissions for that file and change them if necessary.
精彩评论