
if ( !defined("XOOPS_MAINFILE_INCLUDED") ) {
define("XOOPS_MAINFILE_INCLUDED",1);
echo ("mainfile.php-1 ");
// XOOPS Physical Path
// Physical path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_ROOT_PATH', '/home/u2/xxxxx/html');
define('XOOPS_ROOT_PATH', '/home/u2/xxxxx/html');
// XOOPS Virtual Path (URL)
// Virtual path to your main XOOPS directory WITHOUT trailing slash
// Example: define('XOOPS_URL', 'http://xxxxx.web.cedant.com');
define('XOOPS_URL', 'http://xxxxx.web.cedant.com');
echo ("mainfile.php-2 ");
define('XOOPS_CHECK_PATH', 0);
die ("2");
// Protect against external scripts execution if safe mode is not enabled
if ( XOOPS_CHECK_PATH && !ini_get('safe_mode') ) {
echo ("mainfile.php-3 ");
die ("3");
if ( XOOPS_CHECK_PATH && !@ini_get('safe_mode') ) {
.
.
.
$added_count = count($added);
xoops_cp_header();
//OpenTable();
if ( $added_count > 0 ) {
$mail_start = !empty($_POST['mail_start']) ? $_POST['mail_start'] : 0;
// $mail_end = ($added_count > ($mail_start + 100)) ? ($mail_start + 100) : $added_count;
$mail_end = ($added_count > ($mail_start + 10)) ? ($mail_start + 10) : $added_count;
$myts =& MyTextSanitizer::getInstance();
$xoopsMailer =& getMailer();
for ( $i = $mail_start; $i < $mail_end; $i++) {
$xoopsMailer->setToUsers($added[$i]);
}
.
.
.
When you are working with IIS, PHP timeout is valid only when it's lower than script timeout defined by IIS.
IIS 5 has a default timeout of 300 seconds. If you need a higher timeout, you also have to change IIS properties. Otherwise, your server will stop your PHP script before it reaches its own timeout.
for ( $i = $mail_start; $i < $mail_end; $i++) {
$xoopsMailer->setToUsers($added[$i]);
}
/**
* Sends mail using the PHP mail() function. Returns bool.
* @access private
* @return bool
*/
function mail_send($header, $body) {
//$to = substr($this->addr_append("To", $this->to), 4, -2);
// Cannot add Bcc's to the $to
$to = $this->to[0][0]; // no extra comma
for($i = 1; $i < count($this->to); $i++)
$to .= sprintf(",%s", $this->to[$i][0]);
if ($this->Sender != "" && PHP_VERSION >= "4.0")
{
$old_from = ini_get("sendmail_from");
ini_set("sendmail_from", $this->Sender);
}
$header=""; ////// This is my work-around
if ($this->Sender != "" && PHP_VERSION >= "4.0.5")
{
// The fifth parameter to mail is only available in PHP >= 4.0.5
$params = sprintf("-oi -f %s", $this->Sender);
$rt = mail($to, $this->encode_header($this->Subject), $body, $header, $params);
}
else
{
$rt = mail($to, $this->encode_header($this->Subject), $body, $header);
}
if (isset($old_from))
ini_set("sendmail_from", $old_from);
if(!$rt)
{
$this->error_handler("Could not instantiate mail()");
return false;
}
return true;
}