LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2005, 08:06 AM   #1
krunal
LQ Newbie
 
Registered: Apr 2005
Posts: 14

Rep: Reputation: 0
problems in installing php with mysql


hi

i tried to install php using following command :
--------------------------------------------------------------------------------------

'./configure' '--enable-versioning' '--enable-memory-limit' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--with-mysql=/usr/local' '--disable-all' '--with-regex=php' '--disable-cli' '--with-apxs2=/usr/local/sbin/apxs' '--prefix=/usr/local' 'i386-portbld-freebsd5.4'

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

after running "Make" and "make install" when i tried to restart apache, it gave me the following error:

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

Syntax error on line 274 of /usr/local/etc/apache2/httpd.conf:
Cannot load /usr/local/libexec/apache2/libphp4.so into server: /usr/local/libexec/apache2/libphp4.so: Undefined symbol "mysql_drop_db"
--------------------------------------------------------------------------------------

Line number 274 in httpd.conf is :

LoadModule php4_module libexec/apache2/libphp4.so

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

In the above configure command if i remove the path to mysql i.e.

'--with-mysql' instead of '--with-mysql=/usr/local'

then apache does not give any error. But i don't want it to do that way.

Please help.
 
Old 08-17-2005, 08:50 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
Blog Entries: 1

Rep: Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059
Quote:
--with-mysql=/usr/local
Are you sure the /usr/local is you mysql install directory. It should be something like /usr/local/mysql
 
Old 08-18-2005, 07:15 AM   #3
krunal
LQ Newbie
 
Registered: Apr 2005
Posts: 14

Original Poster
Rep: Reputation: 0
i re-installed mysql at /usr/local/mysql.
but the same problem persisted.(when i installed using -with--mysql=/usr/local/mysql)
Then i installed php without giving the path to mysql i.e. only '-with--mysql'.
And then installed the package "php4-mysql".
Now it is working fine.

Any thoughts on what was the previous problem ?
 
Old 08-18-2005, 08:38 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,204
Blog Entries: 1

Rep: Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059Reputation: 2059
When you compile php with the "--with-mysql" you use the built-in mysql support of php. When you add the path to your mysql installation then php uses the header files of your version of mysql to compile the mysql support. I don't know how you installed mysql, or what php4-mysql package is, but I suspect that you missed those header files, or they were the wrong version and that package fixed it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems installing MySql & PHP from rpms? Nelsond Fedora 3 08-12-2005 11:09 AM
problems installing MySQL & PHP on FC4 alpineedge3 Linux - Newbie 9 07-23-2005 05:00 PM
Installing PHP 5 on Apache_v2 MySQL q.sa Linux - Software 1 06-20-2005 01:14 AM
Installing Apache, MySQL and PHP foo_mulan Linux - Newbie 1 07-16-2004 06:28 AM
Installing MySQL.4.0.17 and php support for Mysql on RedHat 9.0 Neha Linux - Software 13 12-29-2003 12:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration