PHP - Conexion Swi-prolog con PHP

 
Vista:

Conexion Swi-prolog con PHP

Publicado por sergio190 (2 intervenciones) el 27/11/2012 01:27:52
Hola Buenas, resulta que tengo la siguiente problemática estoy haciendo una pagina Web en PHP que llama a un archivo Swi-Prolog para procesar la info y luego entregar resultados en pantalla.

El comando que ejecuta la acción es el siguiente:

system("nice -n15 /prolog/bin/ -L128k -G128k -T128k -A128k -f /prolog/spin.pl -g spin,halt")

Donde /prolog/bin/ es donde reside el servidor de SWI-prolog que contiene una copia de las DLL del mismo(hasta el momento no me funciona al parecer aquí tengo el error... lo probé con la ruta donde se instala el SWI-prolog "C:\Program Files\swipl\bin" donde tienen almacenadas las DLL pero nada....),

Y /prolog/spin.pl es donde esta ubicado el archivo prolog que se va a ejecutar. (esta dentro de la carpeta de mi proyecto Web).

También probé agregando en el PATH del Sistema en mi caso windows XP la ruta que corresponde a C:\Program Files\swipl\bin.


Toda la Información la obtuve de esta página : http://www.j-paine.o...g_from_php.html

Ojala alguien me pueda ayudar de antemano muchas gracias

atte.
Sergio S.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

Conexion Swi-prolog con PHP

Publicado por xve (6935 intervenciones) el 27/11/2012 07:53:26
Hola Sergio, que error te produce??
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Conexion Swi-prolog con PHP

Publicado por sergio190 (2 intervenciones) el 27/11/2012 17:05:52
Hola, no me carga el archivo "spin.pl" cuando ejecuto el system, este debería cargar en una tabla un texto aleatorio que ya viene programado dentro del spin.pl
esta es la pagina original :

http://www.j-paine.org/cgi-bin/spin.php


te muestro el scrip de mi pag que es completamente igual al anterior, solo varia en las rutas y es ahi donde posiblemente este el error, creo....

Mi scrip PHP :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<HTML>
<HEAD>
<TITLE>SF story generator </title>
</HEAD>
 
<BODY BGCOLOR=#ffffff>
 
[ <A HREF="/index.html">Jocelyn Ireson-Paine's Home Page</A>
| <A HREF="/spin.html">SF plot-generator source</A>
| <A HREF="/spin_script.html">SF plot-generator PHP script</A>
]
<P>

<CENTER>
<H1>SF plot generator </h1>
</CENTER>

<P>
Reloading this page will randomly generate the plot of a simple
science-fiction story. (There is an
Excel/Excelsior version of this generator at
<A 
HREF="http://www.j-paine.org/excelsior/repository/spin/index.html">www.j-paine.org/excelsior/repository/spin/index.html</A>; 
and
you can also try the
Traveller game at
<A 
HREF="http://www.j-paine.org/cgi-bin/traveller.php">www.j-paine.org/cgi-bin/traveller.php</A>.)
</P>


<P>
<TABLE BORDER>
<TR>
<TD BGCOLOR=#FFCCFF>
<B>
<?php 

 	 system("nice -n15 C:/Archivos de programa/swipl/bin/ -L128k -G128k -T128k -A128k -f /prolog/bin/spin.pl -g spin,halt");
	 	
	 
?> 
</B>
</TD>
</TR>
</TABLE>
</P>

<P>
The program is one I've used in teaching Prolog. Its content is based on
"The Science Fiction Horror Movie Pocket Computer" by Gahan Wilson, from
"The Year's Best Science Fiction No. 5", edited by Harry Harrison and
Brian Aldiss, Sphere, London, 1972. The source is <A
HREF="/spin.html">here</A>; it's running under
<A HREF="http://www.swi-prolog.org/">SWI-Prolog</A> and <A 
HREF="http://www.php.net/">PHP</A>. If you want to know
how to call SWI-Prolog from PHP, you can see
my script <A HREF="/spin_script.html">here</A>.

</P>

<P>
<ADDRESS>31st October 2008</ADDRESS>
<P>

</BODY>
</HTML>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar