Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PHP3] mysql + php4 install

0 views
Skip to first unread message

Mika Tuupola

unread,
May 3, 2000, 3:00:00 AM5/3/00
to

I've been trying to make php4 work with x86 Solaris 8.
Version numbers go as follows: mysql-3.22.32,
apache_1.3.12, php-4.0RC1, gcc_2.95.2. Everything except
gcc itself (which was precompiled binary) has been
compiled with the same compiler and I have used suns
own ld. Sol 8 comes with precompiled Apache which _was_
removed with pkgrm and I recompiled a new one.

At compile time everything goes fine. PHP was compiled
as follows:

#setenv CPPFLAGS -I/usr/local/apache/include/xml/
#./configure --with-mysql=/usr/local/mysql --enable-track-vars
--with-apxs=/usr/local/apache/bin/apxs
#make -j2
#make install

Everything goes fine, but after installing the module
and running configtest the loading fails:

#/usr/local/apache/bin/apachectl configtest
Syntax error on line 239 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server: ld.so.1:
/usr/local/apache/bin/httpd: fatal: relocation error: file
/usr/local/apache/libexec/libphp4.so: symbol mysql_free_result: referenced
symbol not found

Ok so something is missing.

#nm /usr/local/apache/libexec/libphp4.so | grep mysql | grep UNDEF
[1886] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_close
[2037] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_create_db
[3018] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_data_seek
[1770] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_drop_db
[2485] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_fetch_field
[1897] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_fetch_lengths
[2168] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_fetch_row
[2117] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_field_seek
[1925] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_free_result
[1653] | 0| 0|NOTY |GLOB |0 |UNDEF
|mysql_get_client_info
[3168] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_init
[2596] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_list_dbs
[2149] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_list_fields
[2918] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_list_tables
[2243] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_real_connect
[2222] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_real_query
[2773] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_select_db
[2248] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_stat
[2810] | 0| 0|NOTY |GLOB |0 |UNDEF |mysql_store_result


I've come to dead end now. Any suggestions?

--
Mika Tuupola http://www.appelsiini.net/~tuupola/


--
PHP 3 Mailing List <http://www.php.net/>
To unsubscribe, send an empty message to php3-uns...@lists.php.net
To subscribe to the digest, e-mail: php3-diges...@lists.php.net
To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
To contact the list administrators, e-mail: php-lis...@lists.php.net


Tonu Samuel

unread,
May 3, 2000, 3:00:00 AM5/3/00
to
Mika Tuupola wrote:
> /usr/local/apache/libexec/libphp4.so: symbol mysql_free_result: referenced
> symbol not found
>
> Ok so something is missing.
> I've come to dead end now. Any suggestions?

Did you installed MySQL and it's libraries already? Seems like you are
missing MySQL libraries. I am itself a linux user and can't give exact
suggestions for you.

--
+----------------------------------------------------------------+
| TcX ____ __ _____ _____ ___ |
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Tõnu Samuel |
| /*/ /*/ /*/ \*\_ |*| |*||*| to...@mysql.com |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Tallinn, Estonia |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+----------------------------------------------------------------+

Mika Tuupola

unread,
May 3, 2000, 3:00:00 AM5/3/00
to
On Wed, 3 May 2000, Tonu Samuel wrote:

> Did you installed MySQL and it's libraries already? Seems like you are
> missing MySQL libraries. I am itself a linux user and can't give exact

Yes it is installed and running and the libraries can
be found at /usr/local/mysql/lib/mysql/. Shouldn't
--with-mysql=/usr/local/mysql tell configure and compiler
where to find the libraries or have I missed something
here?

--

Mika Tuupola

unread,
May 4, 2000, 3:00:00 AM5/4/00
to
On Wed, 3 May 2000, Mika Tuupola wrote:

> I've been trying to make php4 work with x86 Solaris 8.
> Version numbers go as follows: mysql-3.22.32,
> apache_1.3.12, php-4.0RC1, gcc_2.95.2. Everything except

To continue on this I also tried to do a static build
which also fails (output pasted to bottom). I've searched
mailinglist but havent find solution to neither static
or dso problem.

Other people have had same problems with Solaris 8 too (this
time just Sparc):

http://marc.theaimsgroup.com/?l=php3-general&m=95503120622511&w=2

I also confirmed the mysql libraries are in
/usr/local/mysql/lib/mysql. I am totally out of ideas
(other than downgrading the OS to 2.7 ;)

gcc -DSOLARIS2=280 -I/usr/local/src/php-4.0RC1
-I/usr/local/src/php-4.0RC1/Zend -I/usr/local/src/php-4.0RC1/Zend
-I/usr/local/src/php-4.0RC1 -DUSE_EXPAT -I./lib/expat-lite `./apaci`
-L/usr/local/mysql/lib/mysql \
-o httpd buildmark.o modules.o modules/php4/libphp4.a
modules/standard/libstandard.a main/libmain.a ./os/unix/libos.a ap/libap.a
lib/expat-lite/libexpat.a -R/usr/local/mysql/lib/mysql
-L/usr/local/mysql/lib/mysql -Lmodules/php4 -L../modules/php4
-L../../modules/php4 -lmodphp4 -lpam -ldl -ldl -lresolv -lresolv -lm
-lsocket -lsocket -lnsl -ldl
Undefined first referenced
symbol in file
mysql_get_client_info modules/php4/libphp4.a(php_mysql.o)
mysql_drop_db modules/php4/libphp4.a(php_mysql.o)
mysql_close modules/php4/libphp4.a(php_mysql.o)
mysql_fetch_lengths modules/php4/libphp4.a(php_mysql.o)
mysql_free_result modules/php4/libphp4.a(php_mysql.o)
mysql_create_db modules/php4/libphp4.a(php_mysql.o)
mysql_field_seek modules/php4/libphp4.a(php_mysql.o)
mysql_list_fields modules/php4/libphp4.a(php_mysql.o)
mysql_fetch_row modules/php4/libphp4.a(php_mysql.o)
mysql_real_query modules/php4/libphp4.a(php_mysql.o)
mysql_real_connect modules/php4/libphp4.a(php_mysql.o)
mysql_stat modules/php4/libphp4.a(php_mysql.o)
mysql_fetch_field modules/php4/libphp4.a(php_mysql.o)
mysql_list_dbs modules/php4/libphp4.a(php_mysql.o)
mysql_select_db modules/php4/libphp4.a(php_mysql.o)
mysql_store_result modules/php4/libphp4.a(php_mysql.o)
mysql_list_tables modules/php4/libphp4.a(php_mysql.o)
mysql_data_seek modules/php4/libphp4.a(php_mysql.o)
mysql_init modules/php4/libphp4.a(php_mysql.o)
ld: fatal: Symbol referencing errors. No output written to httpd
collect2: ld returned 1 exit status
make[2]: *** [target_static] Error 1
make[2]: Leaving directory `/usr/local/src/apache_1.3.12/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/local/src/apache_1.3.12'
make: *** [build] Error 2

Mika Tuupola

unread,
May 4, 2000, 3:00:00 AM5/4/00
to
On Wed, 3 May 2000, Mika Tuupola wrote:

> > I've been trying to make php4 work with x86 Solaris 8.
> > Version numbers go as follows: mysql-3.22.32,
> > apache_1.3.12, php-4.0RC1, gcc_2.95.2. Everything except

> /usr/local/mysql/lib/mysql. I am totally out of ideas
> (other than downgrading the OS to 2.7 ;)

I'll continue answering to myself ;) Just made a test
compilation with all the software versions the same
except thatr the OS was Solaris 2.6 (sparc). Everything went
smoothly and was working in ten minutes.

So I blame something broken on Solaris 8 (or my install).
Next I perhaps dumps the readily compiled gcc and compile
one myself to see if that helps. It's a long shot but
worth of trying).

Still if anyone gets Mysql and php4 to work together in Sol 8
please let me know.

0 new messages