PDA

View Full Version : PHP5 Issue


Awjvail
12-10-2007, 10:56 AM
Hi there,

I just moved from a PHP4 server to a PHP5 server and I'm having a small issue a bit of PHP on my page:

the line is:

<?php
include('http://www.mysite.com/forums/view.php?'.$_SERVER['QUERY_STRING']);
?>

Do you see any problems with this?

this is a non-vb page BTW.

Marco van Herwaarden
12-10-2007, 11:03 AM
and the issue is?

nico_swd
12-10-2007, 11:07 AM
Since you're not telling us what the error is, we can only guess.

My guess is that your new php.ini file hasn't enabled allow_url_fopen (http://www.php.net/filesystem#ini.allow-url-include).

Which has nothing to do with PHP 5, by the way.

Is the page you're trying to include on the same host?

Awjvail
12-10-2007, 11:49 AM
Oh yeah duh; forgot to say what the problem was:
nothing is happening.

Originally, when I went to the page, I got this error:

Warning: include() [function.include]: URL file-access is disabled in the server configuration in /home/acctname/public_html/bluelayout/indexphp on line 48

Warning: include(http://www.mysite.com/forums/view.php?) [function.include]: failed to open stream: no suitable wrapper could be found in /home/acctname/public_html/bluelayout/indexphp on line 48

Warning: include() [function.include]: Failed opening 'http://www.mysite.com/forums/view.php?' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/acctname/public_html/bluelayout/indexphp on line 48


So I checked php.ini and made sure allow_url_fopen was enabled, and it was.

Couldn't figure out anything else, so I contacted support and asked if they knew what the problem was. They replied "The error is no longer showing up". I checked index.php; turns out they just commented out the line.

When I uncomment it, the error comes back.


No; the page I'm trying to include is not on the same host - I've not updated my nameservers yet so it's on my old host.


Just as a bit of info: on my old host, the server I was on was very unstable and kept crashing (PHP4) so I asked to be moved to a different server. They moved me to a PHP5 server, and I checked to make sure everything was working fine, and nothing was showing up where it should - no errors or anything. I asked if they could move me to a PHP4 server, and they did, and everything went back to normal.

So.. I'm lost.

--------------- Added 1197319388 at 1197319388 ---------------

By the way: I've tried linking to the page on the new host using the 'live preview url' ; same error.

My host is KnownHost.