php-windows Digest 24 Apr 2002 02:04:29 -0000 Issue 1108

Topics (messages 13239 through 13260):

Update 4.1.2 > 4.2 : MSSQL Error S1000 (Parallel Requests)
        13239 by: news
        13242 by: Svensson, B.A.T. (HKG)
        13243 by: Svensson, B.A.T. (HKG)
        13248 by: Lars Schwarz
        13250 by: Christoph Grottolo
        13253 by: John Lim

Re: username and password validation!
        13240 by: Nicole Amashta

Re: mysql_fetch_array warnings.
        13241 by: Nicole Amashta

Re: PHP 4.2 - hard-coded paths
        13244 by: Svensson, B.A.T. (HKG)
        13246 by: J Wynia

Re: $POST vars
        13245 by: Matt Babineau
        13254 by: Ross Fleming
        13256 by: Scott Hurring

PHP/JAVA - javax.comm.*
        13247 by: Cédric Roy

Installation php 4.2.0
        13249 by: Ethan Nelson
        13251 by: Red Wingate

php 4.2 and apache 2 ...
        13252 by: Michael Zeltner

COM vs. ODBC
        13255 by: Angie Tollerson

Excel not closing after using it via COM
        13257 by: Scott Hurring
        13258 by: Neil Lincoln
        13259 by: Scott Hurring

Re: [PHP-DB] Re: [PHP-WIN] Update 4.1.2 > 4.2 : MSSQL Error S1000 (Parallel Requests)
        13260 by: Alan Popow

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 ---
hi there, after updating from 4.1.2 to 4.2 i got an [S1000][Microsoft][ODBC
SQL Server Driver] Connection is busy with results for another hstmt.
this only happens after a 2nd odbc_exec relating to the same connection id.
any ideas ?

thanks: lars


--- End Message ---
--- Begin Message ---
This is a known bug with the ODBC driver. 

> -----Original Message-----
> From: news 
> Sent: Tuesday, April 23, 2002 3:03 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Update 4.1.2 > 4.2 : MSSQL Error S1000 (Parallel
> Requests)
> 
> 
> hi there, after updating from 4.1.2 to 4.2 i got an [S1000][Microsoft][ODBC
> SQL Server Driver] Connection is busy with results for another hstmt.
> this only happens after a 2nd odbc_exec relating to the same connection id.
> any ideas ?
> 
> thanks: lars
--- End Message ---
--- Begin Message ---
Forgot to mention that it does exists a work around for this,
check MSDN for help on this one.

> -----Original Message-----
> From: Anders Svensson [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 4:40 PM
> To: news
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP-WIN] Update 4.1.2 > 4.2 : MSSQL Error S1000 (Parallel
> Requests)
> 
> 
> This is a known bug with the ODBC driver. 
--- End Message ---
--- Begin Message ---
this has nothing to do with the odbc driver i think, because i already tried
different mdac versions, without success. it's simply like this:
switching between the two php version (without touching the mdac, odbc,
sqlsrv32.dll or anything) 4.1.2 works, 4.2 doesnt, so it must be the odbc
implementation within php 4.2 ....

"B.A.T. Svensson" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
000801c1ead4$b8474790$[EMAIL PROTECTED]">news:000801c1ead4$b8474790$[EMAIL PROTECTED]...
> This is a known bug with the ODBC driver.
>
> > -----Original Message-----
> > From: news
> > Sent: Tuesday, April 23, 2002 3:03 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Update 4.1.2 > 4.2 : MSSQL Error S1000 (Parallel
> > Requests)
> >
> >
> > hi there, after updating from 4.1.2 to 4.2 i got an
[S1000][Microsoft][ODBC
> > SQL Server Driver] Connection is busy with results for another hstmt.
> > this only happens after a 2nd odbc_exec relating to the same connection
id.
> > any ideas ?
> >
> > thanks: lars


--- End Message ---
--- Begin Message ---

"Lars Schwarz" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| this has nothing to do with the odbc driver i think, because i already
tried
| different mdac versions, without success. it's simply like this:
| switching between the two php version (without touching the mdac, odbc,
| sqlsrv32.dll or anything) 4.1.2 works, 4.2 doesnt, so it must be the odbc
| implementation within php 4.2 ....

I also think so. I'm getting some strange odbc errors (missing resultsets
etc.) with 4.2.0, same query is working perfectly in 4.1.2. Some queries
work perfectly as before, some don't. Until now i didn't find any pattern.

I'll try to set up some test scripts, but i don't have any experience in
doing that, so, if somebody could help me i wouldn't refuse.

Christoph


--- End Message ---
--- Begin Message ---
I am having problems too.

My ADOdb regression tests for msaccess/odbc and vfp/odbc fail every time.

No data is being retrieved :-(

Uggh.


"Christoph Grottolo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> "Lars Schwarz" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> | this has nothing to do with the odbc driver i think, because i already
> tried
> | different mdac versions, without success. it's simply like this:
> | switching between the two php version (without touching the mdac, odbc,
> | sqlsrv32.dll or anything) 4.1.2 works, 4.2 doesnt, so it must be the
odbc
> | implementation within php 4.2 ....
>
> I also think so. I'm getting some strange odbc errors (missing resultsets
> etc.) with 4.2.0, same query is working perfectly in 4.1.2. Some queries
> work perfectly as before, some don't. Until now i didn't find any pattern.
>
> I'll try to set up some test scripts, but i don't have any experience in
> doing that, so, if somebody could help me i wouldn't refuse.
>
> Christoph
>
>


--- End Message ---
--- Begin Message ---
If you are using password() to validate the password when a user is logging
in, you should have also used password() when you created the password in
the database. Once you convert the password using password() you can't
change it back. You have to use password() everytime to check it.

Hope this helps,

--
Nicole Amashta
Web Application Developer
www.aeontrek.com


"Nik Alleyne" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there everyone,
> my problem should b simple.
>
> Problem:
>     I am trying to validate a username and password though HTML forms. The
> thing is when i encrypt the password using mysql password encryption
> function 'PASSWORD()' and try to validate the password I am getting the
> error message that I've set for when the username and/or password is
> invalid. However, if I do not encrypt the password, i am validating quite
> easily.
>
> can someone please help;
>
> Thankx
> Nik
>
>


--- End Message ---
--- Begin Message ---
Your code is possibly failing at this line:

> $result = mysql_query($query);


Make sure that the value in $result is != 0

so, try this:

<snip>
##assuming you've already connected to the database, etc...

$query = "select * from users where UserName LIKE '$username'";

if (  $result = mysql_query($query) )
{
     if ($row = mysql_fetch_array($result)) {
    ## ...
    ## ...
     }
}
else
{
    echo "Your query failed. Reason: " . mysql_error_msg();
}
</snip>


--
Nicole Amashta
Web Application Developer
www.aeontrek.com


"Martin.Andrew" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> testing locally I use the following code
>
> $query = "select * from users where UserName LIKE '$username'";
> $result = mysql_query($query);
> if ($row = mysql_fetch_array($result)) {
> ...
> ...
> }
>
> works fine.
>
> On the ISP machine I get the following warnings?
>
> Supplied argument is not a valid MySQL result resource !!
>
> Do I need to change a setting?
>
>
>
>
>
>
>
>


--- End Message ---
--- Begin Message ---
> I just installed Apache 2 and PHP 4.2. It does work and phpinfo() brings up
> indications of Apache 2 and the correct PHP version. However, the paths to
> resources on my system seem to be hard-coded within the php4ts.dll. The path
> to php.ini indicates c:\winnt (which has been hard-coded in the binary
> releases for a while, that's another issue). However, it isn't picking
> anything up from c:\winnt\php.ini. Instead, paths to extensions, the
> include_path, session temp path, etc. all have values in phpinfo(), but not
> the values in ANY php.ini on my system. After opening php4ts.dll in a text
> editor, all of those paths are in there in clear text. Was this hard-coding
> intentional in the 4.2 binaries? The new way of doing things? I'd rather not
> have to recompile on Windows (the whole Visual C++ requirement takes the
> "free" out of PHP), but will have to if it's the only way to configure
> paths.

I know shit and nothing about php - and even less about the source, but
assuming it is hard coded just because you found some string in there isn't
that to advance things a little bit to fast?

I do uses to hard coded things in my programs myself - A.K.A. default values,
but this doesn't implies that these can not be dynamical altered. Oki?

        //Anders
--- End Message ---
--- Begin Message ---
Not if the paths weren't in the binary for PHP 4.1.2. I'm not some sort of
amateur nutcase poking around. There was a decided difference in  behavior
between 4.1.2 and 4.2 on the phpinfo() output. Since the values that were
showing weren't to be found in any cleartext file on my system, I went to
the binaries themselves. And, since php4ts.dll contains the real guts of
PHP, that's what I looked in. I compared it to the 4.1.x DLL's and found
paths
that instead of values like %s, there were values like c:\php4. A change
from a dynamic value gathered from a configuration and a hard-coded path.  I
didn't realize I needed to detail the entire process I went through. I
figured whomever did the build would understand and respond.

> I know shit and nothing about php - and even less about the source, but
> assuming it is hard coded just because you found some string in there
isn't
> that to advance things a little bit to fast?
>
> I do uses to hard coded things in my programs myself - A.K.A. default
values,
> but this doesn't implies that these can not be dynamical altered. Oki?
>
> //Anders


--- End Message ---
--- Begin Message ---
When submitting a page to itself, is it safe to check for the existance
of the $POST variable to tell whether the form was submitted and if it
was to perform and action utilizing the post variables?
 
Matt Babineau
Freelance Internet Developer
e:  <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED] 
p: 603.943.4237
w:  <http://www.illuminatistudios.com/> http://www.illuminatistudios.com
 
 
--- End Message ---
--- Begin Message ---
If by "safe" you mean physically safe, then yes, I can confirm that you
will be in no physical danger if you make this assumption, neither the web
server nor the browser will explode if you try this, thereby leaving you
rather safe...

;-)

Ross

Matt Babineau wrote:

> When submitting a page to itself, is it safe to check for the existance
> of the $POST variable to tell whether the form was submitted and if it
> was to perform and action utilizing the post variables?
>
> Matt Babineau
> Freelance Internet Developer
> e:  <mailto:[EMAIL PROTECTED]>
> [EMAIL PROTECTED]
> p: 603.943.4237
> w:  <http://www.illuminatistudios.com/> http://www.illuminatistudios.com
>
>

--- End Message ---
--- Begin Message ---
merely checking a variable is safe (for ex:)
if (empty($X)) or if (defined($X)) or if ($X) 

I just hope you don't check for them and go
on to use the dirty values w/o any sanity 
or bounds checking on them.  :)

> -----Original Message-----
> From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP-WIN] re: $POST vars
> 
> 
> If by "safe" you mean physically safe, then yes, I can 
> confirm that you
> will be in no physical danger if you make this assumption, 
> neither the web
> server nor the browser will explode if you try this, thereby 
> leaving you
> rather safe...
> 
> ;-)
> 
> Ross
> 
> Matt Babineau wrote:
> 
> > When submitting a page to itself, is it safe to check for 
> the existance
> > of the $POST variable to tell whether the form was 
> submitted and if it
> > was to perform and action utilizing the post variables?
> >
> > Matt Babineau
> > Freelance Internet Developer
> > e:  <mailto:[EMAIL PROTECTED]>
> > [EMAIL PROTECTED]
> > p: 603.943.4237
> > w:  <http://www.illuminatistudios.com/> 
http://www.illuminatistudios.com
>
>


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

Does anyone know if it's possible to access the methods of javax.comm.*
(eg. getPortIdentifier())

I encaspulated the methods in a class but I can't get it working.

When I call the class from Java, it's ok.

Thanks for your help

Cedric
Config:
- Win2000 pro
- PHP 4.0.4
- Apache 1.3.19
- Java JDK1.4.0


--- End Message ---
--- Begin Message ---
I don't understand the installation.  I unpacked the zip file, but there is
no php.exe file in the distribution?  When I install it, all my pages come
up 404 or worse.

What am I missing?  I read through the install.txt but it seemed to suggest
that nothing dramatic has changed in the install routine.

-Ethan

___________________________________
Ethan Nelson, Systems Administrator
Net Solutions, LLC
840 Lawrence Street
Eugene, OR 97401
[EMAIL PROTECTED]
http://www.netsolutionsllc.com
Voice +1 541 345-7087
Fax   +1 541 485-5519

--- End Message ---
--- Begin Message ---
This is an old install.txt which has not been updated yet.
You will find the php.exe in the /sapi/ directory in your php root

-----Ursprüngliche Nachricht-----
Von: Ethan Nelson [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 23. April 2002 7:13 PM
An: '[EMAIL PROTECTED]'
Betreff: [PHP-WIN] Installation php 4.2.0

I don't understand the installation.  I unpacked the zip file, but there is
no php.exe file in the distribution?  When I install it, all my pages come
up 404 or worse.

What am I missing?  I read through the install.txt but it seemed to suggest
that nothing dramatic has changed in the install routine.

-Ethan

___________________________________
Ethan Nelson, Systems Administrator
Net Solutions, LLC
840 Lawrence Street
Eugene, OR 97401
[EMAIL PROTECTED]
http://www.netsolutionsllc.com
Voice +1 541 345-7087
Fax   +1 541 485-5519


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


--- End Message ---
--- Begin Message ---
hey!

has anyone a working version of httpd.conf and php 4.2 and the
php.ini?

i've tried to install it a few times... but it didn't work....

please help!

thanks - michael


--- End Message ---
--- Begin Message ---
I'm going to be reading only some data from an excel file.  Is there any
benefit to COM or ODBC?  I tried the COM route but my scripts always
timed out.  Any opinions one way or the other?
 
Angie Tollerson
Alliance Technologies
Web Programmer
(515)245-7628
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
After working with Excel via COM, i cannot seem to get
the instance of Excel to quit (CTL+ALT+DEL shows an 
'EXCEL.EXE' in my process list).  The script opens up
a file, puts some numbers in, adds some numbers up, then
closes the sheet and tells excel to exit.  I've been
trying for a few hours now to get Excel to actually
*quit* when i call $excel->Quit(); unset($excel);

I have made sure to save the book ($book->Save()),
have set DisplayAlerts="FALSE" (which, on the MS
website, says that Excel will force excel to exit
even if there are unsaved changes).

I've been trying various ways of calling Quit,
Release and unset($excel)... all of them failing
miserably to get excel to quit (I even adapted
sample VB script to loop through all open books
and save them... to be doubly-sure that all changes
are saved).  

For example, the following code always fails and
leaves an excel instance in memory. 

  if (!$excel->Quit())
        die("Cannot call excel->quit");

Can enyone help me out here?  Can anyone tell me how
to get at any errors that Excel might be returning
(so i can figure out *why* it won't go away)

I'm using Win2k, Office 2k, PHP 4.2.0.  

Thanks in advance.

--- End Message ---
--- Begin Message ---
I spent many hours on this and gave up and added a process kill for the
EXCEL "zombie" after exiting the COM code.
There must be a better way..

-----Original Message-----
From: Scott Hurring [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 23, 2002 4:40 PM
To: Php-Win (E-mail)
Subject: [PHP-WIN] Excel not closing after using it via COM

After working with Excel via COM, i cannot seem to get
the instance of Excel to quit (CTL+ALT+DEL shows an
'EXCEL.EXE' in my process list).  The script opens up
a file, puts some numbers in, adds some numbers up, then
closes the sheet and tells excel to exit.  I've been
trying for a few hours now to get Excel to actually
*quit* when i call $excel->Quit(); unset($excel);

I have made sure to save the book ($book->Save()),
have set DisplayAlerts="FALSE" (which, on the MS
website, says that Excel will force excel to exit
even if there are unsaved changes).

I've been trying various ways of calling Quit,
Release and unset($excel)... all of them failing
miserably to get excel to quit (I even adapted
sample VB script to loop through all open books
and save them... to be doubly-sure that all changes
are saved).

For example, the following code always fails and
leaves an excel instance in memory.

  if (!$excel->Quit())
        die("Cannot call excel->quit");

Can enyone help me out here?  Can anyone tell me how
to get at any errors that Excel might be returning
(so i can figure out *why* it won't go away)

I'm using Win2k, Office 2k, PHP 4.2.0.

Thanks in advance.


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


--- End Message ---
--- Begin Message ---
There is either 1) an "undocumented" bug with Excel, or there's
a bug with PHP's handling of COM objects.  Becuase i've tried
virtually every permutation of Quit() and Release() (and even
some bogus calls like Exit() just for fun) and absolutely
*nothing* closes the Instance.

My other gripe is that documentation for COM+PHP+Excel is
*extremely* sparse...  I'm going to write up an article and
post some sample code when i'm done with this project.

This URL helped me make sense of the Excel COM interface:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/htm
l/deovrMicrosoftExcel2000.asp


---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Neil Lincoln [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 7:17 PM
> To: Scott Hurring; Php-Win (E-mail)
> Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> 
> 
> I spent many hours on this and gave up and added a process 
> kill for the
> EXCEL "zombie" after exiting the COM code.
> There must be a better way..
> 
> -----Original Message-----
> From: Scott Hurring [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 4:40 PM
> To: Php-Win (E-mail)
> Subject: [PHP-WIN] Excel not closing after using it via COM
> 
> After working with Excel via COM, i cannot seem to get
> the instance of Excel to quit (CTL+ALT+DEL shows an
> 'EXCEL.EXE' in my process list).  The script opens up
> a file, puts some numbers in, adds some numbers up, then
> closes the sheet and tells excel to exit.  I've been
> trying for a few hours now to get Excel to actually
> *quit* when i call $excel->Quit(); unset($excel);
> 
> I have made sure to save the book ($book->Save()),
> have set DisplayAlerts="FALSE" (which, on the MS
> website, says that Excel will force excel to exit
> even if there are unsaved changes).
> 
> I've been trying various ways of calling Quit,
> Release and unset($excel)... all of them failing
> miserably to get excel to quit (I even adapted
> sample VB script to loop through all open books
> and save them... to be doubly-sure that all changes
> are saved).
> 
> For example, the following code always fails and
> leaves an excel instance in memory.
> 
>   if (!$excel->Quit())
>         die("Cannot call excel->quit");
> 
> Can enyone help me out here?  Can anyone tell me how
> to get at any errors that Excel might be returning
> (so i can figure out *why* it won't go away)
> 
> I'm using Win2k, Office 2k, PHP 4.2.0.
> 
> Thanks in advance.
> 
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> 
> 
--- End Message ---
--- Begin Message ---
On Wed, 24 Apr 2002 03:22:38 +0800, you wrote:

Glad to hear that. I thought it was something stupid that I was doing.

Alan

>I am having problems too.
>
>My ADOdb regression tests for msaccess/odbc and vfp/odbc fail every time.
>
>No data is being retrieved :-(
>
>Uggh.
>
>
>"Christoph Grottolo" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>>
>> "Lars Schwarz" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
>> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> | this has nothing to do with the odbc driver i think, because i already
>> tried
>> | different mdac versions, without success. it's simply like this:
>> | switching between the two php version (without touching the mdac, odbc,
>> | sqlsrv32.dll or anything) 4.1.2 works, 4.2 doesnt, so it must be the
>odbc
>> | implementation within php 4.2 ....
>>
>> I also think so. I'm getting some strange odbc errors (missing resultsets
>> etc.) with 4.2.0, same query is working perfectly in 4.1.2. Some queries
>> work perfectly as before, some don't. Until now i didn't find any pattern.
>>
>> I'll try to set up some test scripts, but i don't have any experience in
>> doing that, so, if somebody could help me i wouldn't refuse.
>>
>> Christoph
>>
>>

--- End Message ---

Reply via email to