Forums / Developer / PHP modules needed fo eZ 3.8.1

PHP modules needed fo eZ 3.8.1

Author Message

Marko Žmak

Moderated by: Nicolas Pastorino

Friday 30 June 2006 10:01:06 am

I'm trying to optimize my server and reduce the amount od loaded modules. So I would like to eliminate all the uneeded modules. Could anyone tell me what modules are really NEEDED for eZ 3.8.1 full functionality?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Kristof Coomans

Friday 07 July 2006 7:04:20 am

Hi Marko

Basically you will need these extensions:
- session
- mysql or pgsql
- gd2 or the ImageMagick program

Optionally, you will want to have these extensions:
- gd2 with FreeType support
- zlib
- mbstring
- exif

If I forgot one, then please post it here.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Łukasz Serwatka

Friday 07 July 2006 7:18:35 am

As optional
-domxml

Remember also load PHP accelerator APC or eAccelerator.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Marko Žmak

Saturday 08 July 2006 6:34:56 am

Thanks for the info. I have further questions... :)

1. What are this optional modules:

- gd2 with FreeType support
- zlib
- mbstring
- exif
-domxml

exactly for? What part of eZ won't work (or will work badly) if I disable them?

2. Are this directives:

'--enable-mbstr-enc-trans'
'--enable-mbregex'

needed fo eZ to work, do they increase eZ performance or they are not needed at all?

3. What directives are needed for domxl? All of these:

'--with-dom'
'--with-dom-xslt'
'--with-dom-exslt'

or I can ommit some of them for better performace? Also, do I need '--with-xml' for domxml to work?

4. For using eZ PDF functionality is '--with-pdflib' directive needed?

5. Which of this directives:

'--enable-gd-native-ttf'
'--with-freetype-dir=/usr'

are needed for gd with freetype?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Vjeran Vlahovic

Sunday 09 July 2006 5:46:58 pm

Hi,
here is one related topic:
http://ez.no/community/forum/setup_design/improving_ez_publish_environment_and_performance

http://www.netgen.hr/eng

Marko Žmak

Tuesday 11 July 2006 6:29:20 am

So, could anyone give some answers about my last 5 questions?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Tuesday 18 July 2006 12:43:05 pm

Does anyone know some details about my 5 subquestions? I'm trying to optimize my server configuration as much as possible, so I would really like to include ONLY those modules that are REALLY needed.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Kristof Coomans

Wednesday 19 July 2006 3:56:09 am

Hello Marko

1.
- gd2 with FreeType support: image manipulation
- zlib: read and write gzip (.gz) compressed files ( http://www.php.net/manual/en/ref.zlib.php )
- mbstring:multibyte specific string functions that help you deal with multibyte encodings, like utf8 http://www.php.net/manual/en/ref.mbstring.php ), multilingual sites will be slightly faster with this enabled
- exif: read meta data of pictures taken from digital cameras ( http://www.php.net/manual/en/ref.exif.php )
- domxml: operate on an XML document with the DOM API ( http://www.php.net/manual/en/ref.domxml.php ), XML processing could be slightly faster but at first sight I doubt it is really used (the $native argument to eZXML::domTree is by default false and must be true to use domxml_open_mem, I couldn't find any other occurence of a domxml function)

2. No idea, so I would leave them with the default values

3. I think --with-dom will suffit

4. --with-pdflib is not needed

5. read http://www.php.net/manual/en/ref.image.php

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Marko Žmak

Wednesday 19 July 2006 6:19:15 am

Thanks for the info Kristof. Here's some disscussion about it...

<i>- gd2 with FreeType support: image manipulation</i>

O.K. gd2 is needed for image manipulation, I know that but what is FreeType for? Is it for embeding custom text in images?

<i>- zlib: read and write gzip (.gz) compressed files (http://www.php.net/manual/en/ref.zlib.php )</ii>

I know what's zlib, but I would like to know if it's used in eZ and what for?

<i>- exif: read meta data of pictures taken from digital cameras ( http://www.php.net/manual/en/ref.exif.php )</i>

Hm... I didn't know eZ could do that...

<i>- domxml: operate on an XML document with the DOM API ( http://www.php.net/manual/en/ref.domxml.php ), XML processing could be slightly faster but at first sight I doubt it is really used (the $native argument to eZXML::domTree is by default false and must be true to use domxml_open_mem, I couldn't find any other occurence of a domxml function)</i>

Could someone from eZ confirm if domxml is really used? And does it improve performance?

<i>3. I think --with-dom will suffit</i>

Could someone from eZ confirm this too?

<i>5. read http://www.php.net/manual/en/ref.image.php</i>

So, as I can see, this is only needed if you want to write custom text on images...

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Łukasz Serwatka

Wednesday 19 July 2006 6:52:20 am

- zlib: read and write gzip (.gz) compressed files (http://www.php.net/manual/en/ref.zlib.php )</ii>

I know what's zlib, but I would like to know if it's used in eZ and what for?

It is used e.g by ezpdf lib, by packages system and compression handlers (ezgzipzlibcompressionhandler and ezgzipshellcompressionhandler)

- domxml: operate on an XML document with the DOM API ( http://www.php.net/manual/en/ref.domxml.php ), XML processing could be slightly faster but at first sight I doubt it is really used (the $native argument to eZXML::domTree is by default false and must be true to use domxml_open_mem, I couldn't find any other occurence of a domxml function)

Could someone from eZ confirm if domxml is really used? And does it improve performance?

Yes it does. It is used by eztstranslator for reading the huge translation file, also by ezxml datatype and image alias handler. You can gain some performance here.

It is also mention on the eZ publish requirements page:
http://ez.no/products/ez_publish/info/requirements_for_ez_publish

3. I think --with-dom will suffit

Could someone from eZ confirm this too?

Yes, it is.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Kristof Coomans

Thursday 20 July 2006 1:42:18 am

Ah, indeed domxml is really used. I didn't have the time to watch into every single file where the domTree function gets called :-)

Maybe it's a good idea to add a non-critical test for domxml in the setup wizard ( enhancement reguest: http://ez.no/bugs/view/8693 )?

O.K. gd2 is needed for image manipulation, I know that but what is FreeType for? Is it for embeding custom text in images?

Yes, it is.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Łukasz Serwatka

Thursday 20 July 2006 2:03:26 am

Maybe it's a good idea to add a non-critical test for domxml in the setup wizard ( enhancement reguest: http://ez.no/bugs/view/8693 )?

Yes it is. Thanks for the report :)

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Marko Žmak

Thursday 20 July 2006 2:46:41 am

I think we need a little summary of this discussion. I have taken some of the most common PHP options and divided them into groups depending on if they are needed by eZ or not (in my opinion).
Some options are still unanswered. If anyone know in which group thoose options belong feel free to suggest it. Or if you have the policy to change this post, move it to appropriate group. Here it is:

-------------------------------------------
Needed:

'--with-mysql=/usr' (or '--with-pgsql=/usr')
'--with-gd' (if you don't have ImageMagic)

-------------------------------------------
Optional:

'--enable-mbstring'
'--enable-mbregex' - only if you use mbstring
'--with-dom'
- for speed improvement

'--enable-gd-native-ttf'
'--with-freetype-dir=/usr'
- for writing custom text in images

'--with-zlib'
- for package handling and template compression

'--enable-exif'
- for extracting meta data of pictures taken from digital cameras

'--with-pgsql=/usr'
- if you want to use postgres rather than mysql

'--with-jpeg-dir=/usr/local'
- if you want eZ to be able to handle JPEG images

'--with-png-dir=/usr'
- if you want eZ to be able to handle PNG images. Note that PNG is only supported in GD versions greater than gd-1.6.

'--with-curl'
- if you want to use ezsoap library

-------------------------------------------
Not needed:

'--enable-ftp'
'--enable-magic-quotes'
'--enable-bcmath'
'--enable-calendar'
'--with-xml'
'--with-pdflib'
'--with-dom-xslt'
'--with-dom-exslt'
'--with-gettext'
'--with-mcrypt'
'--with-mhash'
'--with-xmlrpc'
'--with-zip'

-------------------------------------------
Still unanswered:

'--enable-mbstr-enc-trans'
'--with-ttf'
'--with-xpm-dir=/usr/X11R6'
'--with-swf=/usr/local/flash'

-------------------------------------------
Still under investigation:

'--with-openssl'
'--enable-discard-path'
'--with-pear'
'--enable-sockets'
'--enable-track-vars'
'--enable-versioning'

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Xavier Dutoit

Monday 31 July 2006 7:32:18 am

Hi,

I don't use the gd function but the external imagemagick program (configuration option).

I get slightly better results (rather subjective) and I never had any problem with it, as opposed with gd that on some servers didn't have the gif format enabled.

So I'd say gd isn't mandatory, you can rely on an external pgm.

X+

http://www.sydesy.com

Xavier Dutoit

Monday 31 July 2006 7:37:16 am

Me again,

As for the --with-dom, the behaviour is different than without and albeit faster, I've got more warning messages when trying to put html content like in an xml block. I faced this problem mostly when importing rss feeds, but it did happend with xhtmleditor (sjds or xeditor).

I can't put my hand on the bug report, but it was either with numerical entities eg &192# or with named ones, eg &eactue;

I think it's been fixed on the latest 3.8.

X+

http://www.sydesy.com

Marko Žmak

Wednesday 16 August 2006 1:21:45 am

Some new findings:

'--enable-mbregex' - is needed if you want to use mbstring since eZ uses regex functions (such as ereg) in many places in it's code.

'--enable-mbstr-enc-trans' - I'm not sure about this one. The php documentation (http://au3.php.net/mbstring) says:

<i>
--enable-mbstr-enc-trans : Enable HTTP input character encoding conversion using mbstring conversion engine. If this feature is enabled, HTTP input character encoding may be converted to mbstring.internal_encoding automatically.

Note: As of PHP 4.3.0, the option --enable-mbstr-enc-trans was eliminated and replaced with the runtime setting mbstring.encoding_translation. HTTP input character encoding conversion is enabled when this is set to On (the default is Off).
</i>

What impact on eZ would have disabling this option?

'--with-ttf' - this options enables support for FreeType 1.x. In my opinion, this is not needed if you use '--with-freetype-dir' which enables support for FreeType 2. Am I right?

'--with-jpeg-dir=/usr/local' - needed if you want eZ to be able to handle JPEG images (needed for ImageCreateFromJPEG() function wich is used for eZ image handling)

'--with-png-dir=/usr' - needed if you want eZ to be able to handle PNG images (ImagePNG() function). Note that PNG is only supported in GD versions greater than gd-1.6.

'--with-xpm-dir=/usr/X11R6' - in my opinion this is not needed since eZ doesn't support handling of xpm format (the imagecreatefromxpm() is never used in eZ code). Am I right aobut this? Is this going to change in the future?

'--with-gettext' - not needed since this is used for translating text in PHP based on locale settings, and eZ uses it's own translation system. Right?

'--with-mcrypt' - not needed since mcrypt_*() functions are never used in eZ code.

'--with-mhash' - not needed since mhash_*() functions are never used in eZ code.

'--with-curl' - I think this is needed in ezsoap library. Besides this, it seems that curl_*() functions are only used in "ezstep_site_types.php" and only for testing if curl extension is enabled. Could someone confirm if ezsoap is the only part of eZ that needs curl_*() functions?

'--with-zip' - not needed since neither zip_*() functions nor ZipArchive class are used anywhere in the eZ code

'--with-xmlrpc' - not needed since xmplrpc_*() functions are never used in the eZ code

This is what I got from investigating eZ code and reading PHP docs. Could someone from eZ crew verify this so that it doesn't come that I'm misleading people?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Marko Žmak

Wednesday 16 August 2006 1:30:40 am

Also, I think no swf functions are used in eZ code so '--with-swf=/usr/local/flash' is not need either. Right?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

stelu steluta

Monday 04 June 2007 8:03:37 am

Removed: spam to promote online shop sellings cigarettes.

I'm taking this opportunity to present you some facts about smoking:
http://www.smokefreepartnership.eu

X+

Marco Zinn

Friday 16 October 2009 10:27:56 am

I suggest to remove the "sticky" for this thread. 3.8.1 is outdated.

I also suggest to remove sticky from http://ez.no/developer/forum/developer/sjsd_wysiwyg_editor_based_on_fckeditor_for_ezxmltext and from http://ez.no/developer/forum/developer/sso . Both thread are way too old to be still relevant enough for sticky-ness. Thanks.

Marco
http://www.hyperroad-design.com

Steven E. Bailey

Saturday 18 December 2010 3:59:32 am

Never mind. Somehow I missed that "Inappropriate" button.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com