You are here: Re: CLI environment « PHP Programming Language « IT news, forums, messages
Re: CLI environment

Posted by Schraalhans Keukenmeester on 05/18/07 20:59

At Fri, 18 May 2007 11:51:24 -0500, Steve let his monkeys type:

> i'm trying to re-use scripts, typically called via a browser, in the php
> cli. the cli calls are made through cron jobs. i'm hitting some unknowns as
> to path info. here's the error i'm getting thus far:
>
> "PHP Warning: require_once(../../../../../../site.cfg.php): failed to open
> stream: No such file or directory in
> /var/www/html/dev/admin/cli/import.repair.orders.cli.php on line 5"
>

Not surprising PHP can't find it seeing the file is searched 6 dir
levels up (probably your system root I'd say)

Perhaps you'd better opt for full paths instead of relative, in that case
it doesn't matter what the cwd is during execution of your script.

Opinions differ however on what's best practice, relative or absolute.
Sh.

 

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

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