AIX 6.1Apache 2.2.11 + PHP 5.1.6 installation help
AIXThis forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
AIX 6.1Apache 2.2.11 + PHP 5.1.6 installation help
So I am not very experienced with this OS.. well that is a misleading statement.. I actually have never used AIX before
I have not really installed apache and php before from src .
I have gotten all my pre-requisite packages installed for apache and php .. got GCC installed now I need help getting apache 2.2.11 and PHP 5.1.6+ installed.
even a push in the right direction.
(needed apache modules = mod_rewrite)
(needed php modules = soap and PECL/SSH2)
I assume you have download the apache server and php. i will be using y own version of apache and php.
For apache:
Code:
cd to the directory where the installer resides
gzip -d <name_of_apache_directory.tar.gz>
tar xvf <name_of_apache_directory.tar.gz>
cd <name_of_apache_directory>
Next issue these commands to configure, make and install
Code:
./configure --prefix = /usr/local/apache2
make
make install
After installing, you can start using this command:
Code:
/usr/local/apache2/bin/apachectl -k start
For your case, you mention bout: (needed apache modules = mod_rewrite)
You can find them by using this directory path:
cd /usr/local/apache2/includes
You can find the file in that directory
As For Php
Untar the php directory
Code:
tar jxvf <name_of_php_directory.tar.bz2>
Next configure the php to be use with apache, tjhen make and install
Code:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs
make
make install
Next issue this command where copy the .ini file to path /usr/local/php/lib/ and use editor to open up the file. If nano not available, you can try vi editor
this is the error I get when I do Make install for php
Quote:
# make install
echo '\
\
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
rm -f /usr/local/apache2/modules/libphp5.so
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a
chmod 644 /usr/local/apache2/modules/libphp5.a
ranlib /usr/local/apache2/modules/libphp5.a
libtool: install: warning: remember to run `libtool --finish /tmp/apache/php-5.1.6/libs'
Warning! dlname not found in /usr/local/apache2/modules/libphp5.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2/modules/libphp5.so
chmod: /usr/local/apache2/modules/libphp5.so: A file or directory in the path name does not exist.
apxs:Error: Command failed with rc=65536
.
make: 1254-004 The error code from the last command is 1.
Stop.
Ive gotten this everytime so far, I can't figure out how to fix it.
Well I gave up since I can't figure out how to change the default loader to the GNU loader and the buildtools to GNU ones so I ended up using this bundle ftp://ftp.hvcc.edu/pub/pware/aix53/bundles/amp I found it through IBMs website for AIX.
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules rm -f /usr/local/apache2/modules/libphp5.so
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.a /usr/local/apache2/modules/libphp5.a
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/sys/inst.images/php/php-5.3.0/libs'
chmod 755 /usr/local/apache2/modules/libphp5.so chmod: /usr/local/apache2/modules/libphp5.so: A file or directory in the path name does not exist.
apxs:Error: Command failed with rc=65536
It can't find libphp5.so because the first thing the 'make install' did was rm -f the exact file it needs to continue. The file it's deleting actually exists on the system in a different directory. In my case it was the directory I did the initial 'make' in. So the solution I used was to open two sessions. In the first session type out the cp command that copies the original file to the /usr/local/apache2/modules directory, DON'T hit the enter key. Example:
Next, in the second session, run the 'make install'. Right away, click back to your first session and hit 'enter' to copy it back just after the Makefile does and rm -f on the libphp5.so file. Timing is everything, so it may take a couple tries. Your just recopying the the libphp5 file back to where the Makefile is looking for it so it can continue. It had to be done while your 'make install' is running. Stupidest thing I've ever seen in a compile, but this hack job works and it managed to finish successfully.
hi i have configured PHP and make make test was success , But durin make insatll getting the below error and while creation of PDO headers the insatllation is getting stoped and coming back to the folder ,
I m not sure wheather this installation was success or no and there is not error message also , can any one help on this
And also can any one let me knwo how to test this installation success ?
Thanks for your kind reply friend , then my install is success
I am struck with one more issue i.e presentely i am working on non-root access and I had install my apache and php, but i could not see the libphp5.so file in my apache modules folder not sure during wt phase this files gets genrated , is there any way to get package where i can insatll and copy this libphp5.so file can you provide me the link or some suggestions like when can i get this libphp5.so loaded ?
If you didn't specify something like LDFLAGS=-Wl,-brtl you most likely got a file called libphp5.a containing the shared object. That might be quite okay, or you might want to try to extract the shared object from it. (Use 'ar' or Midnight Commander)
Hopefully, you have a logfile of the make-process (eg: (make all && make install) 2>&1 | tee log.make), so you can search in it for 'libphp5.la' or 'Installing PHP SAPI module' or 'libexec/apache2'
I have been very frustrated with packaging for AIX, and I have never quite finished the php build. This has always been a difficult one. Reading this makes me think it may be time to start again.
The projects I have done (e.g., apache 2.2.22 and 23 and 2.4.3 and 2.4.4) and, perhaps needed for the make install of php - is the coreutils install version.
There are, subtle, and unknown differences in the installs. I have experimented with having /usr/ucb earlier in the path that /usr/bin to get ucb install. That has also worked in some instances.
I am sure the IBM one is standards compliant - and GNU packaging seems to have their own standard - hence the need for another install program.
btw - the logic for remove of the file is because if the file is active you cannot copy over it. using slibclean should have been enough - but that was a hack someone thought of YEARS ago. Very very hard to get it changed.
The last time I did this, was for PHP version 5.3.10, but I'm not aware of major changes in the process.
If the above outout is all you saw from "make install", it doesn't look like the Apache module was installed. I got messages specific to libphp5.so before the "Installing PHP CLI binary" above, similar to this:
Taking one step back, when I first tried the install, I also got "chmod: /usr/local/apache2/modules/libphp5.so: A file or directory in the path name does not exist." similar to those mentioned in earlier posts. I worked around this by editing the apache/build/instdso.sh script as follows:
comment out '$CMD || exit $?' within 'if test "$SYS" = "AIX"'
comment out "rm -f $TARGETDIR/$TARGET_NAME" (2nd last line)
After this I manually copied .libs/libphp5.so to apache/modules/libphp5.so
and rerun make install.
Can you post the "configure" command options you used? That might help us understand the setup. In particular, did you use an "--with-apxs2" option?
As an aside, one alternate option might be to use Michael Perzl's PHP & Apache packages. I've switched from going through this pain myself to using his packages, and am running it happily on a number of servers. See http://www.perzl.org/aix/index.php?n=Main.Php. You'll need root access to install this, though.
From my point of view the root of all these problems is AIX's tradition to put shared objects into *.a acrhives. Everyday Unices don't do that, so programs like PHP aren't really prepared for it. I usually do every compilation from a script sg like this:
Code:
#!/bin/sh
make distclean
export CFLAGS='-maix32 -mtune=native ...'
export LDFLAGS='-maix32 -Wl,-brtl ...'
./configure ... 2>&1 | tee log.configure
<progam/platform specific hacks>
(make all && make install) 2>&1 | tee log.configure
Other -Defines also go into CFLAGS, for example the ones that cause Large File Support (note: be careful with that: either use it in every program or none; for example Apache with LFS and PHP without LFS won't work together -- of course that will cause other problems in PHP (I might explain, if anyone is interested) -- compilation/installation in AIX is a challenging game)
From my point of view, .a archives are normal (since 1978!). The .so naming convention for something that was already working using ranlib was just something new/different. Maybe there is something else different as well.
However, as far as AIX and archives are concerned - the issue is not really the file extension, except where applications demand it. Frequently hard and/or soft links are used to link .so and .a archives. The more important element is the name of the object in the archive - and when .so is again demanded, rather than .o, run-time linking may fail.
The command to know - on AIX - is
Quote:
dump -H /full/program/name
as this will tell you what libraries are sought, and where the application expects to find them.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.