Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    262
    Likes Received:
    6
    Trophy Points:
    168
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. MattDees

    MattDees Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    416
    Likes Received:
    1
    Trophy Points:
    243
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    262
    Likes Received:
    6
    Trophy Points:
    168
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    I figured it out already , And it is fixed :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice