Bug 457777

Summary: PHP lacks headers for the embedding library
Product: [Fedora] Fedora Reporter: Erik van Pienbroek <erik-fedora>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 10CC: fedora, rpm
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.2-13.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-30 02:34:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Erik van Pienbroek 2008-08-04 15:54:52 UTC
For one of my own projects, NNTPGrab (usenet download program), I was looking for a way to embed PHP into my project and according to http://www.cluesheet.com/lectures/phptek-embedding.pdf this should be possible by using a header called php_embed.h and by linking against a special library. Now I've seen there's a special php-embedded package in Fedora which contains this library, but the header php_embed.h is nowhere to be found.

After investigation I've found out that this header isn't installed by the php.spec file. This patch installs the header:

--- php.spec.orig	2008-08-04 13:37:55.197329721 +0200
+++ php.spec	2008-08-04 14:30:00.642331815 +0200
@@ -583,7 +583,7 @@
 make -C build-apache install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
 
 # Install the version for embedded script language in applications
-make -C build-embedded install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
+make -C build-embedded install-headers install-sapi INSTALL_ROOT=$RPM_BUILD_ROOT
 
 # Install the default configuration file and icons
 install -m 755 -d $RPM_BUILD_ROOT%{_sysconfdir}/

This change places the file php_embed.h in the same location as the other headers ($RPM_BUILD_ROOT/usr/include) and this file automatically becomes part of the php-devel subpackage.

Comment 1 Erik van Pienbroek 2008-10-27 12:32:50 UTC
ping?
The solution above is easy to apply and shouldn't cause any side affects

Comment 2 Bug Zapper 2008-11-26 02:39:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Erik van Pienbroek 2008-12-03 22:50:38 UTC
Come on..does it really have to take 4 months to respond to a bugreport with a patch attached?

Comment 4 Remi Collet 2008-12-05 17:08:17 UTC
Juste try :

make -C build-cgi install-headers INSTALL_ROOT=/tmp/hcgi
make -C build-embedded install-headers INSTALL_ROOT=/tmp/hemb
diff -ru /tmp/hcgi /tmp/hemb

You will notice that this is not a good solution...

Searching...

Comment 5 Erik van Pienbroek 2008-12-06 14:21:52 UTC
Thanks for the response.
I see now that the headers of the cgi part differ from the embedded part..
However, the embed sapi just has one header file: /usr/include/php/sapi/embed/php_embed.h so it should be sufficient to just manually copy over this header file during the %install phase (leaving all the other headers intact)

Comment 6 Remi Collet 2008-12-13 08:52:07 UTC
Solution implemented in rawhide (5.2.8-2)

Comment 7 Fedora Update System 2009-01-05 20:29:08 UTC
maniadrive-1.2-11.fc10,php-5.2.8-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/maniadrive-1.2-11.fc10,php-5.2.8-1.fc10

Comment 8 Fedora Update System 2009-01-05 20:35:41 UTC
php-5.2.8-1.fc9,maniadrive-1.2-11.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/php-5.2.8-1.fc9,maniadrive-1.2-11.fc9

Comment 9 Fedora Update System 2009-01-07 09:22:42 UTC
php-5.2.8-1.fc9, maniadrive-1.2-11.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update php maniadrive'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2009-0130

Comment 10 Fedora Update System 2009-01-07 09:32:22 UTC
maniadrive-1.2-11.fc10, php-5.2.8-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update maniadrive php'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-0208

Comment 11 Fedora Update System 2009-02-26 15:32:20 UTC
maniadrive-1.2-12.fc9, php-5.2.8-1.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update maniadrive php'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2009-0130

Comment 12 Fedora Update System 2009-04-17 04:42:07 UTC
php-5.2.9-1.fc10,maniadrive-1.2-13.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/php-5.2.9-1.fc10,maniadrive-1.2-13.fc10

Comment 13 Fedora Update System 2009-04-17 04:48:11 UTC
php-5.2.9-1.fc9,maniadrive-1.2-13.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/php-5.2.9-1.fc9,maniadrive-1.2-13.fc9

Comment 14 Fedora Update System 2009-04-22 00:49:26 UTC
maniadrive-1.2-13.fc10, php-5.2.9-2.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update maniadrive php'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-3768

Comment 15 Fedora Update System 2009-04-22 01:04:46 UTC
maniadrive-1.2-13.fc9, php-5.2.9-2.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing-newkey update maniadrive php'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2009-3848

Comment 16 Fedora Update System 2009-05-30 02:33:24 UTC
maniadrive-1.2-13.fc10, php-5.2.9-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2009-05-30 02:37:22 UTC
maniadrive-1.2-13.fc9, php-5.2.9-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.