NYCPHP Meetup

NYPHP.org

[nycphp-talk] apache2/php5 and include ( ) paths

Jon Baer jonbaer at jonbaer.com
Thu Jun 29 07:10:50 EDT 2006


What happens when you add the -C flag to the mix?  From what I recall  
on windows you path is actually set  where your interpreter is setup  
(ie c:/php5/php.exe) so your 'document root' in that case is really  
c:/php5.  I could be wrong, trying running a print_r($_SERVER) from  
your CLI program to see what differences you get.

Are you using PHP via Cygwin?

- Jon

On Jun 28, 2006, at 10:46 PM, Mikhail Ledvich wrote:

> Hi all,
>   Perhaps someone can help me out with a weird error I am  
> experiencing.
> I've installed Apache2, PHP5, MySQL5 on a WindowsXP machine and
> everything works like a charm. Except when I try to use php.exe from
> command line. If I execute a php file from command prompt using the
> php.exe, if the include/require paths are not entirely hardcoded
> (c:\AppServ\www ...) but are dynamically set (../../config.php): it
> throws errors.
>
> Warning: include_once(../../config.php): failed to open stream: No  
> such
> file or directory in c:\AppServ\www\fill_combination.php on line 10
>
> However, if I put the same into the browser, it works, but from local
> command line I get path errors. Any ideas? I am at the end of my wits.
>
> Thanks,
> mikhail
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> New York PHP Conference and Expo 2006
> http://www.nyphpcon.com
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
>




More information about the talk mailing list