1
Shelia
php includes
  • 2005/2/1 23:20

  • Shelia

  • Not too shy to talk

  • Posts: 140

  • Since: 2003/6/22


My webhost has upgraded its servers. The server are load balanced and causing all sorts of problems for their customers.

My XOOPS site has just stopped working and I've been told to get it working again I have to change the way php includes are coded.

Includes like this include "mainfile.php"; will not work! Includes must be http://localhost.domain.com/mainfile.php or the Physical Path/mainfile.php.

Here is my problem..........how many include statement are in my XOOPS site? Would I be forced to examine each and every file in every directory?

Can someone here shed some light on this for me. I'm still waiting for someone on the hosts forum to address my concerns. the url for that forum is http://forums.powweb.com

I would be grateful for any help.

2
DonXoop
Re: php includes

ouch. you might want to run from them. They are apparently dropping (or can't support) the "." search path from the php_include_path config.

One thing to try is to add it to perhaps the mainfile.php. I'll try something on a dev server but the idea is something like:

$path = '.';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
?>

This should append "." to the current search path and allow you to include files in the current directory.

Actually in .htaccess might be better.
Find out the current search path (phpinfo();) and then:

php_value include_path ":."

just an idea, untested.

3
Shelia
Re: php includes
  • 2005/2/2 0:30

  • Shelia

  • Not too shy to talk

  • Posts: 140

  • Since: 2003/6/22


While I appreciate the help.........I am php challenged!

I have no idea what you are talking about I'm not stupid, I have the ability to learn. I've got copy & paste down cold.

I defined my XOOPS_ROOT_PATH why would'nt this work include XOOPS_ROOT_PATH."/include/common.php";?

If I changed to this-
include "http://localhost.domain.com/include/common.php";

Would I have to change every include statement in Xoops?

Login

Who's Online

280 user(s) are online (246 user(s) are browsing Support Forums)


Members: 0


Guests: 280


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits