|
Posted by Al Dykes on 03/08/06 15:22
In article <dYCdndyUifG-UpPZRVn-rg@comcast.com>,
Jerry Stuckle <jstucklex@attglobal.net> wrote:
>Al Dykes wrote:
>> Is there a usenet group for Apache questions? If I knew of one I'd
>> post the question there.
>>
>
>How about alt.apache.configuration?
>
>> I can't get a MySQL connection in PHP code under apache to work.
>>
>
>Not good. :-)
>
>> I'm learning LAMP, starting on a w2k box. I've downloaded recent
>> copies of Apache, MySQL and PHP and done the setup and it seems to
>> work,except for SQL. I can run pure PHP under the apache server and
>> I've installed phpmyadmin and I can make a database and then access it
>> from mysql in a cmd shell.
>>
>
>Then MySQL and PHP ARE working together.
>
>> I suspect there is some configuration in Apache to talk to Mysql that
>> I've missed. There is no explicit mention of MySQL in my httpd.conf.
>>
>
>You shouldn't need it in the httpd.conf file. Apache isn't accessing
>MySQL - PHP is. But it does need to be in your php.ini file.
>
Thanks for you comments. I've gutted the Dreamweaver code and reduced
the problem to textbook code;
<?php
@mysql_connect("localhost", "book2", "book2")
or die("Could not connect to MySQL server!");
@mysql_select_db("book2")
or die("Could not select database!");
?>
It works and I'm on to other problems. I'll deal with DW later. I'll
deal with dreamweaver later.
--
a d y k e s @ p a n i x . c o m
Don't blame me. I voted for Gore.
Navigation:
[Reply to this message]
|