Loading...
 
Skip to main content

Edit CSS: memory exhausted in logs when trying to edit style containing @import

Status
Closed
Subject
Edit CSS: memory exhausted in logs when trying to edit style containing @import
Version
1.9.x
2.x
Category
  • Error
Feature
Theme: Look & feel, Styles, CSS, Theme Control Center
Resolution status
Out of Date
Submitted by
luci
Volunteered to solve
luci
Lastmod by
luci
Rating
(0)
Description

When using the Edit CSS feature (-+tiki-edit_css.php+-) to edit simple.css it tries to import styles/lite/lite.css via regexp matching pattern @import found in simple.css

The problem is i have set PHP memory_limit 128M and it still crashes PHP and in my apache error log i see "Memory exhausted" or "-+[Mon Aug 13 12:45:51 2007] [notice] child pid 2421 exit signal Segmentation fault (11)+-"

I did some debugging with dies and i don't get why the following regexp matches twice (there's only one @import in simple.css):

Copy to clipboard
preg_match_all("/@import( |\t)+('|\")(.*)(|\")( |\t)*;/U", $line, $importfiles, PREG_SET_ORDER)


Related to http://dev.tikiwiki.org/tiki-view_tracker_item.php?itemId=1162Question

Importance
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
1305
Created
Monday 13 August, 2007 10:42:45 UTC
by Unknown
LastModif
Wednesday 11 January, 2017 20:19:47 UTC


Show PHP error messages