[pmwiki-users] Anyone recognize these error messages?

Sandy sandy at onebit.ca
Wed Feb 6 12:32:48 CST 2008


Tegan Dowling wrote:
> On Feb 5, 2008 4:34 PM, Sandy <sandy at onebit.ca> wrote:

> 
>>> Also, I'm assuming this is a basic install with no cookbook? If not try
>>> disabling those to see if there might be some interference.


> Good thought!  I do normally have lots of recipes enabled.  But ...
> no.  After disabling most recipes, I have the config.php shown below,
> and get the new error messages shown below that.

I may be picking at straws here, seeing warning flags which in fact 
signify nothing, suggesting things which rule out things real 
programmers have already ruled out.

Does the wiki actually run? Does it show a skin and/or content with all 
those errors? That might rule some things out.

Not all recipes are of the "include" variety. Some are simply adding or 
changing a variable in config.php.

And, you are in fact still using a recipe:
 > $ScriptUrl = 'http://www.justice4blahblah.com/test';
 > $PubDirUrl = $ScriptUrl.'/pub';

These over-ride the program's default file locations.

Try commenting out those lines and see if anything changes.

> See above in my reply to Dave, and note that all I changed in
> .htaccess was this: "/index.php" to this: "index.php" (seems odd, but
> I lack background to know what the difference would signify).
> 

The difference is very important, especially if you are using CleanURLs 
or one of the security suggestions to move scripts out of the 
publicly-accessible directories. One of those things where, if you 
change one thing, you have to change another one or two things to match. 
(In this case, your host has moved the first thing, so you're stuck 
changing the rest to match.)

/index.php  is off of the ROOT of the website. It's an absolute path, 
and translates to the same file regardless of where on that site you 
start from.

index.php  is a relative path. It starts from the directory you are 
currently in, and looks for index.php .

For example, if you start at
http://mydomain.ca/some/folder/file.html

/file.php  translates to  mydomain.ca/file.php
but
file.php  translates to  mydomain.ca/some/folder/file.php

Different hosts define "root" differently, which adds to the fun. Again, 
the default install is a good place to start experimenting.

Relative paths in PHP are calculated based on the PHP file you start 
with. E.g.,

one/index.php has the line:
   include(two/script.php);

two/script.php has the line:
   include(hi.php);

If you run one/index.php, you will include one/hi.php.

If you run two/script.php, you will include two/script.php.

Yes, there's a reason for this. It makes it easier to write scripts that 
can be moved around. E.g., in a farm field, make the path to the program 
absolute, but $WikiLogo relative. Copy the field, and it still points 
correctly to the program, but to the logo of the field it's in.

So, I suspect a problem with paths. It takes a special sort of brain to 
sort those out. Some here can do it easily, I usually ask them before 
messing around with it myself; it's faster. (I'm the one who commented 
out stuff in .htaccess that I suspected, learned it wasn't causing my 
problem, only to have my host prove that it was!)

Sandy






More information about the pmwiki-users mailing list