Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7278

Re: How to run a batch file using PHP?

From "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Newsgroups comp.lang.php
Subject Re: How to run a batch file using PHP?
Date 2012-10-09 12:18 +0200
Organization http://alvaro.es/
Message-ID <k50tm9$s04$1@dont-email.me> (permalink)
References (3 earlier) <timstreater-66EBE3.08561105102012@news.individual.net> <f8e25ffc-9e5e-4e8a-a8eb-74bab60f3554@googlegroups.com> <k4mgmf$vdu$1@speranza.aioe.org> <0e7d688a-57d2-4caf-b8a0-48ecabfe8c48@googlegroups.com> <7f6a560e-5070-49bf-b533-b6e1e1bb92ea@googlegroups.com>

Show all headers | View raw


El 08/10/2012 12:19, Fastian escribió/wrote:
>> My batch file:
>>
>> C:\TeX\miktex\bin\latex.exe "E:\wamp\wamp\www\first-program.tex"
>>
>> C:\TeX\miktex\bin\dvipng.exe "E:\wamp\wamp\www\first-program.dvi"
>>
>>
>>
>> (BTW I have tried with double back slash as well as with forward slash in the path)

Backslash is not a escape character in Windows batch.

>> But when I try to run the same batch file using the following php line of code:
>>
>>   exec('showpreview.bat');
>>
>> the apache error log reports
>>
>> latex.exe: The memory dump file could not be found.

Your error messages seem to be changing along time... This one suggests 
that latex just crashed :-?

> Today I found someone with a similar issue on the following link:
> http://board.phpbuilder.com/showthread.php?10366149-RESOLVED-Executing-an-application-from-PHP
>
> It suggested to use EasyPhp. I tried with it and everything started working as desired. Thanks to Allah(subhanahu watala).
>
> It is working whether you specify the absolute path or relative path. so doesn't seems to be a 'path' related issue.
>
> After reading the thread mentioned above if some one can identify the real issue then it will be really worthy.

If you get a PHP crash then you've hit a bug. And you upgrade/downgrade 
to a PHP version after/before the bug was fixed/introduced it's not 
surprising that the bug is gone. Who compiled that PHP version does not 
look particularly relevant.


-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

How to run a batch file using PHP? Fastian <abdulbasit.fast@gmail.com> - 2012-10-03 21:17 -0700
  Re: How to run a batch file using PHP? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-10-04 09:49 +0200
    Re: How to run a batch file using PHP? Fastian <abdulbasit.fast@gmail.com> - 2012-10-04 22:21 -0700
      Re: How to run a batch file using PHP? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-10-05 09:26 +0200
        Re: How to run a batch file using PHP? Fastian <abdulbasit.fast@gmail.com> - 2012-10-05 00:55 -0700
          Re: How to run a batch file using PHP? Shake <QUITAESTO@QUITAESTO.NOES> - 2012-10-05 10:00 +0200
            Re: How to run a batch file using PHP? Fastian <abdulbasit.fast@gmail.com> - 2012-10-05 04:24 -0700
      Re: How to run a batch file using PHP? Tim Streater <timstreater@greenbee.net> - 2012-10-05 08:56 +0100
        Re: How to run a batch file using PHP? Fastian <abdulbasit.fast@gmail.com> - 2012-10-05 01:00 -0700
          Re: How to run a batch file using PHP? bill <william@TechServSys.com> - 2012-10-05 07:35 -0400
            Re: How to run a batch file using PHP? Fastian <abdulbasit.fast@gmail.com> - 2012-10-07 21:33 -0700
              Re: How to run a batch file using PHP? Fastian <abdulbasit.fast@gmail.com> - 2012-10-08 03:19 -0700
                Re: How to run a batch file using PHP? Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-10-08 15:16 +0200
                Re: How to run a batch file using PHP? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-10-09 12:18 +0200

csiph-web