Results 1 to 5 of 5

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

  1. #1
    Member
    Join Date
    May 2006
    Location
    Johannesburg, South Africa
    Posts
    976
    cPanel/WHM Access Level

    Root Administrator

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

    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 Code:
    [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 Code:
    <?
    echo "test foo";
    ?>

    I'm running Apache 2.0.61 & PHP 5.2.4
    [root@gandalf www]# httpd -v; php -v
    Server version: Apache/2.0.61
    Server built: Sep 25 2007 17:59:50
    Cpanel::Easy::Apache v3.2.0 rev2434
    PHP 5.2.4 (cli) (built: Sep 25 2007 18:11:47)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
    with Suhosin v0.9.20, Copyright (c) 2002-2006, by Hardened-PHP Project
    with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
    Any suggestions?
    • cPanel :: Fantastico :: RVSkin :: WHM :: ModernBill
    • Reseller Hosting :: SSL Certificates :: Domain Registrations :: Affiliate Program
    • Blog Hosting :: CMS Hosting :: Forum Hosting :: E-Commerce Hosting

    SoftDux- The Leaders in Software
    Use the coupon: cpanel-06 to get 20% off our packages

  2. #2
    Member darren.nolan's Avatar
    Join Date
    Oct 2007
    Posts
    259

    Default

    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. #3
    Member
    Join Date
    Apr 2005
    Posts
    74

    Default

    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
    Last edited by hbidad; 12-10-2007 at 01:39 AM.

  4. #4
    EWD
    EWD is offline
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Aug 2003
    Location
    NY
    Posts
    167

    Default

    I was having this issue with zend 3.3.0 and php 4.4.7

    Reverting to zend 3.2.2 solved the issue.
    Emerson

  5. #5
    Member darren.nolan's Avatar
    Join Date
    Oct 2007
    Posts
    259

    Default

    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.

Similar Threads

  1. Include custom language files in theme
    By sc00zy in forum Themes and Branding
    Replies: 2
    Last Post: 02-18-2010, 06:44 AM
  2. httpd.conf Include Files Not Working
    By gldickens3 in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 10-08-2008, 12:46 AM
  3. Where to place httpd.conf VirtualHost include files
    By Netmaking in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 08-13-2008, 05:36 AM
  4. SECURITY ISSUE: phpCoin Remote File Include Vuln
    By cmeisinger in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 08-26-2006, 05:10 PM
  5. Exim editor does not recognize .include files?
    By jackie46 in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 05-24-2006, 01:02 PM