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.

can't include() remote website in php / phtml files

Discussion in 'General Discussion' started by SoftDux, Dec 5, 2007.

  1. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    Hi all

    i have (had) a simple index.phtml script, which I put in "/root/cpanel3-skel/public_html/" that included a welcome page on my server, which I could change as I liked. This worked fine for a long time, but now it doesn't seem to work anymore.

    Here's the script:

    PHP:
    [root@gandalf www]# more /root/cpanel3-skel/public_html/index.phtml
    <center><h2>The Domain <?echo $_SERVER['HTTP_HOST']; ?> has been registered by <a href="http://www.SoftDux.com" target="_blank">SoftDux</a></h2></center><B
    R><BR>
    <?
    include_once("http://park.mydomain.com");
    ?>

    The problem is, it doesn't include the http://park.mydomain.com domain anymore.

    If I add the following lines to it, I get the desired output though:
    PHP:
    <?
    echo 
    "test foo";
    ?>

    I'm running Apache 2.0.61 & PHP 5.2.4
    Any suggestions?
     
  2. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    With the PHP.ini ensure that url fopen is enabled.

    I've had the same problem after I installed Zend Optimisation, regardless of what was in php.ini I could not include() from a remote source. Not sure if it's related. Is that a zend feature? /shrug.
     
  3. hbidad

    hbidad Well-Known Member

    Joined:
    Apr 16, 2005
    Messages:
    74
    Likes Received:
    1
    Trophy Points:
    8
    I bet it is suhosin...

    try searching the logs

    grep suhosin /var/log/messages

    If you see something like "urlhere" is an URL that is not allowed

    try adding the following line to your php.ini and restart apache

    suhosin.executor.include.whitelist=http://park.mydomain.com
     
    #3 hbidad, Dec 10, 2007
    Last edited: Dec 10, 2007
  4. EWD

    EWD Well-Known Member
    PartnerNOC

    Joined:
    Aug 19, 2003
    Messages:
    165
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    NY
    I was having this issue with zend 3.3.0 and php 4.4.7

    Reverting to zend 3.2.2 solved the issue.
     
  5. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    As we discovered in another post. That's awesome. I'm going to downgrade later tonight my version that's running on php4 - leave php5 with the latest zend.

    Cheers for confirming.
     
Loading...

Share This Page