Re: Installing informix on Linux ..
Posted in 2004
After having gone through the same sort of thing not too long ago,
here's my Apache 2 (not 1!) config.nice:
#! /bin/sh
#
# Created by configure
"./configure" \\
"--enable-so" \\
"--enable-ssl" \\
"--enable-modules=most" \\
"$@"
And here's my PHP4 config.nice:
#! /bin/sh
#
# Created by configure
'./configure' \\
'--enable-calendar' \\
'--with-apxs2=/usr/local/apache2/bin/apxs' \\
'--with-config-file-path=/usr/local/apache2/conf' \\
'--with-informix' \\
'--with-java' \\
'--with-mysql=/usr' \\
'--with-openssl' \\
'--with-phplib' \\
'--with-tidy' \\
'--with-zend' \\
"$@"
The above install Apache 2 and PHP 4 in the /usr/local tree (which is
the default if you "configure" with no prefix argument).
Log in as root to do this.
If you don't have Java, phplib, or tidy or don't want the features
(calendar, java, openssl, phplib, tidy), remove those from the PHP
config.nice.
1. cd /usr/local/src/httpd-2.0.48 (or wherever you've got the source
tree -- that's the latest, that's the one you use)
2. copy the config.nice above into that directory
3. chmod 755 config.nice
4. ./config.nice
5. make
6. make install
7. cd /usr/local/apache2
8. vi conf/httpd.conf (edit as necessary -- let me know if you need
some help with that)
9. bin/apachectl start
10. ps -ef | fgrep httpd (should show Apache running)
11. bin/apachectl stop
That's Apache, now for PHP:
1. cd /usr/local/src/php-4.3.4
2. save the above config.nice in it
3. chmod 755 config.nice
4. ./config.nice
5. make
6. make install
7. make test (optional)
8. cp php.ini-dist to /usr/local/apache2/conf.
9. cd /usr/local/apache2
10. vi conf/php.ini
11. edit as necessary (probably turn on register_globals)
12. bin/apachectl start
13. ps -ef | fgrep hpptd (to make sure it's running)
14. start your browser
15. get to wherever you've got phpinfo.php, click it
16. If it doesn't work, clear the browser cache and try again.
You should already have INFORMIXDIR in your environment, your
LD_LIBRARY_PATH should look like this
export
LD_LIBRARY_PATH=/opt/informix/lib/esql:/opt/informix/lib:/usr/local/lib
You do not need anything else in LD_LIBRARY_PATH for Apache and PHP.
You may -- may -- have to use the TCP connection with Informix (mine
does not work with shared memory).
The above will also install command line php; try "php phpinfo.php" and
see what happens (that'll tell you that it's installed properly).
If Apache 1 and PHP 3 are installed on your system, you probably want to
uninstall them before you do any of the above and use the latest (they
work better).
Boris wrote:
> After many, many lost hours - there is conclusion...
>
>DOESN'T WORK ....!!!!!!!!!!!!!!!!!!!!
>
>Summary:
>
>I tried to establish php on my linux Mandrake and apache server. Besides I
>need to access from my PHP files on linux to Informix database which is on
>UNIX Tru64. So, when I try in my php script to connect to database Informix
>(with ifx_connect function), there is an error:
>
>Fatal error: Call to undefined function: ifx_connect() in
>/var/www/html/test.php on line 8>
>Informix SE and C SDK are correctly installed and extension is made
>(informix.so)....
>
>Connection from SE to Informix Server is OK and there is no problem, but
>connection from php script (ifx_connect) - doesn't....
>
>
>PLEASE HELP ANYONE...
>
>THANK YOU
>
>Boris
>
>
>
>