Home

Stefano Mallozzi Professional web developmentStefano Mallozzi Professional web development

Condividi contenuti
  • About me
  • Bookmark
  • Tips and tricks
  • Tutorials
  • Contact me
  • Feed aggregator
Home

Languages

  • Italiano
  • English

Contact me

Tag cloud

connection drupal i18n ics images internet lan network node images photo php seo
More tags

Photo galleries

  • Pictures of Gaeta

Unexpected empty output for regular expressions on PHP 5.2.x

Sat, 28/03/2009 - 01:01 — stefano

Since PHP 5.2.x it may happen to find unexpected empty output on regular expressions (preg_replace, preg_match, etc...) when parsing very long strings. This bug is caused by a restrictive limit of pcre.backtrack_limit directive. The default value is 100000, so it can handle strings up to 100000 characters. It would make more sense to change the limit to a higher value, even 20MB. The same change can be applied to the pcre.recursion_limit directive.

Both directives can be changed in the php.ini file:

pcre.backtrack_limit=20971520
pcre.recursion_limit=20971520

or by ini_set():

ini_set('pcre.backtrack_limit', 20971520);
ini_set('pcre.recursion_limit', 20971520);

Tags:
  • Tips and tricks
  • pcre
  • php
  • regular expressions
»
  • Italiano

Node images: manage images and photogalleries in Drupal

Sat, 24/01/2009 - 02:12 — stefano

The Node images project is a Drupal module to create photogalleries. It allows users to assign images to content and view those images in a gallery. Users may upload images inline in the content creation page, and then manage them in a specific page, to edit the current images or upload new ones.
Here are the main features of this module:

  • Advanced management of uploaded images (upload new images, choose the ones to list, change the visualization order).
  • Inline upload from the content creation page.
  • Ajax photogallery, showing thumbnail of uploaded images, and the current images in a Polaroid format.
  • Advanced upload settings (image size, max number of images per content, md5 file names, selection of content types to which associate images).
  • Fine grained permissions (add images to any content type or only specific ones, edit/delete all images or only own iamges).
  • Internationalization support for images description, through the i18strings module (included in the Internationalization package): image descriptions are available as translatable strings in the translate interface.

Photogallery demo: Pictures of Gaeta

Tags:
  • Drupal
  • development
  • drupal
  • gallery
  • i18n
  • images
  • node images
  • photo
  • php
  • translation
»
  • Italiano
Syndicate content

© Stefano Mallozzi
P.IVA 02155580596
Valid XHTML 1.0 Strict Valid CSS Valid RSS
Powered by Drupal Powered by Apache Powered by MySQL Powered by PHP