LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   debian php installs without mysql (https://www.linuxquestions.org/questions/linux-software-2/debian-php-installs-without-mysql-320605/)

Red Squirrel 05-05-2005 11:49 PM

debian php installs without mysql
 
I installed debian and selected the webserver option. The problem is that php is installed without mysql. I installed mysql but it did not reconfigure php with mysql. In phpinfo() it shows this configure string:

../configure' '--prefix=/usr' '--with-apxs2=/usr/bin/apxs2' '--with-config-file-path=/etc/php4/apache2' '--enable-memory-limit' '--disable-debug' '--with-regex=php' '--disable-rpath' '--disable-static' '--with-pic' '--with-layout=GNU' '--with-pear=/usr/share/php' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db4' '--with-iconv' '--enable-exif' '--enable-filepro' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--with-pcre-regex=/usr' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--disable-xml' '--with-expat-dir=/usr' '--with-xmlrpc' '--enable-yp' '--with-zlib' '--without-pgsql' '--with-kerberos=/usr' '--with-openssl=/usr' '--with-zip=/usr' '--enable-dbx' '--with-mime-magic=/usr/share/misc/file/magic.mime' '--with-exec-dir=/usr/lib/php4/libexec' '--without-mm' '--without-mysql' '--without-sybase-ct'

How can I reinstall it but change the --without-mysql part to with-mysql? I can't seem to find anything with this in the documentation. It simply states that everything should be working and all I have left to do is set the root password. But that's not the case since mysql_connect() and other sql functions are not even reconized.

hw-tph 05-06-2005 02:15 AM

Installing the php4-mysql package is probably a good start. :)


Håkan

RomanG 05-06-2005 03:24 AM

Hello.
Code:

./configure --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-sockets
and add other parameters you need
Code:

./configure --help
will help you alot.


Red Squirrel 05-06-2005 11:58 AM

How do I do that with apt-get? And if I install the php4-mysql package will it conflict with the current php4-common one? or will it automaticly just reconfigure it?

HappyTux 05-06-2005 12:20 PM

Quote:

Originally posted by Red Squirrel
How do I do that with apt-get? And if I install the php4-mysql package will it conflict with the current php4-common one? or will it automaticly just reconfigure it?
It should be automatically configured and the package depends on php4-common being installed so there will be no conflict.

Code:

>$ apt-cache show php4-mysql
Package: php4-mysql
Priority: optional
Section: web
Installed-Size: 76
Maintainer: Adam Conrad <adconrad@0c3.net>
Architecture: i386
Source: php4
Version: 4:4.3.10-13
Replaces: php4-cgi-mysql
Depends: libc6 (>= 2.3.2.ds1-21), libmysqlclient12, debconf (>= 0.5) | debconf-2.0, phpapi-20020918, php4-common (= 4:4.3.10-13)
Filename: pool/main/p/php4/php4-mysql_4.3.10-13_i386.deb
Size: 21280
MD5sum: d72955d515598a1d6e313d749c2058de
Description: MySQL module for php4
 This package provides a module for MySQL database connections directly from
 PHP scripts.
 .
 PHP4 is an HTML-embedded scripting language. Much of its syntax is borrowed
 from C, Java and Perl with a couple of unique PHP-specific features thrown
 in. The goal of the language is to allow web developers to write
 dynamically generated pages quickly.


Red Squirrel 05-06-2005 06:13 PM

Turns out I had to reboot and everything works now! I usually don't forget that part, having worked with windows for so long. You plug in a different mouse and have to restart lol.

RomanG 05-06-2005 06:37 PM

linux is quite different from Windows. You do not need to reboot at all, except you install new kernel. Simply restart some services and that is all you need to be happy with your new soft.

Red Squirrel 05-06-2005 07:06 PM

Yeah that's what I figured but for php it must of been different, since I was restarting apache and it was not working. Unless I had to restart mysql too. Either way it works now so that's good. Moving on to email, which is the harder part.

tkarkkainen 05-31-2005 05:29 AM

I'm having the very same problem. I've installed at least the following packages with apt-get:

apache2
mysql-server-4.1
php4
libapache2-mod-php4
php4-mysql

It must be something very simple. Any ideas?

tkarkkainen 05-31-2005 07:51 AM

This is solved now. It turned out that I had edited the php.ini for apache, while it should've been php.ini for apache2.

mrspcs 11-06-2005 07:10 AM

Same problem here, I also installed the php4-mysql but after that mysql still doesn't work.
Also reinstalled everything several times. but still no luck.

Can anyone help me.


All times are GMT -5. The time now is 03:46 AM.