Jump to content

mail class and safe mode error


chriscloyd

Recommended Posts

this is my create mail class
[code]
<?php
class cpmail{
  var $cpuser;
  var $cppass;     
  var $cpdomain;     
  var $cpskin;       
  function cpmail($cpuser,$cppass,$cpdomain,$cpskin='x'){
    $this->cpuser=$cpuser;
    $this->cppass=$cppass;
    $this->cpdomain=$cpdomain;
    $this->cpskin=$cpskin;
  }
  function create($euser,$epass,$equota){
    $path="http://".$this->cpuser.":".$this->cppass."@".$this->cpdomain.":2082/frontend/".$this->cpskin."/mail/doaddpop.html?quota=".$equota."&email=".$euser."&domain=".$this->cpdomain."&password=".$epass;
    $f = fopen($path,"r");
    if (!$f) {
      return('Cannot create email account. Possible reasons: "fopen" function not allowed on your server, PHP is running in SAFE mode');
    }
    while (!feof ($f)) {
      $line = fgets ($f, 1024);
      if (ereg ("already exists!", $line, $out)) {
        return('Such email account already exists.');
      }
    }
    fclose($f);
    return "Email account created.";
}
}

?>
[/code]

im getting this error

Warning: fopen(http://[email protected]:2082/frontend/X v2.6.0/mail/doaddpop.html?quota=20&email=******&domain=******&password=******) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /home/srxstud/public_html/test22/admin/cpmail_class.php on line 15
Cannot create email account. Possible reasons: "fopen" function not allowed on your server, PHP is running in SAFE mode

heres my code that calls it

[code]
<?php
include('cpmail_class.php');
$cpanel = new cpmail("*****","*******","*****","X v2.6.0");
echo cpanel->create($_POST['email'],$_POST['password'],"20");
?>
[/code]

how could i take safe mode off if i dont ahve access to the php.ini
Link to comment
https://forums.phpfreaks.com/topic/32775-mail-class-and-safe-mode-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.