You are here: Solaris 10, PHP 5.0.4, MySQL 4.1.13 « PHP Language « IT news, forums, messages
Solaris 10, PHP 5.0.4, MySQL 4.1.13

Posted by Steve Welch on 08/14/05 16:48

I am trying to get MySQL, PHP and Apache2 to work together and am running
into a brick wall.

Before proceding, I am NOT a C programmer and am NOT familiar at all with
any of the "compilers" such as gcc, etc. I am simply a relatively
knowledgable person trying to get some applications to work together.

Anybody who's principle response is "RTFM", please DO NOT take up my time or
yours.

Setup:
Sun Ultra-10 running Solaris 10
Apache2 from the Solaris 10 installation configured and enabled. - Works
fine
MySQL, Solaris binary downloaded from MySQL mirror, installed and
configured - Works fine
ln -s /usr/local/mysql-max-4.1.13-sun-solaris2.10-sparc-64bit
/usr/local/mysql
PHP 5.0.4 package downloaded from sunfreeware.com, installed with
pkgadd - works fine until I get to the part where i try to get logged into
mysql - I get the following error:
Warning: mysql_connect() [function.mysql-connect]: "Client does not
support authentication protocol requested by server; consider upgrading
MySQL client in /var/apache2/test/createmovie.php on line 4"

(running the tutorials from "Beginning PHP, Apache, MySQL Web Development"
from wrox

By the way, all required packages listed for PHP by the sunfreeware site
have been installed.
Investigation gets me the information that PHP 5 "is NOT", by default,
configured to interface with MySQL (WHY NOT???)
It appears to be simple enough on the Windows binary, simply un-commenting
the reference to the mysql dll in the .ini file, but it appears that for
UNIX/Solaris/Linux, etc, you have to re-compile from the source code with
the option:
"--with-mysql=/usr/local/mysql"

All of my attempts to compile the source for PHP have failed.
I found, and am using, a rather complete set of instructions at
http://ampubsvc.com/~meljr/a2m4p5s8.html but still no cigar!
The tail end of the php ./configure config.log is included.
----------------------------------------------------------
configure:56835: checking for mysql_error in -lmysqlclient
configure:56854: /usr/local/bin/gcc -o
onftest -03 -D_POSIX_PTHREAD_SEMANTICS -R/usr/local/mysql/lib -L/usr/local/mysql/lib
-R/usr/ucblib -L/usr/ucblib -R/usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2 -R/usr/local/lib -L/usr/local/lib
-R/usr -L/usr
onftest.c -lmysqlclient -lz -lz -lresolv -lm -lnsl -lsocket -lgcc -lxml2 -lz
-liconv -lm -lsocket -lnsl -lxml2 -lz -liconv -lm -lsocket -lnsl 1>&5
gcc: unrecognized option `-03'
ld: warning: file /usr/local/mysql/lib/libmysqlclient.a(client.o): wrong ELF
class: ELFCLASS64
Undefined first referenced
symbol in file
mysql_error /var/tmp//cckfI00z.o
ld: fatal: Symbol referencing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 56843 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mysql_error();

int main() {
mysql_error()
; return 0; }
-------------------------------------------------------------

I have even tried to compile PHP 4.4.0 without success.

Any help would be greatly appreciated.

Steve

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация