Thank you for your help!!
But I couldn't install them successfully yet!
There is GCC in my system Solaris 2.7.
I found the error was occured when I installed apache with freetds parameters.
If I delete the freetds options when I install apache, all is ok!
The following steps worked well:
1. configure php:
./configure --with-apache=../apache_1.3.19 --with-imap=../imap-4.4 --enable-track-vars --enable-ftp
2. configure apache
./configure --prefix=/usr/local/apache --enable-module=so --enable-rule=SHARED_CORE --activate-module=src/modules/php4/libphp4.a
But I followed the following steps, it worked wrong:
1. configure & make & make instll php
./configure --with-apache=../apache_1.3.19 --with-imap=../imap-4.4 --with-sybase-ct=/usr/local/freetds --enable-track-vars --enable-ftp
this step worked well.
2.configure apache
./configure --prefix=/usr/local/apache --enable-module=so --enable-rule=SHARED_CORE --activate-module=src/modules/php4/libphp4.a
this step worked wrong.
So I think the freetds has some problem, but I don't know how to resolve them!