Page 1 of 1

(SOLVED) UDT PHP include problem

Posted: Thu Apr 09, 2009 11:33 am
by oklahomawebhost
Hello,

On a site I am using a User Defined Tag, that uses PHP include('') to call another CMSMS page and display it as a menu on the site.

This used to work fine, but recently we are no longer able to use PHP Remote includes, (our code was

Code: Select all

include ("http://www.sitename.com/cmsmadesimple/index.php?page=main-menu");
But now we'll have to use local file includes, but I can't seem to get it to work either. has anyone had an luck getting a link to a CMSMS page work work using the local file include?

I've tried

Code: Select all

include ("index.php?page=main-menu");
and a host of other methods including putting the entire file path into it.

Any thoughts?

Re: UDT PHP include problem

Posted: Thu Apr 09, 2009 2:35 pm
by alby
oklahomawebhost wrote:

Code: Select all

include ("index.php?page=main-menu");
You must include file and not url
include url works if you have allow_url_fopen and allow_url_include enabled


Alby

Re: UDT PHP include problem

Posted: Thu Apr 09, 2009 3:05 pm
by oklahomawebhost
How would include file to a page? since it's being called by index.php?

Re: UDT PHP include problem

Posted: Thu Apr 09, 2009 3:35 pm
by Ted
CMSMS really doesn't have an easy way of scripting out it's contents -- it does a lot of reading of HTTP headers and such to determine which content should be displayed.  Remote includes is really the only way you're going to get the desired result.  Beyond that, you're going to have to result to custom scripts and cron jobs to get what you need.

Re: UDT PHP include problem

Posted: Thu Apr 09, 2009 3:46 pm
by oklahomawebhost
I was afraid of that. :(

Thanks,
I think the answer is to move this site to a different server that currently allows PHP Remote Include.