php-windows Digest 26 Sep 2002 03:52:16 -0000 Issue 1357

Topics (messages 16000 through 16011):

Getting winamp info
        16000 by: dsig.teleport.com

Re: session under windows
        16001 by: neil smith

Re: ? (Errr... problem uploading files)
        16002 by: neil smith

Re: fulltext search through a pdf doccument .....
        16003 by: olinux

Recieve option value from a form.
        16004 by: Arthur

Re: ? (FIXED) (Errr... problem uploading files)
        16005 by: Jose Fandos

Query to MySQL
        16006 by: Marlene Burckhalter
        16007 by: Daniel Gustafsson
        16010 by: Cam Dunstan

Win32api question: parameters
        16008 by: Anna Sotnichenko

win32api: parameters
        16009 by: Anna Sotnichenko

PHP/IIS5/MSSQL shows CGI Header Error
        16011 by: David Redmond

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 ---
Hello Olivier,

Go over to www.phpclasses.org  this is one of the great sites out there with
php code.

They have exactly what you are looking for .. a class for handling Winamp

DSig

Tuesday, September 24, 2002, 5:12:21 PM, you wrote:

OH> Hi,

OH> I would like to retrieve some Winamp information from the server running
my ...

-- 
DSig         






















































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

It looks like you have set a session save handler as 'user' rather than 
'files'

PHP allows you to define user functions for saving session data (for 
example to a DB opn large sites over multiple servers).

You are looking for session files in your directory, whereas PHP expects 
you to have defined an external (script) session handling function 
somewhere because you have specidfied 'user'

Why not change it back in your php.ini and see if it works then ?

Cheers,
Neil Smith.

At 13:04 25/09/2002 +0000, you wrote:

>----------------------------------------------------------------------
>Message-ID: <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>From: "Antonello Oliveri" <[EMAIL PROTECTED]>
>Date: Wed, 25 Sep 2002 03:27:11 +0200
>Subject: session under windows
>
>I've istalled PHP ver. 4.2.3  on two Windows98SE machines and on a WindowsXP
>machine all running PWS 4.0 and/or Apache 1.3.22.
>
>Sessions seem not work. correcly. PHP write the file
>ss_xxxxxxxxxxxxxxxxxxxxxxxx the first time and then it' doesn't update it
>and variables registered are not rescued and initializad to the correct
>value, in other words they are not setted.
>
>I tried different configuration of the php.ini according with directives
>from www.php.net . and giving ( to be sure ) to run the different examples
>about session publishet on the official site.
>
>This is the content of the Session section:
>
>[Session]
>session.save_handler=user
>session.save_path=C:\windows\temp

__________________________________________________________

    VideoChat with friends online, get Freshly Toasted every day at
http://www.fresh-toast.net : NetMeeting solutions for a connected world.

--- End Message ---
--- Begin Message ---
Hi - it seems from your PHPinfo output that you have not specified, in your 
PHP.ini file, a directory where the server can put the uploaded files. If 
this is not specified by a system defaul, you need to specifiy it here. 
This means that : they will disappear into oblivion (at best). Specifying 
C://temp or D://WINNT//Temp is a good place to start.

upload_tmp_dir  no value        no value

Also - your temp files will not have the name of the file you uploaded, 
because they might interfere with other files uploaded into the temp dir. 
They are usually named sequentially, while session files usually have a MD5 
based name (long string of alpha characters)

Consequently the filenames might be like "php29.tmp" or whatever - not what 
you sent the file as. To recover the filename , check

$HTTP_POST_FILES["fieldname"]["name"]

Where fieldname is the name of the browse field that you gave in the forms 
HTML.

Cheers,
Neil Smith.

At 00:39 25/09/2002 +0000, you wrote:
>From: "Jose Fandos" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>,
>         <[EMAIL PROTECTED]>
>Date: Tue, 24 Sep 2002 19:22:14 +0100
>Message-ID: <000401c263f7$50dfa060$2000a8c0@YAL>
>MIME-Version: 1.0
>Content-Type: text/plain;
>         charset="us-ascii"
>Content-Transfer-Encoding: 7bit
>Subject: Errr... problem uploading files
>
>Hi,
>
>Under PHP 4.2.3 and 4.2.2 with Apache 1.3.6, all under Windows XP, when
>a
>form has a file input field, if I browse and upload, all the information
>going with the post to the server gets lost!!! There is no trace of it
>(and
>this is what's really frustating me, no trace in any log of any errors).
>var_dump's show everything empty. If I submit without browsing (i.e. no
>file
>selected), I do see the $_FILES array signaling an error, but otherwise
>complete, and everything else (though, on further testing, it seems that

__________________________________________________________

    VideoChat with friends online, get Freshly Toasted every day at
http://www.fresh-toast.net : NetMeeting solutions for a connected world.

--- End Message ---
--- Begin Message ---
www.htdig.org

olinux

--- toby z <[EMAIL PROTECTED]> wrote:
> hi guyz ....
> i no this is the rong mailing list for this but im
> pretty desprete ... so plz pardon me ....
> 
> i ve to search a pdf doccument through fulltext and
> there r some images containg text which are to be
> included in this search 
> 
> i know this is possible since they search through
> pdf
> doccuments on the net all the time through search
> engines and all but 
> 
> how can i perform a fulltext search inside my site
> which has these pdf doccuments stored in mysql
> (4.0.1-alfa) ?????
> 
> id b eternally gratefull if anyone cud help me .....
> 
> thnx a zillion ....
> 
> toby ....
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--- End Message ---
--- Begin Message ---
Below is the code to create a form. (This for works fine) How do I recieve
<OPTION VALUE='$Last_Orders_id'>  on 'SalesCreate.php' . Many thanks,
Arthur.


 print ("<tr><td><FORM ACTION='SalesCreate.php' METHOD=POST>");
 print ("<P><b>Select Sales info:</b><BR>");
 print ("<SELECT NAME=Sales>");

    while ($RowSales = mysql_fetch_array ($ResultSales)) {
     $Last_Orders_id = (string) $RowSales[sales_log_orders_id];
     $Date_created = (string) $RowSales[sales_log_date];
   print ("<OPTION VALUE='$Last_Orders_id'>Last order = $Last_Orders_id,
created on $Date_created</OPTION>");
 }

 print ("</SELECT>");
 print ("<P><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE='Create
Sales'></FORM></td>");


--- End Message ---
--- Begin Message ---
Hi there!

> Hi - it seems from your PHPinfo output that you have not specified, in
> your
> PHP.ini file, a directory where the server can put the uploaded files.
If
> this is not specified by a system defaul, you need to specifiy it
here.
> This means that : they will disappear into oblivion (at best).
Specifying
> C://temp or D://WINNT//Temp is a good place to start.
> 
> upload_tmp_dir  no value        no value

Yes!!! That did it. It doesn't work all the time. For some reason it
fails at times, even with the same image being uploaded, but it does at
least work now. I saw that option, but given that the following text was
preceeding it, didn't give it further thought.

; Temporary directory for HTTP uploaded files (will use system default
if not
; specified).
upload_tmp_dir = c:\\windows\\temp


> Also - your temp files will not have the name of the file you
uploaded,
> because they might interfere with other files uploaded into the temp
dir.
> They are usually named sequentially, while session files usually have
a
> MD5
> based name (long string of alpha characters)
> 
> Consequently the filenames might be like "php29.tmp" or whatever - not
> what
> you sent the file as. To recover the filename , check
> 
> $HTTP_POST_FILES["fieldname"]["name"]
> 
> Where fieldname is the name of the browse field that you gave in the
forms
> HTML.

Yep. That was taken care of. 

Thanks again,

        Jose

 
> Cheers,
> Neil Smith.
> 
> At 00:39 25/09/2002 +0000, you wrote:
> >From: "Jose Fandos" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>,
> >         <[EMAIL PROTECTED]>
> >Date: Tue, 24 Sep 2002 19:22:14 +0100
> >Message-ID: <000401c263f7$50dfa060$2000a8c0@YAL>
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> >         charset="us-ascii"
> >Content-Transfer-Encoding: 7bit
> >Subject: Errr... problem uploading files
> >
> >Hi,
> >
> >Under PHP 4.2.3 and 4.2.2 with Apache 1.3.6, all under Windows XP,
when
> >a
> >form has a file input field, if I browse and upload, all the
information
> >going with the post to the server gets lost!!! There is no trace of
it
> >(and
> >this is what's really frustating me, no trace in any log of any
errors).
> >var_dump's show everything empty. If I submit without browsing (i.e.
no
> >file
> >selected), I do see the $_FILES array signaling an error, but
otherwise
> >complete, and everything else (though, on further testing, it seems
that
> 
> __________________________________________________________
> 
>     VideoChat with friends online, get Freshly Toasted every day at
> http://www.fresh-toast.net : NetMeeting solutions for a connected
world.


--- End Message ---
--- Begin Message ---
I am trying to display an event calendar in an html document ( I am a beginner, I had 
to start small).
My problem is the following query displays all the records instead of just the ones 
with the event date greater than or equal to the current date.

Any suggestions to a begginer?  Here is a snipplet:

 $query = "SELECT eventmonth FROM $create_calendar_tablename
             WHERE eventdate >= 'currentdate()'
             LIMIT 19";
   $result = mysql_query($query);
   if(!$result) error_message(sql_error());
   while($query_data = mysql_fetch_array($result)) {
   echo $query_data["eventmonth"],"<P>";
   }
--- End Message ---
--- Begin Message ---
I bet you it's the ' around the currentdate()-function that causes it to 
interpret it as a string instead of a function call. And afaik there is no 
currentdate()-function in mysql, it's now().

At 15:02 2002-09-25 -0400, Marlene Burckhalter wrote:
>I am trying to display an event calendar in an html document ( I am a 
>beginner, I had to start small).
>My problem is the following query displays all the records instead of just 
>the ones with the event date greater than or equal to the current date.
>
>Any suggestions to a begginer?  Here is a snipplet:
>
>  $query = "SELECT eventmonth FROM $create_calendar_tablename
>              WHERE eventdate >= 'currentdate()'
>              LIMIT 19";
>    $result = mysql_query($query);
>    if(!$result) error_message(sql_error());
>    while($query_data = mysql_fetch_array($result)) {
>    echo $query_data["eventmonth"],"<P>";
>    }

--- End Message ---
--- Begin Message ---
Marlene
You need to convert the current date to a string of the form "yyy-mm-dd
hh:mm:ss" and write your query as follows

$datestring = date("Y-m-d H:i:s", $some_time_stamp_integer);
 - or for this very day today
$datestring = date("Y-m-d H:i:s");      // returns today if no optional
timestamp given

 $query = "SELECT eventmonth FROM $create_calendar_tablename
             WHERE eventdate >=\"".$datestring."\" LIMIT 19";

or alternatively
 $query = "SELECT eventmonth FROM $create_calendar_tablename
             WHERE eventdate >=\"$datestring\" LIMIT 19";

note the escaped quotation marks in each case.

if you are not in the habit of concatenating strings with those "dots"

this assumes you have stored dates in your table as type datetime rather
timestamp.
timestamp is an integer.  (number of seconds since ages ago - 1972 I think)
datetime is a string - e.g.  "2002-09-24 10:30:00"

hope this helps



----- Original Message -----
From: "Marlene Burckhalter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 26, 2002 5:02 AM
Subject: [PHP-WIN] Query to MySQL


I am trying to display an event calendar in an html document ( I am a
beginner, I had to start small).
My problem is the following query displays all the records instead of just
the ones with the event date greater than or equal to the current date.

Any suggestions to a begginer?  Here is a snipplet:

 $query = "SELECT eventmonth FROM $create_calendar_tablename
             WHERE eventdate >= 'currentdate()'
             LIMIT 19";
   $result = mysql_query($query);
   if(!$result) error_message(sql_error());
   while($query_data = mysql_fetch_array($result)) {
   echo $query_data["eventmonth"],"<P>";
   }


--- End Message ---
--- Begin Message ---
I'm using win32api extension for calling external C functions.
How can I pass pointer to integer or float or an array of integers (floats)
as a parameter?

Thanks


--- End Message ---
--- Begin Message ---
I'm using win32api extension for calling external C functions.
How can I pass pointer to integer or float or an array of integers (floats)
as a parameter?

Thanks


--- End Message ---
--- Begin Message ---
Hi All, 
I am just wondering if anyone out there using PHP (4.2.3, bug also affects
previous versions and the latest CVS snapshot) with IIS5 and receives the
"CGI Header Error" in PHP scripts that use an MSSQL DB connection. 

This bug has been logged on the PHP buglist
(http://bugs.php.net/bug.php?id=9852) however the moderators have closed the
bug without it being investigated correctly. 

I will re-itereate the points that I have listed in the bug thread, they
are; 

- I'm running PHP 4.2.3, IIS5, Win2K (SP3 + Q326830, Q295688, Q147222). 
- IIS is configured to use Host Header 
- The error message that is returned via the script is; 

<head><title>Error in CGI Application</title></head> 
<body><h1>CGI Error</h1>The specified CGI application misbehaved by not 
returning a complete set of HTTP headers. The headers it did return 
are:<p><p><pre></pre> 

- If the slot is run as a local administrator then the error does not occur,
similiary if you remove the IUSR access to the slot so that you are prompted
for authentication, and you use an administrator account. 
- At the same time that the error is generated, a popup also occurs on the
console with the details; 

TitleBar: php.exe - Application Error 

The application failed to initialize properly (0xc0000142). Click OK to
terminate the application 

- Any other PHP script which does not use an MSSQL connection works without
a problem, this also includes scripts which use MySQL. 

If anyone has encountered this problem before and found a resolution for it,
please post it here. As you may read from the bug thread, the developers of
PHP seemed to have passed this off as an IIS issue. 

Cheers
--- End Message ---

Reply via email to