php.h missing during install of APC for Linux Xampp

Problems with the Linux version of XAMPP, questions, comments, and anything related.

php.h missing during install of APC for Linux Xampp

Postby conualfy » 26. September 2012 15:54

Hello!

I am following instructions from here (http://www.samclarke.com/2011/10/install-apc-with-xampp-on-linux/) to install APC on my Xampp (Lampp) installation. I use Ubuntu 12.04 x64, Xampp 1.7.7 installed in /opt/lampp. In the "make" phase I get an error, php.h missing. This is the output in terminal:

Code: Select all
florin@florin-Satellite-C650:~/Downloads/APC-3.1.13$ make
/bin/bash /home/florin/Downloads/APC-3.1.13/libtool --mode=compile cc -I. -I/home/florin/Downloads/APC-3.1.13 -DPHP_ATOM_INC -I/home/florin/Downloads/APC-3.1.13/include -I/home/florin/Downloads/APC-3.1.13/main -I/home/florin/Downloads/APC-3.1.13 -I/opt/lampp/include/php -I/opt/lampp/include/php/main -I/opt/lampp/include/php/TSRM -I/opt/lampp/include/php/Zend -I/opt/lampp/include/php/ext -I/opt/lampp/include/php/ext/date/lib -DHAVE_CONFIG_H -m32 -c /home/florin/Downloads/APC-3.1.13/apc.c -o apc.lo
mkdir .libs
cc -I. -I/home/florin/Downloads/APC-3.1.13 -DPHP_ATOM_INC -I/home/florin/Downloads/APC-3.1.13/include -I/home/florin/Downloads/APC-3.1.13/main -I/home/florin/Downloads/APC-3.1.13 -I/opt/lampp/include/php -I/opt/lampp/include/php/main -I/opt/lampp/include/php/TSRM -I/opt/lampp/include/php/Zend -I/opt/lampp/include/php/ext -I/opt/lampp/include/php/ext/date/lib -DHAVE_CONFIG_H -m32 -c /home/florin/Downloads/APC-3.1.13/apc.c -fPIC -DPIC -o .libs/apc.o
In file included from /home/florin/Downloads/APC-3.1.13/apc.c:34:0:
/home/florin/Downloads/APC-3.1.13/apc.h:61:17: fatal error: php.h: No such file or directory
compilation terminated.
make: *** [apc.lo] Error 1



Do you have any idea how to fix it? Thanks!
conualfy
 
Posts: 3
Joined: 26. September 2012 15:49
XAMPP Version: 5.5.19
Operating System: Ubuntu Linux 12.04

Re: php.h missing during install of APC for Linux Xampp

Postby JonB » 27. September 2012 15:08

A. - I don't know for sure but the development package may contain all the header files. (that is what the first wget is for)
DL'ing the package manually and inspecting it is the right answer.

B. - Good luck on your project. We support XAMPP as its packaged. Its "Sam's" hack so he is the person you should contact.

A personal opinion - I cannot for the life of me understand why people want to adopt XAMPP/lampp and then try to extended it when a standard LAMP stack is so much easier to work with. The philosophy of XAMPP (or it was when I started) is that it is an easy to install, all-in-one suite that does not require installation. That last part means easy to get going, but not easily modified. It certainly means re-compiles are 'all on you'. I'd like a beer for every time I have explained this. :mrgreen:

Good luck again
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: php.h missing during install of APC for Linux Xampp

Postby conualfy » 27. September 2012 15:33

@JonB

Thanks for the answer, I got the idea. You might be right with complicating things with external packages to be installed in xampp, but I did not know it was gonna be complicated. I was just trying to see if there is an easy solution (and the solution on that blog it was like this) to get some more performance. I will stop trying to install APC as it seems it is not that easy.

BTW, I could see in the release notes that in the next releases eAccelerator will be replaced with APC. That will definitely stop people trying to install APC's in Xampp/Lampp :)
conualfy
 
Posts: 3
Joined: 26. September 2012 15:49
XAMPP Version: 5.5.19
Operating System: Ubuntu Linux 12.04

Re: php.h missing during install of APC for Linux Xampp

Postby JonB » 27. September 2012 22:17

Did you try eAccelerator? I have used it on Windows and it sped up my Wordpress blogs 20-30%

BTW, I could see in the release notes that in the next releases eAccelerator will be replaced with APC. That will definitely stop people trying to install APC's in Xampp/Lampp

:mrgreen:

One of the problems, I think, is that XAMPP is a lot to get your head around. It probably makes more sense on Windows than on Linux, where building a LAMP stack is now relatively easy with all the installers and repo libraries.


Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: php.h missing during install of APC for Linux Xampp

Postby conualfy » 27. September 2012 22:46

True, it makes a lot more sense on Windows ot use Xampp than on Linux (I use Ubuntu). But for now it is easy to just have it running and that's all. I have dozens of websites and I don't like going though all the configuration, etc.
Maybe in the future :)


Haven't tried eAccelerator, is it activated just by including it in php and restarting apache?

There are some advantages on Linux in this field as these servers are running mostly on linux servers. Also for me a nice thing is that I use online back-up in Ubuntu One, the websites sources I care most are safe :)
conualfy
 
Posts: 3
Joined: 26. September 2012 15:49
XAMPP Version: 5.5.19
Operating System: Ubuntu Linux 12.04

Re: php.h missing during install of APC for Linux Xampp

Postby JonB » 27. September 2012 23:59

Haven't tried eAccelerator, is it activated just by including it in php and restarting apache?


I believe that is the case. At least on Windows (as I recall) it did almost all the grunt work itself.

http://bravo.newnetenterprises.com/word ... -on-xampp/

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
XAMPP Version: 1.8.3-2
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: php.h missing during install of APC for Linux Xampp

Postby pascom » 05. December 2012 21:04

Hello,
To compile APC (or every other PHP compiled library you need to install the devel package for Xampp). You can find it on the page where you downloaded Xammp (http://www.apachefriends.org/en/xampp-linux.html for me).
Then you have to decompress it into the parent folder of your lampp directory (for me its /opt) :
Code: Select all
$ cd /opt
$ cp ~/Téléchargements/xampp-linux-devel-1.8.1.tar.gz .
$ tar -xzf xampp-linux-devel-1.8.1.tar.gz

To check everything is OK, you can run phpize with option version (which should display your PHP version and no error) :
Code: Select all
$ phpize --version
Configuring for:
PHP Api Version:         ...
Zend Module Api No:      ...
Zend Extension Api No:   ...

Then you just follow the steps you saw in the APC readme file.
Enjoy,
pascom
 
Posts: 1
Joined: 05. December 2012 20:45
XAMPP Version: 5.6.3
Operating System: Mandriva Linux 2010


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 4 guests