Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP website ERROR 500
    primarykey
    data
    text
    <p>I developed some php pages on the XAMPP environment and It worked perfectly but when I moved it to a production server(ubuntu 10.04 apache2),there were two pages that were throwing error.</p> <p>I added the error report script and this is what i got</p> <pre><code>Warning: require_once(Mail.php): failed to open stream: No such file or directory in /var/www/globalgoal/include/signallogic.php on line 2 Fatal error: require_once(): Failed opening required 'Mail.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/globalgoal/include/signallogic.php on line 2 </code></pre> <p>I installed the PEAR package in ubuntu server.</p> <p>This is the actual code:</p> <pre><code>&lt;?php require_once "Mail.php"; function mailing($context, $user) // Email Notification function { $w = date('W')-1; $leader=array(); $con=mysqli_connect("10.9.245.211","root","password","qa"); $sql="SELECT firstname, lastname, access_id FROM user where username = '$user' "; $result=mysqli_query($con,$sql); while($row = mysqli_fetch_array($result)) { $access_id= $row['access_id']; $firstname= $row['firstname']; $lastname= $row['lastname']; } $name=$firstname . " " . $lastname;// Analyst name // Get the initiative lead name $sql="SELECT firstname, lastname, email FROM user where access_id = $access_id and leader=1 "; $result=mysqli_query($con,$sql); while($row = mysqli_fetch_array($result)) { array_push($leader,$row['email']); } $leaderemail=""; for($i=0;$i&lt; count($leader);$i++) { $leaderemail .=$leader[$i] . " , "; } $leaderemail=str_replace(",","&gt;, &lt;",$leaderemail); $from = xxxx@ddd.com; $to = abc@azx.com; $subject = "Weekly Analyst Inputs - Week " . $w ; $body = "Hi,&lt;br/&gt;&lt;br/&gt;Thank you so much for inputting numbers for week " . $w . ".&lt;br/&gt;&lt;br/&gt; These numbers were successfully submitted by &lt;b&gt;" . $name . "&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;" . $context ; $host = "used corp details"; // SMTP server for eBay email $username = ""; // No Auth $password = ""; $MIME="1.0"; $type="text/html; charset=iso-8859-1"; // =================No need to modify below=================== $headers = array ('From' =&gt; $from, 'To' =&gt; $to, 'Subject' =&gt; $subject, 'MIME-VERSION'=&gt;$MIME, 'Content-Type'=&gt;$type ); $smtp = @Mail::factory('smtp', array ('host' =&gt; $host, 'auth' =&gt; false, 'username' =&gt; $username, 'password' =&gt; $password)); $mail = @$smtp-&gt;send($to, $headers, $body); if (@PEAR::isError($mail)) { echo("&lt;p&gt;" . $mail-&gt;getMessage() . "&lt;/p&gt;"); } else { echo("&lt;p&gt;The input results are successfully sent to the initiative lead analysts.&lt;/p&gt;"); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload