XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).
Moderator: General Moderators
Ambush Commander
DevNet Master
Posts: 3698 Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US
Post
by Ambush Commander » Sat Mar 24, 2007 7:10 pm
I have attempted to create a batch file like this:
Code: Select all
php package.php
cd library
rm *.tgz
pear package
However, the batch file always seems to abort after the first line, `php package.php`.
There is a file php.bat in my path that looks like this:
Code: Select all
"C:\php\5.2.0\php.exe" -c "c:\php\ini_dir\cli" %*
Hopefully not the problem.
aaronhall
DevNet Resident
Posts: 1040 Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:
Post
by aaronhall » Sun Mar 25, 2007 8:47 am
Did you need to cd to the 'library' directory before calling package.php?
Ambush Commander
DevNet Master
Posts: 3698 Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US
Post
by Ambush Commander » Sun Mar 25, 2007 1:14 pm
Yeah, otherwise pear complains. It shouldn't be a problem, since I've tried getting rid of everything else and putting an echo Foo! right after the PHP call.
I've also tried explicitly exit(0) and exit(1) in the PHP file.
aaronhall
DevNet Resident
Posts: 1040 Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:
Post
by aaronhall » Sun Mar 25, 2007 1:20 pm
The only things I can think of are checking your log files and just making sure that you are in the same directory that package.php is in before you call the batch file. Also, I assume you are able to call package.php yourself and get back to the command line without error?
Ambush Commander
DevNet Master
Posts: 3698 Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US
Post
by Ambush Commander » Sun Mar 25, 2007 1:25 pm
The only things I can think of are checking your log files
Erm... what logs? This is command line, after all.
you are in the same directory that package.php is in before you call the batch file
Yep, definitely I am. Otherwise, `php package.php` wouldn't work, and it does work.
Also, I assume you are able to call package.php yourself and get back to the command line without error?
Yes.