You are here: Re: Excecute PHP script in SSL protected dir / sched. task on win 2k3 server « All PHP « IT news, forums, messages
Re: Excecute PHP script in SSL protected dir / sched. task on win 2k3 server

Posted by J.O. Aho on 01/11/06 16:29

Marcel wrote:

> I fact there's nothing that requires a webbrowser for my script.... it seems
> that the problem is/are the files i include in the script with
> require_once() .........but i do not know why....

Okey, I guess it's the paths that may cause your problem (guessing here as you
haven't told what kind of trouble you get).

When you do a cli execution of php, then all paths are counted from the place
where you are, not where the script is located.

Wehn running a batch file from the scheduler, I think the path will be wither
C:\ or C:\Windows (or where you now did install it).

We assume you include the file
C:\apache\localhost\htdocs\includes\myinclude.php in your yourscript.php with

require_once('includes\myinclude.php');


This makes php (cli executed) to try to include C:\includes\myinclude.php
and not the C:\apache\localhost\htdocs\includes\myinclude.php which you want
to include. The best option is to use absolute paths, then the script will
work both in the web environment and in the cli environment.


//Aho

 

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

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