• Index
  •  » PHP
  •  » Problem configuring php 5.1.6 with mysql 5.0.24a on Fedora 4

#1 2006-09-18 05:45:00

debram99
New member
Ranking
Registered: 2006-09-17
Posts: 3
Expertise

Problem configuring php 5.1.6 with mysql 5.0.24a on Fedora 4

I'm a newbie to php, mysql, and apache.  I can't get php to configure with mysql.  I'm on Fedora core 4.  I successfully installed apache2 and mysql 5.0.24a. 

I'm running the following configure command for php:

./configure --prefix=/usr/local/php
               --with-config-file-path=/usr/local/php
               --with-mysql=/usr/local/mysql
               --with-apxs2=/usr/local/apache/bin/apxs
               --enable-track-vars
               --enable-magic-quotes
           
It gives me the following error:
        configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information.

If I exclude the --with-mysql, then it configures with no problem.  I've tried including the --with-zlib-dir=/usr/includes (and other directories), but it then it gives the following error:
        configure: error: mysql configure failed. Please check config.log for more information.

I see nothing obvious in the config.log.   Here are the last several lines of the log:

file.cpp: undefined reference to `__builtin_delete'
/usr/local/mysql/lib/libmysqlclient.a(libtaocrypt_la-file.o)(.text+0x28c): In function `TaoCrypt::FileSink::~FileSink(void)':
file.cpp: undefined reference to `__builtin_delete'
collect2: ld returned 1 exit status
configure: failed program was:
#line 58781 "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; }




Any help would be much appreciated.

Offline

 

#2 2006-09-21 03:03:07

sachin
Moderator
RankingRanking
Nepal
From: Kathmandu
Registered: 2006-09-18
Posts: 45
Expertise

Re: Problem configuring php 5.1.6 with mysql 5.0.24a on Fedora 4

Hi Debram,

Sorry to reply you late.

Please follow the below steps and check if it works.

1. Download Fedora Core 4 ISO files and burn them to CDs
http://download.fedora.redhat.com/pub/f … -disc1.iso
http://download.fedora.redhat.com/pub/f … -disc2.iso
http://download.fedora.redhat.com/pub/f … -disc3.iso
http://download.fedora.redhat.com/pub/f … -disc4.iso

2. Boot to Disc 1 and install using the graphical interface (skip the Media check unless you want to waste an hour or so)

3. Select the Server installation

4. In the Firewall section, you can install it if you really want... but a hardware firewall works much better. The IPTables and SELinux really slow down the box, so I disable both of those.

5. In the Packages, add Gnome, Graphical Internet, Graphics, FTP, MySQL and Development Tools

6. Also, in the Web Server details, add mod_auth_mysql, mod_auth_ldap and php-mysql

7. Click through to let the install do its thing

When it is finished installing, you'll need to create your default user. Then you'll be presented with a logon screen.

8. Login to the box with the user you created

9. Access a terminal window: Applications/System Tools/Terminal

10. Go root: type su and hit Enter

11. Update your software: yum update apache mysql php

12. Check that everything is running, plus configure stuff to run on boot:
/sbin/chkconfig httpd on
/sbin/service httpd start
/sbin/chkconfig mysqld on
/sbin/service mysqld start

13. Create a root password for MySQL:
mysqladmin -u root password 'password'

14. Browse to http://localhost and see that Apache installed

15. Create a test page for PHP:
vi /var/www/html/phpinfo.php
i (insert mode in the VI editor)
<?php echo phpinfo(); ?>
Press Escape (exit insert mode in VI) then :wq and press Enter (colon write quit)

16. Browse to the PHP test page at http://localhost/phpinfo.php

As you can see from the PHP test page, the configuration is --without-mysql by default. Argh. So now for the hard part - configuring PHP with MySQL support.

17. Get the PHP source files - you gotta compile 'em
wget http://us2.php.net/get/php-5.1.2.tar.gz … net/mirror

18. Extract them:
tar -zxvf php-5.1.2.tar.gz
This will create a folder called php-5.1.2 - in your user's home folder assuming you haven't gone CD'ing around since you started following these instructions.

19. Install the Apache developer files - Fedora Core 4 is missing a file that will cause PHP's configure command to fail, but the developer files have what you need.
yum install httpd-devel-2.0.54
Note that the reason I'm installing 2.0.54 is because that's the version of Apache that's running. It shows up on that phpinfo.php page that you browse to. You should make sure that you install the same version that you are running if it's changed since I posted this.
This will ask you about installing 4 packages and updating 11 more - don't worry, just let 'er rip!

20. Now for the lovely configuration and compile runs. First, change to the php source directory:
cd php-5.1.2

21. Now run the configuration. Okay, this is a pretty big and hairy command, but basically it is the exact same configuration that shows in that phpinfo.php browse that you did earlier, with a few minor changes:
'--with-mysql' rather than '--without-mysql' - the reason we're all here
'--without-unixODBC' rather than '--with-unixODBC=shared,/usr' - otherwise you get a lovely config error 'cause it isn't installed by default on Core 4
'--without-pspell' rather than '--with-pspell' - yet another thing that Core 4 is missing
And here's the line to execute - just copy and paste it
./configure '--build=i386-redhat-linux' '--host=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--without-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-pear=/usr/share/pear' '--with-kerberos' '--enable-ucd-snmp-hack' '--without-unixODBC' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-apxs2=/usr/sbin/apxs' '--with-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba'

22. Pray and then press Enter
If all goes well, you'll get a License message and "Thank you for using PHP.". You're welcome.

23. Now you have to compile the configuration you just built. That's easy:
make
Note that there are quite a few parameters differ in signedness warnings - don't worry, the signedness-challenged nature of the php source doesn't seem to hurt anything.

24. Now install it - first, stop Apache:
/sbin/service httpd stop

25. Now run the install: make install

26. Before restarting and testing everything, you need to avoid a Warning that Apache shows due to the install causing a duplicate line in the Apache configuration. So edit the Apache config file:
vi /etc/httpd/conf/httpd.conf
and locate LoadModule php5_module /usr/lib/httpd/modules/libphp5.so and add a # before it:
# LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
(remember press i to insert, then Escape and :wq to write it and quit)

27. Now for the big moment, restart Apache!
/sbin/service httpd restart

Check the installation by browsing once again to http://localhost/phpinfo.php and see if you were successful!

Please let me know if this works.

Thanks
Sachin

Offline

 
  • Index
  •  » PHP
  •  » Problem configuring php 5.1.6 with mysql 5.0.24a on Fedora 4

Board footer

OPML feedsRSS feeds



Powered by WWWThreads Forum
© Copyright 2006, WWWThreads