chriscloyd Posted January 4, 2007 Share Posted January 4, 2007 this is my create mail class[code]<?phpclass 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 errorWarning: 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 15Cannot create email account. Possible reasons: "fopen" function not allowed on your server, PHP is running in SAFE modeheres my code that calls it[code]<?phpinclude('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 More sharing options...
Jessica Posted January 4, 2007 Share Posted January 4, 2007 Contact your host. Link to comment https://forums.phpfreaks.com/topic/32775-mail-class-and-safe-mode-error/#findComment-152599 Share on other sites More sharing options...
Eugene Posted January 4, 2007 Share Posted January 4, 2007 Go to the url using a test username and passsword, to see if the path exists. Link to comment https://forums.phpfreaks.com/topic/32775-mail-class-and-safe-mode-error/#findComment-152601 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.