Re: How to run a batch file using PHP? [message #179328 is a reply to message #179327] |
Fri, 05 October 2012 08:00 |
Fastian
Messages: 20 Registered: June 2012
Karma:
|
Junior Member |
|
|
On Friday, October 5, 2012 12:56:13 PM UTC+5, Tim Streater wrote:
> In article <764ff07b-1bf1-45a6-9479-85e163b5712f(at)googlegroups(dot)com>,
>
> Fastian <abdulbasit(dot)fast(at)gmail(dot)com> wrote:
>
>
>
>> To be precise, my batch file named show-preview.bat consist of only two
>
>> commands:
>
>> latex first-program.tex
>
>> dvipng first-program.dvi
>
>>
>
>> When I run show-preview.bat from cmd then they run successfully and I obtain
>
>> the desired result.
>
>> But when I use exec('show-preview.bat'); I am finding the following error in
>
>> apache_error_log:
>
>> 'latex' is not recognized as an internal or external command, operable
>
>> program or batch file.
>
>> 'dvipng' is not recognized as an internal or external command, operable
>
>> program or batch file.
>
>>
>
>> Whereas both of these commands are working fine from the command
>
>> prompt........ what you say?
>
>>
>
>> I also tried to pass the absolute path of the bat file within exec() but it
>
>> also do not work. Any idea?
>
>
>
> Don't you need the absolute paths of latex etc within the batch file?
>
>
>
> --
>
> Tim
>
>
>
> "That excessive bail ought not to be required, nor excessive fines imposed,
>
> nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
I have also tried with the absolute path of the latex but no success.
|
|
|