Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: mamasboy on January 03, 2011, 11:36:52 PM

Title: PHP5 - with zlib installed ?
Post by: mamasboy on January 03, 2011, 11:36:52 PM
Hello there,

I need PHP5 to have the zlib added. Is there any easy way to add that?

Thank you!
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on February 16, 2011, 06:04:13 PM
I might have a problem related, this is my phpinfo (http://pastehtml.com/view/1d9lfn8.html) , on my php can not unzip file, i discuss of this here (http://forum.tinycorelinux.net/index.php?topic=8683.msg47321#msg47321).
Title: Re: PHP5 - with zlib installed ?
Post by: gutmensch on February 20, 2011, 07:52:38 AM
try to use apache2-mod-php5 instead of php5, zlib should be enabled there.
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on February 21, 2011, 12:19:14 AM
this implies that I know to use apache, Please tell me where can I find a smart tutorial
Title: Re: PHP5 - with zlib installed ?
Post by: gutmensch on February 21, 2011, 04:35:57 AM
it's quite simple...

1. install apache2-mod-php5 (appbrowser or tce-load), apache2 will be fetched as dep
2. in a terminal run: $ sudo apachectl -k start
3. create test.php within /usr/local/apache2/htdocs/ including phpinfo()
4. browse to http://localhost/test.php

main configuration file for apache2 is /usr/local/apache2/conf/httpd.conf, for php they're in /usr/local/apache2/conf/php5/. add or remove extensions for php in dist.ini file and load appropriate dependencies (mentioned in the file). e.g. for bz2.so extension you need bzip2-lib.tcz.
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on February 21, 2011, 06:55:27 AM
gutmensch:works beautifully, to try to use something easier, I complicated my life for a week in a row, and apache is perfect.
Very thanks!  ;D
Title: Re: PHP5 - with zlib installed ?
Post by: robc on February 21, 2011, 10:38:02 AM
The apache2-mod-php5 is recommended for most users that are using apache + php.  The php5 extension is more of an example and place of reference for those who want to use php-cgi instead of a module.  I recommend creating a custom build of php5 to include only the features that your server needs. This is what I do since it keeps the size of the binary down and reduces the number of deps.

The build script for php5 can be found in the extension source directory.

For more information on php-cgi: http://php.net/manual/en/security.cgi-bin.php (http://php.net/manual/en/security.cgi-bin.php)

Also, I am updating/rebuilding php5 and will make sure all of the default settings are be enabled.
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on February 21, 2011, 06:46:11 PM
Ok, thanks robc  ;)
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on February 28, 2011, 02:50:38 PM
Ok, I have another problem, I begin to think that I'll never have happened.
Everything works, but when I go to log in with the data set during installation of dokuwiki, the login page is reloaded always from scratch and will not let me continue.
I understand that you probably do not know the reason, but I try the same, (I also asked two other forums): I think it has nothing to do with dokuwiki because it worked well with xampp.
This is my php info: http://pastehtml.com/view/1dfiflm.html
Title: Re: PHP5 - with zlib installed ?
Post by: gutmensch on February 28, 2011, 05:36:58 PM
heyho vinnie,

please always take a look into /usr/local/apache2/logs/error_log as PHP errors will appear there. It seems that dokuwiki needs a pcre lib with utf8 support, whilst our pcre.tcz in the repo doesn't support utf8 (at least this is the error I got when trying to run a dokuwiki login here). Though I don't like bundled libs that much, I will try to build php with its built-in pcre lib, which should support utf8 - only a guess but we'll see if it works out ;-)
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on March 01, 2011, 03:44:08 AM
Sorry gut, the fact is that I am really unaware of how it works, but from now on I'll keep it under control.
I try to ask directly to the packager, i send him a private message, I too would prefer a shared library :)
Title: Re: PHP5 - with zlib installed ?
Post by: gutmensch on March 01, 2011, 05:14:31 AM
updated the mod with bundled pcre, dokuwiki login now works for me... let's see what daniel says about pcre + utf8 ;)
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on March 01, 2011, 05:38:00 AM
I contacted Daniel with a pm, hope to respond soon.
Thanks again gutmensch :)
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on March 01, 2011, 10:10:45 AM
Gut, I think you put the same version to the repository, is to wait for the response of the pcre package?
Title: Re: PHP5 - with zlib installed ?
Post by: gutmensch on March 01, 2011, 10:19:59 AM
no, I didn't update the current entry because I cleaned up some error from previous version... the current version is online, I ran tce-update, got it and dokuwiki was running. but you can recheck with ldd mod_php5.so, it shouldn't depend on libpcre.so any longer whereas the old version does.
Title: Re: PHP5 - with zlib installed ?
Post by: danielibarnes on March 01, 2011, 10:49:59 AM
I contacted Daniel with a pm, hope to respond soon.
Thanks again gutmensch :)

Submitted. I updated pcre to 8.12 and added "--enable-unicode-properties" (implies --enabled-utf8)  to the configure parameters:

pcre-8.12 configuration summary:

    Install prefix .................. : /usr/local
    C preprocessor .................. : gcc -E
    C compiler ...................... : gcc
    C++ preprocessor ................ : g++ -E
    C++ compiler .................... : g++
    Linker .......................... : /usr/local/bin/ld
    C preprocessor flags ............ :
    C compiler flags ................ : -march=i486 -mtune=i686 -Os -pipe
    C++ compiler flags .............. : -march=i486 -mtune=i686 -Os -pipe
    Linker flags .................... :
    Extra libraries ................. : -lncurses

    Build C++ library ............... : yes
    Enable UTF-8 support ............ : yes
    Unicode properties .............. : yes
    Newline char/sequence ........... : lf
    \R matches only ANYCRLF ......... : no
    EBCDIC coding ................... : no
    Rebuild char tables ............. : no
    Use stack recursion ............. : yes
    POSIX mem threshold ............. : 10
    Internal link size .............. : 2
    Match limit ..................... : 10000000
    Match limit recursion ........... : MATCH_LIMIT
    Build shared libs ............... : yes
    Build static libs ............... : yes
    Link pcregrep with libz ......... : yes
    Link pcregrep with libbz2 ....... : yes
    Link pcretest with libreadline .. : yes
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on March 01, 2011, 05:31:22 PM
ok! to me the update did not work, then I realized that having a secondary mirror.
I set ibiblio and I could update the two packages and now everything is in full regalia


(http://img703.imageshack.us/img703/813/templ.th.jpg) (http://img703.imageshack.us/img703/813/templ.jpg)
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on May 07, 2012, 07:08:19 AM
I know it's a very old post but I think there might be some relation, I'm trying to run this
http://www.phoronix-test-suite.com (generic package: http://www.phoronix-test-suite.com/download.php?file=phoronix-test-suite-3.8.0 )
It is a benchmark that requires gtk2, xdg-utils and php.
After that I try to start the command phoronix-test-suite gui this is the output:
Code: [Select]
The following PHP extensions are REQUIRED by the Phoronix Test Suite:

ZIP      PHP Zip support is required for file compression and decompression.
...
Title: Re: PHP5 - with zlib installed ?
Post by: gutmensch on May 07, 2012, 08:46:40 AM
Heyho vinnie, time for a PHP update I guess ;-) you are running the php5.tcz extension or the apache2-mod-php5.tcz extension? php needed the switch --enable-zip=shared to include zip support, I think it's available in the mod, but I don't know for php5.tcz. However I'll update the mod since it's been quite some time, but what a shame - my build script is gone, aaawww lovely Monday! If you're encountering the problem with php5.tcz please contact robc :)
Title: Re: PHP5 - with zlib installed ?
Post by: vinnie on May 07, 2012, 07:43:15 PM
Ok, well, first I tried php5, then seeing that it did not work I tried apache2-mod-php5.tcz , however I have not restarted so it might have messed up, I try again in these days and I'll let you know!
Title: Re: PHP5 - with zlib installed ?
Post by: curaga on May 08, 2012, 05:24:09 AM
If you do get PTS working, please share results ;)