[PHP] slow upload with http post

2004-04-20 Thread Yavuz Maşlak
Hello
I have a webserver that  running php4.3.x,mysql3.5x,apache1.3.x  on Mandrake9.
I intended to transfer this server to another server.
I installed Freebsd4.9 on newserver. and certainly apache1.3x,php4,mysql and 
concerning components.
it works well. and I have a problem. 
We have 100Mbit/s Lan media. no problem
Folders that (some has  size of 1Mbyte or more )  are uploaded with http_post to the 
server. 
in old server  
the folder that size of 1mbyte was uploaded with in 2 second. but on Freebsd the same 
folder uploading with in 7,8 second. That is, Upload is slow
What shall i do ? 





[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
Aidan Lister wrote:

> Why do these functions wrap at approximately 80 chars? It's stupid! How
> can this be worked around?

It doesn't check the source to see that the browser wraps the text as it
reaches the border of the window.

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



[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
Red Wingate wrote:

> Aidan Lister wrote:
> 
>> Why do these functions wrap at approximately 80 chars? It's stupid! How
>> can this be worked around?
> 
> It doesn't check the source to see that the browser wraps the text as it
> reaches the border of the window.

Oh just another note, use  to skip this limitation :-)





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



[PHP] Re: slow upload with http post

2004-04-20 Thread Red Wingate
Yavuz maFelak wrote:

> Hello
> I have a webserver that  running php4.3.x,mysql3.5x,apache1.3.x  on
> Mandrake9. I intended to transfer this server to another server.
> I installed Freebsd4.9 on newserver. and certainly apache1.3x,php4,mysql
> and concerning components. it works well. and I have a problem.
> We have 100Mbit/s Lan media. no problem
> Folders that (some has  size of 1Mbyte or more )  are uploaded with
> http_post to the server. in old server
> the folder that size of 1mbyte was uploaded with in 2 second. but on
> Freebsd the same folder uploading with in 7,8 second. That is, Upload is
> slow What shall i do ?

wait aprox 5.8 seconds longer?

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



Re: [PHP] FW: Resizing Pictures

2004-04-20 Thread Lester Caine
Ryan Schefke wrote:

How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?
Grab a copy of TikiWiki - http://freshmeat.net/projects/tiki/
It's quite a large system, but there are lots of useful libraries in it.
lib/imagegals/imagegallib.php has a nice sample of building thumbnails 
and smaller copies of the original as well as managing them.

Alternatively phpgallery - http://www.giffin.org/phpgallery.php
has a similar set of functions but you will need to scout them out.
( Isn't open source great - just borrow what you want :) )

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] FW: Resizing Pictures

2004-04-20 Thread Brent Clark
> Grab a copy of TikiWiki - http://freshmeat.net/projects/tiki/
> It's quite a large system, but there are lots of useful libraries in it.
> lib/imagegals/imagegallib.php has a nice sample of building thumbnails 
> and smaller copies of the original as well as managing them.
> Alternatively phpgallery - http://www.giffin.org/phpgallery.php
> has a similar set of functions but you will need to scout them out.
> ( Isn't open source great - just borrow what you want :) )

Indeed it is 
There is real nice one called phpix.
This is non OO project. Might be easier to read

Kind Regards
Brent Clark

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



Re: [PHP] Re: slow upload with http post

2004-04-20 Thread Yavuz Maslak
yes more or less we wait
- Original Message - 
From: "Red Wingate" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 20, 2004 12:09 PM
Subject: [PHP] Re: slow upload with http post


> Yavuz maFelak wrote:
>
> > Hello
> > I have a webserver that  running php4.3.x,mysql3.5x,apache1.3.x  on
> > Mandrake9. I intended to transfer this server to another server.
> > I installed Freebsd4.9 on newserver. and certainly apache1.3x,php4,mysql
> > and concerning components. it works well. and I have a problem.
> > We have 100Mbit/s Lan media. no problem
> > Folders that (some has  size of 1Mbyte or more )  are uploaded with
> > http_post to the server. in old server
> > the folder that size of 1mbyte was uploaded with in 2 second. but on
> > Freebsd the same folder uploading with in 7,8 second. That is, Upload is
> > slow What shall i do ?
>
> wait aprox 5.8 seconds longer?
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP] Encrypting Source

2004-04-20 Thread Clifford W. Hansen
Thanx to all for the suggestions...

Till We Meet Again...

Clifford W. Hansen
Operations Support Developer
Aspivia (Pty) Ltd.

+27 (0) 11 259-1150 (Switchboard)
+27 (0) 11 259-1019 (Fax)
+27 (0) 83 761-0240 (Mobile)
[EMAIL PROTECTED] (EMail)
http://chansen.aspivia.com (Web)

Registered Linux user number 343424 on http://counter.li.org/ 

"We have seen strange things today!" Luke 5:26

This message contains information intended for the perusal, and/or use (if
so stated), of the stated addressee(s) only. The information is confidential
and privileged. If you are not an intended recipient, do not peruse, use,
disseminate, distribute, copy or in any manner rely upon the information
contained in this message (directly or indirectly). The sender and/or the
entity represented by the sender shall not be held accountable in the event
that this prohibition is disregarded.

If you receive this message in error, notify the sender immediately by
e-mail, fax or telephone and return and/or destroy the original message.

The views or representations contained in this message, whether express or
implied, are those of the sender only, unless that sender expressly states
them to be the views or representations of an entity or person, who shall be
named by the sender and who the sender shall state to represent. No
liability shall otherwise attach to any other entity or person.

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



[PHP] Parse error: parse error, unexpected '='

2004-04-20 Thread Lasse Motroen
I have received some code and am trying to run it. However, I get the 
following error:

*Parse error*: parse error, unexpected '=', expecting ')'

It happens on this line when &$args=array() is reached:

function array_key_remove(&$args=array(), $keys=array(),$replacement=NULL)

I have php-4.2.2-17 and Apache 2.0.40 installed, and am runnig RedHat 9. 
What's wrong, please help.

Regards,
not-really-too-familiar-with-PHP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Parse error: parse error, unexpected '='

2004-04-20 Thread Elfyn McBratney
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tuesday 20 Apr 2004 08:24, Lasse Motroen wrote:
> I have received some code and am trying to run it. However, I get the
> following error:
>
> *Parse error*: parse error, unexpected '=', expecting ')'
>
> It happens on this line when &$args=array() is reached:
>
> function array_key_remove(&$args=array(), $keys=array(),$replacement=NULL)
>
> I have php-4.2.2-17 and Apache 2.0.40 installed, and am runnig RedHat 9.
> What's wrong, please help.

IN PHP4 you can't have a default value for a parameter given by reference:

  &$args=array()

You will need to change that to a simple

  &$args

for it to work with PHP4.  However, in PHP5 (any version from b1, I believe), 
you can have a default value for a parameter when given by referrence.

Elfyn

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

Error: quote_machine(): Dry humour detected.

>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
<< ~  Linux london 2.6.5-emcb-243 #2 i686 GNU/Linux  ~ >>
>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAhO9vaIgMKkVlSLQRAgu5AKCubWfkqcopm7ZXWuUamdPiRiW3gwCfVidL
5ixcr8l+91g2km7+VAPvYRM=
=6DUI
-END PGP SIGNATURE-

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



[PHP] <button> tag

2004-04-20 Thread Richard Lewis
Hello PHPers,

I'm not sure whether this is the best place to post this message...

Some of the forms I'm using in a PHP project I'm working use the http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Re: sessions getting destroyed for *Some* clients

2004-04-20 Thread Jaskirat Singh
I do not think it is the server name issue. I used
www.original-remote-control.co.uk for testing ..and I have done that
scores of times now :) ..

I do not use setcookie .. I just call session_start() in the beginning
to set the cookie for session.

Jas

--
Make sure it's not just a cookie-problem related to server name.  The
shopping 
cart session for "original-remote-control.co.uk" is different from the
shopping 
cart for "www.original-remote-control.co.uk".  If this is your problem,
I think 
you can fix it by changing how you call "setcookie".

Of course, this may not be the problem, in which case you can ignore
what I 
just said. :-)

cheers,

Travis






__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

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



RE: [PHP] <button> tag

2004-04-20 Thread Hawkes, Richard
> Some of the forms I'm using in a PHP project I'm working use the 
> mailto:[EMAIL PROTECTED]
Sent: 20 April 2004 09:45
To: [EMAIL PROTECTED]
Subject: [PHP] 

[PHP] Re: Parse error: parse error, unexpected '='

2004-04-20 Thread Craig



"Lasse Motroen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have received some code and am trying to run it. However, I get the
> following error:
>
> *Parse error*: parse error, unexpected '=', expecting ')'
>
> It happens on this line when &$args=array() is reached:
>
> function array_key_remove(&$args=array(), $keys=array(),$replacement=NULL)
>
> I have php-4.2.2-17 and Apache 2.0.40 installed, and am runnig RedHat 9.
> What's wrong, please help.
>
> Regards,
> not-really-too-familiar-with-PHP

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



RE: [PHP] <button> tag

2004-04-20 Thread Nunners
 is not a standard HTML v4 tag

You need:


> -Original Message-
> From: Richard Lewis [mailto:[EMAIL PROTECTED]
> Sent: 20 April 2004 09:45
> To: [EMAIL PROTECTED]
> Subject: [PHP] 

Re: [PHP] <button> tag

2004-04-20 Thread Richard Davey
Hello Richard,

Tuesday, April 20, 2004, 9:44:59 AM, you wrote:

RL> They are working fine on Konqueror but don't seem to work properly on MSIE.
RL> I tried inserting the debug code:

I'm amazed that worked on Konqueror. It's not even valid HTML. You
sure you didn't mean  ?

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] Re: <button> tag

2004-04-20 Thread Richard Lewis
Acutally, I've just worked out why its not working:

I have multiple  tags on the same page which all do different things
(edit/delete/new...). They are all called 'submit' (name='submit') and have
different 'value' values in order that the receiving script may distinguish
between them:

Edit Item
Delete Item

It seems that MSIE doesn't send the value of 'value' when the form is
posted.

Does  allow this sort of functionality?

Cheers,
Richard

Richard Lewis wrote:

> Hello PHPers,
> 
> I'm not sure whether this is the best place to post this message...
> 
> Some of the forms I'm using in a PHP project I'm working use the  type="submit ...> tag to submit.
> 
> They are working fine on Konqueror but don't seem to work properly on
> MSIE. I tried inserting the debug code:
> 
> echo var_dump($_POST);
> 
> into the receiving script and in both Konqueror and MSIE all the values
> were present.
> 
> Does anyone know what might be going on here?
> 
> Cheers,
> Richard

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



Re: [PHP] Re: <button> tag

2004-04-20 Thread Richard Davey
Hello Richard,

Tuesday, April 20, 2004, 9:55:15 AM, you wrote:

RL> Acutally, I've just worked out why its not working:

Other than it not being valid HTML you mean? :)

RL> I have multiple  tags on the same page which all do different things
RL> (edit/delete/new...). They are all called 'submit' (name='submit') and have
RL> different 'value' values in order that the receiving script may distinguish
RL> between them:

RL> Edit Item
RL> Delete Item

RL> It seems that MSIE doesn't send the value of 'value' when the form is
RL> posted.

In all fairness to IE, it WILL send the value of each button - but PHP
cannot distinguish between them all because you have given them all
the same name! :)

RL> Does  allow this sort of functionality?

If it has a unique name, sure:



Alternatively, if you need loads of buttons on a page, just use:




-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] Re: <button> tag

2004-04-20 Thread Richard Lewis
>In all fairness to IE, it WILL send the value of each button - but PHP
>cannot distinguish between them all because you have given them all
>the same name! :)
>
>RL> Does  allow this sort of functionality?
>
>If it has a unique name, sure:
>
>

So what if I want to know which button was pressed to submit the form?

At the moment I have:

switch ($_POST['submit'])
{
case "edit": ...
case "new": ...
}

R.

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



Re[2]: [PHP] Re: <button> tag

2004-04-20 Thread Richard Davey
Hello Richard,

Tuesday, April 20, 2004, 10:17:42 AM, you wrote:

>>In all fairness to IE, it WILL send the value of each button - but PHP
>>cannot distinguish between them all because you have given them all
>>the same name! :)
>>
>>RL> Does  allow this sort of functionality?
>>
>>If it has a unique name, sure:
>>
>>

RL> So what if I want to know which button was pressed to submit the form?

You should have 1 submit button per form - which doesn't mean you
cannot have more than 1 form per page. I.e. one form for "add", one
for "edit", etc. They can all have the same action/method (i.e. go to
the same PHP script).

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re[2]: [PHP] <button> tag

2004-04-20 Thread Richard Davey
Hello Mike,

Tuesday, April 20, 2004, 11:15:07 AM, you wrote:

FML> Bzzt! Completely wrong. See
FML> http://www.w3.org/TR/html401/interact/forms.html#h-17.5.

Yeah, already covered this.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



RE: [PHP] Unwanted e-mails

2004-04-20 Thread Ford, Mike [LSS]
On 19 April 2004 23:02, Lester Caine wrote:

> OK 72 Hours later I got 6 bounce messages back related to Fridays
> eMails direct to lists.php.net ( one of which is yet another attempt
> to unsubscribe from php-db ) 
> 
> > Delivery-date: Mon, 19 Apr 2004 20:30:30 +0100
> > Received: from dswu27.btconnect.com ([193.113.154.28])
> > by mx1.mail.uk.clara.net with smtp (Exim 4.30)
> > id 1BFeTO-000KR9-8m
> > for [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:30:30 +0100
> > Received: from btconnect.com by dswu27.btconnect.com id
> <[EMAIL PROTECTED]>; Mon, 19 Apr 2004
> 20:27:04 +0100
> > Message-Type: Delivery Report

Yeah, get that bounce every time a message is sent to php-general.  It's
obviously coming from a bad address subscribed to the list, though, as all
messages appear on the list long before that bounce comes in.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



[PHP] Re: $PHP_SELF problem

2004-04-20 Thread Red Wingate
[EMAIL PROTECTED] wrote:

> Hi
> 
> $thisFileName = $PHP_SELF; works in a file just a few lines after the
> program start.
> 
> $thisFileName = $PHP_SELF; doesn't work (echo ("Debug: self:
> $PHP_SELF"); returns Debug: self: ) if it's within function
> getNavigation() in the Navigation object called by another program.
> 
You better check the docs on 'global' and $GLOBALS :-)

-- red

> Why?
> 
> The Navigation object is called like this:
> include ("Navigation.php4");
> $myNavigation = new Navigation ("a", "b");
> $myNavigation->getNavigation();
> 
> I guess I'm asking $PHP_SELF something confusing. Does it respond
> "index.php4" which is where the above three lines reside, or
> Navigation.php4 which is where the actual $PHP_SELF resides.
> 
> All help appreciated :-)
> 
> Cheers
> J

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



RE: [PHP] <button> tag

2004-04-20 Thread Ford, Mike [LSS]
On 20 April 2004 09:45, Nunners wrote:

>  is not a standard HTML v4 tag

Bzzt! Completely wrong. See
http://www.w3.org/TR/html401/interact/forms.html#h-17.5.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



[PHP] Re: $PHP_SELF problem

2004-04-20 Thread Craig
http://ie.php.net/globals

Instead of $PHP_SELF use $_SERVER['PHP_SELF']

Craig


"Red Wingate" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> [EMAIL PROTECTED] wrote:
>
> > Hi
> >
> > $thisFileName = $PHP_SELF; works in a file just a few lines after the
> > program start.
> >
> > $thisFileName = $PHP_SELF; doesn't work (echo ("Debug: self:
> > $PHP_SELF"); returns Debug: self: ) if it's within function
> > getNavigation() in the Navigation object called by another program.
> >
> You better check the docs on 'global' and $GLOBALS :-)
>
> -- red
>
> > Why?
> >
> > The Navigation object is called like this:
> > include ("Navigation.php4");
> > $myNavigation = new Navigation ("a", "b");
> > $myNavigation->getNavigation();
> >
> > I guess I'm asking $PHP_SELF something confusing. Does it respond
> > "index.php4" which is where the above three lines reside, or
> > Navigation.php4 which is where the actual $PHP_SELF resides.
> >
> > All help appreciated :-)
> >
> > Cheers
> > J

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



[PHP] $PHP_SELF problem

2004-04-20 Thread john
Hi

$thisFileName = $PHP_SELF; works in a file just a few lines after the
program start.

$thisFileName = $PHP_SELF; doesn't work (echo ("Debug: self:
$PHP_SELF"); returns Debug: self: ) if it's within function
getNavigation() in the Navigation object called by another program.

Why?

The Navigation object is called like this:
include ("Navigation.php4");
$myNavigation = new Navigation ("a", "b");
$myNavigation->getNavigation();

I guess I'm asking $PHP_SELF something confusing. Does it respond
"index.php4" which is where the above three lines reside, or
Navigation.php4 which is where the actual $PHP_SELF resides.

All help appreciated :-)

Cheers
J

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



RE: [PHP] Unwanted e-mails

2004-04-20 Thread Ford, Mike [LSS]
On 20 April 2004 07:47, Lester Caine wrote:

> Chris W. Parker wrote:
> 
> > but your messages *ARE* getting accepted otherwise i would not be
> > reading this email right now!
> 
> NO THEY ARE NOT - This reply HAS to be sent via the newsgroup!
> 
> The bounce messages I am getting are as a result of .php.net NOT
> accepting my perfectly valid posts!

No, I don't believe so -- the bounce you posted looks exactly like the one I get from 
every message posted to the list, and my messages get through fine.  In fact, the 
bounce generally arrives days after the message has made it to the list!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] Unsubscribing Was: Unwanted e-mails

2004-04-20 Thread David Robley
[EMAIL PROTECTED] (Lester Caine) wrote in 
news:[EMAIL PROTECTED]:

> Chris Shiflett wrote:
> 
>>>If you look at the first post above, it appears he is hitting
>>>"Reply" to list messages, trying to unsubscribe by sending a post
>>>to the list. If you look at the text of the return that he passed on
>>>to the list, it also indicates he was sending his unsubscribe posts to
>>>the list address. 
>> 
>> If he hit "Reply," his message would be sent to the author of a previous
>> email, not the list.
>> 
>> From what I can tell, he has tried to follow the proper procedure for
>> unsubscribing, yet some overzealous list members find it necessary to
>> ridicule him without actually reading his emails. No response is better
>> for everyone than ridiculing people, even if their behavior is clearly
>> wrong. 
>> 
>> If anyone has trouble unsubscribing from this list, please refer them to
>> the following page:
>> 
>> http://www.php.net/unsub.php
>> 
>> It will help one unsubscribe, even if it requires manual intervention.
>> 
>> Hope that helps.
> 
> Thank you Chris for some sanity - BUT
> to once again repeat the problem ...
> 
> I am having to use the newsgroup interface to get ANYTHING into the 
> php.net domain 
> 
> The LONG bounce message I posted is one of many I have had since the new 
> year in response to ANY messages I post via email. It takes up to 72 
> hours for that bounce to appear, and NOTHING gets through to the lists 
> via that method. ( If someone wants copies of all of them to look at I 
> can send them - including the unsubscribe bounces ! )
> 
> While I will put up with the newsgroup interface it is not my preferred 
> method of working, but currently I receive email copies of the lists as 
> well as having to access the newsgroup.
> 
> UNSUBSCRIBE from the eMail copy requires that I reply to the eMail the 
> lists send me - AND THAT REPLY IS BOUNCED EVERY TIME.
> 
> This problem only happens with eMails to addresses ending .php.net and I 
> have no problem with any other eMail list.
> 
> PLEASE do not keep telling me it is my own fault - PLEASE can someone at 
> least address the problem rather that complaining that I am ignorant!
> 

If all else fails, does an email to listname-owner work for you? Also, the 
info at http://auseinet.flinders.edu.au/links/lists/ezmlm.html might be 
helpful.

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



RE: [PHP] Unwanted e-mails

2004-04-20 Thread Red Wingate
[...]
>> > but your messages *ARE* getting accepted otherwise i would not be
>> > reading this email right now!
>> 
>> NO THEY ARE NOT - This reply HAS to be sent via the newsgroup!
>> 
>> The bounce messages I am getting are as a result of .php.net NOT
>> accepting my perfectly valid posts!
> 
> No, I don't believe so -- the bounce you posted looks exactly like the one
> I get from every message posted to the list, and my messages get through
> fine.  In fact, the bounce generally arrives days after the message has
> made it to the list!
[...]

Allright, lets glue this two posts together 

[...]
> > Delivery-date: Mon, 19 Apr 2004 20:30:30 +0100
> > Received: from dswu27.btconnect.com ([193.113.154.28])
> > by mx1.mail.uk.clara.net with smtp (Exim 4.30)
> > id 1BFeTO-000KR9-8m
> > for [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:30:30 +0100
> > Received: from btconnect.com by dswu27.btconnect.com id
> > <[EMAIL PROTECTED]>; Mon, 19 Apr 2004
> > 20:27:04 +0100
> > Message-Type: Delivery Report
[...]

Sooo ... now if you would have taken a slight look at the mail
you got, you might have noticed 'dswu27.btconnect.com'. Now, someone
registered an e-mail adress to PHP.General

[EMAIL PROTECTED]

which bounces every message back it gets from the list (right to the
author of the mail as is does a simple reply.

 -- red

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



[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Aidan Lister
No, PHP explicity inserts  at 80chars


"Red Wingate" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Red Wingate wrote:
>
> > Aidan Lister wrote:
> >
> >> Why do these functions wrap at approximately 80 chars? It's stupid! How
> >> can this be worked around?
> >
> > It doesn't check the source to see that the browser wraps the text as it
> > reaches the border of the window.
>
> Oh just another note, use  to skip this limitation :-)
>
> 
>hightlight_file ( '...' );
> ?>
> 

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



[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
I just build a testcase to check wether PHP does or not and it doesn't even
if i have 1080 chars in a line :p

 -- red

> No, PHP explicity inserts  at 80chars
> 
> 
> "Red Wingate" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Red Wingate wrote:
>>
>> > Aidan Lister wrote:
>> >
>> >> Why do these functions wrap at approximately 80 chars? It's stupid!
>> >> How can this be worked around?
>> >
>> > It doesn't check the source to see that the browser wraps the text as
>> > it reaches the border of the window.
>>
>> Oh just another note, use  to skip this limitation :-)
>>
>> 
>> >   hightlight_file ( '...' );
>> ?>
>> 

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



[PHP] Whats faster? text files or mysql?

2004-04-20 Thread Andrew Fenn
I have two text files with two rows of data on each line sperated by a tab for about 
20 lines in each file. Would it be faster accessing this data by putting it in a mysql 
table?




-
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download 
Messenger Now

[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Aidan Lister
It seems they've fixed this in php5, so I can't complain.

"Aidan Lister" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Why do these functions wrap at approximately 80 chars? It's stupid! How
can
> this be worked around?

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



Re: [PHP] Unsubscribing Was: Unwanted e-mails

2004-04-20 Thread Lester Caine
David Robley wrote:

If all else fails, does an email to listname-owner work for you? Also, the 
info at http://auseinet.flinders.edu.au/links/lists/ezmlm.html might be 
helpful.
Unfortunately not :)
The list owner is [EMAIL PROTECTED] which is still a .php.net 
address, and so gets a bounce message after 72 hours.
I can't believe that SOMEONE who has access to the list server has not 
seen my messages across four lists ;)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Aidan Lister
Here's a PHP4 example:
http://ircphp.com/users/imho/?file=function.str_chop.php

Here's an example where PHP has explicitly wrapped at 80 chars, but only the
PHP, not the HTML.
http://ircphp.com/users/imho/



"Red Wingate" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I just build a testcase to check wether PHP does or not and it doesn't
even
> if i have 1080 chars in a line :p
>
>  -- red
>
> > No, PHP explicity inserts  at 80chars
> >
> >
> > "Red Wingate" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >> Red Wingate wrote:
> >>
> >> > Aidan Lister wrote:
> >> >
> >> >> Why do these functions wrap at approximately 80 chars? It's stupid!
> >> >> How can this be worked around?
> >> >
> >> > It doesn't check the source to see that the browser wraps the text as
> >> > it reaches the border of the window.
> >>
> >> Oh just another note, use  to skip this limitation :-)
> >>
> >> 
> >>  >>   hightlight_file ( '...' );
> >> ?>
> >> 

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



RE: [PHP] Whats faster? text files or mysql?

2004-04-20 Thread Jay Blanchard
[snip]
I have two text files with two rows of data on each line sperated by a
tab for about 20 lines in each file. Would it be faster accessing this
data by putting it in a mysql table?
[/snip]

Sounds like the perfect opportunity to set up a test! File I/O is always
slower.

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



[PHP] Re: Whats faster? text files or mysql?

2004-04-20 Thread Aidan Lister
Ofcourse

"Andrew fenn" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have two text files with two rows of data on each line sperated by a tab
for about 20 lines in each file. Would it be faster accessing this data by
putting it in a mysql table?
>
>
>
>
> -
>   Yahoo! Messenger - Communicate instantly..."Ping" your friends today!
Download Messenger Now

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



Re: [PHP] Re: <button> tag

2004-04-20 Thread John W. Holmes
From: "Richard Lewis" <[EMAIL PROTECTED]>

> >In all fairness to IE, it WILL send the value of each button - but PHP
> >cannot distinguish between them all because you have given them all
> >the same name! :)
> >
> >RL> Does  allow this sort of functionality?
> >
> >If it has a unique name, sure:
> >
> >
>
> So what if I want to know which button was pressed to submit the form?
>
> At the moment I have:
>
> switch ($_POST['submit'])
> {
> case "edit": ...
> case "new": ...
> }

You can have multiple submit buttons, each one just needs to have a unique
name or value.




Now, when either of those buttons are pressed, you'll end up with one
$_POST['submit'] variable that'll either have a value of "New" or "Edit". So
you can do exactly what you want above, just be sure to match up the case
(new vs. New, etc).

You can also do it with unique names:




Now, depending upon which button was pressed, you'll either have
$_POST['edit_submit'] or $_POST['new_submit'], but not both.

if(isset($_POST['edit_submit']))
{ //do edit stuff }
elseif(isset($_POST['new_submit']))
{ //do new stuff }
etc...

---John Holmes...

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



RE: [PHP] PHP Web Hosting

2004-04-20 Thread Martin, Stanley G [Contractor for Sprint]
This was the email I was looking for. I found my answer in this forum.
Come to find out, the owner of Domehost.com was in jail and it was/is a
one man operation. Too bad, everything they had was working great, just
couldn't get any minor support from them. Got my money's worth and now
it's time to move on.

Thanks for the link Justin.

Stanley G. Martin
System Administrator
Sprint - EAS Business Intelligence 
[EMAIL PROTECTED]


-Original Message-
From: Justin Palmer [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 5:01 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] PHP Web Hosting

I have used hostrocket.com and ipowerweb.com with good success.  I don't
think that it is my place per say to tell you who to host with, for I
don't want to give bad advise, if it does not work for you.  I do have a
resource that might be helpful. Here it is http://webhostingforums.com/

Regards,

Justin Palmer



-Original Message-
From: Russell P Jones [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 2:37 PM
To: Daniel Clark
Cc: [EMAIL PROTECTED]; Martin, Stanley G [Contractor for Sprint];
[EMAIL PROTECTED]
Subject: Re: [PHP] PHP Web Hosting


http://www.networkeleven.com

I have been using these folks for about a year and a half now. They have
done numerous custom builds for me and will do it within 15 minutes of
your request. Pretty amazing customer service.

Russ Jones

On Mon, 19 Apr 2004, Daniel Clark wrote:

> I'm using www.phpwebhosting.com
>
>
> > On Mon, 2004-04-19 at 15:14, Martin, Stanley G [Contractor for 
> > Sprint]
> > wrote:
> >> Some time ago I put up a web site on Domehost.com.  Everything has 
> >> been working great and I had a couple questions for their Tech 
> >> Support but haven't received any feedback from them, they don't 
> >> answer their phones. Also, it is stated on their site that a 
> >> company called Wintek Computing took them over last year.  I can't 
> >> contact them either.  Does anyone know anything that may have 
> >> happened here?  I suspect I need to find another web hosting 
> >> company before my site just goes away.
> >>
> >> Stanley G. Martin
> >> System Administrator
> >> Sprint - EAS Business Intelligence [EMAIL PROTECTED]
> > --
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

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

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



Re: [PHP] Whats faster? text files or mysql?

2004-04-20 Thread Travis Low
Isn't the database kept in a file?  Why would that file be faster than a plain 
text file?

cheers,

Travis

Jay Blanchard wrote:
[snip]
I have two text files with two rows of data on each line sperated by a
tab for about 20 lines in each file. Would it be faster accessing this
data by putting it in a mysql table?
[/snip]
Sounds like the perfect opportunity to set up a test! File I/O is always
slower.
--
Travis Low


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


RE: [PHP] Whats faster? text files or mysql?

2004-04-20 Thread Jay Blanchard
[snip]
Isn't the database kept in a file?  Why would that file be faster than a
plain 
text file?
[/snip]

Of course it is, but the file is kept accessible by the database server
deamon so you are not reading from a file in the tradional sense.

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



Re: [PHP] Re: Re: sessions getting destroyed for *Some* clients

2004-04-20 Thread Hardik Doshi
The another problem could be your clients have
disabled the cookies on their browsers. Are you taking
care of that consideration while writing your scripts?

If your clients have disabled the cookies on their
browsers then you need to pass session id value from
the URL.

Let me know if that is the case. 

Hardik Doshi


--- Jaskirat Singh <[EMAIL PROTECTED]> wrote:
> I do not think it is the server name issue. I used
> www.original-remote-control.co.uk for testing ..and
> I have done that
> scores of times now :) ..
> 
> I do not use setcookie .. I just call
> session_start() in the beginning
> to set the cookie for session.
> 
> Jas
> 
> --
> Make sure it's not just a cookie-problem related to
> server name.  The
> shopping 
> cart session for "original-remote-control.co.uk" is
> different from the
> shopping 
> cart for "www.original-remote-control.co.uk".  If
> this is your problem,
> I think 
> you can fix it by changing how you call "setcookie".
> 
> Of course, this may not be the problem, in which
> case you can ignore
> what I 
> just said. :-)
> 
> cheers,
> 
> Travis
> 
> 
> 
> 
>   
>   
> __
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for
> 25¢
> http://photos.yahoo.com/ph/print_splash
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

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



RE: [PHP] Whats faster? text files or mysql?

2004-04-20 Thread Mark Cubitt
I'm not sure but I think it would depend on the programming language and
with php File I/O is slower then database (mySql anyway).

Where as Perl would probably be quicker with the text file.

I could be wrong though

Regards

Mark Cubitt

> -Original Message-
> From: Travis Low [mailto:[EMAIL PROTECTED]
> Sent: 20 April 2004 14:12
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Whats faster? text files or mysql?
>
>
> Isn't the database kept in a file?  Why would that file be faster
> than a plain
> text file?
>
> cheers,
>
> Travis
>
> Jay Blanchard wrote:
> > [snip]
> > I have two text files with two rows of data on each line sperated by a
> > tab for about 20 lines in each file. Would it be faster accessing this
> > data by putting it in a mysql table?
> > [/snip]
> >
> > Sounds like the perfect opportunity to set up a test! File I/O is always
> > slower.
> >
>
> --
> Travis Low
> 
> 
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



RE: [PHP] FW: Resizing Pictures

2004-04-20 Thread Hardik Doshi
You can resize a file using the GD library. Look for
the GD library functions in php manual.

Hardik Doshi

> [...]
> > Hi Warren,
> > 
> > Thanks for the reply; however, that wasn't the
> answer I was searching for.
> > Using PHP, I would like to resize a file once it's
> store in a directory on
> > a (my) webserver.
> > 
> > Anyone know?
> [...]
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

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



Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread T. H. Grejc
Justin Patrin wrote:
The threading works just fine. The problem is that users have ignorant 
mail software that don't set the thread headers correctly. Even 
newsgroup client software might do this. This is *not* the server's 
fault in any way, shape, or form.
Sure it's not servers fault, knowing that news.php.net is not *real* 
news server. It is mailing list mirror. News server dont make threads 
based on subject like mailing list, but based on message header field.

News servers are cheaper, faster, easier to use, more accessible, easier 
to archive than mailing lists. That's why I dont see the point of 
mailing list being primary to php.net.

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


RE: [PHP] Whats faster? text files or mysql?

2004-04-20 Thread Jay Blanchard
[snip]
I'm not sure but I think it would depend on the programming language and
with php File I/O is slower then database (mySql anyway).

Where as Perl would probably be quicker with the text file.
[/snip]

There is always awk! 

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



Re: [PHP] Whats faster? text files or mysql?

2004-04-20 Thread John W. Holmes
From: "Andrew Fenn" <[EMAIL PROTECTED]>

> I have two text files with two rows of data on each
> line sperated by a tab for about 20 lines in each file.
> Would it be faster accessing this data by putting it in a
> mysql table?

Depends what you want to do with the data. If you're searching through for
specific values, summing values, grouping, etc, then you'd probably be
better off putting it in a database as they are designed for those sort of
functions.

If you're just opening and displaying the file, or looking for one simple
match, then just leave it in a file.

Don't forget about SQLite if you choose the database route, also.

---John Holmes...

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



Re: [PHP] Whats faster? text files or mysql?

2004-04-20 Thread John Nichel
Mark Cubitt wrote:
I'm not sure but I think it would depend on the programming language and
with php File I/O is slower then database (mySql anyway).
Where as Perl would probably be quicker with the text file.

I could be wrong though
It would really depend on the size of the file, and how the db table is 
set up.  No matter the size of the file, or if you're using php / Perl, 
you still have to open the file, and parse it line for line until you 
find the value you're looking for.  If the db table is indexed, it's 
going to be faster than most text files (unless you only have like 10 
records).

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] single quote escape questions

2004-04-20 Thread Kathleen Ballard
I would like some advice on special/reserved chars in
strings, especially single quotes.

I am developing an application that requires using a
Name field in the url for navigation.  I have a case
where "Toni's" in the url is returned in
$_SERVER['PATH_INFO'] as "Toni\'s" eventhough the
address bar shows "Toni's".  

I can easily add the code to stripslashes from the
vars I extract, but is the single quote the only char
that is an issue here?  Is this a server addition or a
client/browser addition?  The server has magic quotes
set off, so that is not the issue.

Secondly, what is best/favorite way to escape chars
for mysql?  I know that mysql_real_escape_string() 
has been recommended recently.  But that brings up the
issue of magic quotes.  Would
set_magic_quotes_runtime(0) be a reliable way of
making sure my code runs with magic quotes off?

Thanks for your time,
Kathleen

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



Re: [PHP] Whats faster? text files or mysql?

2004-04-20 Thread John Nichel
Jay Blanchard wrote:
[snip]
I'm not sure but I think it would depend on the programming language and
with php File I/O is slower then database (mySql anyway).
Where as Perl would probably be quicker with the text file.
[/snip]
There is always awk! 

Aw, no votes for cat | grep? ;)

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-20 Thread John W. Holmes
From: "Tom Rogers" <[EMAIL PROTECTED]>
> JWH> Does anyone know of a script that'll receive the results of a form,
> JWH> parse the original form and substitute the user supplied data in for
the
> JWH> form elements and then send an HTML email of the "form"?
>
> Here is a class I use with my template system but it is easy to modify
> it.

Thanks for the tip. This requires you know what the elements of the form
are, though. Like I said, if you know what's in the form, this whole process
is pretty trivial.

I want to take an unknown form, receive the data, then redisplay the form
with the form elements gone and the values submitted replacing them. My
personal needs incorporate sending this in an email, but that's the easy
part.

,  and  elements will be easy, I think. You can
just replace the whole element with a post variable matching it's name.

$page = preg_replace('/]+>/ie','$_POST[\'\1\']',$page);

The checkboxes and radio buttons would be a little harder.




I'm thinking this will take two passes. First match the names of each
checkbox or radio button. Once I have the $name, I can say

$_POST[$name][$_POST[$name]] = $_POST[$name];

resulting in

$_POST['foo']['1'] = 1

if the first checkbox was selected.

Then, do a replace

$page = preg_replace('/]+>/ie','$_POST[\'\1\'][\'\2\']',$page);

Accounting for arrays would require something else and I'd obviously have to
account for extra attributes within the form elements. Anybody thing of
something that's more efficient? I'm still just brainstorming here. :)

---John Holmes...

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



Re: [PHP] single quote escape questions

2004-04-20 Thread Hardik Doshi

> Secondly, what is best/favorite way to escape chars
> for mysql?  I know that mysql_real_escape_string() 
> has been recommended recently.  But that brings up
> the
> issue of magic quotes.  Would
> set_magic_quotes_runtime(0) be a reliable way of
> making sure my code runs with magic quotes off?

It's recommended to use mysql_real_escape_string() to
eacape funky characters. Addslashes() does the same
thing but as we are storing data in the database so
it's better to offload it to the database. In future
if database needs to escape another character then
mysql_real_escape_string() will take care of it
easily.
 
> Thanks for your time,
> Kathleen

Hardik Doshi

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





__
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash

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



Re[2]: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-20 Thread Tom Rogers
Hi,

Tuesday, April 20, 2004, 11:29:41 PM, you wrote:
JWH> From: "Tom Rogers" <[EMAIL PROTECTED]>
>> JWH> Does anyone know of a script that'll receive the results of a form,
>> JWH> parse the original form and substitute the user supplied data in for
JWH> the
>> JWH> form elements and then send an HTML email of the "form"?
>>
>> Here is a class I use with my template system but it is easy to modify
>> it.

JWH> Thanks for the tip. This requires you know what the elements of the form
JWH> are, though. Like I said, if you know what's in the form, this whole process
JWH> is pretty trivial.

JWH> I want to take an unknown form, receive the data, then redisplay the form
JWH> with the form elements gone and the values submitted replacing them. My
JWH> personal needs incorporate sending this in an email, but that's the easy
JWH> part.

JWH> ,  and  elements will be easy, I think. You can
JWH> just replace the whole element with a post variable matching it's name.

JWH> $page = preg_replace('/>]+>/ie','$_POST[\'\1\']',$page);

JWH> The checkboxes and radio buttons would be a little harder.

JWH> 
JWH> 

JWH> I'm thinking this will take two passes. First match the names of each
JWH> checkbox or radio button. Once I have the $name, I can say

JWH> $_POST[$name][$_POST[$name]] = $_POST[$name];

JWH> resulting in

JWH> $_POST['foo']['1'] = 1

JWH> if the first checkbox was selected.

JWH> Then, do a replace

JWH> $page = preg_replace('/>]+>/ie','$_POST[\'\1\'][\'\2\']',$page);

JWH> Accounting for arrays would require something else and I'd obviously have to
JWH> account for extra attributes within the form elements. Anybody thing of
JWH> something that's more efficient? I'm still just brainstorming here. :)

JWH> ---John Holmes...


It does not need to know the form elements, only the reserved words it
uses and you take those out and pass them directly to the class if
needed. It takes the variable name from the POST array and uses it with
the value. No need to know what the input fields are called or even
what type - checkboxes and radio groups work fine.

-- 
regards,
Tom

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



RE: [PHP] PHP Web Hosting

2004-04-20 Thread Ryan A

On 4/20/2004 3:03:36 PM, Martin, Stanley G [Contractor for Sprint]
([EMAIL PROTECTED]) wrote:
> This was the email I was looking for. I found my answer in this forum.
> Come to find out, the owner of Domehost.com was in jail and it was/is a
> one man operation. Too bad, everything they had was working great, just
> couldn't get any minor support from them. Got my money's worth and now
> it's time to move on.
>
> Thanks for the link Justin.
>
> Stanley G. Martin
> System Administrator
> Sprint - EAS Business Intelligence
> [EMAIL PROTECTED]
>

Thats just like the hosts, being so inconsiderate to the clientsthis guy
goes to jail and does not even think of telling his clients before hand that
he is doing illegal things..
These hosts just think of themselves...going to jail and all.

:-D

Cheers,
-Ryan

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



[PHP] Extension : compiling several .C files ?

2004-04-20 Thread user
Hi,

I've learn how to compile a simple (with only one .C file) extension 
under Windows and Linux. And multi .C file compilation with Windows.

But how can I compile a PHP extension composed by several .C files ? I'm 
not an expert in GCC compilation. So perheaps I've missed something.

For linux, I use the information give by the php documentation

http://www.php.net/manual/fr/zend.creating.php

The example give in the doc is fine for one .c file, but does not works 
for several .C files.

Thx for helping me :).

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


Re: Re[2]: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-20 Thread John W. Holmes
From: "Tom Rogers" <[EMAIL PROTECTED]>

> It does not need to know the form elements, only the reserved words it
> uses and you take those out and pass them directly to the class if
> needed. It takes the variable name from the POST array and uses it with
> the value. No need to know what the input fields are called or even
> what type - checkboxes and radio groups work fine.

Okay, I see what you mean.

>default:  //not a keyword
>$k = ereg_replace("_"," ",$k);  //get rid of _ and replace with a space
>if($v == "BR"){  //if BR add a carriage return,used for making blank line
>  $this->vars['blocks']['submit'][$x]['ifs']['break'] = ' ';
>  $this->text .= "\n";
>}else{
>  $this->vars['blocks']['submit'][$x]['vars']['name'] = $k;
>  $this->vars['blocks']['submit'][$x]['vars']['value'] = $v;
>  $this->text .= "$k : $v\n";  //add the variable name and value to email
> }

I see what you're doing here, but it doesn't fit what I'm looking for
exactly. You just create a Key : Value list to include in the email. I want
the email to look exactly like the form, only substitute in the values
submitted by the user.

---John Holmes...

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



[PHP] Re: show_source or highlight_string wrapping

2004-04-20 Thread Red Wingate
Maybe you take a look at the source as there ARE NO linebreaks
in any wrong places. I know the source produced by PHP's Source
functions is a mess but take yourself a while and you will see
there are no linebreaks at all :p

-- red

Aidan Lister wrote:

> Here's a PHP4 example:
> http://ircphp.com/users/imho/?file=function.str_chop.php
> 
> Here's an example where PHP has explicitly wrapped at 80 chars, but only
> the PHP, not the HTML.
> http://ircphp.com/users/imho/
> 
> 
> 
> "Red Wingate" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> I just build a testcase to check wether PHP does or not and it doesn't
> even
>> if i have 1080 chars in a line :p
>>
>>  -- red
>>
>> > No, PHP explicity inserts  at 80chars
>> >
>> >
>> > "Red Wingate" <[EMAIL PROTECTED]> wrote in message
>> > news:[EMAIL PROTECTED]
>> >> Red Wingate wrote:
>> >>
>> >> > Aidan Lister wrote:
>> >> >
>> >> >> Why do these functions wrap at approximately 80 chars? It's stupid!
>> >> >> How can this be worked around?
>> >> >
>> >> > It doesn't check the source to see that the browser wraps the text
>> >> > as it reaches the border of the window.
>> >>
>> >> Oh just another note, use  to skip this limitation :-)
>> >>
>> >> 
>> >> > >>   hightlight_file ( '...' );
>> >> ?>
>> >> 

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



Re: [PHP] Re: <button> tag

2004-04-20 Thread Red Wingate
Try something like this:


   function submit_form( type ) {
  document.forms['submit_form'].elements['mode'].value = type;
  document.forms['submit_form'].submit();
   }






[...]
> switch ($_POST['submit'])
> {
> case "edit": ...
> case "new": ...
> }
[...]

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



Re[4]: [PHP] Program that'll parse HTML form with results and send HTML email?

2004-04-20 Thread Tom Rogers
Hi,

Wednesday, April 21, 2004, 12:05:08 AM, you wrote:
JWH> I see what you're doing here, but it doesn't fit what I'm looking for
JWH> exactly. You just create a Key : Value list to include in the email. I want
JWH> the email to look exactly like the form, only substitute in the values
JWH> submitted by the user.

JWH> ---John Holmes...

Now I see what you want, the real problem would be select boxes and
radio buttons, the others would be quite easy. looks like a job for
preg_replace_callback() and the worlds ugliest case statement:-)
Have you got a good sample form I could play with? It would be quite a
class. I assume you have access to the original form :)

-- 
regards,
Tom

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



[PHP] Upload file form

2004-04-20 Thread Jeff McKeon
Ok, not exactly pure PHP problem but I hope someone here has seen this
before..

I'm got an upload form on a webpage, here's the code:

SNIP

?>
Select the file type and browse for that file. The press 'Upload'. The
file will be uploaded to the server.
No changes in the database are done during this step.


Form action: 
Select CDR file type: 
Stratos
MVS
Xantic



Browse for the file




CDR File: 



http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread -{ Rene Brehmer }-
At 16:29 19-04-2004, Curt Zirzow wrote:
* Thus wrote T. H. Grejc ([EMAIL PROTECTED]):
> Hello,
>
> I've seen this subject before, but never really got any answer. PHP have
> news server at news.php.net but it is 'always' down and it is only a
> mailing list mirror, so some messages get lost or get 'out of thread'.
I've never had any problems with news.php.net being down or loosing
messages.  As for 'out of thread', that is usually due to the
person's email/newsreader client not replying correctly to a
thread.
That is mostly Outlook and OE that are real good at trashing the Xref ... 
others (old) clients do it too, but OE is the biggest sinner in that 
aspect... (and Outlook runs on the OE engine when it comes to mail).

Rene

--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread Red Wingate
[...]
> That is mostly Outlook and OE that are real good at trashing the Xref ...
> others (old) clients do it too, but OE is the biggest sinner in that
> aspect... (and Outlook runs on the OE engine when it comes to mail).
[...]

who is outlook ? :-)

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



Re: [PHP] PHP Web Hosting

2004-04-20 Thread -{ Rene Brehmer }-
Don't know about that particular host either ...

But I'm very happy with Westhost (http://westhost.com/) ... I moved over 
from DotServ ... Nomatter what my question's been, I've gotten response 
from Westhost within the matter of 30 minutes ... and it's been kind 
responses too, even when I've critized their home-made management interface 
:) ... basically everything I missed at DotServ (I'll recommend anyone 
against them, they're largely incompetent)...

Rene

At 20:20 19-04-2004, Adam Voigt wrote:
Not sure about that particular host, but if your looking for one with
good features, and high reliability, I would suggest Spenix.
http://www.spenix.com

I asked them a question about my hosting plan (not even a support
request) at 9PM and was sent a response within 5 minutes. Very good
support, I would definitely recommend them.
--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Web Hosting

2004-04-20 Thread -{ Rene Brehmer }-
At 21:19 19-04-2004, John Nichel wrote:
Greg Donald wrote:
Your signature is twice the rfc1855 suggested limit.
http://www.faqs.org/rfcs/rfc1855.html
 - If you include a signature keep it short.  Rule of thumb is no longer
than 4 lines.
And the RFC1885 'guidelines' are also almost 10 years old.  I think most 
people today have a fast enough connection to handle the 500+/- bytes of 
my signatureeven if they're still on dial-up.  Of course, I could be 
mistaken and there may still be someone out there using 900baud. ;)
Most usenet netiquette guidelines I've read suggest max. 4-6 lines of sig 
content, with "permitted" divider lines at either end ... and in this case 
a line is 75 chars ...

Rene

--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] PHP Web Hosting

2004-04-20 Thread -{ Rene Brehmer }-
Yes...

Of course you can, it's yours.

I've got mine registered at enom through Westhost, and westhost gives me a 
registrar interface so I can do whatever I want with my domain ... make new 
TLDs, add/remove pointers, and stuff like that ... not sure what other 
hosts provide just as simple a way to manage the domain, but I love this 
one :) ... It's hosted 6000 miles from where I am, but I've got about as 
much control over my domain and my server there as I have over the one that 
sits right next to me...

Rene

At 21:34 19-04-2004, Martin, Stanley G [Contractor for Sprint] wrote:
I've received a number of suggestions as to where I should go to for my
web hosting but it doesn't seem that anyone has any experience with
Domehost. This brings up another question; transferring my Domain name.
If I do move to another hosting site, can I take my domain name with me?
Stanley G. Martin
--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Web Hosting

2004-04-20 Thread John Nichel
-{ Rene Brehmer }- wrote:
At 21:19 19-04-2004, John Nichel wrote:

Greg Donald wrote:

Your signature is twice the rfc1855 suggested limit.
http://www.faqs.org/rfcs/rfc1855.html
 - If you include a signature keep it short.  Rule of thumb is no longer
than 4 lines.


And the RFC1885 'guidelines' are also almost 10 years old.  I think 
most people today have a fast enough connection to handle the 500+/- 
bytes of my signatureeven if they're still on dial-up.  Of course, 
I could be mistaken and there may still be someone out there using 
900baud. ;)


Most usenet netiquette guidelines I've read suggest max. 4-6 lines of 
sig content, with "permitted" divider lines at either end ... and in 
this case a line is 75 chars ...
A, but the almost 10 year old RFC says this...

"Limit line length to fewer than 65 characters and end a line with a 
carriage return."

;)

*getting blow torch ready*

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: Converting XML into something PHP like....

2004-04-20 Thread Nunners
Hi Folks,

At the end of the email is a var_dump of my XML...

I can go through and do foreach on each section, however, this is completely
useless in practice.

How do I call things like $data["Title"] and
$data["avail_dataset"]["0"]["dept_date"]?

At the moment, every time I do this, it comes out as NULL

Cheers
Nunners

>  var_dump($data);
> ?>
> Output:
> 
> object(stdClass)(3) {
>   ["Title"]=>
>   string(12) "Example TopX"
>   ["Type"]=>
>   string(7) "Package"
>   ["avail_dataset"]=>
>   object(stdClass)(8) {
> ["avail_record"]=>
> array(6) {
>   [0]=>
>   object(stdClass)(26) {
> ["arr_time_int"]=>
> string(0) ""
> ["content_link"]=>
> string(0) ""
> ["dept_code"]=>
> string(3) "LGW"
> ["dept_date"]=>
> string(10) "2004-04-24"
> ["dept_name"]=>
> string(7) "GATWICK"
> ["dept_time_int"]=>
> string(0) ""
> ["dest_name"]=>
> string(7) "Majorca"
> ["dest_code"]=>
> string(3) "PMI"
> ["holiday_type"]=>
> string(0) ""
> ["nights"]=>
> string(1) "7"
> ["poll_date"]=>
> string(10) "2004-04-20"
> ["poll_time"]=>
> string(5) "10:53"
> ["price1"]=>
> string(2) "89"
> ["price2"]=>
> string(0) ""
> ["price3"]=>
> string(3) "155"
> ["price4"]=>
> string(3) "235"
> ["price5"]=>
> string(0) ""
> ["price6"]=>
> string(2) "55"
> ["rtn_code"]=>
> string(0) ""
> ["rtn_name"]=>
> string(0) ""
> ["tag"]=>
> string(0) ""
> ["tourop_code"]=>
> string(3) "COS"
> ["tourop_name"]=>
> string(0) ""
> ["currency"]=>
> string(3) "GBP"
> ["can_cost"]=>
> string(5) "False"
> ["can_book"]=>
> string(5) "False"
>   }
>   [1]=>
>   object(stdClass)(26) {
> ["arr_time_int"]=>
> string(0) ""
> ["content_link"]=>
> string(0) ""
> ["dept_code"]=>
> string(3) "LGW"
> ["dept_date"]=>
> string(10) "2004-04-24"
> ["dept_name"]=>
> string(7) "GATWICK"
> ["dept_time_int"]=>
> string(0) ""
> ["dest_name"]=>
> string(12) "Costa Blanca"
> ["dest_code"]=>
> string(3) "ALC"
> ["holiday_type"]=>
> string(0) ""
> ["nights"]=>
> string(1) "7"
> ["poll_date"]=>
> string(10) "2004-04-20"
> ["poll_time"]=>
> string(5) "10:53"
> ["price1"]=>
> string(2) "89"
> ["price2"]=>
> string(0) ""
> ["price3"]=>
> string(3) "159"
> ["price4"]=>
> string(0) ""
> ["price5"]=>
> string(0) ""
> ["price6"]=>
> string(2) "69"
> ["rtn_code"]=>
> string(0) ""
> ["rtn_name"]=>
> string(0) ""
> ["tag"]=>
> string(0) ""
> ["tourop_code"]=>
> string(3) "COS"
> ["tourop_name"]=>
> string(0) ""
> ["currency"]=>
> string(3) "GBP"
> ["can_cost"]=>
> string(5) "False"
> ["can_book"]=>
> string(5) "False"
>   }
>   [2]=>
>   object(stdClass)(26) {
> ["arr_time_int"]=>
> string(0) ""
> ["content_link"]=>
> string(0) ""
> ["dept_code"]=>
> string(3) "LGW"
> ["dept_date"]=>
> string(10) "2004-04-21"
> ["dept_name"]=>
> string(7) "GATWICK"
> ["dept_time_int"]=>
> string(0) ""
> ["dest_name"]=>
> string(6) "Cyprus"
> ["dest_code"]=>
> string(3) "LCA"
> ["holiday_type"]=>
> string(0) ""
> ["nights"]=>
> string(1) "7"
> ["poll_date"]=>
> string(10) "2004-04-20"
> ["poll_time"]=>
> string(5) "09:01"
> ["price1"]=>
> string(2) "99"
> ["price2"]=>
> string(0) ""
> ["price3"]=>
> string(3) "139"
> ["price4"]=>
> string(0) ""
> ["price5"]=>
> string(0) ""
> ["price6"]=>
> string(2) "59"
> ["rtn_code"]=>
> string(0) ""
> ["rtn_name"]=>
> string(0) ""
> ["tag"]=>
> string(0) ""
> ["tourop_code"]=>
> string(3) "AHL"
> ["tourop_name"]=>
> string(0) ""
> ["currency"]=>
> string(3) "GBP"
> ["can_cost"]=>
> string(5) "False"
> ["can_book"]=>
> string(5) "False"
>   }
>   [3]=>
>   object(stdClass)(26) {
> ["arr_time_int"]=>
> string(0) ""
> ["content_link"]=>
> string(0) ""
> ["dept_code"]=>
> string(3) "MAN"
> ["dept_date"]=>
> string(10) "2004-04-25"
>  

Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread -{ Rene Brehmer }-
Isn't there a european mirror of that server ??? ... I can't even get a 
connection to news.php.net

Rene

At 21:46 19-04-2004, Red Wingate wrote:
Same here, just installed some Newsgroup Software and everything works
just fine for me :-)
 -- red

Justin Patrin wrote:

Curt Zirzow wrote:

* Thus wrote T. H. Grejc ([EMAIL PROTECTED]):

Hello,

I've seen this subject before, but never really got any answer. PHP 
have news server at news.php.net but it is 'always' down and it is only 
a mailing list mirror, so some messages get lost or get 'out of thread'.
--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Upload file form

2004-04-20 Thread Jeff McKeon
> -Original Message-
> From: Jeff McKeon 
> Sent: Tuesday, April 20, 2004 10:21 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Upload file form
> 
> 
> Ok, not exactly pure PHP problem but I hope someone here has 
> seen this before..
> 
> I'm got an upload form on a webpage, here's the code:
> 
> SNIP
> 
> ?>
> Select the file type and browse for that file. The press 
> 'Upload'. The file will be uploaded to the server. No changes 
> in the database are done during this step.
> 
>  ACTION=""> Form action: 
>  Select CDR file type: 
>   value='1:Stratos'>Stratos
> MVS
> Xantic
> 
> 
> 
> Browse for the file
> 
>  
>   TYPE="HIDDEN" NAME="uid" VALUE="[OpSup]jsm"> CDR File:  TYPE="FILE" NAME="file1" SIZE="80">  TYPE="SUBMIT" VALUE="Upload"> 
> 
>  
> SNIP
> 
> I'm running this page on Redhat Linux 9 with an Apache ver 2 
> webserver. The site itself is a virtualName site (All virutal 
> sites share the same IP address).
> 
> When I browse for the tile and select it, then press the 
> submit button, Instead of getting a delay as the file 
> uploads, I get an instant error page from the browers:
> 
> The page cannot be displayed: Cannot file server or DNS Error
> 
> Any ideas?
> 

It appears that it may be a filesize issue.  I made a small text file
and it uploaded fine, a 13MB csv however causes the problem.

In php.ini

I've set the Max_file_uplode = 20M

But still have the problem.

Thanks,

Jeff

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



Re: [PHP] Unwanted e-mails

2004-04-20 Thread -{ Rene Brehmer }-
At 00:16 20-04-2004, Andy B wrote:
> BUT that does not help at all. btconnect is my service provider, and I
> have to send my eMails through them. The messages are caused by
> lists.php.net not accepting my messages 
>but your messages *ARE* getting accepted otherwise i >would not be
>reading this email right now!
>chris.

when i talked to my internet people about those sorts of emails like
btconnect and pandasoft virus warnings all they told me was that some
spammer person had probably tagged the php mailinglist database of email
addresses and are now bouncing emails around all the php mailing list
people... it happened to be figured out that way at least on my end because
the mysql mailing list server sent me an email today saying that it had
received lots of emails that bounced off my email address and will now take
me off the list the next time it happens.. so even though that list email is
valid the bounces to that list are spammers trying to do whatever it is they
get their highs out of.
Only problem with this theory is that I receive timeout messages from 
BTconnect as well everytime I post, despite me living in Denmark and having 
Tiscali for provider ... and everytime I get one, it fits with my messages 
never showing up on list ... I've got a filter setup to specifically find 
my messages that come back from the lists, and the ones I get timeout 
messages for never come back ...

Rene

--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Re: Converting XML into something PHP like....

2004-04-20 Thread Red Wingate
Nunners wrote:

Array != Object

echo $data->Title .'';
echo $data->avail_dataset[0]->dept_date .'';

etc. pp

There are some examples on how to convert your XML-Dump
into an Array check out the comments over at php.net

 -- red

[...]
> Hi Folks,
> 
> At the end of the email is a var_dump of my XML...
> 
> I can go through and do foreach on each section, however, this is
> completely useless in practice.
> 
> How do I call things like $data["Title"] and
> $data["avail_dataset"]["0"]["dept_date"]?
> 
> At the moment, every time I do this, it comes out as NULL
> 
> Cheers
> Nunners
[...]

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



[PHP] Logic problem

2004-04-20 Thread Alex Hogan
Hi All,

I am having a logic problem. (insert jokes here)  I am trying to create a
function that will allow me to pass any number of fields and tables into a
blanket query.

I am getting an error; Unexpected foreach.  I have tried placing the loop in
several different places and am getting the same error.

What should I be doing differently?

Here's my code;

function myselect($array1, $array2){
$i  =   0;
$n  =   0;
$query  =   "SELECT".foreach($array1 as $flds){
$flds[$i];
}.
"FROM".foreach($array2 as $tbls){
$tbls[$n];
}.;
$result =   mssql_query($query);
print   "
";
$j  =   0;
while($row  =   mssql_fetch_array($result)){
$fields =   $row[flds[$j]];
print   "".$fields."";
}
}


alex


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




[PHP] Re: Logic problem

2004-04-20 Thread Red Wingate
As foreach is a language-construct you cannot concat it
to a string.

try something like:

$temp = '.';
foreach ( $array AS $key ) 
   $temp .= ''.$key.'';
$temp .= '';

instead

   --red

[...]
> Hi All,
> 
> I am having a logic problem. (insert jokes here)  I am trying to create a
> function that will allow me to pass any number of fields and tables into a
> blanket query.
> 
> I am getting an error; Unexpected foreach.  I have tried placing the loop
> in several different places and am getting the same error.
> 
> What should I be doing differently?
> 
> Here's my code;
> 
> function myselect($array1, $array2){
> $i=   0;
> $n=   0;
> $query=   "SELECT".foreach($array1 as $flds){
> $flds[$i];
> }.
> "FROM".foreach($array2 as $tbls){
> $tbls[$n];
> }.;
> $result   =   mssql_query($query);
> print "
> ";
> $j=   0;
> while($row=   mssql_fetch_array($result)){
> $fields   =   $row[flds[$j]];
> print "".$fields."";
> }
> }
> 
> 
> alex
[...]

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



RE: [PHP] CURL Help

2004-04-20 Thread jon roig
You wanna feed it an array - something like this:

$post_array = array(
"x_Login"=> $config['authnetLogin']
,"x_Password"=> $config['authnetPass']
,"x_Type"=> $config['authnetXtype']
,"x_Method"  => "CC"
,"x_Version" => "3.0"
,"x_ADC_Delim_Data"  => "TRUE"
,"x_ADC_URL" => "FALSE"
,"x_Test_Request"=> $config['authnetTest']
,"x_Amount"  => $amount
,"x_Card_Num"=> $credit_card_number
,"x_Exp_Date"=> $credit_card_expiration_date
,"x_Email"   => $customer_email
,"x_Phone"   => $phone
,"x_First_Name"  => $first_name
,"x_Last_Name"   => $last_name
,"x_Company" => $company
,"x_Address" => $address
,"x_City"=> $city
,"x_State"   => $state
,"x_Zip" => $zip
,"x_country" => $country
,"x_Invoice_Num" => $invoicenum
,"x_Description" => $product_description
);


Then add it in with the other curl stuff...

curl_setopt($ch, CURLOPT_POSTFIELDS,$data);

-- jon


---
jon roig
web developer
email: [EMAIL PROTECTED]
phone: 888.230.7557

-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 11:44 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] CURL Help


* Thus wrote Monty ([EMAIL PROTECTED]):
> Hi, I'm trying to get a site working with our credit card merchant 
> gateway's "direct mode" using CURL. But I'm not exactly sure if I'm 
> doing it right. Here's what the gateway wants sent to it as a POST:
> 
> POST /gw/sas/direct3.0 HTTP/1.0
> Host: secure.gateway.com:1401
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 57
>  
> card_number=2&card_expire=0505&amount=5.00
> 
> This is supposed to be sent to http://secure.gateway.com:1401, the 
> 1401 representing a "port". Not sure if this requires anything special

> in CURL other than appending it to the URL after a colon the way it 
> appears above.
> 
> $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL,"http://secure.gateway.com:1401";);

You're missing the rest of the URL:
  curl_setopt($ch,
CURLOPT_URL,"http://secure.gateway.com:1401/gw/direct3.0";);

Do they require you to use a SSL connection?
  use https:// instead, and has curl been compiled with-ssl, check
  the output of phpinfo()

And set HTTP/1.0 protocol:
  setopt($ch, CURLOPT_HTTP_VERSION, 1.0);



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General 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.657 / Virus Database: 422 - Release Date: 4/13/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.657 / Virus Database: 422 - Release Date: 4/13/2004
 

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



Re: [PHP] Logic problem

2004-04-20 Thread John Nichel
Alex Hogan wrote:
Hi All,

I am having a logic problem. (insert jokes here)  I am trying to create a
function that will allow me to pass any number of fields and tables into a
blanket query.
I am getting an error; Unexpected foreach.  I have tried placing the loop in
several different places and am getting the same error.
What should I be doing differently?

Here's my code;

function myselect($array1, $array2){
$i  =   0;
$n  =   0;
$query  =   "SELECT".foreach($array1 as $flds){
$flds[$i];
}.
"FROM".foreach($array2 as $tbls){
$tbls[$n];
}.;
$result =   mssql_query($query);
print   "
";
$j  =   0;
while($row  =   mssql_fetch_array($result)){
$fields =   $row[flds[$j]];
print   "".$fields."";
}
}
You can't concat a construct.  Try something like this...

$query = "SELECT ";
$start = true;
foreach ( $array1 as $flds ) {
if ( $start ) {
$query .= $flds[$i];
$start = false;
} else {
$query .= ", " . $flds[$i];
}
}
$query .= " FROM ";
$start = true;
foreach ( $array2 as $tbls ) {
if ( $start ) {
$query .= $tbls[$n];
$start = false;
} else {
$query .= ", " . $tbls[$n];
}
}
Ugly code, needs tweaking, but you should get the idea.

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Why NNTP is not default protocol for php groups

2004-04-20 Thread Curt Zirzow
* Thus wrote T. H. Grejc ([EMAIL PROTECTED]):
> Justin Patrin wrote:
> >The threading works just fine. The problem is that users have ignorant 
> >mail software that don't set the thread headers correctly. Even 
> >newsgroup client software might do this. This is *not* the server's 
> >fault in any way, shape, or form.
> 
> Sure it's not servers fault, knowing that news.php.net is not *real* 
> news server. It is mailing list mirror. News server dont make threads 
> based on subject like mailing list, but based on message header field.

The servers don't make threads, its the client software that is
responsible for following up to and displaying threads, properly.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



RE: [PHP] Logic problem

2004-04-20 Thread Alex Hogan
[snip]
> $query = "SELECT ";
> $start = true;
> foreach ( $array1 as $flds ) {
>   if ( $start ) {
>   $query .= $flds[$i];
>   $start = false;
>   } else {
>   $query .= ", " . $flds[$i];
>   }
> }
> $query .= " FROM ";
> $start = true;
> foreach ( $array2 as $tbls ) {
>   if ( $start ) {
>   $query .= $tbls[$n];
>   $start = false;
>   } else {
>   $query .= ", " . $tbls[$n];
>   }
> }
[/snip]

I gotcha..,

I do have one question though.  I ran your code and it only returns the
first letter for that element in the array.  For instance fieldone returns
as f and tableone returns as t.
The output looks like this;
SELECT f,f,f FROM t,t.


alex


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




Re: [PHP] slow upload with http post

2004-04-20 Thread William Lovaton
full duplex or half duplex?


El mar, 20-04-2004 a las 02:00, Yavuz Maşlak escribió:
> Hello
> I have a webserver that  running php4.3.x,mysql3.5x,apache1.3.x  on Mandrake9.
> I intended to transfer this server to another server.
> I installed Freebsd4.9 on newserver. and certainly apache1.3x,php4,mysql and 
> concerning components.
> it works well. and I have a problem. 
> We have 100Mbit/s Lan media. no problem
> Folders that (some has  size of 1Mbyte or more )  are uploaded with http_post to the 
> server. 
> in old server  
> the folder that size of 1mbyte was uploaded with in 2 second. but on Freebsd the 
> same folder uploading with in 7,8 second. That is, Upload is slow
> What shall i do ? 
> 
> 
> 

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



RE: [PHP] Logic problem

2004-04-20 Thread Alex Hogan
[snip]
I do have one question though.  I ran your code and it only returns the
first letter for that element in the array.  For instance fieldone returns
as f and tableone returns as t. The output looks like this; SELECT f,f,f
FROM t,t.
[/snip]

Never mind I found it.  It should be;
$query = "SELECT ";
$start = true;
$i = 0;
foreach ( $array1 as $flds ) {
if ( $start ) {
$query .= $flds;
$start = false;
} else {
$query .= ", " . $flds;

}
}
$query .= " FROM ";
$start = true;
$n = 0;
foreach ( $array2 as $tbls ) {
if ( $start ) {
$query .= $tbls;
$start = false;
} else {
$query .= ", " . $tbls;
}
}

Thanks John, you saved me hours of work.


alex


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




[PHP] session variables

2004-04-20 Thread Charles Collins
I have two test files running on a server, which is giving me a headache,
due to the fact the session variables are not been maintained across the two
pages.

The server is running ...

PHP Version  = 4.0.5
register_globals = ON
Session Support = Enabled
session.auto_start = Off
session.cache_expire =  180
session.cache_limiter = nocache
session.cookie_domain = inweb.net.uk
session.cookie_lifetime = 600
session.cookie_path =  /
session.cookie_secure = Off
session.entropy_file = no value
session.entropy_length = 0
session.gc_maxlifetime = 1440
session.gc_probability = 1
session.name = PHPSESSID
session.referer_check = no value
session.save_handler = files
session.save_path = /tmp
session.serialize_handler php
session.use_cookies = On

The two script files are as follows: -

Page #1:



Page # 2



Can anyone tell me where I'm going wrong, works fine of test servers, etc.,
only screwed up when site was lauched.

Thanks in advance ...

Regards
Charlie.

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



RE: [PHP] session variables

2004-04-20 Thread Vincent DUPONT
I would do
script 1 :
$_SESSION['test'] = "hello world";

and in script2 :
print($_SESSION['test']);


vincent

-Original Message-
From: Charles Collins [mailto:[EMAIL PROTECTED]
Sent: mardi 20 avril 2004 17:44
To: [EMAIL PROTECTED]
Subject: [PHP] session variables


I have two test files running on a server, which is giving me a headache,
due to the fact the session variables are not been maintained across the two
pages.

The server is running ...

PHP Version  = 4.0.5
register_globals = ON
Session Support = Enabled
session.auto_start = Off
session.cache_expire =  180
session.cache_limiter = nocache
session.cookie_domain = inweb.net.uk
session.cookie_lifetime = 600
session.cookie_path =  /
session.cookie_secure = Off
session.entropy_file = no value
session.entropy_length = 0
session.gc_maxlifetime = 1440
session.gc_probability = 1
session.name = PHPSESSID
session.referer_check = no value
session.save_handler = files
session.save_path = /tmp
session.serialize_handler php
session.use_cookies = On

The two script files are as follows: -

Page #1:



Page # 2



Can anyone tell me where I'm going wrong, works fine of test servers, etc.,
only screwed up when site was lauched.

Thanks in advance ...

Regards
Charlie.

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

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



Re: [PHP] Logic problem

2004-04-20 Thread Kelly Hallman
Apr 20 at 9:55am, Alex Hogan wrote:
> function myselect($array1, $array2){
> $query = "SELECT".foreach($array1 as $flds){ $flds[$i]; }.
> "FROM".foreach($array2 as $tbls){ $tbls[$n]; } ...

Alex, if you merely wish to place the values of an array into your 
query, you might also try doing it this way:

$query = 'SELECT '. implode(', ', $array1).
' FROM '. implode(', ', $array2). ' ... ';

Usually when writing queries, I prefer to use sprintf():

$q = 'SELECT %s FROM %s';
$q = sprintf($q, implode(', ',$array1), implode(', ',$array2));

The more complex the query gets, the easier it is to read using this 
approach. I'm sure some find that debatable. After all, I'm crazy ;)

--
Kelly Hallman

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



Re: [PHP] session variables

2004-04-20 Thread Charles Collins
Dear Vincent,

Tried that as well as $HTTP_SERVER_VARS, $_SESSION, etc., still cannot get
the damn thing working.

Regards,
Charlie.

"Vincent Dupont" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I would do
script 1 :
$_SESSION['test'] = "hello world";

and in script2 :
print($_SESSION['test']);


vincent

-Original Message-
From: Charles Collins [mailto:[EMAIL PROTECTED]
Sent: mardi 20 avril 2004 17:44
To: [EMAIL PROTECTED]
Subject: [PHP] session variables


I have two test files running on a server, which is giving me a headache,
due to the fact the session variables are not been maintained across the two
pages.

The server is running ...

PHP Version  = 4.0.5
register_globals = ON
Session Support = Enabled
session.auto_start = Off
session.cache_expire =  180
session.cache_limiter = nocache
session.cookie_domain = inweb.net.uk
session.cookie_lifetime = 600
session.cookie_path =  /
session.cookie_secure = Off
session.entropy_file = no value
session.entropy_length = 0
session.gc_maxlifetime = 1440
session.gc_probability = 1
session.name = PHPSESSID
session.referer_check = no value
session.save_handler = files
session.save_path = /tmp
session.serialize_handler php
session.use_cookies = On

The two script files are as follows: -

Page #1:



Page # 2



Can anyone tell me where I'm going wrong, works fine of test servers, etc.,
only screwed up when site was lauched.

Thanks in advance ...

Regards
Charlie.

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

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



[PHP] Forking external binaries

2004-04-20 Thread Mark
Hello All,

I was hoping to benefit from the collective wisdom of the list.

We have a web application that forks off an external program to
inject an email in the outgoing queue. At busy periods this external
program (qmail-inject) can take a little while to return. I'm 
currently using popen() to spawn the qmail-inject binary.

Is there a way to spawn the external binary but not wait for it
to return. I'd be happy to ignore any return value if the tradeoff
was a fast return.

Suggestions or advice would be most welcome.

Best regards,

Mark.

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



RE: [PHP] Logic problem

2004-04-20 Thread Ford, Mike [LSS]
On 20 April 2004 16:44, Alex Hogan wrote:

> foreach ( $array1 as $flds ) {
>   if ( $start ) {
>   $query .= $flds;
>   $start = false;
>   } else {
>   $query .= ", " . $flds;
> 
>   }
> }

   $query .= implode(", ", $array1);

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Upload file form SOLVED

2004-04-20 Thread Jeff McKeon
The problem is solved. 

/etc/httpd/conf.d/php.conf 
the parameter LimitRequestBody is set to 524288 by default.

Jeff

> -Original Message-
> From: Jeff McKeon 
> Sent: Tuesday, April 20, 2004 10:48 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP] Upload file form
> 
> 
> > -Original Message-
> > From: Jeff McKeon
> > Sent: Tuesday, April 20, 2004 10:21 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Upload file form
> > 
> > 
> > Ok, not exactly pure PHP problem but I hope someone here has
> > seen this before..
> > 
> > I'm got an upload form on a webpage, here's the code:
> > 
> > SNIP
> > 
> > ?>
> > Select the file type and browse for that file. The press
> > 'Upload'. The file will be uploaded to the server. No changes 
> > in the database are done during this step.
> > 
> >  > ACTION=""> Form action: 
> >  Select CDR file type: 
> >   > value='1:Stratos'>Stratos
> > MVS
> > Xantic
> > 
> > 
> > 
> > Browse for the file
> > 
> > 
> >   > TYPE="HIDDEN" NAME="uid" VALUE="[OpSup]jsm"> CDR File:  > TYPE="FILE" NAME="file1" SIZE="80">  > TYPE="SUBMIT" VALUE="Upload"> 
> > 
> >  > 
> > SNIP
> > 
> > I'm running this page on Redhat Linux 9 with an Apache ver 2
> > webserver. The site itself is a virtualName site (All virutal 
> > sites share the same IP address).
> > 
> > When I browse for the tile and select it, then press the
> > submit button, Instead of getting a delay as the file 
> > uploads, I get an instant error page from the browers:
> > 
> > The page cannot be displayed: Cannot file server or DNS Error
> > 
> > Any ideas?
> > 
> 
> It appears that it may be a filesize issue.  I made a small 
> text file and it uploaded fine, a 13MB csv however causes the problem.
> 
> In php.ini
> 
> I've set the Max_file_uplode = 20M
> 
> But still have the problem.
> 
> Thanks,
> 
> Jeff
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

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



Re: [PHP] Logic problem

2004-04-20 Thread John Nichel
Alex Hogan wrote:

I gotcha..,

I do have one question though.  I ran your code and it only returns the 
first letter for that element in the array.  For instance fieldone 
returns as f and tableone returns as t.

The output looks like this;
SELECT f,f,f FROM t,t.
alex
What's in your array?

--
***
*  _  __   __  __   _  * John  Nichel *
* | |/ /___ __ \ \/ /__ _ _| |__ ___  __ ___ _ __  * 716.856.9675 *
* | ' http://www.KegWorks.com[EMAIL PROTECTED] * 14203 - 1321 *
***
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Search for a *

2004-04-20 Thread Brent Clark
Hi all
how do you search for a * in preg_match

Kind Regards
Brent Clark

Re: [PHP] Search for a *

2004-04-20 Thread Curt Zirzow
* Thus wrote Brent Clark ([EMAIL PROTECTED]):
> Hi all
> how do you search for a * in preg_match

You need to escape it:
  preg_match('/\*/', $var);

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



RE: [PHP] Logic problem

2004-04-20 Thread Alex Hogan
> What's in your array?

$array1[0] = 'firstname';
$array1[1] = 'lastname';
$array1[2] = 'tkt_title';

I got that fixed.

Thanks.


alex hogan



** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




Re: [PHP] session variables

2004-04-20 Thread Daniel Clark
hum.  Try $_SESSION['test'] on page 2.

> I have two test files running on a server, which is giving me a headache,
> due to the fact the session variables are not been maintained across the
> two
> pages.
>
> The server is running ...
>
> PHP Version  = 4.0.5
> register_globals = ON
> Session Support = Enabled
> session.auto_start = Off
> session.cache_expire =  180
> session.cache_limiter = nocache
> session.cookie_domain = inweb.net.uk
> session.cookie_lifetime = 600
> session.cookie_path =  /
> session.cookie_secure = Off
> session.entropy_file = no value
> session.entropy_length = 0
> session.gc_maxlifetime = 1440
> session.gc_probability = 1
> session.name = PHPSESSID
> session.referer_check = no value
> session.save_handler = files
> session.save_path = /tmp
> session.serialize_handler php
> session.use_cookies = On
>
> The two script files are as follows: -
>
> Page #1:
>
>   session_start();
>  session_register("test");
>  $test = "Hullo World";
>  print $test; // prints "test"
> ?>
>
> Page # 2
>
>   session_start();
>  print $test;// prints nothing, zip!
> ?>
>
> Can anyone tell me where I'm going wrong, works fine of test servers,
> etc.,
> only screwed up when site was lauched.

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



Re: [PHP] Search for a *

2004-04-20 Thread Brent Clark
>   preg_match('/\*/', $var);
Thanks, worked like charm

Kind Regards
Brent Clark

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



Re: [PHP] session variables

2004-04-20 Thread Daniel Clark
Does page1 call page2?
Or do you open another browser window and open page2?

My understanding is some browsers to NOT transfer the same session info to
another borwser window.

> Tried that as well as $HTTP_SERVER_VARS, $_SESSION, etc., still cannot get
> the damn thing working.
>
> Regards,
> Charlie.
>
> "Vincent Dupont" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> I would do
> script 1 :
> $_SESSION['test'] = "hello world";
>
> and in script2 :
> print($_SESSION['test']);
>
>
> vincent
>
> -Original Message-
> From: Charles Collins [mailto:[EMAIL PROTECTED]
> Sent: mardi 20 avril 2004 17:44
> To: [EMAIL PROTECTED]
> Subject: [PHP] session variables
>
>
> I have two test files running on a server, which is giving me a headache,
> due to the fact the session variables are not been maintained across the
> two
> pages.
>
> The server is running ...
>
> PHP Version  = 4.0.5
> register_globals = ON
> Session Support = Enabled
> session.auto_start = Off
> session.cache_expire =  180
> session.cache_limiter = nocache
> session.cookie_domain = inweb.net.uk
> session.cookie_lifetime = 600
> session.cookie_path =  /
> session.cookie_secure = Off
> session.entropy_file = no value
> session.entropy_length = 0
> session.gc_maxlifetime = 1440
> session.gc_probability = 1
> session.name = PHPSESSID
> session.referer_check = no value
> session.save_handler = files
> session.save_path = /tmp
> session.serialize_handler php
> session.use_cookies = On
>
> The two script files are as follows: -
>
> Page #1:
>
>   session_start();
>  session_register("test");
>  $test = "Hullo World";
>  print $test; // prints "test"
> ?>
>
> Page # 2
>
>   session_start();
>  print $test;// prints nothing, zip!
> ?>
>
> Can anyone tell me where I'm going wrong, works fine of test servers,
> etc.,
> only screwed up when site was lauched.

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



Re: [PHP] session variables

2004-04-20 Thread Curt Zirzow
* Thus wrote Charles Collins ([EMAIL PROTECTED]):
> I have two test files running on a server, which is giving me a headache,
> due to the fact the session variables are not been maintained across the two
> pages.
> 
> The server is running ...
> 
> PHP Version  = 4.0.5
> register_globals = ON
> Session Support = Enabled

This looks like output from 'php -i'. The php module *can* have a
different config, check these values from phpinfo() in  a webpage
in the same directory as your scripts with

> ...
> 
>   session_start();
>  session_register("test");
>  $test = "Hullo World";
>  print $test; // prints "test"
> ?>
> 
> Page # 2
> 
>   session_start();
>  print $test;// prints nothing, zip!
> ?>
I would strongly suggest using the $_SESSION variable, even if
register_globals is on, that way sessions work regardless of its
setting.

page 1:
session_start();
$test = $_SESSION['test'] = 'Hullo World';
echo $test;

page 2:
session_start();
$test = $_SESSION['test'];
echo $test;


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] session variables

2004-04-20 Thread Curt Zirzow
* Thus wrote Curt Zirzow ([EMAIL PROTECTED]):
> This looks like output from 'php -i'. The php module *can* have a
> different config, check these values from phpinfo() in  a webpage
> in the same directory as your scripts with

I fired my proofreader so I have to do this manually now :)

s/ with/.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] ADOdb SQL Updates

2004-04-20 Thread Gabe
I'm trying to do a simple update to an access database using the ADOdb 
library.  For some reason I can't get it to work.  I can however, get a 
simple select statment to work just fine.  Take a look at my code below 
as well as the error message.  Maybe someone can help me out.  As you'll 
see below there isn't an error generated from the select statement, but 
I do get one from the Update statment.  The error says there are too few 
parameters, but I'm not sure what else I need.  *disclaimer* - my SQL 
skills are not real strong

Any help is much appreciated!

 CODE *


$sql = "SELECT * FROM tblFAQ_Book WHERE autoBookID = 1";

$rs = $db_conn->Execute($sql);

$updateSQL = "UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = \"one more 
test\" WHERE (tblFAQ_Book.autoBookID = 1)";

$db_conn->Execute($updateSQL);
$db_conn->Close();
 ERROR MESSAGE 

(access): SELECT * FROM tblFAQ_Book WHERE autoBookID = 1

(access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
WHERE (tblFAQ_Book.autoBookID = 1)

Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
Driver] Too few parameters. Expected 1., SQL state 07001 in 
SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
Expected 1.

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


RE: [PHP] FW: Resizing Pictures

2004-04-20 Thread Vail, Warren
OK, here you have lots of options using PHP gd extensions just to start (or
not).  Just specifying width and height in your html IMG statement will
result in the image being resized by the browser, however, the entire image
file must be transferred to the browser.

http://www.php.net/manual/en/ref.image.php

As before, downsizing tends to work much better that upsizing (no pun's
intended).

http://www.php.net/manual/en/function.imagecopyresized.php

Hope this helps,  

Warren Vail

-Original Message-
From: Ryan Schefke [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 8:59 PM
To: 'Warren Vail'; 'Php-General-Help'
Subject: RE: [PHP] FW: Resizing Pictures


Hi Warren,

Thanks for the reply; however, that wasn't the answer I was searching for.
Using PHP, I would like to resize a file once it's store in a directory on a
(my) webserver.  

Anyone know?

-Original Message-
From: Warren Vail [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 19, 2004 11:56 PM
To: Ryan Schefke; Php-General-Help
Subject: RE: [PHP] FW: Resizing Pictures

If you don't mind doing them by hand, Window Paint can, use
Image->Stretch/Skew and Stretch by the same percentage for horizontal 
Image->and
vertical dimensions to keep the same perspective (less than 100% will reduce
the picture and more than 100% will stretch, but clarity of the image will
suffer from enlarging the image).  I would also suggest save a .bmp in the
original size for future resizing and adjusting, and save as jpg for
transferring to your website (your visitors will appreciate the smaller jpg
format).

good luck

Warren Vail
[EMAIL PROTECTED]


-Original Message-
From: Ryan Schefke [mailto:[EMAIL PROTECTED]
Sent: Monday, April 19, 2004 8:06 PM
To: Php-General-Help
Cc: 'Ryan Schefke'
Subject: [PHP] FW: Resizing Pictures




How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?



Thanks!

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

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

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



RE: [PHP] ADOdb SQL Updates

2004-04-20 Thread Jay Blanchard
[snip]
I'm trying to do a simple update to an access database using the ADOdb 
library.

Any help is much appreciated!
[/snip]

What error message are you getting? You are outputting an error message
when queries fail, aren't you? Does the connected user have permission
to perform updates on the specified table?

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



Re: [PHP] ADOdb SQL Updates

2004-04-20 Thread Curt Zirzow
* Thus wrote Gabe ([EMAIL PROTECTED]):
> ...
> (access): UPDATE tblFAQ_Book SET tblFAQ_Book.fldTitle = "one more test" 
> WHERE (tblFAQ_Book.autoBookID = 1)
> 
> Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access 
> Driver] Too few parameters. Expected 1., SQL state 07001 in 
> SQLExecDirect in \adodb\drivers\adodb-odbc.inc.php on line 504
> 07001: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. 
> Expected 1.

Recheck the spelling of column names and table names.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Resizing Pictures

2004-04-20 Thread Ryan Schefke
How do you resize pictures once they're in a certain directory?  I have the
script to upload a picture, that's working fine.  I just need some help with
resizing it.  Can someone help?

 

Thanks!



  1   2   >