LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices

Reply
 
Search this Thread
Old 04-27-2009, 07:53 AM   #1
Voltxion
LQ Newbie
 
Registered: Nov 2006
Location: USA
Distribution: Ubuntu
Posts: 10

Rep: Reputation: 0
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)

All help is greatly appreciated.

-Thank you [Voltxion]
 
Old 04-27-2009, 12:47 PM   #2
vitalstrike82
Member
 
Registered: Oct 2007
Location: Singapore
Distribution: OpenSuse, Slackware, Redhat
Posts: 315

Rep: Reputation: 40
Smile

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

Code:
cp php.ini-recommended /usr/local/php/lib/php.ini 
nano /usr/local/php/lib/php.ini
Update the php.ini as follows (search for the doc root in php.ini)
doc_root="/usr/local/apache2/htdocs/"

pecl i think can be found in the php bin directory.

These are the steps i use to install. Hope you can install without any problems too.
 
Old 04-28-2009, 07:01 AM   #3
Voltxion
LQ Newbie
 
Registered: Nov 2006
Location: USA
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 04-28-2009, 09:23 AM   #4
Voltxion
LQ Newbie
 
Registered: Nov 2006
Location: USA
Distribution: Ubuntu
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 07-14-2009, 10:35 AM   #5
Weeds2009
LQ Newbie
 
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
I figured this out. Dumbest thing I've ever seen.

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:

cp /usr/sys/inst.images/php/php-5.3.0/.libs/libphp5.so /usr/local/apache2/modules/

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.

Good luck

Last edited by Weeds2009; 07-14-2009 at 10:36 AM.
 
Old 06-20-2013, 06:12 AM   #6
priya117
LQ Newbie
 
Registered: Jun 2013
Posts: 5

Rep: Reputation: Disabled
required the actual output and test PHP

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 ?

PHPH installed was : 5.4.16

$ make install
Installing PHP CLI binary: /opt/Programs/PHP//bin/
Installing PHP CLI man page: /opt/Programs/PHP//php/man/man1/
Installing PHP CGI binary: /opt/Programs/PHP//bin/
Installing build environment: /opt/Programs/PHP//lib/php/build/
Installing header files: /opt/Programs/PHP//include/php/
Installing helper programs: /opt/Programs/PHP//bin/
Installing man pages: /opt/Programs/PHP//php/man/man1/
page: phpize.1
page: php-config.1
Installing PDO headers: /opt/Programs/PHP//include/php/ext/pdo

Last edited by priya117; 06-20-2013 at 06:14 AM.
 
Old 06-20-2013, 08:20 AM   #7
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,676

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
And where is the error message? This is how 'make install' ends.
Try this too (you should see current dates):
Code:
ls -l /usr/local/bin/php /usr/local/libexec/apache2/libphp5.* \
/usr/local/etc/php.ini /usr/local/lib/php.ini
Edit: in your case add prefix /opt/Programs/PHP/

Last edited by NevemTeve; 06-20-2013 at 08:22 AM.
 
Old 06-20-2013, 08:55 AM   #8
priya117
LQ Newbie
 
Registered: Jun 2013
Posts: 5

Rep: Reputation: Disabled
Unhappy

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 ?

Thanks in advance
 
Old 06-20-2013, 09:32 AM   #9
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,676

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
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'

Last edited by NevemTeve; 06-29-2013 at 02:55 AM.
 
Old 06-20-2013, 03:42 PM   #10
Michael AM
Member
 
Registered: May 2006
Distribution: AIX 5.3, AIX 6.1, AIX 7.1
Posts: 95

Rep: Reputation: 23
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.

Ah yes. If you are curious, my packages can be found via http://dl.aixtools.net
 
Old 06-21-2013, 09:39 AM   #11
Michael AM
Member
 
Registered: May 2006
Distribution: AIX 5.3, AIX 6.1, AIX 7.1
Posts: 95

Rep: Reputation: 23
seems i broke my virtual host entry, so the downloads are offline til i get home. my apologies.
 
Old 06-21-2013, 11:00 AM   #12
cliffordw
Member
 
Registered: Jan 2012
Location: South Africa
Posts: 259

Rep: Reputation: 109Reputation: 109
Quote:
Originally Posted by priya117 View Post
$ make install
Installing PHP CLI binary: /opt/Programs/PHP//bin/
Installing PHP CLI man page: /opt/Programs/PHP//php/man/man1/
Installing PHP CGI binary: /opt/Programs/PHP//bin/
Installing build environment: /opt/Programs/PHP//lib/php/build/
Installing header files: /opt/Programs/PHP//include/php/
Installing helper programs: /opt/Programs/PHP//bin/
Installing man pages: /opt/Programs/PHP//php/man/man1/
page: phpize.1
page: php-config.1
Installing PDO headers: /opt/Programs/PHP//include/php/ext/pdo
Hi there,

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:

Code:
# make install
Installing PHP SAPI module:       apache2handler
/opt/glacier/apache/build/instdso.sh SH_LIBTOOL='/opt/glacier/apache/build/libtool' libphp5.la /opt/glacier/apache/modules
rm -f /opt/glacier/apache/modules/libphp5.so
/opt/glacier/apache/build/libtool --mode=install cp libphp5.la /opt/glacier/apache/modules/
cp .libs/libphp5.a /opt/glacier/apache/modules/libphp5.a
cp .libs/libphp5.lai /opt/glacier/apache/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /opt/glacier/src/php-5.3.10/libs'
chmod 755 /opt/glacier/apache/modules/libphp5.so
[activating module `php5' in /opt/glacier/apache/conf/httpd.conf]
Installing PHP CLI binary:        /opt/glacier/php/bin/
...
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:
  1. comment out '$CMD || exit $?' within 'if test "$SYS" = "AIX"'
  2. 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.

Good luck!
 
Old 06-29-2013, 03:07 AM   #13
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,676

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
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)

Last edited by NevemTeve; 06-29-2013 at 06:08 AM.
 
Old 07-24-2013, 03:07 AM   #14
Michael AM
Member
 
Registered: May 2006
Distribution: AIX 5.3, AIX 6.1, AIX 7.1
Posts: 95

Rep: Reputation: 23
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.
 
Old 07-24-2013, 04:13 AM   #15
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 1,676

Rep: Reputation: 487Reputation: 487Reputation: 487Reputation: 487Reputation: 487
Well, if you didn't experience problems when compiling PHP, you certainly shouldn't change anything.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AIX Installation Procedure abrenar AIX 1 03-06-2009 07:10 PM
install php-5 mysql-5 apache-2 on AIX here4linux AIX 1 08-19-2008 04:17 PM
Help Me! stuck on AIX 5.3 installation VFO AIX 1 12-17-2005 07:47 PM
AIX login problem after first installation vinay88819 AIX 2 05-10-2005 03:12 PM
AIX 4.3.2 installation problems jamesps AIX 6 01-20-2005 04:00 PM


All times are GMT -5. The time now is 07:55 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration