[PHP] About exec function

2007-03-13 Thread Pablo Luque
Hello, I'm designing a website with php and the critical point of the design 
is to execute a program in the server, so after execution is finished, 
server will show the client some data and info.
The program is called pspice, which analizes electronic circuits, works in 
msdos and in order to call him you need to write in the command the input 
file (which is created before we call the program) and the output file, 
which can have the same name as the input file, since they have a different 
extension. If everything works correctly after the execution of the proper 
command, a .out (the output file written in the command) file should be 
created with the data the server would later provide to the client.

I have got to execute the program using the line:

exec('c:\WINDOWS\\SYSTEM32\\cmd.exe /c start c:\\PHP\\PSPICE\\pspice1.exe 
ej1 ej1')


The problem I have is that the execution never ends. The cmd window with the 
execution of the program appears and never ends, just keep simulating (and 
the execution should be over in less than a second). The .out file is 
created but it is empty. How can I make the execution of the program stop 
and continue executing the rest of the code of my php file?


Thanks!

_
Descubre la descarga digital con MSN Music. Más de un millón de canciones. 
http://music.msn.es/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] problem with string & floats in PHP

2007-05-15 Thread Pablo Luque
Hello, Im designing a website in which I have to read some data (numbers) 
from a txt file and then send this data to a function which prints a graphic 
with them. When I read the data I save it in an array and the numbers are in 
this format: 5.812E-08. I have read the php documentation about it, and I 
have use the example given there to check which type is the data saved in 
the array. The response I got is

$vectorIc[1]== 5.812E-08 type is string

I dont understand why. In the documentation it is clear that this kind of 
data should be considerer float, or thats what I understood. I cant continue 
with my web designing if I dont get to turn the vector elements into float 
numbers, because the function that prints the graphic gives errors when 
recieving strings. I would be very thankful if you could help me trying to 
solve this. In using PHP 4.4.7 and Apache 2.0.59.


Thank you very much!

_
Descubre la descarga digital con MSN Music. Más de un millón de canciones. 
http://music.msn.es/


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php