Run PHP5 script on eZ setup and running on PHP4

Author Message

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?

Mindaugas Rimgaila

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

Mindaugas Rimgaila

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:22:45
Script start
Timing: Jan 18 2025 19:22:45
Module start 'layout'
Timing: Jan 18 2025 19:22:45
Module start 'content'
Timing: Jan 18 2025 19:22:46
Module end 'content'
Timing: Jan 18 2025 19:22:46
Script end

Main resources:

Total runtime0.7572 sec
Peak memory usage4,096.0000 KB
Database Queries55

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0094 588.0469152.6406
Module start 'layout' 0.00940.0073 740.687539.4766
Module start 'content' 0.01670.7390 780.1641434.9297
Module end 'content' 0.75570.0015 1,215.09388.1250
Script end 0.7571  1,223.2188 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00680.8933160.0004
Check MTime0.00280.3653160.0002
Mysql Total
Database connection0.00190.255410.0019
Mysqli_queries0.701492.6350550.0128
Looping result0.00090.1209530.0000
Template Total0.706693.320.3533
Template load0.00200.264520.0010
Template processing0.704693.059320.3523
Template load and register function0.00020.021810.0002
states
state_id_array0.00150.201310.0015
state_identifier_array0.00110.142520.0005
Override
Cache load0.00170.2185180.0001
Sytem overhead
Fetch class attribute can translate value0.00080.101510.0008
Fetch class attribute name0.00110.147930.0004
XML
Image XML parsing0.00010.015710.0001
class_abstraction
Instantiating content class attribute0.00000.001530.0000
General
dbfile0.00060.0840100.0001
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs