The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Email creation script not working on local http server

Discussion in 'E-mail Discussions' started by bdigital, Sep 5, 2007.

  1. bdigital

    bdigital Registered

    Joined:
    Sep 5, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi I have a dedicated linux server with exim as email server. I want to create email accounts using php script which uses cpanel to create email accounts. But the problem I m facing is that when I put the php script on the same server it does not create the email accounts but when i put it on some other server then it works.
    So I m confused that whether it is some exim configuration probelm or problem with php or apache configuration as email account creation script is using fopen function. can anyone guide me?

    I checked the configurations ... allow url fopen is enabled and safe mode is disabled but hte script is not working ... seems that it does not open the url. note that when i upload the same script to some other server then it works but dont know y does not it work on the same server.

    here is the script:


    PHP:
    $f fopen ("http://$cpuser:$cppass@$cpdomain:2082/frontend/cpskin/mail/dopasswdpop.html?quota=20&email=$euser&domain=$edomain&password=$epass""r");
      if (!
    $f
        print 
    "0";
      else
        print 
    "1";
    I have supplied all the arguments correctly as it works from my other web server.
     
  2. bdigital

    bdigital Registered

    Joined:
    Sep 5, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    this too not working

    I also tried to create email account through cpanel's addpop script:

    Code:
    /usr/local/cpanel/cpanel-email addpop <email address> <password> <quota in MB> <domain.com>
    it seems to work but and does not give any error but there is no new account actually being created
     
  3. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Monitor your error log while you try running the script. That will tell you exactly what the rejection is or at least enough info to figure it out.

    tail -f /usr/local/apache/logs/error_log | grep php
     
Loading...

Share This Page