php-general Digest 6 Oct 2005 21:41:39 -0000 Issue 3723

2005-10-06 Thread php-general-digest-help
:: ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- ::Bruce:: ---End Message--- ---BeginMessage--- http://news.yahoo.com/s/pcworld/20051006/tc_pcworld/122874 -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED

[PHP] Detect file size BEFORE upload it

2005-10-06 Thread Ruben
Hi, I have been trying _several_ ways to control the size of the files that can be uploaded in a form. The problem is that I was able to detect file size after complete file is transfered. I need to detect file size before all file is transfered, in order to cancel it and preserve server

Re: [PHP] Detect file size BEFORE upload it

2005-10-06 Thread Jasper Bryant-Greene
Ruben wrote: I have been trying _several_ ways to control the size of the files that can be uploaded in a form. The problem is that I was able to detect file size after complete file is transfered. I need to detect file size before all file is transfered, in order to cancel it and preserve

[PHP] Re: Detect file size BEFORE upload it

2005-10-06 Thread Ruben Rubio Rey
Saswat Praharaj wrote: I guess checking the content-length field in HTTP header will help you. I have already tried it. PHP can read content-length after complete file is transferred. Regds, -Saswat On 10/6/05, Ruben [EMAIL PROTECTED] wrote: Hi, I have been trying _several_ ways

Re: [PHP] caching parsed XML files... FALSE advice, still not working

2005-10-06 Thread Petr Smith
Petr Smith wrote: Jasper Bryant-Greene wrote: Petr Smith wrote: is it possible to cache parsed XML files somehow? I'm writing template library based on XML. But it's not very efficient to create new DomDocument, load XML template, process it and show on every page hit. XML parsing is not

Re: [PHP] caching parsed XML files... FALSE advice, still not working

2005-10-06 Thread Jasper Bryant-Greene
Petr Smith wrote: it's not working at all. And it could never work. I don't think it's funny to write false advices to people every other week. I've installed APC cache, tried to save XML. It was not working. apc_fetch returned NULL every time. [snip] When I looked into documentation for

Re: [PHP] caching parsed XML files as DOM objects in memory

2005-10-06 Thread Petr Smith
it's not working at all. And it could never work. I don't think it's funny to write false advices to people every other week. I've installed APC cache, tried to save XML. It was not working. apc_fetch returned NULL every time. [snip] When I looked into documentation for APC - there is this

[PHP] Re: mail() with port authentication

2005-10-06 Thread Mark Rees
Do I need to use Pear to specify port 587 and authentication when sending mail? I could not find any way to do it using mail(). Windows or Unix? On Windows you can set the port by setting smtp_port in php.ini. Unix doesn't appear to have a direct equivalent, but you might be able to do

[PHP] How do I POST data with headers make the browser follow?

2005-10-06 Thread Ragnar
Hi guys/girls, I have to apologize if this issue has been discussed in detail before but I couldn't find anything obvious so far. What I need/want to do is to : 1. Take POST data from a form (no problem) 2. Do whatever i need to on the target page (no problem) 3. Pass some other data on to a

Re: [PHP] Detect file size BEFORE upload it

2005-10-06 Thread Richard Davey
Hi Ruben, Thursday, October 6, 2005, 7:38:35 AM, you wrote: The problem is that I was able to detect file size after complete file is transfered. I need to detect file size before all file is transfered, in order to cancel it and preserve server resources. Any ideas? The only way to do

Re: [PHP] How do I POST data with headers make the browser follow?

2005-10-06 Thread Brent Baisley
If the information is sensitive, why are you trying to fake a POST submission? A POST can be received from anywhere. SSL is just encrypting it, not verifying the client is the same. I would use session variables to store information you need to access from page to page. That way you can

[PHP] Re: How do I POST data with headers make the browser follow?

2005-10-06 Thread Petr Smith
I have to apologize if this issue has been discussed in detail before but I couldn't find anything obvious so far. What I need/want to do is to : 1. Take POST data from a form (no problem) 2. Do whatever i need to on the target page (no problem) 3. Pass some other data on to a 3rd page as a

Re: [PHP] Re: form not submitting when I change action from PHP_SELF to thanks page

2005-10-06 Thread Bruce Gilbert
when I add that code I can the following error msg when submitting the form. *Warning*: Cannot modify header information - headers already sent by (output started at /home/webadmin/dedicated75.virtual.vps-

[PHP] Creator in the news

2005-10-06 Thread John Nichel
http://news.yahoo.com/s/pcworld/20051006/tc_pcworld/122874 -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: form not submitting when I change action from PHP_SELF to thanks page

2005-10-06 Thread tg-php
Check to make sure absolutely nothing before the header() function is outputing anything. No echos, no prints, no var_dumps, no HTML or even blank lines. If it's something tangible like an echo or print or something, then putting an exit()/die() function right before the header() function then

Re: [PHP] How do I POST data with headers make the browser follow?

2005-10-06 Thread Mark Rees
1. Take POST data from a form (no problem) 2. Do whatever i need to on the target page (no problem) 3. Pass some other data on to a 3rd page as a POST request. 4. Get the browser to follow to said 3rd page. All this is happening via SSL. What the other people said about HTTP. It's

[PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. I verified that I'm setting it before any other output is sent to the browser. I verified that $username does have some valid contents. I also verified that the browsers I'm

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Larry E. Ullman
I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. I verified that I'm setting it before any other output is sent to the browser. I verified that $username does have some valid contents. I also verified that the browsers I'm

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread John Nichel
Brian Dunning wrote: I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. snip Is that just a typo? It should be $_COOKIE['username'] -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing

Re: [PHP] Re: form not submitting when I change action from PHP_SELF to thanks page

2005-10-06 Thread Bruce Gilbert
I checked and no white space involved. What would I need to put tin the exit()/die() function? On 10/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Check to make sure absolutely nothing before the header() function is outputing anything. No echos, no prints, no var_dumps, no HTML or even

Re: [PHP] Re: form not submitting when I change action from PHP_SELF to thanks page

2005-10-06 Thread Robert Cummings
Here's the simple solution (put it at the top of your script: ob_start(); Cheers, Rob. On Thu, 2005-10-06 at 10:30, Bruce Gilbert wrote: I checked and no white space involved. What would I need to put tin the exit()/die() function? On 10/6/05, [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
On Oct 6, 2005, at 7:28 AM, John Nichel wrote: Is that just a typo? It should be $_COOKIE['username'] Oops, yes, that was my typo in the email - it is correctly $_COOKIE ['username'] in the code. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Re: form not submitting when I change action from PHP_SELF to thanks page

2005-10-06 Thread tg-php
You don't have to put anything specific, it just stops the script from executing. You can optionally put text in there. I like using die() for some reason (shorter? more.. err.. aggressive? hah) so I'll using commands like: die(Made it to this point...); I might use this to see if I got to

Re: [PHP] Detect file size BEFORE upload it

2005-10-06 Thread Ruben Rubio Rey
:) U have it. Its perferct. Im gonna check it, but seems to be the solution. Raditha Dissanayake wrote: While you are at SF checkout Mega Upload. Ruben Rubio Rey wrote: Anyway, if I would use any applet I ll use one of sourceforge.net. Its free and I can modify source, so I can

RE: [PHP] PHP and XML

2005-10-06 Thread Rick Emery
Quoting Robbert van Andel [EMAIL PROTECTED]: Thanks, I'm investigating XSL and it looks pretty good. We use an RPM based installation of PHP version 5.0.4. I see on PHP.net's website that XSL comes standard with PHP 5 and you need to enable it by adding the argument --with-xsl to the

Re: [PHP] Re: form not submitting when I change action from PHP_SELF to thanks page

2005-10-06 Thread Bruce Gilbert
when I put the die statment in and test the form I get, the html prior to the form and what I put in my die statement eg:made it to this point. The form submits and I get the info, but I am not redirected to the Thanks page. My question is how do I determine from this what is causing my error?

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Chris
Unless I'm mistaken, you appear to be setting the Expiration date of the cookie to Mon, 29 Jun 1970 17:00:00 -0700. Which would cause the cookie to be unset, if it were already set, and do nothing otherwise. Chris Brian Dunning wrote: I'm trying to setcookie('username',$username,15552000)

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread tg-php
Good catch, Chris. I was wondering about that myself but hadn't taken the time to see if setcookie() used regular serial time or if cookies had another time standard. echo date(m/d/Y h:i:s, 15552000); 06/29/1970 08:00:00 That's what I get. -TG = = = Original message = = = Unless I'm

Re: [PHP] Detect file size BEFORE upload it

2005-10-06 Thread tg-php
I know that part of the POST transaction with the client and web server involves sending the 'content-length'.. there's no way to tap into that before the file's uploaded though I guess. (example of how to manually POST using Python at leastfound here:

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
D'Oh! You guys are absolutely right. I was trying to go for 6 months, which works now if I say time()+15552000 instead of 15552000. And the documentation shows that exactly - apparently I read right over it, even though I studied it minutely before posting. Oh well...my wife would have the

[PHP] SOAP problem, (related to gethostbyname?)

2005-10-06 Thread -k.
I'm using the PEAR Soap package and having problem accessing another sites's webservices. When i do something like this: ?PHP $wsdl_url = 'some_wsdl.xml'; $WSDL = new SOAP_WSDL($wsdl_url); $client = $WSDL-getProxy(); $web_service_result = $client -

[PHP] Re: [PHP-DB] Search Replace within PHP

2005-10-06 Thread tg-php
str_replace() is the first thing that comes to mind. From the manual: // Provides: body text='black' $bodytag = str_replace(%body%, black, body text='%body%'); Using %keyword% and is kind of a template style method, but has worked out well for me (and I assume others) so try something along

Re: [PHP] Detect file size BEFORE upload it

2005-10-06 Thread Jasper Bryant-Greene
[EMAIL PROTECTED] wrote: var myFile = new File(c:\temp\myfile.txt); myFile.open(r); alert('myFile length: ' + myFile.getLength()); Somehow I don't think any browser is going to give JS access to arbitrary files on the user's system like that. -- Jasper Bryant-Greene Freelance web developer

Re: [PHP] Detect file size BEFORE upload it

2005-10-06 Thread tg-php
Yeah, you're right. I didn't test that before I posted it. Looks like you can do it as long as your clients are running Windows and you can use Active X or another Windows trick using something like JScript, but with pure Javascript it looks bleak. I tried to use something like this: img =

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Richard Lynch
On Thu, October 6, 2005 9:11 am, Brian Dunning wrote: I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. I verified that I'm setting it before any other output is sent to the browser. I verified that $username does have some

Re: [PHP] How do I POST data with headers make the browser follow?

2005-10-06 Thread Ragnar
The information that comes in from the first page is a creditcard form with the standard values (CCnumber, Expiry Date, Cardholder name etc). On page 2 an XMLrequest is done with a verification gateway (in this case to check for enrolment in 3D-Secure), the result for that I get back on the same

RE: [PHP] PHP and XML

2005-10-06 Thread Robbert van Andel
Yes, I resolved the problem today by installing this RPM via yum. I had assumed it was already installed because I was able to do some XML parsing without it. I was able to get the XML transformed and it looks good, if I do say so myself :) Robbert -Original Message- From: Rick Emery

[PHP] incLomplete

2005-10-06 Thread Daevid Vincent
Just saw this error. PHP 5.0.3 Warning: Invalid or inclomplete context in foo.php on line 42 HAHAHAHHAH. inclomplete. :p You had me at EHLO --E.Webb (10.04.05) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP vs. ColdFusion

2005-10-06 Thread Rick Emery
Quoting Angelo Zanetti [EMAIL PROTECTED]: Please let us know what the outcome is!! A *huge* THANK YOU to everyone who helped me with this (yes, even those who recommended Cold Fusion)! For those interested, our organization has decided (much to my surprise) to go with PHP running on Linux.

[PHP] Linux/PHP and Windows/MSSQL

2005-10-06 Thread Rick Emery
Knowing that I'm not the only one to want to connect to Microsoft SQL Server on Windows from PHP and Apache on Linux, I'm seeking advice. I set up a proof-of-concept application, using Gentoo Linux (with which I'm most familiar) as my base. Being a compile-from-source distribution with a lot

Re: [PHP] Re: PHP vs. ColdFusion

2005-10-06 Thread Robert Cummings
On Thu, 2005-10-06 at 21:15, Rick Emery wrote: Quoting Angelo Zanetti [EMAIL PROTECTED]: Please let us know what the outcome is!! A *huge* THANK YOU to everyone who helped me with this (yes, even those who recommended Cold Fusion)! For those interested, our organization has decided

RE: [PHP] Linux/PHP and Windows/MSSQL

2005-10-06 Thread Robbert van Andel
There are freetds rpms out there as well as mssql rpms. I got it to work on a Fedora Core 1 box but since upgrading to Fedora Core 4 I was not able to find any rpms for either because they are not available for PHP5 (yet). If you find any I'd love to know. Sorry I can't point to where I got

Re: [PHP] Linux/PHP and Windows/MSSQL

2005-10-06 Thread Frank M. Kromann
Hi Rick, FreeTDS is still a fast moving target and so is PHP in some areas. Getting pre-compiled RPM's would often force you to run older versions. Compiling from source enables you to keep up to date with the latest features and bug-fixes. If you are running this on multiple computers it's not a

Re: [PHP] Linux/PHP and Windows/MSSQL

2005-10-06 Thread Michael Crute
On 10/6/05, Rick Emery [EMAIL PROTECTED] wrote: Knowing that I'm not the only one to want to connect to Microsoft SQL Server on Windows from PHP and Apache on Linux, I'm seeking advice. I set up a proof-of-concept application, using Gentoo Linux (with which I'm most familiar) as my base.

[PHP] Re: How do I POST data with headers make the browser follow?

2005-10-06 Thread Ragnar
Message-ID: [EMAIL PROTECTED] To: php-general@lists.php.net Date: Thu, 06 Oct 2005 15:04:41 +0200 From: Petr Smith [EMAIL PROTECTED] Subject: Re: How do I POST data with headers make the browser follow? I have to apologize if this issue has been discussed in detail before but I couldn't find