Yeah thanks for the phpinfo() tip. I guess I know that MySQL isn't working
with PHP cos I'd already checked that. Bit silly I presumed that installing
it all at the same time as installing Linux it would all work together.

In the package manager for RedHat, under the Web Server Section, PHP is
listed for installation, along with a few modules to go with it (ie. LDAP
and IMAP, and some stuff to do with PostgreSQL), but there is no option to
install a MySQL module with it. Seems a bit silly really.

The version of PHP is 4.22.2-8.0.5 (4.2 basically), and I don't know what
version MySQL was built into PHP from, but it doesn't seem to be on this
version.

I simplified my code to just this, and got the same message, so I don't
think adding my own code will help:

<?

if ($connection = mysql_connect("localhost", "[username]", "[password]"))

echo "hooray!";

else

echo "oopsie!";

?>

I don't know what you think about all this, maybe I should download
distributions and install them myself, but if I can sort it without having
to that would be great as I'm only just starting to get my head around Linux
after all these years.

Thanks for your help guys :)

Jono

"Ricardo Lopes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Call to undefined function mysql_connect(), this means that php doesnt
> reconize mysql_connect() as a function, this could be because you use the
> wrong name for the function (in this case it seems ok, check your code),
or
> because the mysql extension isn't loaded (it is loaded by default, and it
> should be if you didnt mess the php.ini file or the extensions directory).
>
> There is an easy way to check if the extension is loaded, create a phpinfo
> script:
>
> <?php
>     phpinfo();
> ?>
>
> and serach for mysql to see extension is loaded.
>
> Hope this helps.
>
> ----- Original Message -----
> From: "JeRRy" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, February 26, 2004 11:59 AM
> Subject: [PHP-DB] Re: call to undefined function mysql_connect() [PHP /
> MySQL / Red Hat 8]
>
>
> > To: [EMAIL PROTECTED]
> > From: "Jono" <[EMAIL PROTECTED]>
> > Date: Wed, 25 Feb 2004 20:50:37 -0000
> > Subject: call to undefined function mysql_connect()
> > [PHP / MySQL / Red Hat 8]
> >
> >
> > Hey.
> >
> > I've just installed Red Hat 8 from a downloaded
> > distribution and have
> > set up
> > Apache, PHP and MySQL. The problem I have is my old
> > code that I wrote
> > in a
> > Windows environment doesn't work.
> >
> > The error I get is: call to undefined function
> > mysql_connect()
> >
> > I know that Apache is running fine and I know that PHP
> > and MySQL run
> > okay
> > independantly of each other, but I can't work out how
> > to get them
> > working
> > together.
> >
> > Any Ideas?
> >
> > Thanks, Jono.
> >
> >
> > Hi,
> >
> > Generally you need to post your code to get help,
> > otherwise we can't show you where the problem is.  So
> > could you please, unless you have found a solution,
> > post your code so we can see what's going on and point
> > you in the right direction? :)
> >
> > J
> >
> >
> > Find local movie times and trailers on Yahoo! Movies.
> > http://au.movies.yahoo.com
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to