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

SoftDux

Well-Known Member
May 27, 2006
1,023
5
168
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:
[[email protected] 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
[[email protected] 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?
 

darren.nolan

Well-Known Member
Oct 4, 2007
257
0
66
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.
 

hbidad

Well-Known Member
Apr 16, 2005
74
1
158
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:

EWD

Well-Known Member
PartnerNOC
Aug 19, 2003
165
0
166
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.
 

darren.nolan

Well-Known Member
Oct 4, 2007
257
0
66
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.