Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Dec 2007
    Posts
    70

    Default forcing php script to run with dedicated IP

    Hi there

    In WHM, I created a test account called "test.com" which I assigned a unique IP(ip manager). I also fitted a self-signed certificate to it.

    I have a php script in the account which makes http "GET" requests to a remote website. These requests are still being made from the main shared server IP, instead of from the new dedicated IP.

    I am running SuPHP. The scripts are running as the user (and not "nobody") but the IP is still not dedicated.

    Any thoughts please?

    Cheers
    Dude

  2. #2
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: forcing php script to run with dedicated IP

    The script has to be written to use a different IP, since outgoing traffic will utilize the server's main IP unless the script has been written to use another IP.

    The dedicated IP on an account is used for incoming connections. Now, if a connection has already been established, then a dedicated IP will be used for outgoing connections at that point.

    Both the incoming and outgoing connections must be told which IP to use, which needs to be in the script in question. There isn't any way in Apache or the network to automate this, it has to be in the script that is trying to send the outgoing request.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. Cron Job, Run PHP script
    By bowers01 in forum New User Questions
    Replies: 2
    Last Post: 11-18-2010, 03:23 PM
  2. One PHP script on website won't run
    By knipper in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 02-08-2009, 11:09 AM
  3. Replies: 3
    Last Post: 03-29-2007, 04:31 AM
  4. Issues with php script not run on new server
    By isputra in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 05-12-2006, 12:22 PM
  5. How to make PHP script to run with the user's id?
    By smartinfo in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-21-2002, 02:51 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube