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://...@srxstudios.com: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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.