The online racing simulator
PHP Issue!
(14 posts, started )
PHP Issue! [solved]
Hey again,

Is there anyway to create an insim using PHP4?

I really don't want to upgrade to PHP5 due to issues with my site (too many things rely on PHP4 at the moment and its a big site to convert really).

Is there any workaround for this?

Thanks,
Mark
Quote from Krammeh :Is there anyway to create an insim using PHP4

Yes, but the socket functions MUST be either compiled in, or activated by extension. Most hosts prevent this as it's a known security hole though.
okay, I have a dedicated server that I manage myself.

I'm attempting to install PHP5, Its all isntalled, but I cannot get MySQL support added Any idea's?

(its linux btw)
Quote from Krammeh :okay, I have a dedicated server that I manage myself.

I'm attempting to install PHP5, Its all isntalled, but I cannot get MySQL support added Any idea's?

(its linux btw)

Are you compiling it yourself or installing from package? What distro?

If you're compiling, add the appropriate configure option. If you're using debian, or a debian based distro (with apt installed mysql 5 version), this should work and give you mysql and mysql support;
--with-mysql=/usr --with-mysqli=/usr/bin/mysql_config

Quote :./configure --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config --with-apxs=/apacheserv/bin/apxs --enable-trans-sid --enable-ftp --with-gd --with-jpeg-dir=/usr/lib --with-zlib-dir=/usr/lib

configure: error: mysql configure failed. Please check config.log for more information.

its a downloaded version from php.net (latest)
Redhat Linux Fedora 6 is what I am running
To use mysqli you may need the mysql 5.x client. At least that's what i have installed here

try to configure for regular mysql module instead of mysqli

--------------

OT :

(this is why i love freebsd)

cd /usr/ports/lang/php5
make install

sit back

done

then do to the php5-extensions port and make install again and select what modules you want. Again sit back and done.
meh.

stilll doesn't work.

It makes NO sense to me, as to why they removed the support by default.

90/100 PHP users, use MYSQL!!! ARGH!
what does config.log say? Any indication on what's going wrong? Did it not find the files it needs?
Quote :checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
[root@sys16192 php-5.2.2]# vi config.log
configure: failed program was:
#line 58217 "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_close();
int main() {
mysql_close()
; return 0; }
configure:58449: checking for mysql_error in -lmysqlclient
configure:58468: gcc -o conftest -I/usr/include -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient -lz -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 58457 "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; }

this is the log
i suppose this is what it comes down to

/usr/bin/ld: cannot find -lmysqlclient

Maybe you need to upgrade mysql?
I don't really know much about this though, so don't take my word for this. It's been a while since i manually compiled php and its modules.
I never like to upgrade MySQL. cause of the amount of data in my tables.

I think I'll do it later on, now going to pizza hut with girlfriend

I will let you know as to how it goes!
You need the development libraries for MySQL.

No idea what package that is under Fedora though. Under debian it's libmysqlclient-dev (which points to the latest version).

Honestly, I had considered not even granting a response to the "mysql support" rant as it's wrong. If there was no support, they wouldn't have any modules for it at all.

The reason why compiling your own turns on nothing by default is because it's assumed that you have a clue about what you're doing. You know what you want to turn on and off and how to work with it. It's not designed to be an automatic process.

In all seriousness, I'd really consider using the packages in your instance. I'm sure that some nice Fedora user will come along (like buses, there will be 2 or 3 of them no doubt), who can tell you which package(s) you need for a reasonably upto date version of PHP with MySQL and socket support.
After a few more google searches, I found a work around (although, the "make" still says that its incompatable, but it still goes through the installation, AND it works! it connects to MySQL and everything!

Quote :export LDFLAGS=-L/usr/lib64/mysql

Finally installed php 5.2.2!

Thanks for all of your help lads!

PHP Issue!
(14 posts, started )
FGED GREDG RDFGDR GSFDG