php-windows Digest 27 Oct 2003 22:26:01 -0000 Issue 1974

Topics (messages 21887 through 21896):

Re: urgent : alter table modify
        21887 by: Svensson, B.A.T. (HKG)

Error connecting to MySQL Database
        21888 by: Yosvel Reyes
        21889 by: Gerardo Rojas

MySQL service won't start
        21890 by: Roderick Martin
        21894 by: Shadow

Run php file every day?
        21891 by: Disko_kex
        21892 by: Piotr Pluciennik

Problems with TCP/IP and PHP
        21893 by: Robert Duda
        21895 by: DvDmanDT
        21896 by: Robert Duda

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 ---
I know how to alter a table, but you need to specify the
RDBMS in question unless you want an ISO SQL-92 answer.

By the way, this is the win32 php list....

On Mon, 2003-10-27 at 08:42, Rinku Shivnani wrote:
> PLs answer if you know it....... plssssssss

--- End Message ---
--- Begin Message ---
Hi All:

I'm a PHP beginner and just I am trying to connect using PHP to a MySQL
Database with the following code

<?php 
        $Connection = mysql_connect("server", "login", "pwd");
        
        if($Connection == TRUE){
                //I am connected to the data base...
                
                $id = mysql_query("select * from publication");
                
                if($id != FALSE){
                        //now fetch the results...
                        while(($result = mysql_fetch_row($id))){
                                echo $result[0];
                                echo " --- ";
                                echo $result[1];
                                echo " --- ";
                                echo $result[2];
                                echo "<br/>";   
                        }
                }
                else{
                        echo "Cant execute the SQL statement";
                } 
        }
        else
                echo "Cant connect to database";
  ?>

and when I try to execute this code got the following error:

Fatal error: Call to undefined function: mysql_connect() in C:\Program
Files\Apache Group\Apache2\htdocs\Yosvel\TMP4oqwenf8u5.php on line 27

I Assume that there must be an error on my PHP installation or I have to
include some other php file

Any suggestion??? 
Thanks in advance...



==========================================
Lic. Yosvel Reyes Fonfria 
[EMAIL PROTECTED]
tel: (053)42 205428

Who try and try again, triumph!!!
==========================================

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service

--- End Message ---
--- Begin Message ---
the function call mysql_connect() returns

1. Resource (link identifier) if succesful
2. False if NOT successful

fix
--------------
if( $Connection != FALSE ){
                //I am connected to the data base...

---------------

--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]


-----Original Message-----
From: Yosvel Reyes [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 9:31 AM
To: PHP Windows
Subject: [PHP-WIN] Error connecting to MySQL Database


Hi All:

I'm a PHP beginner and just I am trying to connect using PHP to a MySQL
Database with the following code

<?php 
        $Connection = mysql_connect("server", "login", "pwd");
        
        if($Connection == TRUE){
                //I am connected to the data base...
                
                $id = mysql_query("select * from publication");
                
                if($id != FALSE){
                        //now fetch the results...
                        while(($result = mysql_fetch_row($id))){
                                echo $result[0];
                                echo " --- ";
                                echo $result[1];
                                echo " --- ";
                                echo $result[2];
                                echo "<br/>";   
                        }
                }
                else{
                        echo "Cant execute the SQL statement";
                } 
        }
        else
                echo "Cant connect to database";
  ?>

and when I try to execute this code got the following error:

Fatal error: Call to undefined function: mysql_connect() in C:\Program
Files\Apache Group\Apache2\htdocs\Yosvel\TMP4oqwenf8u5.php on line 27

I Assume that there must be an error on my PHP installation or I have to
include some other php file

Any suggestion??? 
Thanks in advance...



==========================================
Lic. Yosvel Reyes Fonfria 
[EMAIL PROTECTED]
tel: (053)42 205428

Who try and try again, triumph!!!
==========================================

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service

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

--- End Message ---
--- Begin Message --- I followed the installation instructions for MySQL (installing MySQL 4 on a Windows NT 4 box), it appeared to install fine, and the initial launch from command line produced the correct response, but we have been unable to install it as a service, getting this error...

Could not start the MySQL service on \\xxxxxxx. Error 1067: process terminated unexpectedly.

Any ideas?

Thanks!
--- End Message ---
--- Begin Message ---
Did you try from the root?  Is the driver in services? Check and see....if
you can't start if from services... Go to /mysql/bin and uninstall the
driver then reinstall it. http://www.mysql.com/doc/en/Installing.html
Shadow

--- End Message ---
--- Begin Message ---
Hi,
 
Is there an easy way to run a php file same time every day? Im running
IIS5 and PHP4.3.3.
 
Thx

--- End Message ---
--- Begin Message ---
use AT command or tasks scheduler located in Control Panel of Windows
system.

HTH
Piotr

Disko_kex wrote:

> Hi,
>
> Is there an easy way to run a php file same time every day? Im running
> IIS5 and PHP4.3.3.
>
> Thx

--- End Message ---
--- Begin Message ---
I am running the following:

PHP Version 4.3.4RC2, I tried 4.3.3 with the same results.
MySql Version 4.0.16-nt
Windows XP Professional

Using PHP as cgi with Roxen.

Anytime I try to connect to anything over TCP/IP I get an error. Below is
the error that I get if I try to connect to an IMAP source:

Warning: imap_open(): Couldn't open stream {mydomain.com:143}INBOX in
F:\projects\phpgroupware\email\inc\class.mail_dcom_imap.inc.php on line 214

Warning: imap_open(): Couldn't open stream
{mydomain.com:143/imap/notls}INBOX in
F:\projects\phpgroupware\email\inc\class.mail_dcom_imap.inc.php on line 214
(the code comes from phpgroupware version 0.9.14.007)

And if I try to connect to Mysql I get the following error unless I use
named-pipes:

#2004 - Can't create TCP/IP socket (10106)
(This error comes from phpmyadmin during log in, if I change the host entry
to '.' instead of 'localhost' the login succeeds.)

I have the IMAP extension uncommented and the path to the extensions
directory is correct. I can get to the IMAP server from Pike running on the
same box so the proble is not the IMAP server. In fact when I look at the
IMAP logs the connection never gets to the server. This appears to be some
disconnect between the C-client library and the windows TCP/IP library under
XP. Has anyone else had the same problem and if so how did you fix it?

Any help with this would be greatly appreciated.

Thanks,

Rob

--- End Message ---
--- Begin Message ---
I have been using every version and RC of PHP since 4.2.1 days, and I have
never had any problems, using sockets, mysql_connect,
fopen("http://blalbla";) or anything...

Did you compile yourself or did you download precompiled ones... If you
compiled yourself, try the precompiled one... Check your hosts file
(C:\windows\system32\drivers\etc) and see if something is wrong with it...

-- 
// DvDmanDT
MSN: dvdmandt€hotmail.com
Mail: dvdmandt€telia.com
##########################
Please, if you are using windows, you may be infected by Swen. Please go
here to find out more:
http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen
http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
##########################
"Robert Duda" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> I am running the following:
>
> PHP Version 4.3.4RC2, I tried 4.3.3 with the same results.
> MySql Version 4.0.16-nt
> Windows XP Professional
>
> Using PHP as cgi with Roxen.
>
> Anytime I try to connect to anything over TCP/IP I get an error. Below is
> the error that I get if I try to connect to an IMAP source:
>
> Warning: imap_open(): Couldn't open stream {mydomain.com:143}INBOX in
> F:\projects\phpgroupware\email\inc\class.mail_dcom_imap.inc.php on line
214
>
> Warning: imap_open(): Couldn't open stream
> {mydomain.com:143/imap/notls}INBOX in
> F:\projects\phpgroupware\email\inc\class.mail_dcom_imap.inc.php on line
214
> (the code comes from phpgroupware version 0.9.14.007)
>
> And if I try to connect to Mysql I get the following error unless I use
> named-pipes:
>
> #2004 - Can't create TCP/IP socket (10106)
> (This error comes from phpmyadmin during log in, if I change the host
entry
> to '.' instead of 'localhost' the login succeeds.)
>
> I have the IMAP extension uncommented and the path to the extensions
> directory is correct. I can get to the IMAP server from Pike running on
the
> same box so the proble is not the IMAP server. In fact when I look at the
> IMAP logs the connection never gets to the server. This appears to be some
> disconnect between the C-client library and the windows TCP/IP library
under
> XP. Has anyone else had the same problem and if so how did you fix it?
>
> Any help with this would be greatly appreciated.
>
> Thanks,
>
> Rob

--- End Message ---
--- Begin Message ---
I am using the compiled versions and have tried using ip addresses instead
of host names with the same results. I don't think it's my host file.
Besides, why would pike be able to reach the same hosts?

Are you using XP pro?

Rob

"Dvdmandt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have been using every version and RC of PHP since 4.2.1 days, and I have
> never had any problems, using sockets, mysql_connect,
> fopen("http://blalbla";) or anything...
>
> Did you compile yourself or did you download precompiled ones... If you
> compiled yourself, try the precompiled one... Check your hosts file
> (C:\windows\system32\drivers\etc) and see if something is wrong with it...
>
> --
> // DvDmanDT
> MSN: dvdmandt€hotmail.com
> Mail: dvdmandt€telia.com
> ##########################
> Please, if you are using windows, you may be infected by Swen. Please go
> here to find out more:
> http://us.mcafee.com/virusInfo/default.asp?id=helpCenter&hcName=swen
> http://securityresponse.symantec.com/avcenter/venc/data/[EMAIL PROTECTED]
> ##########################
> "Robert Duda" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > I am running the following:
> >
> > PHP Version 4.3.4RC2, I tried 4.3.3 with the same results.
> > MySql Version 4.0.16-nt
> > Windows XP Professional
> >
> > Using PHP as cgi with Roxen.
> >
> > Anytime I try to connect to anything over TCP/IP I get an error. Below
is
> > the error that I get if I try to connect to an IMAP source:
> >
> > Warning: imap_open(): Couldn't open stream {mydomain.com:143}INBOX in
> > F:\projects\phpgroupware\email\inc\class.mail_dcom_imap.inc.php on line
> 214
> >
> > Warning: imap_open(): Couldn't open stream
> > {mydomain.com:143/imap/notls}INBOX in
> > F:\projects\phpgroupware\email\inc\class.mail_dcom_imap.inc.php on line
> 214
> > (the code comes from phpgroupware version 0.9.14.007)
> >
> > And if I try to connect to Mysql I get the following error unless I use
> > named-pipes:
> >
> > #2004 - Can't create TCP/IP socket (10106)
> > (This error comes from phpmyadmin during log in, if I change the host
> entry
> > to '.' instead of 'localhost' the login succeeds.)
> >
> > I have the IMAP extension uncommented and the path to the extensions
> > directory is correct. I can get to the IMAP server from Pike running on
> the
> > same box so the proble is not the IMAP server. In fact when I look at
the
> > IMAP logs the connection never gets to the server. This appears to be
some
> > disconnect between the C-client library and the windows TCP/IP library
> under
> > XP. Has anyone else had the same problem and if so how did you fix it?
> >
> > Any help with this would be greatly appreciated.
> >
> > Thanks,
> >
> > Rob

--- End Message ---

Reply via email to