Clearing cache from command prompt, deletes files from outside www root

Author Message

Abdallah Mostafa

Sunday 20 February 2011 3:14:36 am

Hello,

A long time ago I made a batch file to clear Ez cahce from command prompt since it's much faster than Admin interface. I was working very well until a couple of weeks ago when it started to delete files from my hard drive outside the Ez folder and even outside the www root.

I think this happened after I re-installed PHP.

This problem happens on Ez version 4.3, PHP 5.2.6.

Guillaume Kulakowski

Sunday 20 February 2011 8:15:43 am

Do you use symbolic link ?

It's for this, since 4.4 you don't launch eZ script with root user

My blog : http://www.llaumgui.com (not in eZ Publish ;-))
eZC on RHEL : http://blog.famillecollet.com/pages/Config-en
eZC on Fedora : just "yum install php-channel-ezc"

Abdallah Mostafa

Monday 21 February 2011 9:54:07 am

I'm on Windows Vista and my batch file looks like this

d:
cd\projects\hu
php bin\php\ezcache.php --clear-all --purge
pause

My Ez installation is 4.3 and this batch file used to work fine until (I think) I re-installed PHP.

Is there something I'm missing in PHP configuration perhaps?

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 05:11:48
Script start
Timing: Jan 18 2025 05:11:48
Module start 'layout'
Timing: Jan 18 2025 05:11:48
Module start 'content'
Timing: Jan 18 2025 05:11:49
Module end 'content'
Timing: Jan 18 2025 05:11:49
Script end

Main resources:

Total runtime1.3192 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 594.4922152.6875
Module start 'layout' 0.00740.0031 747.179739.5156
Module start 'content' 0.01041.3069 786.6953532.3672
Module end 'content' 1.31740.0018 1,319.06258.0938
Script end 1.3192  1,327.1563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.2829160.0002
Check MTime0.00140.1076160.0001
Mysql Total
Database connection0.00070.049410.0007
Mysqli_queries1.259395.4579570.0221
Looping result0.00080.0626550.0000
Template Total1.276696.820.6383
Template load0.00290.217220.0014
Template processing1.273796.551320.6369
Template load and register function0.00020.011510.0002
states
state_id_array0.00160.118010.0016
state_identifier_array0.00140.104420.0007
Override
Cache load0.00210.1629190.0001
Sytem overhead
Fetch class attribute can translate value0.00100.072420.0005
Fetch class attribute name0.00260.193940.0006
XML
Image XML parsing0.00080.056920.0004
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00450.3392170.0003
String conversion0.00000.000840.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
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs