Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 56963 - php5 ebuild request
Summary: php5 ebuild request
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
: 32563 57101 (view as bug list)
Depends on: 53886 55457 56917 57048 57074 57101 57167 57180 57184 57336 57572 57864 57875 57877 58479
Blocks:
  Show dependency tree
 
Reported: 2004-07-13 16:19 UTC by Chris Kloosterman
Modified: 2005-01-04 13:45 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mod_php 5.0.0-r1 ebuild (mod_php-5.0.0-r1.ebuild,3.93 KB, text/plain)
2004-07-13 16:19 UTC, Chris Kloosterman
Details
php-5.0.0 ebuild (php-5.0.0-r1.ebuild,521 bytes, application/octet-stream)
2004-07-13 16:20 UTC, Chris Kloosterman
Details
php-5.0.0-r1 ebuild (php-5.0.0-r1.ebuild,521 bytes, text/plain)
2004-07-13 16:22 UTC, Chris Kloosterman
Details
/etc/apache2/conf/modules.d/70_mod_php.conf (70_mod_php.conf,2.66 KB, text/plain)
2004-07-13 16:25 UTC, Chris Kloosterman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Kloosterman 2004-07-13 16:19:10 UTC
PHP5 has been released, and the ebuild should be updated.  I have successfully emerged PHP5 and will post ebuilds and changes I had to make momentarily.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Chris Kloosterman 2004-07-13 16:19:51 UTC
Created attachment 35349 [details]
mod_php 5.0.0-r1 ebuild
Comment 2 Chris Kloosterman 2004-07-13 16:20:15 UTC
Created attachment 35350 [details]
php-5.0.0 ebuild
Comment 3 Chris Kloosterman 2004-07-13 16:22:12 UTC
Created attachment 35351 [details]
php-5.0.0-r1 ebuild
Comment 4 Chris Kloosterman 2004-07-13 16:22:31 UTC
Comment on attachment 35350 [details]
php-5.0.0 ebuild

oops
Comment 5 Chris Kloosterman 2004-07-13 16:25:35 UTC
Created attachment 35352 [details]
/etc/apache2/conf/modules.d/70_mod_php.conf
Comment 6 Chris Kloosterman 2004-07-13 16:26:49 UTC
I also had to:

- put php5_soap_persistence_session.diff in the files path of both ebuilds (using portage overlay)
- Add "-gdbm" to my use flags (or add dba)
- Add an "IfDefine PHP5" section to 70_mod_conf.php (see attachment)
- Remove the package.mask entry for php-5.0.0
Comment 7 Michael Glauche (RETIRED) gentoo-dev 2004-07-14 02:03:59 UTC
I think this is a dupblicate of bug #32563 
Comment 8 Myles Grant 2004-07-14 10:48:09 UTC
So where do I get php5_soap_persistence_session.diff from?
Comment 9 Chris Kloosterman 2004-07-14 10:58:02 UTC
/usr/portage/dev-php/mod_php/files/php5_soap_persistence_session.diff

It's needed for php-5.0.0-r1 too.
Comment 10 Myles Grant 2004-07-14 13:30:28 UTC
ok, with the new mod_php.conf and -D PHP5 set, mod_php no longer reads /etc/php/apache2-php4/php.ini (as expected, I suppose).  But there is no /etc/php/apache2-php5/.  And creating one doesn't get php to read it.  Where does php5 expect php.ini to be now?
Comment 11 Chris Kloosterman 2004-07-14 13:50:30 UTC
From phpinfo():

Configuration File (php.ini) Path 	/etc/php/apache2-php5/php.ini

I found this in the .sapi file:

 my_conf="${my_conf} --with-config-file-path=/etc/php/${PHPSAPI}-php5/php.ini"

Of course, that path and file don't exist, so it's using the php defaults.
Comment 12 Myles Grant 2004-07-14 14:08:07 UTC
No dice.

phpinfo() says: "'./configure' '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--with-apxs2=/usr/sbin/apxs2' '--with-config-file-path=/etc/php/apache2-php5/php.ini' '--disable-bcmath' '--with-bz2' '--disable-calendar' '--without-cpdflib' '--disable-ctype' '--with-curl' '--with-curlwrappers' '--disable-dbase' '--enable-dbx' '--enable-dio' '--disable-exif' '--without-fam' '--without-fbsql' '--without-fdftk' '--disable-filepro' '--disable-ftp' '--with-gettext' '--without-gmp' '--without-hwapi' '--with-iconv' '--without-informix' '--without-ingres' '--without-interbase' '--enable-mbstring' '--with-mcrypt' '--without-mcve' '--without-mhash' '--without-ming' '--without-mnogosearch' '--without-msql' '--without-mssql' '--with-ncurses' '--without-oci8' '--without-oracle' '--with-openssl' '--without-ovrimos' '--without-pcre-regx' '--without-pfpro' '--without-pgsql' '--disable-posix' '--with-pspell' '--without-recode' '--without-snmp' '--with-soap' '--enable-sockets' '--without-sybase' '--without-sybase-ct' '--enable-sysvmsg' '--enable-sysvsem' '--enable-sysvshm' '--with-tidy' '--disable-wddx' '--with-xsl' '--with-xmlrpc' '--disable-yp' '--with-zlib' '--without-cdb' '--with-db4' '--without-dbm' '--without-flatfile' '--with-gdbm' '--without-inifile' '--without-ndbm' '--without-qdbm' '--with-gd' '--enable-gd-jis-conf' '--enable-gd-native-ttf' '--with-imap' '--without-kerberos' '--with-imap-ssl' '--with-ldap' '--with-ldap-sasl' '--with-mysql' '--without-mm' '--without-msession' '--enable-sqlite-utf8' '--enable-dba' '--without-readline' '--without-libedit'"

And "Configuration File (php.ini) Path 	/etc/php/apache2-php5/php.ini "

Created /etc/php/apache2-php5/php.ini (by copying /etc/php/apache2-php4/php.ini), and restarted Apache.  But phpinfo() says: "include_path: .:/usr/lib/php" for both Local and Master, even though /etc/php/apache2-php5/php.ini says "include_path = ".:/usr/lib/php:/htdocs/resources/global-config:/htdocs/resources/config:/htdocs/resources""

Numerous other values are customized in php.ini, but phpinfo() doesn't show them.

I'm obviously missing something.  Regardless, I think the ebuild should create this php.ini file in the new location.

Also, when I had tidy set in my USE flags, compilation would fail.  If I emerged tidy, it would work, of course.  The ebuild doesn't appear to calculate that as a dependency correctly.  I eventually had to have USE="-readline -snmp -odbc" set to compile, for the same reason.
Comment 13 Stuart Herbert (RETIRED) gentoo-dev 2004-07-14 15:11:38 UTC
Nice to read that people are trying out the ebuilds :)

Earlier in the day, I bumped both php-5.0.0 and mod_php-5.0.0 to use PHP5-final rather than RC3.  The missing SOAP patch is no longer missing.

I've just finished sorting out most of the dependencies for PHP 5, and the builds now create and install the php.ini file for you.  I've also added some additional checks for USE flag combinations that aren't valid.  

These changes should be appearing on your local rsync mirror in about an hour.

Apart from mistakes in the eclass, AFAIK the only things left to sort out are ODBC support (about time I learned about it anyhow) and Kerberos.

Please emerge sync, and re-emerge these ebuilds to test.

Best regards,
Stu
Comment 14 Myles Grant 2004-07-14 15:50:19 UTC
Stu,

I have the same problem with your mod_php ebuild.  Also, your 70_mod_php5.conf has extramodules/libphp5.so but after emerging your ebuild, libphp5.so is actually in modules, not extramodules.
Comment 15 Stuart Herbert (RETIRED) gentoo-dev 2004-07-14 16:24:49 UTC
Hi Miles,

Er, please be more specific.  There's quite a few problems listed in here :)

I'll look at the apache conf file in the morning, and get that sorted out.

Best regards,
Stu
Comment 16 Myles Grant 2004-07-14 18:14:12 UTC
Sorry, Stu.  My problem is that php is clearly compiled to use /etc/php/apache2-php5/php.ini as the php.ini location.  However, directives I put in that file (like include_path), don't take effect.  phpinfo() shows this.
Comment 17 Stuart Herbert (RETIRED) gentoo-dev 2004-07-14 22:32:51 UTC
Miles,

Okay, that was *probably* caused by a bug in the eclass, and should have been fixed along with last night's work.  If you emerge sync, rebuild php 5, it should work for you.

Best regards,
Stu
Comment 18 Stuart Herbert (RETIRED) gentoo-dev 2004-07-14 22:33:19 UTC
*** Bug 57101 has been marked as a duplicate of this bug. ***
Comment 19 Noah Pritikin 2004-07-15 00:18:13 UTC
please note this from php 5 ./configure help:

"--with-config-file-path=PATH"

description: "Sets the path in which to look for php.ini, defaults to PREFIX/lib"

this is the PATH, meaning the **folder** where php.ini is found. So instead of PATH=/etc/php/apache2-php5/php.ini, it needs to be PATH=/etc/php/apache2-php5/ if you want to use that directory.

-Noah
Comment 20 Stuart Herbert (RETIRED) gentoo-dev 2004-07-15 05:54:59 UTC
Yup, and that's what it was changed to yesterday :)

Please - and this is a general request, not just for bugs about our PHP 5 support: don't post or comment on a bug unless you're sure you have the latest ebuilds and eclasses.  Saves everyone lots of time and trouble, and helps us provide a better service to you.

Many thanks,
Stu
Comment 21 Myles Grant 2004-07-15 08:23:32 UTC
Sorry.  I did an emerge sync right after your comment at 15:11 PST, and sure enough, the php5 ebuilds showed up in the tree.  So I deleted the ebuilds I downloaded from this bug, and emerged the new ones.  Not much else I can do to make sure I have the latest ebuilds and eclasses.

I'll re-sync, re-build, and let you know how it goes.  Thanks.
Comment 22 Stuart Herbert (RETIRED) gentoo-dev 2004-07-15 09:49:54 UTC
Hi Myles,

It takes about an hour for changes made to CVS to reach the rsync mirrors; sometimes longer if the mirrors are having a bad day.  It seems that you emerge sync'd before the hour was up.

Best regards,
Stu
Comment 23 Stuart Herbert (RETIRED) gentoo-dev 2004-07-16 07:47:56 UTC
Everyone who's having problems getting mod_php5 to run ... which version of Apache are you using?  The stuff in Portage works fine for me w/ Apache 2 ...

I've committed a new config file which hopefully will fix things for Apache 1 users.  Let me know how you get on please.

Thanks
Stu
Comment 24 Noah Pritikin 2004-07-17 14:13:30 UTC
Stu--

I have another question concerning jpeg (with gd) support... I had looked through the forums and searched bugzilla but didn't find anything on the topic.  In php 4.*, there was a 'jpeg' USE flag to enable/disable this feature.  In the php5 ebuilds, this use flag is not there according to `emerge -pv /usr/portage/dev-php/php/php-5.0.0.ebuild`.  Thoughts on this? I need jpeg support, so is this another bug that should be opened?

Thanks,
Noah
Comment 25 Stuart Herbert (RETIRED) gentoo-dev 2004-07-19 05:48:33 UTC
*** Bug 32563 has been marked as a duplicate of this bug. ***
Comment 26 ftl 2004-07-20 15:28:23 UTC
i made some changes in my ebuild:

--- php5-sapi.eclass.bak        2004-07-20 19:08:56.703470432 +0200
+++ php5-sapi.eclass    2004-07-20 20:09:55.480251816 +0200
@@ -25,3 +25,3 @@
 S="${WORKDIR}/${MY_P}"
-IUSE="${IUSE} adabas bcmath birdstep bzlib calendar cpdflib crypt ctype curl curlwrappers db2 dbase dbmaker dbx dio esoob exif fam frontbase fdftk filepro ftp gmp hyperwave-api iconv informix ingres interbase iodbc libedit mcve mhash ming mnogosearch msession msql mssql mysql ncurses nls nis oci8 oracle7 ssl ovrimos pcre pfpro postgres posix readline recode sapdb session shared simplexml snmp soap sockets solid spell spl ssl sybase sybase-ct sysvipc tidy tokenizer truetype odbc wddx xsl xml2 xmlrpc zlib dba cdb berkdb flatfile gdbm inifile qdbm empress empress-bcs gd gd-external imap kerberos ssl ldap sasl pcntl sqlite"
+IUSE="${IUSE} adabas bcmath birdstep bzlib calendar cpdflib crypt ctype curl curlwrappers db2 dbase dbmaker dbx dio esoob exif fam frontbase fdftk filepro ftp gmp hyperwave-api iconv informix ingres interbase iodbc libedit mcve memlimit mhash ming mnogosearch msession msql mssql mysql ncurses nls nis oci8 oracle7 ssl ovrimos pcre pfpro postgres posix readline recode sapdb session shared simplexml snmp soap sockets solid spell spl ssl sybase sybase-ct sysvipc tidy tokenizer truetype odbc wddx xsl xml2 xmlrpc zlib dba cdb berkdb flatfile gdbm inifile qdbm empress empress-bcs gd gd-external imap kerberos ssl ldap sasl pcntl sqlite"

@@ -39,3 +39,2 @@
        gmp? ( dev-libs/gmp )
-       iconv? ( dev-libs/libiconv )
        imap? ( virtual/imapd )
@@ -160,7 +159,2 @@

-       case "$PHPSAPI" in
-               cli|cgi)
-                       enable_extension_with "pcntl" "pcntl" 1 ;;
-       esac
-
        confutils_use_conflict "readline" "libedit"
@@ -300,2 +294,3 @@
        enable_extension_with           "mcve"                  "mcve"                  1
+       enable_extension_enable         "memory-limit"          "memlimit"              0
        enable_extension_with           "mhash"                 "mhash"                 1
@@ -311,2 +306,3 @@
        enable_extension_without        "pcre-regx"             "pcre"                  1
+       enable_extension_enable         "pcntl"                 "pcntl"                 1
        enable_extension_with           "pfpro"                 "pfpro"                 1



pcntl:
1. enable_extension_with -> enable_extension_enable
2. i know that pcntl shouldn't be enabled within a webserver environment, but emerging mod_php also builds the cli version and i need pcntl to be enabled in that. it might be reasonable to force --disable-cli in the mod_php ebuild and make users emerge php for the cli. this method would result in two independent php.ini files for the apache modul and the cli - it sounds good to me... but it wouldn't be comfortable.
see also this bugreport: http://bugs.gentoo.org/show_bug.cgi?id=22735

iconv:
from the php manual: "You will need nothing if the system you are using is one of the recent POSIX-compliant systems because standard C libraries that are supplied in them must provide iconv facility."
http://bugs.gentoo.org/show_bug.cgi?id=57244

just my two cents
Comment 27 Stuart Herbert (RETIRED) gentoo-dev 2004-07-21 03:57:50 UTC
ftl,

Thanks for that feedback.  I've just committed an updated php5-sapi.eclass, which should be appearing on your local rsync mirror in about an hour.

Best regards,
Stu
Comment 28 Marc "Slyoldfox" Vanbrabant 2004-07-25 23:02:37 UTC
>>QUOTE
------- Additional Comment #24 From Noah Pritikin  2004-07-17 14:13 PST -------
I have another question concerning jpeg (with gd) support... I had looked through the forums and searched bugzilla but didn't find anything on the topic.  In php 4.*, there was a 'jpeg' USE flag to enable/disable this feature.  In the php5 ebuilds, this use flag is not there according to `emerge -pv /usr/portage/dev-php/php/php-5.0.0.ebuild`.  Thoughts on this? I need jpeg support, so is this another bug that should be opened?
Thanks,
Noah
<<QUOTE

I had the same "problem" that my app uses GD with JPEG support. Indeed I didn't find any Use flag either. I solved it by hacking the .ebuild from:

   my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"

to:

   my_conf="${my_conf} --with-jpeg-dir=/usr --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
Comment 29 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-08-07 13:06:02 UTC
jpeg is fixed in cvs.
I've added the packages for mcve and cpdflib into the portage tree, and updated the eclass(es) appropriately.
QDBM was already in the portage tree, so I've just put the nessicary depends into the eclass.
Fixed IMAP-SSL build.
Added Oracle sanity check.
Filepro support.
Major INI file work:
- sets extension_dir
- secures allow_url_fopen if SAPI != cli
- sets include_path
- sets up all possible extension= entries (for shared support)

I would also appreciate everybody trying the updated eclass.
If no problems are reported in the next week, I'm aiming on releasing PHP5 into ~arch.
Comment 30 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-08-13 14:45:30 UTC
it's in ~x86 now :-)