php-windows Digest 7 Aug 2007 06:08:06 -0000 Issue 3303
Topics (messages 28322 through 28339):
Re: Help with if
28322 by: Stut
28323 by: Stephen
28324 by: Carlton Whitehead
28325 by: Luis Moreira (ESI-GSQP)
28326 by: Thomas Hearn
28327 by: Stephen
28328 by: Stut
28339 by: Gustav Wiberg
PHP, MYSQL and Apache
28329 by: KM
28330 by: Bill Bolte
28331 by: Carlton Whitehead
28332 by: KM
28333 by: Carlton Whitehead
28334 by: KM
28335 by: KM
28336 by: Jeff White
28337 by: KM
Can php execute separte .net file
28338 by: Tony Trapp
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Stephen wrote:
i'm tryin to get the if command to work on my site so that I can get the
buttons to show for registering if a certain user is at the first rank.
The current code that I have is as follows;
</php
if ($rank) !== Unregistered) {
Curious PHP tag, you don't want the ) after $rank and Unregistered I'm
guessing should be in quotes. I suggest you copy/paste your code instead
of re-typing it (assuming you re-typed it).
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
i did take out the ) after them both and it still is not working. I have
copy and pasted it, I just removed the huge blog of info that was given from
PayPal that is not important.
"Stut" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Stephen wrote:
>> i'm tryin to get the if command to work on my site so that I can get the
>> buttons to show for registering if a certain user is at the first rank.
>>
>> The current code that I have is as follows;
>>
>> </php
>> if ($rank) !== Unregistered) {
>
> Curious PHP tag, you don't want the ) after $rank and Unregistered I'm
> guessing should be in quotes. I suggest you copy/paste your code instead
> of re-typing it (assuming you re-typed it).
>
> -Stut
>
> --
> http://stut.net/
--- End Message ---
--- Begin Message ---
Hi Stephen,
It looks like there are a few problems:
</php should change to <?php (your script shouldn't be parsing at all right
now)
In your second line, do you have a constant named Unregistered, or are you
trying to check if $rank is a string containing "Unregistered"? I'm guessing
that line should change to:
if ($rank !== 'Unregistered') {
Regards,
Carlton Whitehead
----- Original Message -----
From: "Stephen" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Monday, August 6, 2007 11:18:22 AM (GMT-0500) America/New_York
Subject: [PHP-WIN] Help with if
i'm tryin to get the if command to work on my site so that I can get the
buttons to show for registering if a certain user is at the first rank.
The current code that I have is as follows;
</php
if ($rank) !== Unregistered) {
echo '<form action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
but24.gif" border="0" name="submit" alt="Make payments with PayPal -
it's fast, free and secure!">
<img alt="" border="0"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1"
height="1">
<rest of the code>
} else {
echo '<A HREF="https://www.paypal.com/cgi-bin/webscr?
cmd=_subscr-find&alias=therealzerocool%40gmail%2ecom">
<IMG SRC="https://www.paypal.com/en_US/i/btn/cancel_subscribe_gen.gif"
BORDER="0">
</A>';
}
?>
On the account i'm testing with it should not be showing both buttons on the
lase one, but both of them show. What am I doing wrong?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I believe the syntax is not correct.
First, you should have
if ($rank !== Unregistered) {
or
if (($rank) !== Unregistered) {
Otherwise, the count for "open parenthesis" and "close parenthesis" do not
match.
Also, is Unregistered a defined type?
If not, how do you compare a variable ($rank) against it ?
Luis
-----Original Message-----
From: Stephen [mailto:[EMAIL PROTECTED]
Sent: segunda-feira, 6 de Agosto de 2007 16:31
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Help with if
i did take out the ) after them both and it still is not working. I have
copy and pasted it, I just removed the huge blog of info that was given from
PayPal that is not important.
"Stut" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Stephen wrote:
>> i'm tryin to get the if command to work on my site so that I can get the
>> buttons to show for registering if a certain user is at the first rank.
>>
>> The current code that I have is as follows;
>>
>> </php
>> if ($rank) !== Unregistered) {
>
> Curious PHP tag, you don't want the ) after $rank and Unregistered I'm
> guessing should be in quotes. I suggest you copy/paste your code instead
> of re-typing it (assuming you re-typed it).
>
> -Stut
>
> --
> http://stut.net/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Stephen,
Should be if ($rank != Unregistered)
However, what is Unregistered? Is it a variable, constant?
There is a possibility that it should be ($rank != $Unregistered)
If you are comparing $rank to an actual text value then it should be
($rank != "Unregistered")
Hopefully that helps.
Tom
Stephen wrote:
i did take out the ) after them both and it still is not working. I have
copy and pasted it, I just removed the huge blog of info that was given from
PayPal that is not important.
"Stut" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Stephen wrote:
i'm tryin to get the if command to work on my site so that I can get the
buttons to show for registering if a certain user is at the first rank.
The current code that I have is as follows;
</php
if ($rank) !== Unregistered) {
Curious PHP tag, you don't want the ) after $rank and Unregistered I'm
guessing should be in quotes. I suggest you copy/paste your code instead
of re-typing it (assuming you re-typed it).
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
$rank would be called from the users file and then if their rank was set at
Unregistered i want it to display the subscription button and if it was any
other rank then it shows the Cancle Subscription button
""Luis Moreira (ESI-GSQP)"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I believe the syntax is not correct.
>
> First, you should have
>
> if ($rank !== Unregistered) {
>
> or
>
> if (($rank) !== Unregistered) {
>
> Otherwise, the count for "open parenthesis" and "close parenthesis" do not
> match.
>
> Also, is Unregistered a defined type?
> If not, how do you compare a variable ($rank) against it ?
>
>
> Luis
>
>
> -----Original Message-----
> From: Stephen [mailto:[EMAIL PROTECTED]
> Sent: segunda-feira, 6 de Agosto de 2007 16:31
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] Help with if
>
> i did take out the ) after them both and it still is not working. I have
> copy and pasted it, I just removed the huge blog of info that was given
> from
>
> PayPal that is not important.
> "Stut" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Stephen wrote:
>>> i'm tryin to get the if command to work on my site so that I can get the
>>> buttons to show for registering if a certain user is at the first rank.
>>>
>>> The current code that I have is as follows;
>>>
>>> </php
>>> if ($rank) !== Unregistered) {
>>
>> Curious PHP tag, you don't want the ) after $rank and Unregistered I'm
>> guessing should be in quotes. I suggest you copy/paste your code instead
>> of re-typing it (assuming you re-typed it).
>>
>> -Stut
>>
>> --
>> http://stut.net/
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Stephen wrote:
i did take out the ) after them both and it still is not working. I have
copy and pasted it, I just removed the huge blog of info that was given from
PayPal that is not important.
Make sure you have display_errors on and error_reporting is set to E_ALL
in your php.ini. Without those you're not getting the full picture.
Also try viewing the source of the page that is output. Are you seeing
any PHP code in it?
-Stut
--
http://stut.net/
"Stut" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Stephen wrote:
i'm tryin to get the if command to work on my site so that I can get the
buttons to show for registering if a certain user is at the first rank.
The current code that I have is as follows;
</php
if ($rank) !== Unregistered) {
Curious PHP tag, you don't want the ) after $rank and Unregistered I'm
guessing should be in quotes. I suggest you copy/paste your code instead
of re-typing it (assuming you re-typed it).
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
Hi!
I saw a several things that other people has pointed out, but there is another
thing...
You are missing '; after height="1"
echo '<form action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
but24.gif" border="0" name="submit" alt="Make payments with PayPal -
it's fast, free and secure!">
<img alt="" border="0"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1"
height="1">
The if-statement is missing a parenthese )
if ($rank) !== Unregistered) {
You have two right paranthesis and one left...
if ($rank) !== Unregistered) {
Could be
if ($rank !== Unregistered) {
OR
if (($rank) !== Unregistered) {
Or as someone else has pointed out:
if ($rank !== $Unregistered) {
</php should be <?php as someone has pointed out also
You can try to do this and see what happens. (and figure out what's the problem)
echo "rank=" . $rank;
echo "unregistered=" . Unregistered;
if ($rank) !== Unregistered) {
echo "true";
else {
echo "false";
}
Best regards
/Gustav Wiberg
-----Original Message-----
From: Stephen [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 5:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Help with if
i'm tryin to get the if command to work on my site so that I can get the
buttons to show for registering if a certain user is at the first rank.
The current code that I have is as follows;
</php
if ($rank) !== Unregistered) {
echo '<form action="https://www.paypal.com/cgi-bin/webscr"
method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-
but24.gif" border="0" name="submit" alt="Make payments with PayPal -
it's fast, free and secure!">
<img alt="" border="0"
src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1"
height="1">
<rest of the code>
} else {
echo '<A HREF="https://www.paypal.com/cgi-bin/webscr?
cmd=_subscr-find&alias=therealzerocool%40gmail%2ecom">
<IMG SRC="https://www.paypal.com/en_US/i/btn/cancel_subscribe_gen.gif"
BORDER="0">
</A>';
}
?>
On the account i'm testing with it should not be showing both buttons on the
lase one, but both of them show. What am I doing wrong?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 2007-08-05 16:16
--- End Message ---
--- Begin Message ---
I am attempting to use the following together….
MYSQL 5.0
Apache 2.2.4
PHP 5.2.3
PHP info I can get. I get the following statement whenever trying to get to
mysql
Here is the PHP code for what I’m trying to do…
<?php
// Connect to the database
$dbhost = 'localhost';
$dbusername = 'root';
$dbpasswd = 'joker';
$database_name = 'simple';
$connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
or die ('Couldn\'t connect to server.');
$db = mysql_select_db("$database_name", $connection)
or die('Couldn\'t select database.');
// Generate SQL code to store data on database.
$insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
1,2,3\')';
// Execute SQL code.
mysql_query( $insert_sql )
or die ( 'It Didn\’t Work: ' . mysql_error() );
// Tell User we are done.
echo 'Code Inserted';
?>
Fatal error: Call to undefined function mysql_connect() in C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php on
line 7
Anyone had this before and have a solution, it would be appreciated.
Keith
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
--- End Message ---
--- Begin Message ---
Looks like the mysql extension isn't enable in your php.ini. Make sure
it is enabled in the .ini and that the extension is in the appropriate
folder.
-----Original Message-----
From: KM [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 3:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP, MYSQL and Apache
I am attempting to use the following together....
MYSQL 5.0
Apache 2.2.4
PHP 5.2.3
PHP info I can get. I get the following statement whenever trying to
get to
mysql
Here is the PHP code for what I'm trying to do...
<?php
// Connect to the database
$dbhost = 'localhost';
$dbusername = 'root';
$dbpasswd = 'joker';
$database_name = 'simple';
$connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
or die ('Couldn\'t connect to server.');
$db = mysql_select_db("$database_name", $connection)
or die('Couldn\'t select database.');
// Generate SQL code to store data on database.
$insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
1,2,3\')';
// Execute SQL code.
mysql_query( $insert_sql )
or die ( 'It Didn\'t Work: ' . mysql_error() );
// Tell User we are done.
echo 'Code Inserted';
?>
Fatal error: Call to undefined function mysql_connect() in C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php
on
line 7
Anyone had this before and have a solution, it would be appreciated.
Keith
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
--- End Message ---
--- Begin Message ---
Keith,
Browse to your phpinfo(); page, and search it for mysql. Is it listed? If
not, the mysql module isn't enabled, and you shouldn't expect a mysql_connect
command to work. You may need to edit your php.ini and enable the
php_mysql.dll module.
Refer to the results of phpinfo(); for the path to the active php.ini file,
since sometimes this can be an unexpected location on Windows machines, at
least in my experience.
Regards,
Carlton Whitehead
----- Original Message -----
From: "KM" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Monday, August 6, 2007 4:58:36 PM (GMT-0500) America/New_York
Subject: [PHP-WIN] PHP, MYSQL and Apache
I am attempting to use the following together….
MYSQL 5.0
Apache 2.2.4
PHP 5.2.3
PHP info I can get. I get the following statement whenever trying to get to
mysql
Here is the PHP code for what I’m trying to do…
<?php
// Connect to the database
$dbhost = 'localhost';
$dbusername = 'root';
$dbpasswd = 'joker';
$database_name = 'simple';
$connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
or die ('Couldn\'t connect to server.');
$db = mysql_select_db("$database_name", $connection)
or die('Couldn\'t select database.');
// Generate SQL code to store data on database.
$insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
1,2,3\')';
// Execute SQL code.
mysql_query( $insert_sql )
or die ( 'It Didn\’t Work: ' . mysql_error() );
// Tell User we are done.
echo 'Code Inserted';
?>
Fatal error: Call to undefined function mysql_connect() in C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php on
line 7
Anyone had this before and have a solution, it would be appreciated.
Keith
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
--- End Message ---
--- Begin Message ---
Here is the section of my php.ini that contains the information
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_msql.dll
;extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
Is there something else I am missing?
Keith
-----Original Message-----
From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 5:11 PM
To: KM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
Keith,
Browse to your phpinfo(); page, and search it for mysql. Is it listed? If
not, the mysql module isn't enabled, and you shouldn't expect a mysql_connect
command to work. You may need to edit your php.ini and enable the
php_mysql.dll module.
Refer to the results of phpinfo(); for the path to the active php.ini file,
since sometimes this can be an unexpected location on Windows machines, at
least in my experience.
Regards,
Carlton Whitehead
----- Original Message -----
From: "KM" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Monday, August 6, 2007 4:58:36 PM (GMT-0500) America/New_York
Subject: [PHP-WIN] PHP, MYSQL and Apache
I am attempting to use the following together….
MYSQL 5.0
Apache 2.2.4
PHP 5.2.3
PHP info I can get. I get the following statement whenever trying to get to
mysql
Here is the PHP code for what I’m trying to do…
<?php
// Connect to the database
$dbhost = 'localhost';
$dbusername = 'root';
$dbpasswd = 'joker';
$database_name = 'simple';
$connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
or die ('Couldn\'t connect to server.');
$db = mysql_select_db("$database_name", $connection)
or die('Couldn\'t select database.');
// Generate SQL code to store data on database.
$insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
1,2,3\')';
// Execute SQL code.
mysql_query( $insert_sql )
or die ( 'It Didn\’t Work: ' . mysql_error() );
// Tell User we are done.
echo 'Code Inserted';
?>
Fatal error: Call to undefined function mysql_connect() in C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php on
line 7
Anyone had this before and have a solution, it would be appreciated.
Keith
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM
--- End Message ---
--- Begin Message ---
Keith,
Are you sure that's the same php.ini that is referenced by your
phpinfo(); script?
Have you restarted Apache since you enabled the extensions?
Regards,
Carlton Whitehead
KM wrote:
Here is the section of my php.ini that contains the information
;extension=php_bz2.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_msql.dll
;extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
;extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
;extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll
Is there something else I am missing?
Keith
-----Original Message-----
From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 5:11 PM
To: KM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
Keith,
Browse to your phpinfo(); page, and search it for mysql. Is it listed? If not, the mysql module isn't enabled, and you shouldn't expect a mysql_connect command to work. You may need to edit your php.ini and enable the php_mysql.dll module.
Refer to the results of phpinfo(); for the path to the active php.ini file,
since sometimes this can be an unexpected location on Windows machines, at
least in my experience.
Regards,
Carlton Whitehead
----- Original Message -----
From: "KM" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Monday, August 6, 2007 4:58:36 PM (GMT-0500) America/New_York
Subject: [PHP-WIN] PHP, MYSQL and Apache
I am attempting to use the following together….
MYSQL 5.0
Apache 2.2.4
PHP 5.2.3
PHP info I can get. I get the following statement whenever trying to get to
mysql
Here is the PHP code for what I’m trying to do…
<?php
// Connect to the database
$dbhost = 'localhost';
$dbusername = 'root';
$dbpasswd = 'joker';
$database_name = 'simple';
$connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
or die ('Couldn\'t connect to server.');
$db = mysql_select_db("$database_name", $connection)
or die('Couldn\'t select database.');
// Generate SQL code to store data on database.
$insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
1,2,3\')';
// Execute SQL code.
mysql_query( $insert_sql )
or die ( 'It Didn\’t Work: ' . mysql_error() );
// Tell User we are done.
echo 'Code Inserted';
?>
Fatal error: Call to undefined function mysql_connect() in C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php on
line 7
Anyone had this before and have a solution, it would be appreciated.
Keith
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM
--- End Message ---
--- Begin Message ---
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\WINDOWS\php.ini
This is indeed the ini file I am editing and saving.
And yes, any time I've made changes to it, I have restarted apache.
Thanks
Keith
-----Original Message-----
From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 9:01 PM
To: KM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
Keith,
Are you sure that's the same php.ini that is referenced by your
phpinfo(); script?
Have you restarted Apache since you enabled the extensions?
Regards,
Carlton Whitehead
KM wrote:
> Here is the section of my php.ini that contains the information
>
> ;extension=php_bz2.dll
> ;extension=php_curl.dll
> ;extension=php_dba.dll
> ;extension=php_dbase.dll
> ;extension=php_exif.dll
> ;extension=php_fdf.dll
> ;extension=php_gd2.dll
> ;extension=php_gettext.dll
> ;extension=php_gmp.dll
> ;extension=php_ifx.dll
> ;extension=php_imap.dll
> ;extension=php_interbase.dll
> ;extension=php_ldap.dll
> ;extension=php_mbstring.dll
> ;extension=php_mcrypt.dll
> ;extension=php_mhash.dll
> ;extension=php_mime_magic.dll
> ;extension=php_ming.dll
> ;extension=php_msql.dll
> ;extension=php_mssql.dll
> extension=php_mysql.dll
> extension=php_mysqli.dll
> ;extension=php_oci8.dll
> ;extension=php_openssl.dll
> ;extension=php_pdo.dll
> ;extension=php_pdo_firebird.dll
> ;extension=php_pdo_mssql.dll
> ;extension=php_pdo_mysql.dll
> ;extension=php_pdo_oci.dll
> ;extension=php_pdo_oci8.dll
> ;extension=php_pdo_odbc.dll
> ;extension=php_pdo_pgsql.dll
> ;extension=php_pdo_sqlite.dll
> ;extension=php_pgsql.dll
> ;extension=php_pspell.dll
> ;extension=php_shmop.dll
> ;extension=php_snmp.dll
> ;extension=php_soap.dll
> ;extension=php_sockets.dll
> ;extension=php_sqlite.dll
> ;extension=php_sybase_ct.dll
> ;extension=php_tidy.dll
> ;extension=php_xmlrpc.dll
> ;extension=php_xsl.dll
> ;extension=php_zip.dll
>
> Is there something else I am missing?
>
> Keith
>
>
> -----Original Message-----
> From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 06, 2007 5:11 PM
> To: KM
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
>
> Keith,
>
> Browse to your phpinfo(); page, and search it for mysql. Is it listed? If
> not, the mysql module isn't enabled, and you shouldn't expect a mysql_connect
> command to work. You may need to edit your php.ini and enable the
> php_mysql.dll module.
>
> Refer to the results of phpinfo(); for the path to the active php.ini file,
> since sometimes this can be an unexpected location on Windows machines, at
> least in my experience.
>
> Regards,
> Carlton Whitehead
>
> ----- Original Message -----
> From: "KM" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Sent: Monday, August 6, 2007 4:58:36 PM (GMT-0500) America/New_York
> Subject: [PHP-WIN] PHP, MYSQL and Apache
>
> I am attempting to use the following together….
>
>
>
> MYSQL 5.0
>
> Apache 2.2.4
>
> PHP 5.2.3
>
>
>
> PHP info I can get. I get the following statement whenever trying to get to
> mysql
>
>
>
>
>
> Here is the PHP code for what I’m trying to do…
>
>
>
> <?php
>
> // Connect to the database
>
> $dbhost = 'localhost';
>
> $dbusername = 'root';
>
> $dbpasswd = 'joker';
>
> $database_name = 'simple';
>
> $connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
>
> or die ('Couldn\'t connect to server.');
>
> $db = mysql_select_db("$database_name", $connection)
>
> or die('Couldn\'t select database.');
>
>
>
> // Generate SQL code to store data on database.
>
> $insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
> 1,2,3\')';
>
>
>
> // Execute SQL code.
>
> mysql_query( $insert_sql )
>
> or die ( 'It Didn\’t Work: ' . mysql_error() );
>
>
>
> // Tell User we are done.
>
> echo 'Code Inserted';
>
> ?>
>
>
>
>
>
> Fatal error: Call to undefined function mysql_connect() in C:\Program
> Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php on
> line 7
>
>
>
> Anyone had this before and have a solution, it would be appreciated.
>
>
>
> Keith
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
> 4:16 PM
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16
> PM
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16
> PM
>
>
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM
--- End Message ---
--- Begin Message ---
Not sure if this is the cause but I get this error in my apache error log
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program
Files\\PHP\\ext\\php_mysql.dll' - The specified module could not be found.\r\n
in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program
Files\\PHP\\ext\\php_mysqli.dll' - The specified module could not be found.\r\n
in Unknown on line 0
The files are there but should it be trying to access them with the path? It
shouldn’t have all those double \ should it?
-----Original Message-----
From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 9:01 PM
To: KM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
Keith,
Are you sure that's the same php.ini that is referenced by your
phpinfo(); script?
Have you restarted Apache since you enabled the extensions?
Regards,
Carlton Whitehead
KM wrote:
> Here is the section of my php.ini that contains the information
>
> ;extension=php_bz2.dll
> ;extension=php_curl.dll
> ;extension=php_dba.dll
> ;extension=php_dbase.dll
> ;extension=php_exif.dll
> ;extension=php_fdf.dll
> ;extension=php_gd2.dll
> ;extension=php_gettext.dll
> ;extension=php_gmp.dll
> ;extension=php_ifx.dll
> ;extension=php_imap.dll
> ;extension=php_interbase.dll
> ;extension=php_ldap.dll
> ;extension=php_mbstring.dll
> ;extension=php_mcrypt.dll
> ;extension=php_mhash.dll
> ;extension=php_mime_magic.dll
> ;extension=php_ming.dll
> ;extension=php_msql.dll
> ;extension=php_mssql.dll
> extension=php_mysql.dll
> extension=php_mysqli.dll
> ;extension=php_oci8.dll
> ;extension=php_openssl.dll
> ;extension=php_pdo.dll
> ;extension=php_pdo_firebird.dll
> ;extension=php_pdo_mssql.dll
> ;extension=php_pdo_mysql.dll
> ;extension=php_pdo_oci.dll
> ;extension=php_pdo_oci8.dll
> ;extension=php_pdo_odbc.dll
> ;extension=php_pdo_pgsql.dll
> ;extension=php_pdo_sqlite.dll
> ;extension=php_pgsql.dll
> ;extension=php_pspell.dll
> ;extension=php_shmop.dll
> ;extension=php_snmp.dll
> ;extension=php_soap.dll
> ;extension=php_sockets.dll
> ;extension=php_sqlite.dll
> ;extension=php_sybase_ct.dll
> ;extension=php_tidy.dll
> ;extension=php_xmlrpc.dll
> ;extension=php_xsl.dll
> ;extension=php_zip.dll
>
> Is there something else I am missing?
>
> Keith
>
>
> -----Original Message-----
> From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 06, 2007 5:11 PM
> To: KM
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
>
> Keith,
>
> Browse to your phpinfo(); page, and search it for mysql. Is it listed? If
> not, the mysql module isn't enabled, and you shouldn't expect a mysql_connect
> command to work. You may need to edit your php.ini and enable the
> php_mysql.dll module.
>
> Refer to the results of phpinfo(); for the path to the active php.ini file,
> since sometimes this can be an unexpected location on Windows machines, at
> least in my experience.
>
> Regards,
> Carlton Whitehead
>
> ----- Original Message -----
> From: "KM" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Sent: Monday, August 6, 2007 4:58:36 PM (GMT-0500) America/New_York
> Subject: [PHP-WIN] PHP, MYSQL and Apache
>
> I am attempting to use the following together….
>
>
>
> MYSQL 5.0
>
> Apache 2.2.4
>
> PHP 5.2.3
>
>
>
> PHP info I can get. I get the following statement whenever trying to get to
> mysql
>
>
>
>
>
> Here is the PHP code for what I’m trying to do…
>
>
>
> <?php
>
> // Connect to the database
>
> $dbhost = 'localhost';
>
> $dbusername = 'root';
>
> $dbpasswd = 'joker';
>
> $database_name = 'simple';
>
> $connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
>
> or die ('Couldn\'t connect to server.');
>
> $db = mysql_select_db("$database_name", $connection)
>
> or die('Couldn\'t select database.');
>
>
>
> // Generate SQL code to store data on database.
>
> $insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
> 1,2,3\')';
>
>
>
> // Execute SQL code.
>
> mysql_query( $insert_sql )
>
> or die ( 'It Didn\’t Work: ' . mysql_error() );
>
>
>
> // Tell User we are done.
>
> echo 'Code Inserted';
>
> ?>
>
>
>
>
>
> Fatal error: Call to undefined function mysql_connect() in C:\Program
> Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php on
> line 7
>
>
>
> Anyone had this before and have a solution, it would be appreciated.
>
>
>
> Keith
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
> 4:16 PM
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16
> PM
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16
> PM
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007 4:16 PM
--- End Message ---
--- Begin Message ---
Hello Keith,
I realize this may seem a bit tedious, but is your PHP directory in the
Windows PATH environment variable? And, if so, is the "libmysql.dll" file in
the PHP directory?
Jeff
-----Original Message-----
From: KM [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 9:22 PM
To: 'Carlton Whitehead'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] PHP, MYSQL and Apache
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\WINDOWS\php.ini
This is indeed the ini file I am editing and saving.
And yes, any time I've made changes to it, I have restarted apache.
Thanks
Keith
-----Original Message-----
From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 9:01 PM
To: KM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
Keith,
Are you sure that's the same php.ini that is referenced by your
phpinfo(); script?
Have you restarted Apache since you enabled the extensions?
Regards,
Carlton Whitehead
KM wrote:
> Here is the section of my php.ini that contains the information
>
> ;extension=php_bz2.dll
> ;extension=php_curl.dll
> ;extension=php_dba.dll
> ;extension=php_dbase.dll
> ;extension=php_exif.dll
> ;extension=php_fdf.dll
> ;extension=php_gd2.dll
> ;extension=php_gettext.dll
> ;extension=php_gmp.dll
> ;extension=php_ifx.dll
> ;extension=php_imap.dll
> ;extension=php_interbase.dll
> ;extension=php_ldap.dll
> ;extension=php_mbstring.dll
> ;extension=php_mcrypt.dll
> ;extension=php_mhash.dll
> ;extension=php_mime_magic.dll
> ;extension=php_ming.dll
> ;extension=php_msql.dll
> ;extension=php_mssql.dll
> extension=php_mysql.dll
> extension=php_mysqli.dll
> ;extension=php_oci8.dll
> ;extension=php_openssl.dll
> ;extension=php_pdo.dll
> ;extension=php_pdo_firebird.dll
> ;extension=php_pdo_mssql.dll
> ;extension=php_pdo_mysql.dll
> ;extension=php_pdo_oci.dll
> ;extension=php_pdo_oci8.dll
> ;extension=php_pdo_odbc.dll
> ;extension=php_pdo_pgsql.dll
> ;extension=php_pdo_sqlite.dll
> ;extension=php_pgsql.dll
> ;extension=php_pspell.dll
> ;extension=php_shmop.dll
> ;extension=php_snmp.dll
> ;extension=php_soap.dll
> ;extension=php_sockets.dll
> ;extension=php_sqlite.dll
> ;extension=php_sybase_ct.dll
> ;extension=php_tidy.dll
> ;extension=php_xmlrpc.dll
> ;extension=php_xsl.dll
> ;extension=php_zip.dll
>
> Is there something else I am missing?
>
> Keith
>
>
> -----Original Message-----
> From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 06, 2007 5:11 PM
> To: KM
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
>
> Keith,
>
> Browse to your phpinfo(); page, and search it for mysql. Is it listed?
If not, the mysql module isn't enabled, and you shouldn't expect a
mysql_connect command to work. You may need to edit your php.ini and enable
the php_mysql.dll module.
>
> Refer to the results of phpinfo(); for the path to the active php.ini
file, since sometimes this can be an unexpected location on Windows
machines, at least in my experience.
>
> Regards,
> Carlton Whitehead
>
> ----- Original Message -----
> From: "KM" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Sent: Monday, August 6, 2007 4:58:36 PM (GMT-0500) America/New_York
> Subject: [PHP-WIN] PHP, MYSQL and Apache
>
> I am attempting to use the following together..
>
>
>
> MYSQL 5.0
>
> Apache 2.2.4
>
> PHP 5.2.3
>
>
>
> PHP info I can get. I get the following statement whenever trying to get
to
> mysql
>
>
>
>
>
> Here is the PHP code for what I'm trying to do.
>
>
>
> <?php
>
> // Connect to the database
>
> $dbhost = 'localhost';
>
> $dbusername = 'root';
>
> $dbpasswd = 'joker';
>
> $database_name = 'simple';
>
> $connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
>
> or die ('Couldn\'t connect to server.');
>
> $db = mysql_select_db("$database_name", $connection)
>
> or die('Couldn\'t select database.');
>
>
>
> // Generate SQL code to store data on database.
>
> $insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
> 1,2,3\')';
>
>
>
> // Execute SQL code.
>
> mysql_query( $insert_sql )
>
> or die ( 'It Didn\'t Work: ' . mysql_error() );
>
>
>
> // Tell User we are done.
>
> echo 'Code Inserted';
>
> ?>
>
>
>
>
>
> Fatal error: Call to undefined function mysql_connect() in C:\Program
> Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php on
> line 7
>
>
>
> Anyone had this before and have a solution, it would be appreciated.
>
>
>
> Keith
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
> 4:16 PM
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
>
>
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Yes the directory is in the PATH....
And yes on the second as well....
Keith
-----Original Message-----
From: Jeff White [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 9:56 PM
To: 'KM'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] PHP, MYSQL and Apache
Hello Keith,
I realize this may seem a bit tedious, but is your PHP directory in the
Windows PATH environment variable? And, if so, is the "libmysql.dll" file in
the PHP directory?
Jeff
-----Original Message-----
From: KM [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 9:22 PM
To: 'Carlton Whitehead'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] PHP, MYSQL and Apache
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File C:\WINDOWS\php.ini
This is indeed the ini file I am editing and saving.
And yes, any time I've made changes to it, I have restarted apache.
Thanks
Keith
-----Original Message-----
From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
Sent: Monday, August 06, 2007 9:01 PM
To: KM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
Keith,
Are you sure that's the same php.ini that is referenced by your
phpinfo(); script?
Have you restarted Apache since you enabled the extensions?
Regards,
Carlton Whitehead
KM wrote:
> Here is the section of my php.ini that contains the information
>
> ;extension=php_bz2.dll
> ;extension=php_curl.dll
> ;extension=php_dba.dll
> ;extension=php_dbase.dll
> ;extension=php_exif.dll
> ;extension=php_fdf.dll
> ;extension=php_gd2.dll
> ;extension=php_gettext.dll
> ;extension=php_gmp.dll
> ;extension=php_ifx.dll
> ;extension=php_imap.dll
> ;extension=php_interbase.dll
> ;extension=php_ldap.dll
> ;extension=php_mbstring.dll
> ;extension=php_mcrypt.dll
> ;extension=php_mhash.dll
> ;extension=php_mime_magic.dll
> ;extension=php_ming.dll
> ;extension=php_msql.dll
> ;extension=php_mssql.dll
> extension=php_mysql.dll
> extension=php_mysqli.dll
> ;extension=php_oci8.dll
> ;extension=php_openssl.dll
> ;extension=php_pdo.dll
> ;extension=php_pdo_firebird.dll
> ;extension=php_pdo_mssql.dll
> ;extension=php_pdo_mysql.dll
> ;extension=php_pdo_oci.dll
> ;extension=php_pdo_oci8.dll
> ;extension=php_pdo_odbc.dll
> ;extension=php_pdo_pgsql.dll
> ;extension=php_pdo_sqlite.dll
> ;extension=php_pgsql.dll
> ;extension=php_pspell.dll
> ;extension=php_shmop.dll
> ;extension=php_snmp.dll
> ;extension=php_soap.dll
> ;extension=php_sockets.dll
> ;extension=php_sqlite.dll
> ;extension=php_sybase_ct.dll
> ;extension=php_tidy.dll
> ;extension=php_xmlrpc.dll
> ;extension=php_xsl.dll
> ;extension=php_zip.dll
>
> Is there something else I am missing?
>
> Keith
>
>
> -----Original Message-----
> From: Carlton Whitehead [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 06, 2007 5:11 PM
> To: KM
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-WIN] PHP, MYSQL and Apache
>
> Keith,
>
> Browse to your phpinfo(); page, and search it for mysql. Is it listed?
If not, the mysql module isn't enabled, and you shouldn't expect a
mysql_connect command to work. You may need to edit your php.ini and enable
the php_mysql.dll module.
>
> Refer to the results of phpinfo(); for the path to the active php.ini
file, since sometimes this can be an unexpected location on Windows
machines, at least in my experience.
>
> Regards,
> Carlton Whitehead
>
> ----- Original Message -----
> From: "KM" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Sent: Monday, August 6, 2007 4:58:36 PM (GMT-0500) America/New_York
> Subject: [PHP-WIN] PHP, MYSQL and Apache
>
> I am attempting to use the following together..
>
>
>
> MYSQL 5.0
>
> Apache 2.2.4
>
> PHP 5.2.3
>
>
>
> PHP info I can get. I get the following statement whenever trying to get
to
> mysql
>
>
>
>
>
> Here is the PHP code for what I'm trying to do.
>
>
>
> <?php
>
> // Connect to the database
>
> $dbhost = 'localhost';
>
> $dbusername = 'root';
>
> $dbpasswd = 'joker';
>
> $database_name = 'simple';
>
> $connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
>
> or die ('Couldn\'t connect to server.');
>
> $db = mysql_select_db("$database_name", $connection)
>
> or die('Couldn\'t select database.');
>
>
>
> // Generate SQL code to store data on database.
>
> $insert_sql = 'INSERT INTO simple_table (text) VALUES (\'test text,
> 1,2,3\')';
>
>
>
> // Execute SQL code.
>
> mysql_query( $insert_sql )
>
> or die ( 'It Didn\'t Work: ' . mysql_error() );
>
>
>
> // Tell User we are done.
>
> echo 'Code Inserted';
>
> ?>
>
>
>
>
>
> Fatal error: Call to undefined function mysql_connect() in C:\Program
> Files\Apache Software Foundation\Apache2.2\htdocs\test_insert_mysql.php on
> line 7
>
>
>
> Anyone had this before and have a solution, it would be appreciated.
>
>
>
> Keith
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
> 4:16 PM
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
>
>
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.11.6/938 - Release Date: 8/5/2007
4:16 PM
--- End Message ---
--- Begin Message ---
Hey guys wondering a php can execute again a asp.net file like myfile.aspx?
Thanks guys.
Tony...
--- End Message ---