Re: [PHP] Working with internal data formats

2008-05-15 Thread John Gunther
Iv Ray wrote: John Gunther wrote: > What technique can I use to take an 8-byte double precision value, as > stored internally, and assign its value to a PHP float variable without > having the bytes misinterpreted as a character string. Does it get misinterpreted, or do you just w

[PHP] Working with internal data formats

2008-05-15 Thread John Gunther
What technique can I use to take an 8-byte double precision value, as stored internally, and assign its value to a PHP float variable without having the bytes misinterpreted as a character string. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.

[PHP] Re: HTML form upload works, CURL fails when uploading file from c:

2008-01-05 Thread John Gunther
Well, I think I understand the problem now: CURL is operating from the server so it knows nothing about C: on the client! So how do I solve my problem? I want to upload multiple files from C: to the server based on a single wildcard spec typed into an HTML form by the user. John Gunther

[PHP] HTML form upload works, CURL fails when uploading file from c:

2008-01-05 Thread John Gunther
PHP 5.2.1 on Apache/Linux. Client is Firefox and IE7 on Windows XP. Uploading C:\boot.ini works great from an HTML type="file" form element but fails using what should be the equivalent: curl_setopt($ch,CURLOPT_POSTFIELDS,array('peru'=>'@C:/boot.ini')); CURL error is "failed creating formpost

[PHP] Re: website tree

2008-01-05 Thread John Gunther
Get the various parts from the $_SERVER superglobal variable: 1) scheme (e.g. http://) from $_SERVER['HTTPS'] (https if "on") 2) host:port (e.g. bucksvsbytes.com) from $_SERVER['HTTP_HOST'] 3) /path/page?query part (e.g. /catalog/index.php?pid=444) from $_SERVER

[PHP] Re: menu andfolder question

2008-01-05 Thread John Gunther
Unless I misunderstand your question, this is normal behavior. The page designer purposely enters the link in the simpler form: http://www.zend.com/en/company because the web server is configured to assume that index.htm is the default page in that folder and correctly displays it. Alain Roger

[PHP] can't figure out proper format for c:\ path for curl upload

2008-01-04 Thread John Gunther
I can't figure out how to pass a c:\... filepath via curl for an RFC1867 multipart form upload in PHP 5.2.1. I'm using the following code to perform a programmatic file upload to the PHP server: $filepath='/home/user/testfile.txt'; $ch=curl_init('http://bucksvsbytes.com/upload.php'); curl_se

[PHP] Re: debugging imap_open

2007-11-09 Thread John Gunther
n manually log in to pop3 and imap through telnet, so I'm at a loss. Am I leaving something important out? I'm running PHP 5.2.1 on Apache 2.0 John John Gunther wrote: I'm trying to use imap functions for the first time and always get "Couldn't open stream" errors

Re: [PHP] Re: Sending Mails

2007-11-09 Thread John Gunther
.0.1], dsn=2.0.0, stat=Sent (lA9KQHhY008650 Message accepted for delivery) - Original Message ----- From: "John Gunther" <[EMAIL PROTECTED]> To: Sent: Friday, November 09, 2007 03:16 PM Subject: [PHP] Re: Sending Mails All true. sendmail or a sendmail shell must be runni

[PHP] Re: Sending Mails

2007-11-09 Thread John Gunther
All true. sendmail or a sendmail shell must be running. The sendmail command to use can be customized in the sendmail_path directive in the php.ini configuration file. If you can't manually use sendmail to send an email, php can't either. John Gunther Alberto García Gómez wrote:

[PHP] debugging imap_open

2007-11-09 Thread John Gunther
#x27;/tmp/imap.txt'); $po='{mail.usservas.org:143/debug}'; $mbox = imap_open($po, $user, $password ,OP_DEBUG); Thanks for the help. John Gunther -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Retrieving response headers from an off-site page

2006-08-01 Thread John Gunther
Thank you! It sure looks like cURL is exactly the tool I need. As soon as I get it installed, I'll start playing with it. Ray Hauge wrote: I deal with screen-scraping a lot at work. I would suggest using cURL to store the cookie data, and then subsequently get the data you need. HTH --

[PHP] Retrieving response headers from an off-site page

2006-07-31 Thread John Gunther
rn a sessionid and then I have to send it in a Cookie header the second time. Reading the first GET's response headers and sending the needed request header on the second GET - in combination with file_get_contents() - is just beyond me. Can anyone enlighten me? John Gunther -- PHP Gen

Re: [PHP] Startinga shell process with a life of its own

2006-07-11 Thread John Gunther
Great approach! Slicker'n snot. I added one enhancement: The shell script writss progress info to the database which the trigger page displays on entry. Richard Lynch wrote: I would recommend, however, that you re-structure things slightly so that the Architecture is more like this: User vi

[PHP] Startinga shell process with a life of its own

2006-07-06 Thread John Gunther
owser context. John Gunther Bucks vs Bytes Inc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Calculations and exponents in languages

2006-06-28 Thread John Gunther
Algol used ^ More common, historically, is the use of ** as the exponentiation operator: Fortran, PL/I, perl, python Curiously, many modern languages -- inexplicably -- don't have an exponentiation operator: C, Java, Javascript, PHP John Gunther Robin Vickery wrote: On 28/06/06, [

Re: [PHP] serve long duration pages

2006-06-28 Thread John Gunther
You're right , my task is really not a web function except for the need to trigger it from an admin page. I'm going to use the PHP command line interface to run it without web interaction. However, there are still situations where a web script may sometimes involve long run times depending on t

[PHP] serve long duration pages

2006-06-28 Thread John Gunther
it's not implemented in 4.3.10. Is there anything I can do from PHP or elsewhere to solve this? John Gunther Bucks vs Bytes Inc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] sessions expiring

2006-06-02 Thread John Gunther
iesOff session.use_trans_sidOff Thanks. John Gunther Bucks vs Bytes Inc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] SVG page displays correctly, but not when generated by PHP

2002-02-24 Thread john gunther
Here's another curious occurrence that may be related: displaying any php page as a local file brings up the Windows "Open with" dialog, whereas referencing the same page as a URL works. Any insighta you can provide would be appreciated. Thanks. John Gunther -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php