For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > August 2005 > Solaris 10, PHP 5.0.4, MySQL 4.1.13









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Solaris 10, PHP 5.0.4, MySQL 4.1.13
Steve Welch

2005-08-14, 8:59 am

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


Steve Welch

2005-08-15, 8:59 am

Is is possible to download a php binary (php 5.0.4) with mysql enabled
(mysql 4.1.3, Sun Solaris 10 on sparc)?
All of my attempts to run ./configure --with-mysql=/usr/local/mysql have
failed with results similar to below.

The following from the php on-line manual makes me wonder what would happen
if Micro$oft decided to disable the ability to link between MS Word and MS
Excel (Without re-compiling both programs)? (Does Bill Gates really need to
worry about a linux takeover?)
PHP 5+
MySQL is not enabled by default, nor is the MySQL library bundled with PHP.
Read this FAQ for details on why. Use the --with-mysql[=DIR] configure
option to include MySQL support. You can download headers and libraries from
MySQL.

As a non-C programmer, is it even possible to get php 5+ to work with MySQL?

As a software user, I don't care why the MySQL library is not bundled with
PHP. What I do wonder is that with all of the "PAM" hype that is out there,
why somebody would intentially "break" a good thing? There are a lot of
knowledgeable users out here that don't necessarily know how to compile
"anything" much less muddle our way through this cryptic maze of
linux/unix.ism that predominates in these areas. Is there ANYBODY out there
who speaks "English"

Are there any alternatives to the PAM (php/apache/mysql) solution (GNU) ?
I need a (SQL capable) database on Solaris 10
I need a way to access the information contained in that database from
Win2K machines.
(Apache 2 is already installed and running on the Solaris machine)
It needs to be "bullet proof" and "simple" for the user, queries only,
no changes in the data.

"Steve Welch" <steve-welch@comcast.net> wrote in message
news:jcGdnZ2dnZ2O-MT0nZ2dnQrWYt-dnZ2dRVn-0J2dnZ0@comcast.com...
>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
> nftest -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
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com