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.

Automating CpanelUser Login with PHP

Discussion in 'General Discussion' started by universal, Jan 6, 2003.

  1. universal

    universal Registered

    Joined:
    Dec 13, 2002
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi every one,

    When I type
    &http://cpanelusername:cpanelpwd@mywebsite.com/cpanel/& as my browser URL, I'm able to login directly w/o the http authentication window.

    But why is that the following PHP header funtion is not working in the same way, the following php page when called is working fine w/o any errors but the cpanel this time is returning with a http authentication window?

    header(&Location: http://cpanelusername:cpanelpwd@mywebsite.com/cpanel/&);


    Any fault in my code ?

    /Universal
     
  2. g3b

    g3b Member

    Joined:
    Sep 7, 2002
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Answer for you

    If you use the port number (2082) instead of the /cpanel/ subdirectory, it should work as you require. e.g.

    header(&Location: http://cpanelusername:cpanelpwd@mywebsite.com:2082/&)

    Let me know if this works better for you.

    Regards,

    Grant
     
  3. Radio_Head

    Radio_Head Well-Known Member

    Joined:
    Feb 15, 2002
    Messages:
    2,051
    Likes Received:
    1
    Trophy Points:
    38
    I had the same problem .It should be a cookie problem perhaps .
    Or perhaps because cpanel use a different php.ini .....
     

Share This Page