Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2002 08:51:41 -0700
From:      Nathan Kinkade <nkinkade@dsl-only.com>
To:        David Banning <david@skytrackercanada.com>
Cc:        questions@freebsd.org
Subject:   Re: php-mysql question
Message-ID:  <20020719085141.667f52fd.nkinkade@dsl-only.com>
In-Reply-To: <20020719030832.A88231@skytrackercanada.com>
References:  <20020719030832.A88231@skytrackercanada.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Jul 2002 03:08:32 -0400
David Banning <david@skytrackercanada.com> wrote:

> I just attempted to install php-templates. That seemed to install a
> newer version of mod-php4 from the ports. It seems that apache, ssl,
> php and mysql all work, but I cannot access mysql through php anymore.
> 
> How does php know where to find the database structure of mysql?
> I have never had a php.ini, as I just went by the
> defaults. I wonder whether the defaults have changed in newer
> releases?

PHP doesn't work directly with MySQL databases, thus it doesn't have to
know where to find them.  It simply talks to the `mysqld` (MySQL Daemon)
which should be listening on a standard port.  In any case, double check
that the newer version of PHP was compiled with MySQL support.  Create a
file called "test.php" in your WWW root and add this one line to the
file "<? phpinfo() ?>".  Open the file in a browser and a whole slew of
infomation about PHP should come up.  Look in the "Configuration
Commands" section for something like `--with-mysql`.  If it's not there,
you will need to recompile PHP with MySQL support.  If it's there, 
check to make sure that `mysqld` is running.  Maybe do a `sockstat |
grep mysql` - you should see an entry for mysqld listening on port 3306.

Nathan  

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020719085141.667f52fd.nkinkade>