From owner-freebsd-questions Fri Jul 19 8:53:53 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 548E837B401 for ; Fri, 19 Jul 2002 08:53:50 -0700 (PDT) Received: from sub21-156.member.dsl-only.net (sub21-156.member.dsl-only.net [63.105.21.156]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6E8343E67 for ; Fri, 19 Jul 2002 08:53:49 -0700 (PDT) (envelope-from nkinkade@dsl-only.com) Received: from sub21-156.member.dsl-only.net (freebsd.localhost.localdomain [127.0.0.1]) by sub21-156.member.dsl-only.net (8.12.4/8.12.4) with SMTP id g6JFpknI098442; Fri, 19 Jul 2002 08:51:48 -0700 (PDT) (envelope-from nkinkade@dsl-only.com) Date: Fri, 19 Jul 2002 08:51:41 -0700 From: Nathan Kinkade To: David Banning 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> X-Mailer: Sylpheed version 0.7.8claws (GTK+ 1.2.10; i386-portbld-freebsd4.6) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 19 Jul 2002 03:08:32 -0400 David Banning 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 "". 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