[SPT/CWIS] cwis 1.4.0: can't find includes
Sandro Garoffolo
sandro.garoffolo at unito.it
Mon May 15 05:12:17 CDT 2006
Kucera, Rich ha scritto:
> The problem is include_path in php.ini.
>
> This is the way php.ini is in standard package management installation:
> include_path = "/usr/share/php"
>
> This setting will not allow the relative include mechanisms of CWIS (the
> include paths in CWIS source require statements do not start with either a
> '.' or a '..', therefore they can't use PHP's include semantics regarding
> paths starting with those prefixes).
>
> The solution is either comment it:
> ;include_path = "/usr/share/php" #/usr/share/php is empty anyway
>
> Or add a '.' to the beginning of the include_path, so that relative path
> searches can be done:
> include_path = ".:/usr/share/php"
>
> Restart apache.
>
> CWIS include mechanics depends on the include path setting. I would now
> reinstall CWIS because it may be tainted--part of the install is executed in
> PHP script with the faulty include settings.
>
> Could there be a test in the install scripts to check for this?
>
> -Rich
>
>
> -----Original Message-----
> From: spt-cwis-users-bounces at scout.wisc.edu
> [mailto:spt-cwis-users-bounces at scout.wisc.edu] On Behalf Of Kucera, Rich
> Sent: Monday, April 17, 2006 4:23 PM
> To: SPT / CWIS Users Discussion List
> Subject: [SPT/CWIS] cwis 1.4.0: can't find includes
>
> Hello,
>
> I'm getting the following error from the fresh install of CWIS 1.4.0 using
> PHP 4.4.0:
>
> Warning: main(include/SPT--SPTDatabase.php) [function.main]: failed to open
> stream: No such file or directory in
> /srv/www/htdocs/CWIS/include/SPT--ItemFactory.php on line 29
>
> Fatal error: main() [function.require]: Failed opening required
> 'include/SPT--SPTDatabase.php' (include_path='/usr/share/php') in
> /srv/www/htdocs/CWIS/include/SPT--ItemFactory.php on line 29
>
>
> Looking over the includes in 1.4.0 includes directory, they don't seem to be
> consistently done. Some are begun with " dirname(__FILE__)", a few others
> (including this problem case), just specify the include by "include/").
>
> Grepping for require_once:
>
> freezone:/srv/www/htdocs/CWIS/include # grep require_once *
> SPT--ClassificationFactory.php:require_once(dirname(__FILE__)."/SPT--ItemFact
> ory.php");
> SPT--ClassificationFactory.php:require_once(dirname(__FILE__)."/SPT--Classifi
> cation.php");
> SPT--Classification.php:require_once(dirname(__FILE__)."/SPT--SPTDatabase.php
> ");
> ...
> SPT--ItemFactory.php:require_once("include/SPT--SPTDatabase.php");
> SPT--ItemFactory.php:require_once("include/SPT--Common.php"); # (to
> make sure we have $Session and $User global vars)
>
> Hopefully this is just a PHP or permission setting and not a problem with the
> release.
>
> Thanks,
> -Rich
> _______________________________________________
> SPT-CWIS-Users mailing list
> SPT-CWIS-Users at scout.wisc.edu
> http://scout.wisc.edu/mailman/listinfo/spt-cwis-users
> _______________________________________________
> SPT-CWIS-Users mailing list
> SPT-CWIS-Users at scout.wisc.edu
> http://scout.wisc.edu/mailman/listinfo/spt-cwis-users
>
>
I read your mail a month ago, now i had installed scout portal toolkit
and I had the same problem with the include.
I tried the solution that you proposed but still happen an error with
the metadata tools.
Have someone an advice to solve the problem?
Thanks in advance.
Regards
Sandro Garoffolo
Department of Paediatrics Science
University of Turin
More information about the SPT-CWIS-Users
mailing list