php-windows Digest 17 Apr 2002 21:58:17 -0000 Issue 1098

Topics (messages 13134 through 13143):

mssql, query and schoolboy error
        13134 by: Rob Fraser

win configuration
        13135 by: Ivan Soloviev

Apache 2.0.35 & php 4.2.0 RC4 includes
        13136 by: Chris Fraser

Strange problem 'window.open'
        13137 by: Fabio
        13139 by: R'twick Niceorgaw
        13142 by: Fabio

Re: [PHP] win configuration
        13138 by: Geoff Hankerson

NT-Challenge-Response-Auth under Win2000/Apache/PHP?
        13140 by: Andreas Kolbe

<form> tag and sessions
        13141 by: Dale Heil

PHP Warning:  No File Uploaded in Unknown on Line 0.. any ideas?
        13143 by: Ethan Nelson

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 ---
Dear All,
I hope somebody can help me. I am new to PHP (I've used ASP for three
years:-( ) and I'm loving PHP and trying to get my work to convert but
I've coming across a error with mssql_query() explorer its just crashes
with a php.exe 'memory could not be read error'. I'm sure it a school
boy error from me but I'm just stuck, please help me code is......
===========
$link = mssql_connect ("laptop", "sa", "elmwood");
print ("<br>LINK was $link");
 
$back = mssql_select_db ( "elmback",$link); 
print("<br>back was $back");
 
$query = "SELECT * FROM tblperson";
print("<br>query was $query");
 
$result = mssql_query($query,$link); //JUST CRASHES ON THIS LINE
 
$r = mssql_rows_affected ( $link);
print("<br>rows affected was $r");
 
$close =  mssql_close ($link);
print("<br>close was $close");
 
 
=========
I run IIS4, NT4 (SP6a) and SQL 7 on the same machine as its my
development one, out of date maybe but you should see my clothes but PHP
was test downloaded a month ago - any ideas from a white knight?
best regards 
Rob
--- End Message ---
--- Begin Message ---
Hello!
Is it possible to configure php under w2k, IIS5.0 for different hosts
separately? In particular to set different include paths?
Thank you.
......................................................................
Ivan Soloviev                                         [EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Greetings,
   Is anyone having problems with includes or include path with this configuration?

I'm running Apache 2.0.35/php 4.2.0 RC4 on WinXP pro.

Warning: Failed opening 'mod//index.php' for inclusion (include_path='.;c:\php4\pear') 
in D:
\Internet\Apache\htdocs\urswerks\mod.php on line 14

--
"The dogmas of the quiet past are inadequate for the stormy present. The occasion is 
piled high 
with difficulty, and we must rise to the occasion. As our case is new, so we must 
think anew, 
and act anew. We must disentrall ourselves, and then we shall save our country.We can 
not 
escape history. We will be remembered, in spite of ourselves. The fiery trial through 
which we 
pass will light us down in honor or dishonor, to the last generation. We shall nobly 
save, or 
meanly lose our last best hope of Earth."                       Annual Message to 
Congress, 
Concluding Remarks, December 1, 1862
                                                                                       
                    - 
President Abraham Lincoln  
Copyleft 2001: http://www.gnu.org/licenses/fdl.html                                    
                                 
                        
                                                                                       
                                                                                       
        



--- End Message ---
--- Begin Message ---
This is my page:
----------------------
<html>
<head>
<script language = "Javascript" src="general.js"></script>
</head>
<body>
<?
        include "general.php";
        include "param.php";

        if (!($conn=mssql_connect($DBserver, $DBusername, $DBpassword))) {
                die("Errore di connessione al server");
        }

        if (!(mssql_select_db($DBdatabase, $conn))) {
                die("Errore di connessione al database");
        }

        $sql="SELECT * FROM TEMPORANEA WHERE IDT=".$IDT;
        if (!($result=mssql_query($sql, $conn))) {
                die("Errore nella query ".$sql);
        }
        $datarecord=mssql_fetch_array($result);
?>
<form name="theform" method="POST" action="input.php">
<table width=100% border=0 cellspacing=0 cellpadding=0>
        <tr>
                <td>
                        <? here some php code to display $datarecord[...] ?>
                </td>
        </tr>
</table>
</form>
<?
        $sql="UPDATE mytable SET myfield1=1,myfield2=2";

        if (!($result=mssql_query($sql, $conn))) {
                die("Errore nella query ".$sql);
        }

        mssql_close($conn);
?>
        <script>
        window.open('totale.php?IDT=".$IDT."','leftframe');";                   // 
<--- !!! here is
the problem !!!
        </script>
</body>
</html>
----------------------


The marked line should open the php page in 'leftframe' frame: some time
this is not done and I get the error:

----------------
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers. The headers it did return are:
----------------

I try to reload the main page and 'totale.php' is opened in the right way.
The problem seems to be is in the window.open that sometimes loads the wrong
page or none. If I put an alert('test'); befone the window.open, that window
is opened *always*.

Is there some setting to look for in php.ini or this method to open windows
is not correct?


Thanx, Fabio

--- End Message ---
--- Begin Message ---
You are using php  inside a javascript code without the <?php ?> tags!

change the problem line as below and it may work

window.open('totale.php?IDT= "'+ <?= $IDT?> + '"','leftframe');"; // <---
!!! here is
the problem !!!

R'twick
----- Original Message -----
From: "Fabio" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 17, 2002 10:16 AM
Subject: [PHP-WIN] Strange problem 'window.open'


> This is my page:
> ----------------------
> <html>
> <head>
> <script language = "Javascript" src="general.js"></script>
> </head>
> <body>
> <?
> include "general.php";
> include "param.php";
>
> if (!($conn=mssql_connect($DBserver, $DBusername, $DBpassword))) {
> die("Errore di connessione al server");
> }
>
> if (!(mssql_select_db($DBdatabase, $conn))) {
> die("Errore di connessione al database");
> }
>
> $sql="SELECT * FROM TEMPORANEA WHERE IDT=".$IDT;
> if (!($result=mssql_query($sql, $conn))) {
> die("Errore nella query ".$sql);
> }
> $datarecord=mssql_fetch_array($result);
> ?>
> <form name="theform" method="POST" action="input.php">
> <table width=100% border=0 cellspacing=0 cellpadding=0>
> <tr>
> <td>
> <? here some php code to display $datarecord[...] ?>
> </td>
> </tr>
> </table>
> </form>
> <?
> $sql="UPDATE mytable SET myfield1=1,myfield2=2";
>
> if (!($result=mssql_query($sql, $conn))) {
> die("Errore nella query ".$sql);
> }
>
> mssql_close($conn);
> ?>
> <script>
> window.open('totale.php?IDT=".$IDT."','leftframe');"; // <--- !!! here is
> the problem !!!
> </script>
> </body>
> </html>
> ----------------------
>
>
> The marked line should open the php page in 'leftframe' frame: some time
> this is not done and I get the error:
>
> ----------------
> CGI Error
> The specified CGI application misbehaved by not returning a complete set
of
> HTTP headers. The headers it did return are:
> ----------------
>
> I try to reload the main page and 'totale.php' is opened in the right way.
> The problem seems to be is in the window.open that sometimes loads the
wrong
> page or none. If I put an alert('test'); befone the window.open, that
window
> is opened *always*.
>
> Is there some setting to look for in php.ini or this method to open
windows
> is not correct?
>
>
> Thanx, Fabio
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--- End Message ---
--- Begin Message ---
Okay: I mistaken to do a copy/paste, sorry. The javascript in my original
page is okay.
Tha main problem is that the window.open is well executed sometimes and some
other times I get the *CGI Error*

Thanx, Fabio

> -----Original Message-----
> From: Sichta Daniel [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 17, 2002 4:19 PM
> To: Fabio
> Subject: RE: [PHP-WIN] Strange problem 'window.open'
>
>
> Hi Try this:
>
>       <script>
>       window.open('totale.php?IDT='+<?=$IDT;?>'+,'leftframe');";
> // <--- !!! here is
> the problem !!!
>       </script>
>
> -----Original Message-----
> From: Fabio [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 17, 2002 4:17 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Strange problem 'window.open'
>
>
> This is my page:
> ----------------------
> <html>
> <head>
> <script language = "Javascript" src="general.js"></script>
> </head>
> <body>
> <?
>       include "general.php";
>       include "param.php";
>
>       if (!($conn=mssql_connect($DBserver, $DBusername,
> $DBpassword))) {
>               die("Errore di connessione al server");
>       }
>
>       if (!(mssql_select_db($DBdatabase, $conn))) {
>               die("Errore di connessione al database");
>       }
>
>       $sql="SELECT * FROM TEMPORANEA WHERE IDT=".$IDT;
>       if (!($result=mssql_query($sql, $conn))) {
>               die("Errore nella query ".$sql);
>       }
>       $datarecord=mssql_fetch_array($result);
> ?>
> <form name="theform" method="POST" action="input.php">
> <table width=100% border=0 cellspacing=0 cellpadding=0>
>       <tr>
>               <td>
>                       <? here some php code to display
> $datarecord[...] ?>
>               </td>
>       </tr>
> </table>
> </form>
> <?
>       $sql="UPDATE mytable SET myfield1=1,myfield2=2";
>
>       if (!($result=mssql_query($sql, $conn))) {
>               die("Errore nella query ".$sql);
>       }
>
>       mssql_close($conn);
> ?>
>       <script>
>       window.open('totale.php?IDT=".$IDT."','leftframe');";
> // <--- !!! here is
> the problem !!!
>       </script>
> </body>
> </html>
> ----------------------
>
>
> The marked line should open the php page in 'leftframe'
> frame: some time
> this is not done and I get the error:
>
> ----------------
> CGI Error
> The specified CGI application misbehaved by not returning a
> complete set of
> HTTP headers. The headers it did return are:
> ----------------
>
> I try to reload the main page and 'totale.php' is opened in
> the right way.
> The problem seems to be is in the window.open that sometimes
> loads the wrong
> page or none. If I put an alert('test'); befone the
> window.open, that window
> is opened *always*.
>
> Is there some setting to look for in php.ini or this method
> to open windows
> is not correct?
>
>
> Thanx, Fabio
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

--- End Message ---
--- Begin Message ---
Why not just use Apache because unless you have paid MS some $2,000 for an
unlimited Internet client license you can only serve up to some 10 clients
and be legal.

I'd recommend the installer at nusphere.com it installs Apache, Php, Mysql
and Perl for you painlessly and it is a free download.
----- Original Message -----
From: "Ivan Soloviev" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, April 17, 2002 8:51 AM
Subject: [PHP] win configuration


> Hello!
> Is it possible to configure php under w2k, IIS5.0 for different hosts
> separately? In particular to set different include paths?
> Thank you.
> ......................................................................
> Ivan Soloviev                                         [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Help somebody, PLEASE!!! :-)

We're trying to get NT-Challenge-Response running under WIN2000 with Apache
& PHP to get vital informations about the client's (IE's) current user...

Any informations, help or examples for doing so?

Thanks in advance!


Best regards

Andreas Kolbe
BerlinDat GmbH


--- End Message ---
--- Begin Message ---
FYI...

on php version 4.1.1 

Session ID will not be appended to the action=  if the action= is not on the same line 
as the <form> tag.

Example:

Won't work...
   <form method="get" name="PublicForm" 
                                 action="drillPublicLevel1.php">

Works...
   <form method="get" name="PublicForm" action="drillPublicLevel1.php">


--- End Message ---
--- Begin Message ---
hey there..

this has been on my nerves all day today.. here is the problem..

I have a form.. it looks like this:

echo "<form method=\"post\" action=\"./mgr.html\"
enctype=\"multipart/form-data\">\n";
echo "Header:<br>\n";
echo "<input type=text name=header size=50><br><br>\n";
echo "Body:<br>\n";
echo "<textarea name=body wrap=virtual cols=45
rows=10></textarea><br><br>\n";
echo "Image:<br>\n";
echo "<input type=file name=image><br><br>\n";
echo "<input type=submit name=function value=\"Add this special\"><br>\n";
echo "</form>\n";

mgr.html's first line of code looks like this:

die();

my browser output is this:

PHP Warning: No file uploaded in Unknown on line 0 

I have no idea how this is happening.. it seems that php is letting me know
that i didn't upload a file BEFORE it even parses the mgr.html file.  All i
want to do is to get rid of this error message, perferiably in the php.ini
file (i am running php 4.3.0-dev on a win2k box). I have "display_errors =
Off" in my php.ini file.

any ideas?

-Chris

--- End Message ---

Reply via email to