Sending mail with api data using codeigniter - php

I need to send mail to the admin with the inserted data using APi function ,
the function is look like that
public function requestbookingresort_post()
{
$languageid = $this->input->post('languageId');
$resort_id = $this->input->post('resortId');
$booking_from = $this->input->post('bookingFrom');
$booking_to = $this->input->post('bookingTo');
$contact_name = $this->input->post('contactName');
$contact_email = $this->input->post('contactEmail');
$contact_phone = $this->input->post('contactPhone');
$userid = $this->input->post('userId');
if (empty($languageid))
{
$languageRecord = getDefaultlanguage();
$languageid = $languageRecord->languageid;
}
$language_file = languagefilebyid($languageid);
$this->lang->load($language_file, $language_file);
if (empty($resort_id) || empty($booking_from) || empty($booking_to) || empty($contact_name) || empty($contact_email) || empty($contact_phone))
{
$arr['status'] = 'error';
$arr['statusMessage'] = lang('error_in_booking');
$arr['data'] = array();
}
else
{
$dataArray = array(
"languageid" => $languageid,
"userid" => empty($userid) ? "0" : $userid,
"resortid" => $resort_id,
"bookingfrom" => date("Y-m-d", strtotime($booking_from)),
"bookingto" => date("Y-m-d", strtotime($booking_to)),
"contactname" => $contact_name,
"contactemail" => $contact_email,
"contactphone" => $contact_phone,
"requestdatetime" => date("Y-m-d H:i:s"),
);
$this->load->model("Resort_model");
$booking_id = $this->Resort_model->saveBookingRequest($dataArray);
if (empty($booking_id))
{
$arr['status'] = 'error';
$arr['statusMessage'] = lang('error_occurred');
$arr['data'] = array();
}
else
{
$arr['status'] = 'success';
$arr['statusMessage'] = lang('booking_request_submit');
$arr['data'] = array();
}
}
$response = array(
"response" => $arr
);
$this->set_response($response, REST_Controller::HTTP_CREATED); // CREATED (201) being the HTTP response code
}
But i'm new at codeigniter and didn't know how to get this passed data from the database to send mail with that to the admin mail or something ?

Try this.
public function requestbookingresort_post()
{
// Your operations
$response = array(
"response" => $arr
);
$this->sendMail($response)
$this->set_response($response, REST_Controller::HTTP_CREATED); // CREATED (201) being the HTTP response code
}
public function sendMail($response)
{
$settings=$this->Some_model->getEmailSettings();
$mail = new PHPMailer();
$mail->IsSMTP(); // we are going to use SMTP
$mail->SMTPAuth = true; // enabled SMTP authentication
$mail->SMTPSecure = "ssl"; // prefix for secure protocol to connect to the server
$mail->Host = $settings->host; // setting GMail as our SMTP server
$mail->Port = $settings->port; // SMTP port to connect to GMail
$mail->Username = $settings->email; // user email address
$mail->Password = $settings->password; // password in GMail
$mail->SetFrom($settings->sent_email, $settings->sent_title); //Who is sending the email
$mail->AddReplyTo($settings->reply_email,$settings->reply_email); //email address that receives the response
$mail->Subject = "Your Booking has been confirmed";
$mail->IsHTML(true);
$body = $this->load->view('path/email_template', $response, true);
$mail->MsgHTML($body);
$destination = $response['contactEmail']; // Who is addressed the email to
$mail->AddAddress($destination);
if(!$mail->Send()) {
$data['code']=300;
$data["message"] = "Error: " . $mail->ErrorInfo;
}
}
Make sure you have PHPMailer in your libraries and you are loading the library in your constructor and I hope you are keeping Email settings in your database. If not you can manually provide host, port, username and password fields

Related

Issue with PHPmailer and Google reCapcha V2 validation

I'm having issues with Google reCapcha verification in a form using PHPmailer. When the form is completed and the check in "I'm not a robot" is ok, press SEND and this message appears:
"reCaptcha is not Valid! Please try again.".
I've tried with reloading, change navigator to latest version, delete historial, and nothing works.
This is the message in the Google reCapcha admin panel: "We have detected that your website does not verify reCAPTCHA solutions. These verifications are necessary for the service to function properly on your website. You can get more information on our developer website".
Furthermore, I've set the allow_url_fopen = on for testing, but still doesn't work.
Does anyone figure out what's going on, and what's the best solution?
Actualization 13/06:
The ERROR_LOG shows this:
[13-Jun-2021 21:20:22 UTC] PHP Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/mywebsite/public_html/include/contact-form.php on line 90
[13-Jun-2021 21:20:22 UTC] PHP Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=XX--very long code here--XX): failed to open stream: no suitable wrapper could be found in /home/mywebsite/public_html/include/contact-form.php on line 90
The contact-form.PHP file original is this:
<?php
session_cache_limiter('nocache');
header('Expires: ' . gmdate('r', 0));
header('Content-type: application/json');
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'php-mailer/src/Exception.php';
require 'php-mailer/src/PHPMailer.php';
//require 'php-mailer/src/SMTP.php';
// Enter your email address. If you need multiple email recipes simply add a comma: email#domain.com, email2#domain.com
$to = "";
// Add your reCaptcha Secret key if you wish to activate google reCaptcha security
$recaptcha_secret_key = '';
// Default message responses
const RESPONSE_MSG = [
'success' => [
"message_sent" => "We have <strong>successfully</strong> received your message. We will get back to you as soon as possible."
],
'form' => [
"recipient_email" => "Message not sent! The recipient email address is missing in the config file.",
"name" => "Contact Form",
"subject" => "New Message From Contact Form"
],
'google' => [
"recapthca_invalid" => "reCaptcha is not Valid! Please try again.",
"recaptcha_secret_key" => "Google reCaptcha secret key is missing in config file!"
]
];
//This functionality will process post fields without worrying to define them on your html template for your customzied form.
//Note: autofields will process only post fields that starts with name widget-contact-form OR with custom prefix field name
$form_prefix = isset($_POST["form-prefix"]) ? $_POST["form-prefix"] : "widget-contact-form-";
$form_title = isset($_POST["form-name"]) ? $_POST["form-name"] : RESPONSE_MSG['form']['name'];
$subject = isset($_POST[$form_prefix."subject"]) ? $_POST[$form_prefix."subject"] : RESPONSE_MSG['form']['subject'];
$email = isset($_POST[$form_prefix."email"]) ? $_POST[$form_prefix."email"] : null;
$name = isset($_POST[$form_prefix."name"]) ? $_POST[$form_prefix."name"] : null;
if( $_SERVER['REQUEST_METHOD'] == 'POST') {
if($email != '') {
if(empty($to)) {
$response = array ('response'=>'warning', 'message'=> RESPONSE_MSG['form']['recipient_email']);
echo json_encode($response);
die;
}
//If you don't receive the email, enable and configure these parameters below:
//$mail->SMTPOptions = array('ssl' => array('verify_peer' => false,'verify_peer_name' => false,'allow_self_signed' => true));
//$mail->IsSMTP();
//$mail->Host = 'mail.yourserver.com'; // Specify main and backup SMTP servers, example: smtp1.example.com;smtp2.example.com
//$mail->SMTPAuth = true;
//$mail->Port = 587; // TCP port to connect to 587 or 465
//$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
//$mail->Username = 'SMTP username'; // SMTP username
//$mail->Password = 'SMTP password'; // SMTP password
$mail = new PHPMailer;
$mail->IsHTML(true);
$mail->CharSet = 'UTF-8';
$mail->From = $email;
$mail->FromName = $name;
if(strpos($to, ',') !== false){
$email_addresses = explode(',', $to);
foreach($email_addresses as $email_address) {
$mail->AddAddress(trim($email_address));
}
}
else {$mail->AddAddress($to);}
$mail->AddReplyTo($email, $name);
$mail->Subject = $subject;
// Check if google captch is present
if(isset($_POST['g-recaptcha-response'])) {
if(empty($recaptcha_secret_key)) {
$response = array ('response'=>'error', 'message'=> RESPONSE_MSG['google']['recaptcha_secret_key']);
echo json_encode($response);
die;
}
$response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$recaptcha_secret_key.'&response='.$_POST['g-recaptcha-response']);
$response_data = json_decode($response);
if ($response_data->success !== true ) {
$response = array ('response'=>'error', 'message'=> RESPONSE_MSG['google']['recapthca_invalid']);
echo json_encode($response);
die;
}
}
//Remove unused fields
foreach (array("form-prefix", "subject", "g-recaptcha") as $fld) {
unset($_POST[$form_prefix . $fld]);
}
unset($_POST['g-recaptcha-response']);
//Format eMail Template
$mail_template = '<table width="100%" cellspacing="40" cellpadding="0" bgcolor="#F5F5F5"><tbody><tr><td>';
$mail_template .= '<table width="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#F5F5F5" style="border-spacing:0;font-family:sans-serif;color:#475159;margin:0 auto;width:100%;max-width:70%"><tbody>';
$mail_template .= '<tr><td style="padding-top:20px;padding-left:0px;padding-right:0px;width:100%;text-align:right; font-size:12px;line-height:22px">This email is sent from '.$_SERVER['HTTP_HOST'].'</td></tr>';
$mail_template .= '</tbody></table>';
$mail_template .= '<table width="100%" cellspacing="0" cellpadding="0" border="0" bgcolor="#F5F5F5" style="padding: 50px; border-spacing:0;font-family:sans-serif;color:#475159;margin:0 auto;width:100%;max-width:70%; background-color:#ffffff;"><tbody>';
$mail_template .= '<tr><td style="font-weight:bold;font-family:Arial,sans-serif;font-size:36px;line-height:42px">'.$form_title.'</td></tr>';
$mail_template .= '<tr><td style="padding-top:25px;padding-bottom:40px; font-size:16px;">';
foreach ($_POST as $field => $value) {
$split_field_name = str_replace($form_prefix, '', $field);
$ucwords_field_name = ucfirst(str_replace('-', ' ', $split_field_name));
$mail_template .= '<p style="display:block;margin-bottom:10px;"><strong>'.$ucwords_field_name.': </strong>'.$value.'</p>';
}
$mail_template .= '</td></tr>';
$mail_template .= '<tr><td style="padding-top:16px;font-size:12px;line-height:24px;color:#767676; border-top:1px solid #f5f7f8;">Date: '.date("F j, Y, g:i a").'</td></tr>';
$mail_template .= '<tr><td style="font-size:12px;line-height:24px;color:#767676">From: '.$email.'</td></tr>';
$mail_template .= '</tbody></table>';
$mail_template .= '</td></tr></tbody></table>';
$mail->Body = $mail_template;
// Check if any file is attached
$attachments = [];
if (!empty($_FILES[$form_prefix.'attachment'])) {
$result = array();
foreach ($_FILES[$form_prefix.'attachment'] as $key => $value) {
for ($i = 0; $i < count($value); $i++) {
$result[$i][$key] = $value[$i];
}
}
foreach ( $result as $key => $attachment) {
$mail->addAttachment($attachment['tmp_name'],$attachment['name']);
}
}
if(!$mail->Send()) {
$response = array ('response'=>'error', 'message'=> $mail->ErrorInfo);
}else {
$response = array ('response'=>'success', 'message'=> RESPONSE_MSG['success']['message_sent']);
}
echo json_encode($response);
} else {
$response = array ('response'=>'error');
echo json_encode($response);
}
}
?>
Thank you,
Alejandra

How can I check the receiver email is real or not in CodeIgniter?

How can I check the receiver email is real or not on mail send in CodeIgniter3? And if it is not available or not real [fake] mail address then show the alert box with Mail is not available.
For example : When we send mail in gmail with fake mail address [which is not available or not real] then gmail reply with below text.
Google tried to deliver your message, but it was rejected by the server for the recipient domain example.com by mta5.am0.example.net.
EDIT 1
Here is my email send code. Please guide me where to add that code. I added as you said but it show
undefined email variable.
My email send code below :
<?php defined('BASEPATH') or exit('No direct script access allowed');
/**
* SENDS EMAIL WITH GMAIL
*/
class Emailsend extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->model('emailsend_model');
}
function index()
{
$mail_setting = $this->emailsend_model->getMailSetting();
$config = Array(
'protocol' => 'smtp',
//'smtp_host' => $mail_setting->smtp_server_name,
'smtp_host' => 'ssl://smtp.googlemail.com',
//'smtp_port' => 465,
'smtp_port' => 465,
//'smtp_user' => $mail_setting->smtp_user_name,
'smtp_user' => 'kzwkyawzinwai#gmail.com',
//'smtp_pass' => $mail_setting->smtp_password,
'smtp_pass' => 'mypassword',
'smtp_timeout' => '7',
'mailtype' => 'text',
'validation' => TRUE,
'charset' => 'utf-8',
'newline' => "\r\n",
'wordwrap' => TRUE,
'crlf' => "\r\n",
'newline' => "\r\n",
'dsn' => TRUE
);
$this->load->library('email', $config);
date_default_timezone_set("Asia/Tokyo");
$day = date('Y-m-d');
//$hour = date('H:i:00');
//$mail_informs = $this->emailsend_model->getSendMailInfo($day, $hour);
$mail_informs = $this->emailsend_model->getSendMailInfo($day);
if(!empty($mail_informs)){
function calculate_string($mathString) {
$mathString = trim($mathString);
$mathString = preg_replace('/[^0-9.\+\-\*\/\(\)]/', '', $mathString);
$compute = create_function("", "return (". $mathString .");");
return 0 + $compute();
}
foreach($mail_informs as $mail_inform)
{
$message = $mail_inform->subject;
$search_word = array("(氏名)", "(メールアドレス)", "(登録日)");
$mail_date = str_replace("-", '/', $mail_inform->insert_date);
$replace_word = array($mail_inform->user_name, $mail_inform->mail_addr, $mail_date);
$item_informs = $this->emailsend_model->getAllOriginalItemsById($mail_inform->user_plan_detail_id);
foreach($item_informs as $item_inform){
$item_name = "(". $item_inform->item_name . ")";
if($item_inform->data_type==2){
$item_value_date = $item_inform->item_value;
$item_value = str_replace("-", "/", $item_value_date);
}
else if($item_inform->data_type==1){
$item_value = $item_inform->item_value;
$item_name = str_replace(str_split('()'), '', $item_name);
}
else if($item_inform->data_type==0){
$item_value = $item_inform->item_value;
}
array_push($search_word, $item_name);
array_push($replace_word, $item_value);
}
$result_message = str_replace($search_word, $replace_word, $message);
preg_match_all("/\(([^)]*)\)/", $result_message, $matches);
$search_matches = $matches[0];
$cal_arr = $matches[1];
$cal_count = count($cal_arr);
$replace_matches = array();
for($i=0;$i<$cal_count;$i++)
{
$cal_val = calculate_string($cal_arr["$i"]);
array_push($replace_matches, $cal_val);
}
$final_message = str_replace($search_matches, $replace_matches, $result_message);
$this->email->set_newline("\r\n");
$this->email->from( $mail_setting->sender_mail_addr);
$this->email->to($mail_inform->mail_addr);
$this->email->subject(mb_convert_encoding($mail_inform->title, "UTF-8"));
$this->email->message(mb_convert_encoding($final_message, "UTF-8"));
$path = __DIR__;
$file = $path . '/../../uploads/'.$mail_inform->tpl_id.'/'.$mail_inform->file_attachment;
if(!empty($mail_inform->file_attachment)) {
$this->email->attach($file);
}
$r=#$this->email->send();
if (!$r) {
?>
<script type="text/javascript">
alert("Send Failed");
</script>
<?php
show_error($this->email->print_debugger());
}
else{
?>
<script type="text/javascript">
alert("Send Successfully");
</script>
<?php
echo $this->email->print_debugger();
//show_error($this->email->print_debugger());
}
/*if($r) {
$status = 2; // 送信済み
$id = $mail_inform->user_plan_detail_id;
$this->emailsend_model->setStatus($id, $status);
?>
<script type="text/javascript">
alert("Send Successfully");
</script>
<?php
}
else {
$status = 1; // 送信失敗
$id = $mail_inform->user_plan_detail_id;
$this->emailsend_model->setStatus($id, $status);
?>
<script type="text/javascript">
alert("Send Failed");
</script>
<?php
show_error($this->email->print_debugger());
}*/
$this->email->clear(TRUE);
}
}
}
}
The other possible solution (outside codeigniter) to consume public api like https://mailjagger.com/api/validate/rajehs#mta5.am0.example.net that would return true or false. And just execute mail sending section once received true.
Update:
Create a php file in your library folder named Genuinemail.php. contents as follows
class Genuinemail {
public function __construct() {
// Do your stuff with $arr
}
/**
* verify email format, dns and banned emails
* #param string $email
* #return mixed bool true if correct / string
*/
public static function check($email)
{
//get the email to check up, clean it
$email = filter_var($email,FILTER_SANITIZE_STRING);
// 1 - check valid email format using RFC 822
if (filter_var($email, FILTER_VALIDATE_EMAIL)===FALSE)
return 'No valid email format';
//get email domain to work in nexts checks
$email_domain = preg_replace('/^[^#]++#/', '', $email);
// 2 - check if its from banned domains.
if (in_array($email_domain,self::get_banned_domains()))
return 'Banned domain '.$email_domain;
// 3 - check DNS for MX records
if ((bool) checkdnsrr($email_domain, 'MX')==FALSE)
return 'DNS MX not found for domain '.$email_domain;
// 4 - wow actually a real email! congrats ;)
return TRUE;
}
/**
* gets the array of not allowed domains for emails, reads from json stores file for 1 week
* #return array
* #see banned domains https://github.com/ivolo/disposable-email-domains/blob/master/index.json
* #return array
*/
private static function get_banned_domains()
{
//where we store the banned domains
$file = 'banned_domains.json';
//if the json file is not in local or the file exists but is older than 1 week, regenerate the json
if (!file_exists($file) OR (file_exists($file) AND filemtime($file) < strtotime('-1 week')) )
{
$banned_domains = file_get_contents("https://rawgit.com/ivolo/disposable-email-domains/master/index.json");
if ($banned_domains !== FALSE)
file_put_contents($file,$banned_domains,LOCK_EX);
}
else//get the domains from the file
$banned_domains = file_get_contents($file);
return json_decode($banned_domains);
}
}
This library can be used like this sample method
function checkSpam($email)
{
$this->load->library('genuinemail');
$check = $this->genuinemail->check($email);
if($check===TRUE) return true;
return false;
}

Zend_mail success message comes but mail not send

guys i have using a script to send mails, all seems fine with it and even i get the success message but sadly the emails are not delivered.. can any body look for any lapses in this code
Code
$body = "This is testmail please ignore";
$mail = new Zend_Mail ();
$tr = new Zend_Mail_Transport_Sendmail ( '-f' . $sentFromEmail );
Zend_Mail::setDefaultTransport ( $tr );
$mail->setReturnPath("user#admin.com");
$mail->setFrom ( "user#admin.com", 'Reporters' );
$mail->setBodyHtml ( $body );
$mail->addTo ( "samjam#gmail.com" );
$mail->setSubject ( "Weekly Report" );
try {
$mail->send ();
echo "Success";
} catch ( Exception $e ) {
echo "Mail sending failed.\n";
}
SMTP configuration
if (isset($config['ssl'])) {
switch (strtolower($config['ssl'])) {
case 'tls':
$this->_secure = 'tls';
break;
case 'ssl':
$this->_transport = 'ssl';
$this->_secure = 'ssl';
if ($port == null) {
$port = 465;
}
break;
}
}
if ($port == null) {
if (($port = ini_get('smtp_port')) == '') {
$port = 25;
}
}
The answer is that samjam#gmail.com is not an email address of any email account that you have access to.
It belongs to a private individual who you do not know.
This is the correct answer.

Yii Mailer doesn't work

I trying to send mail using yii simple mailer ...
I followed the step :
http://www.yiiframework.com/extension/yii-simple-mailer/
And download the extension and put in yii extension folder :
https://github.com/tlikai/YiiMailer
Then put the code to config/main.php:
'mailer' => array(
// for smtp
'class' => 'ext.mailer.SmtpMailer',
'server' => 'theserver',
'port' => '25',
'username' => 'theadmin',
'password' => 'thepassword',
// for php mail
'class' => 'ext.mailer.PhpMailer',
),
Then in my controller I wrote this code to send mail:
$to = 'wahaha#gmail.com';
$subject = 'Hello Mailer';
$content = 'Some content';
Yii::app()->mailer->send($to, $subject, $content);
Then the browser gave me the error :
Property "PhpMailer.server" is not defined.
Did I miss something in my code?
In config/main.php
'Smtpmail'=>array(
'class'=>'ext.smtpmail.PHPMailer',
'Host'=>"localhost",
'Username'=>'thesmile1019#gmail.com',
'Password'=>'wakakaka',
'Mailer'=>'smtp',
'Port'=>25,
'SMTPAuth'=>true,
),
In Component/controller.php
public function mailsend($to,$from,$from_name,$subject,$message)
{
$mail = Yii::app()->Smtpmail;
$mail->SetFrom($from,$from_name);
$mail->Subject = $subject;
$mail->MsgHTML($message);
$mail->AddAddress($to, "");
// Add CC
if(!empty($cc)){
foreach($cc as $email){
$mail->AddCC($email);
}
}
// Add Attchments
if(!empty($attachment)){
foreach($attachment as $attach){
$mail->AddAttachment($attach);
}
}
if(!$mail->Send()) {
return false; // Fail echo "Mailer Error: " . $mail->ErrorInfo;
}else {
return true; // Success
}
}
In controller
public function actionSendMail(){
$token = $_POST['YII_CSRF_TOKEN'];
if ($token !== Yii::app()->getRequest()->getCsrfToken()){
Yii::app()->end();
}
$to = 'thesmile1019#gmail.com';
$from = 'localhost';
$from_name = 'mface';
$subject = 'testing';
$message = 'testing';
if($token == true){
$util = new Utility();
$util->detectMobileBrowser();
$util->checkWebSiteLanguageInCookies();
$this->layout = "masterLayout";
$this->render('mailsend');
$this->mailsend($to,$from,$from_name,$subject,$message);
}else{
print_r("Not Sent");
die();
}
}
Process not problem going correct but didn't receive the mail
Change your port in pathtowebroot/protected/config/main.php
'Smtpmail'=>array(
'class'=>'ext.smtpmail.PHPMailer',
'Host'=>"smtp.gmail.com",
'Username'=>'thesmile1019#gmail.com',
'Password'=>'wakakaka',
'Mailer'=>'smtp',
'Port'=>465,
'SMTPAuth'=>true,
'SMTPSecure' => 'ssl'
),

phpMailer blank page when creating multiple instances of the class

I am creating a function to send a notification email to a user using the phpMailer lib.
public function notify($address,$subject = '',$body = null,$mailer_options = array()) {
try {
$phpmailer = new PHPMailer($exceptions = true);
$phpmailer->CharSet = 'UTF-8';
$phpmailer->IsSMTP();
$phpmailer->SMTPAuth = true;
$phpmailer->SMTPKeepAlive = true;
//$phpmailer->SMTPDebug = true;
$phpmailer->IsHTML(true);
$phpmailer->Host = ...
$phpmailer->Username = ...
$phpmailer->Password = ...
$phpmailer->From = ...
$phpmailer->FromName =...
$phpmailer->AddAddress($address);
$phpmailer->Subject = $subject;
$phpmailer->Body = $body;
$phpmailer->Send();
$phpmailer->ClearAllRecipients();
}
It works fine if i just send an email or sending multiple emails inside the class.
But if do
for($i=0;$i<3;$++)
{
$notification = new $Notification();
$notification->notify(...);
}
It retuns a blank page. No errors, messages, nothing.
Before you ask i have display_errors turned on.
What can it be?
It works fine if i just have one instance of phpmailer like this:
$phpmailer = new PHPMailer($exceptions = true);
(...)
for($i=0;$i<3;$i++)
{
$phpmailer->AddAddress('address');
$phpmailer->Subject = "";
$phpmailer->Body = "sasa";
$phpmailer->Send();
$phpmailer->ClearAllRecipients();
}
Remove the $ from new Notification:
for($i=0;$i<3;$++)
{
$notification = new Notification();
$notification->notify(...);
}
new $Notification will create a new instance from the value of variable $Notification.
That would only work if $Notification really contains "Notification" (assuming your class is named "Notification")
If you've turned display_errors on in your PHP script, but the server has disabled it by default, errors won't be displayed if there is a syntax error in your script.

Categories