You are here: Re: [PHP] Re: Include wierdness. « PHP « IT news, forums, messages
Re: [PHP] Re: Include wierdness.

Posted by Rob Adams on 03/04/05 19:14

"Jochem Maas" <jochem@iamjochem.com> wrote in message
news:42289656.4070506@iamjochem.com...
> Jason Barnett wrote:
>> Jochem Maas wrote:
>>
>>>Rob Adams wrote:
>>
>> ...
>>
>>>you 100% sure your include_path is '.' ? just asking.
>>>also you mention a /www/lib and a /www/include dir - maybe thats
>>>the problem?
>>>
>>>maybe you can make the problem go away by setting include_path to
>>>'.:/www/include' or '.:/www/lib'
>>
>>
>> This still sounds like the best place to start... check your
>> include_path and see if it includes '.' and/or whatever is the root
>> directory for your tikiwiki installation.
>>
>> <?php var_dump(ini_get('include_path')); ?>
>>
>>>I must say I think its overkill to use file_exists() on files
>>>you are going to require_once() - although no doubt there is a good
>>>reason to do it sometimes :-)
>>
>>
>> Well... I seem to recall there is an optional argument for require_once
>> that searches the include path. You can try using that parameter if you
>> don't know the current working directory (why?).
>
> manual doesn't confirm that - besides most of my code wouldn't work if
> require_once didn't use the include path...
> actually some of my code really doesn't work :-) but when a require fails

:) I know the feeling...

> its often obvious because there is NO output and NO error logged - but
> thats
> just me. anyway I'm sure require_once uses the include_path.

I figured out what the problem was. Learn something new every ... month or
so.
In unix, the include_path is separated by a colon (:), not a semi-colon (;).
My
include_path was set to '.;/path/to/smarty/'. I changed it to
'.:/path/to/smarty/' and
the error went away. Guess I should've read the manual on the configuration
file
as well. :)

Thanks for the help.

-- Rob

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация