Forums / Developer / Run PHP5 script on eZ setup and running on PHP4
Mindaugas Rimgaila
Thursday 02 March 2006 6:42:24 am
Hello,i setup my system to run on both PHP4 and PHP5 versions, for PHP5 version file extension must be .php5 now i whant to write operator, which would be parsed by PHP5
Any sugestions?
Thursday 02 March 2006 7:03:48 am
One of this problem solving could be executing external command $res=exec('php5-cgi ./file_to_run.php5')but it's not very flexible, i must form response of PHP5 file that it could be understud by operator script file
So maibe i could write my own operator parser, where could be posible to define which PHP version to use
Saturday 04 March 2006 10:56:21 am
I found the solution:
i simply setup internal page with local IP address, which is parsed via PHP5 and downloading this page via eZ operator
in my local page result is in tags like:
<LocalPHP5Var1><?php echo $var1; ?></LocalPHP5Var1>
and in operator i wrote function getTagContent
this was necesure to use PHP5 for me because in PHP5 you can use multithreaded webpage download. If someone also is interested in multithreaded webpage crawler take a look to http://curl.haxx.se/libcurl/php/examples/multi.html
:) so it seems that i solved this problem by my own