[phplib] RE: Still Cannot connect php3 with mysql ... From: Kofler Thomas (Thomas.Kofler <email protected>)
Date: 09/13/00

for trouble - shooting:
create a file test.php3 with the content:
<? phpinfo() ?>

If you browse the file, then there must be a section with mysql, eg.

mysql
MySQL Support enabled
Active Persistent Links 1
Active Links 1
Client API version 3.23.10-alpha
MYSQL_INCLUDE
MYSQL_LFLAGS
MYSQL_LIBS

> -----Original Message-----
> From: Varun [mailto:vsuri <email protected>]
> Sent: Wednesday, September 13, 2000 2:06 PM
> To: Kofler Thomas
> Cc: phplib <email protected>
> Subject: Still Cannot connect php3 with mysql ...
>
>
> hi
> thanx...for ur help......this is what i did....but still
> can't connect mysql
> and php3
> (after extracting all gz file of apache, mysql & php4 in the
> tmp, of course
> making their indiviual directories) at the bach prompt
>
> #cd mysql-3.22.32
> #./configure --prefix=/usr/local/mysql
> #make
> #make install
> # scripts/mysql_install_db
> # cd /usr/local/mysql/bin
> # ./safe_mysqld &
> # ./mysqladmin -u root password 'mypassword'
>
> #cd /usr/local/mysql/bin
> #mysqlshow -p
>
> it displays the database
>
> #mysql -u root -p
> password entered then
>
> i created a database named test2 and made a table named books
> which has one
> entry
>
> Now the apache installation
>
> # cd /tmp/apache
> # gunzip -c apache_1.3.12.tar.gz | tar xf -
> # cd apache_1.3.12
> # ./configure --prefix=/usr/local/apache
> # cd ..
>
> Now PHP installation
>
> # tar xvfz php-4.0.24.tar.gz
> #cd phpdirectory
>
> # ./configure --with-mysql=/usr/local/mysql \
> --with-xml \
> --with-apache=../apache_1.3.12 \
> --enable-track-vars
>
> # make
> # make install
> # cp php.ini-dist /usr/local/lib/php.ini
>
> now i made a test1.php3 , copied the file in
> /home/httpd/html/ which had
>
> <?
> $dbuser = 'root';
> $dbhost = 'localhost';
> $dbpass = 'gavemypassword';
> $dbname = 'test2';
> $dbtble = 'books';
> $mysql_link = mysql_connect($dbhost,$dbuser,$dbpass);
> <-----THIS IS WHERE
> THE ERROR OCCURS
> $column = mysql_list_fields($dbname,$dbtble,$mysql_link);
> for($i=0; $i< mysql_num_fields($column); $i++ )
> {
> print mysql_field_name($column,$i )."<br>";
> }
> ?>
>
> FATAL ERROR: Call to unsupported or undefined function
> mysql_connect() in
> /home/httpd/html/test1.php3 on line number which is show above
>
>
>
>
>
>
>
>
> ----- Original Message -----
> From: Kofler Thomas <Thomas.Kofler <email protected>>
> To: 'Varun' <vsuri <email protected>>; <phplib <email protected>>
> Sent: Monday, September 11, 2000 12:16 PM
> Subject: RE: [phplib] cannot connect php3 with mysql ...
>
>
> > Did you install php with mysql - Support ?
> >
> > ./configure --with-apxs=/usr/sbin/apxs --with-mysql
> > (as DSO module for apache)
> >
> > I dont know if the stanard Red Hat 6.2 install of php
> supports mysql.
> >
> > Here you can get the PHP4 - rpms for PII/PIII and AMD -
> computers with
> mysql
> > - Support:
> >
> > http://fsr.ku.dk/people/troels/rpms/php/
> >
> > Greetings
> > - Thomas
> >
> > > -----Original Message-----
> > > From: Varun [mailto:vsuri <email protected>]
> > > Sent: Saturday, September 09, 2000 10:36 AM
> > > To: phplib <email protected>
> > > Subject: [phplib] cannot connect php3 with mysql ...
> > >
> > >
> > > hi
> > >
> > > i have red hat 6.2, php3 & mysql.....i'm unable to connect a
> > > php3 program to the database.....it gives some call
> > > error.....where i give the mysql_connect(....)...i installed
> > > mysql & php through rpm's....any help
> > >
> > > Varun
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> > For additional commands, e-mail: phplib-help <email protected>
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>