Re: [PHP] PHP/MySQL fatal error

2004-08-28 Thread Jason Wong
On Saturday 28 August 2004 09:43, gc wrote:
 Hi all,

 I'm Gene Candelaria and I'm a PHP and MySQL newbie.

You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a References: header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view (tree view) of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on New message instead of Reply within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.

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



RE: [PHP] PHP/MySQL fatal error

2004-08-28 Thread gc
Please accept my appologies, it won't happen again. I didn't realize. I must
have missed this in the welcome message. 

gene

-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 27, 2004 11:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP/MySQL fatal error


On Saturday 28 August 2004 09:43, gc wrote:
 Hi all,

 I'm Gene Candelaria and I'm a PHP and MySQL newbie.

You have started a new thread by taking an existing posting and replying to
it while you changed the subject.

That is bad, because it breaks threading. Whenever you reply to a message,
your mail client generates a References: header that tells all recipients
which posting(s) your posting refers to. A mail client uses this information
to build a threaded view (tree view) of the postings.

With your posting style you successfully torpedoed this useful feature; your
posting shows up within an existing thread it has nothing to do with.

Always do a fresh post when you want to start a new thread. To achieve this,
click on New message instead of Reply within your mail client, and enter
the list address as the recipient. You can save the list address in your
address book for convenience.

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



[PHP] PHP/MySQL fatal error

2004-08-27 Thread gc
Hi all,

I'm Gene Candelaria and I'm a PHP and MySQL newbie.

I have a feeling a lot of you have seen this before. I'm teaching myself
PHP/MySQL trying to setup a guestbook. I'm running latest versions of
Apache, PHP and MySql on my WIN2k machine. I have them working, except, I
get the messages:

Fatal error: Call to undefined function mysql_connect() 

Fatal error: Call to undefined function mysql_pconnect() 

when serving two of my php docs (code snippets below). I've been reading and
searching and trying all sorts of things to fix this and nothing works. I've
removed the comment from the line extension=php_mysql.dll in php.ini.
(Below is the MySQL section of php.ini. It's pretty standard, I'm using
defaults.) I edited my Apache config file with the needed lines:

 
### Section 4: PHP 5 Module
#
ScriptAlias /cgi-bin/ C:/Program Files/Apache Group/Apache2/cgi-bin/
LoadModule php5_module php/php5apache2.dll
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir C:/Program Files/Apache Group/Apache2/PHP


When I run my test.php doc, MySQL is not listed. Do I need to enable it in
the configure command? How do I edit the configure command. Per my test.php,
It now reads:

Configure Command  cscript /nologo configure.js --with-gd=shared
--enable-snapshot-build 
  

Online I read these comments: 
 
Ok, your php.ini file is set to 'on' for mysql.allow_persistent, but is
mysql  really enabled? Does your configure command look something like
this?
'./configure' '--with-mysql=/usr/local/mysql'

If you don't have --with-mysql it means that you cannot use mysql functions,
so compile PHP again 
with this option.



How do I edit that pesky configure command. I searched, but couldn't find an
answer. So, where am I going wrong? Thanks for reading and big thanks for
any help.
 
gene
[EMAIL PROTECTED]



 
php.ini snippet (comments removed for easier reading:

[MySQL]

mysql.allow_persistent = On
 
mysql.max_persistent = -1
 
mysql.max_links = -1

mysql.default_port =
 
mysql.default_socket =

mysql.default_host =

mysql.default_user =
 
mysql.default_password =

mysql.connect_timeout = 60

mysql.trace_mode = Off 



guest.php code snippet:

//connect 
// change localhost to your db host name 
mysql_pconnect( http://aulon.dyndns.org/;, $username, $password) 
   or die( Unable to connect to SQL server); 
mysql_select_db( $db_name) or die( Unable to select database); 
 
 
guestbook.php code snippet:

// Connect to DB

$li = mysql_connect($dbHost, $dbUser, $dbPass) or die(Could not connect);
mysql_select_db($dbDatabase, $li) or die (could not select DB); 

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