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.

WHM plugin header function

Discussion in 'cPanel Developers' started by syslint, Aug 31, 2011.

  1. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I am writing a whm plugin . But the php Header function is not redirecting . I need to redirect to htp://127.0.0.1:8088/ , But the whm server is not redirecting . this script work fine with any webserver that support php. The full code is below,
    ---------
    <?php
    header( 'Location: http://127.0.0.1:8088/' ) ;
    ?>
    ------

    The error whm showing is as follows,
    -----
    Firefox can't establish a connection to the server at 127.0.0.1:8088.
    The site could be temporarily unavailable or too busy. Try again in a few
    moments.
    If you are unable to load any pages, check your computer's network
    connection.
    If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.
    ----------

    So how to bypass this issue. Please advice.
     
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Redirecting a user to localhost:8080 will try to redirect them to port 8080 on their machine.

    In order to do what you are trying, you'll need to redirect them to http://$server_ip:8080
     
  3. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    I figured it out already , And it is fixed :)
     
Loading...

Share This Page