php-general Digest 6 Jun 2006 16:47:01 -0000 Issue 4170

2006-06-06 Thread php-general-digest-help
php-general Digest 6 Jun 2006 16:47:01 - Issue 4170 Topics (messages 237441 through 237465): Re: When is z != z ? 237441 by: Robert Cummings 237452 by: Ford, Mike 237453 by: Finner, Doug 237456 by: Martin Alterisio 237458 by: Rasmus Lerdorf

[PHP] Cannot read variables

2006-06-06 Thread William Stokes
Hello, I just set up a test box for PHP/MySQL on a WinXP box and now I'm having trouble with variables passed to browser from a link. For example I have a link that outputs this: http://localhost/index.php?team=CF10b. Now the CF10b cannot be user in the code like it should. I turned to

[PHP] Removing an aspect of a variable...

2006-06-06 Thread Rob W.
Say I have a variable setting an ip address of 192.168.100.0 I want to be able to remove the last to chr's of that variable ie: .0 What would be my best solution to do that?

Re: [PHP] Removing an aspect of a variable...

2006-06-06 Thread Rob W.
Tnx. - Original Message - From: rich gray [EMAIL PROTECTED] To: Rob W. [EMAIL PROTECTED] Sent: Tuesday, June 06, 2006 2:44 AM Subject: Re: [PHP] Removing an aspect of a variable... substr($variable,0,-2); Rob W. wrote: Say I have a variable setting an ip address of 192.168.100.0

RE: [PHP] Removing an aspect of a variable...

2006-06-06 Thread Peter Lauri
But that will just give you .0. If you have 192.168.100.232 it will return 32. You have to check where the . is and then take the substring from that. Use strpos or similar for that (I do not know if that can check backwards) -Original Message- From: Rob W. [mailto:[EMAIL PROTECTED]

Re: [PHP] Removing an aspect of a variable...

2006-06-06 Thread Robin Vickery
On 06/06/06, Rob W. [EMAIL PROTECTED] wrote: Say I have a variable setting an ip address of 192.168.100.0 I want to be able to remove the last to chr's of that variable ie: .0 What would be my best solution to do that? Remove the last two characters of a string? $shorterString =

Re: [PHP] Removing an aspect of a variable...

2006-06-06 Thread Paul Novitski
At 12:37 AM 6/6/2006, Rob W. wrote: Say I have a variable setting an ip address of 192.168.100.0 I want to be able to remove the last to chr's of that variable ie: .0 What would be my best solution to do that? If you want the last two characters you can use substr(): [1] $sResult =

[PHP] Re: Cannot read variables

2006-06-06 Thread The Panister
Can you show us the script please? William Stokes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, I just set up a test box for PHP/MySQL on a WinXP box and now I'm having trouble with variables passed to browser from a link. For example I have a link that outputs this:

[PHP] Re: Session variables on Windows

2006-06-06 Thread The Panister
Well Do you have folder called tmp in your root? ThePanister! Tom [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does some well-known problem exist with the session variables in Windows servers? Because in a system that I have running on a Windows server, sometimes the

Re: [PHP] Removing an aspect of a variable...

2006-06-06 Thread David Otton
On Tue, 6 Jun 2006 08:52:46 +0100, Robin Vickery wrote: On 06/06/06, Rob W. [EMAIL PROTECTED] wrote: Say I have a variable setting an ip address of 192.168.100.0 I want to be able to remove the last to chr's of that variable ie: .0 What would be my best solution to do that? Remove the last

Re: [PHP] Cannot read variables

2006-06-06 Thread David Otton
On Tue, 6 Jun 2006 10:36:12 +0300, you wrote: I just set up a test box for PHP/MySQL on a WinXP box and now I'm having trouble with variables passed to browser from a link. For example I have a link that outputs this: http://localhost/index.php?team=CF10b. Now the CF10b cannot be user in the

RE: [PHP] When is z != z ?

2006-06-06 Thread Ford, Mike
On 06 June 2006 02:35, tedd wrote: a b c ... x y z aa ab ac ... yx yy yz za zb zc ... zy zx zz aaa aab -- it's not! Yes it is. The ++ operator generates that sequence when applied to a string, and nothing you can say or do will alter that fact. You're trying to treat the 2nd and 3rd

[PHP] Re: When is z != z ?

2006-06-06 Thread Finner, Doug
I love this thread. Who'da thunk alphabets could be so much fun? FWIW: Different language, different rules - to do 'letter math', letters must be converted to their ASCII number value, add one, convert back to a letter. The set of allowed ASCII numbers is limited to (I think) 256 and 'real'

Re: [PHP] Cannot read variables

2006-06-06 Thread William Stokes
Yess! Wrong ini file... There seems to be 3 of them on the same PC for some reason? -W David Otton [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] On Tue, 6 Jun 2006 10:36:12 +0300, you wrote: I just set up a test box for PHP/MySQL on a WinXP box and now I'm having trouble with

Re: [PHP] Using variable content to name a class

2006-06-06 Thread Jochem Maas
Dave M G wrote: Chris, Thank you for replying. $object = new $className(); Is this possible? If in doubt, test it out ;) Yes, it will work. Oh, that's actually the code I can use? I just wrote it as an explanatory aid, not thinking that it could be literally done like that. I assumed

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 00:01, Martin Alterisio wrote: Because defining ++ and and in such a way as to make them behave like numbers would have made them not work for alphabetizing. A string is a string, and comparison of strings is alphabetic

[PHP] Pear DB and memcached

2006-06-06 Thread Ruben Rubio Rey
Hi, Im having a trouble using memcached with pear db. When im using memcache to store and retrieve an string, all works fine. When Im using memcache to store a pear db resulset, it does not work!! This retrieves data but pear::db does not understand it. I really dont know Any ideas? Thanks in

Re: [PHP] When is z != z ?

2006-06-06 Thread Rasmus Lerdorf
Martin Alterisio wrote: You're right about ++ operator not to be considered a math operator, my mistake. What I should have said is that the usual connotation and expected behaviour of ++ and the comparison operators is to give iteration capabilities to a certain data type, as used in a for

Re: [PHP] When is z != z ?

2006-06-06 Thread Barry
Martin Alterisio schrieb: is it really worthy the functionality supplied with the string ++ operator as it is? I don't see its usefullness yet. guess you want to order something by name not by number which might be false in some cases (1,10,2,20,21 ... and so on). There it might be useful.

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Barry [EMAIL PROTECTED]: Martin Alterisio schrieb: is it really worthy the functionality supplied with the string ++ operator as it is? I don't see its usefullness yet. guess you want to order something by name not by number which might be false in some cases (1,10,2,20,21 ... and

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Rasmus Lerdorf [EMAIL PROTECTED]: Martin Alterisio wrote: You're right about ++ operator not to be considered a math operator, my mistake. What I should have said is that the usual connotation and expected behaviour of ++ and the comparison operators is to give iteration

Re: [PHP] Cannot read variables

2006-06-06 Thread Adam Zey
William Stokes wrote: Yess! Wrong ini file... There seems to be 3 of them on the same PC for some reason? -W David Otton [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] On Tue, 6 Jun 2006 10:36:12 +0300, you wrote: I just set up a test box for PHP/MySQL on a WinXP box and now I'm

[PHP] Re: Pear DB and memcached

2006-06-06 Thread Ben Ramsey
On 6/6/06 9:55 AM, Ruben Rubio Rey wrote: Im having a trouble using memcached with pear db. When im using memcache to store and retrieve an string, all works fine. When Im using memcache to store a pear db resulset, it does not work!! This retrieves data but pear::db does not understand it. I

Re: [PHP] Re: Pear DB and memcached

2006-06-06 Thread Ruben Rubio Rey
Ben Ramsey wrote: On 6/6/06 9:55 AM, Ruben Rubio Rey wrote: Im having a trouble using memcached with pear db. When im using memcache to store and retrieve an string, all works fine. When Im using memcache to store a pear db resulset, it does not work!! This retrieves data but pear::db does

Re: [PHP] When is z != z ?

2006-06-06 Thread Robert Cummings
On Tue, 2006-06-06 at 09:46, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: In C++ they do leave it to the coder, and well, we all know what a mess it can be deciphering overloaded operators in C++ (or maybe we ALL don't). At any rate, the PHP overlords made a choice,

[PHP] 1,600,000 ��ª��������� �Ѵ������§�ӴѺ�ѡ���дǡ����Ѻ���¸�áԨ�ͧ��ҹ ��������������������ѹ���¨ҡ��ҧ�������ա�������ҧ �ҤҶ١�ҡ���������ա���� ��˹��¨ӹǹ�ӡѴ

2006-06-06 Thread 1,600,000 ��ª��������� �Ѵ������§�ӴѺ�ѡ���дǡ����Ѻ���¸�áԨ�ͧ��ҹ ��������������������ѹ���¨ҡ��ҧ�������ա�������ҧ �ҤҶ١�ҡ���������ա���� ��˹��¨ӹǹ�ӡѴ
1,600,000 ÃÒª×èÍÍÕàÁÅì ¤Ñ´ÊÃÃàÃÕ§ÅӴѺÍÑ¡ÉÃÊдǡÊÓËÃѺ¢ÂÒ¸ØáԨ¢Í§·èÒ¹ ¾ÃéÍÁ·Ñé§á¶Áâ»Ãá¡ÃÁ·Ñ¹ÊÁѨҡµèÒ§»ÃÐà·ÈÍÕ¡ËÅÒÂÍÂèÒ§ ÃÒ¤Ò¶Ù¡ÁÒ¡ËÒäÁèä´éÍÕ¡áÅéÇ ¨Ó˹èÒ¨ӹǹ¨Ó¡Ñ´ µÔ´¨ÃÇ´ãËé¸ØáԨ¢Í§·èÒ¹´éÇ¡ÒûÃЪÒÊÑÁ¾Ñ¹¸ì¸ØáԨ·Ò§ÍÕàÁÅì â´Âµé¹·Ø¹·ÕèµèÓáÅмŵͺÃѺ·Õè´Õ·ÕèÊØ´ ´éÇÂÍÕàÁÅì 1.6 ÅéÒ¹àÁÅì

Re: [PHP] When is z != z ?

2006-06-06 Thread tedd
Rasmus: At 6:54 PM -0700 6/5/06, Rasmus Lerdorf wrote: tedd wrote: For example, the Unicode issue was raised during this discussion -- if php doesn't consider the numeric relationship of characters, then I see a big problem waiting in the wings. Because if we're having these types of

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 09:46, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: In C++ they do leave it to the coder, and well, we all know what a mess it can be deciphering overloaded operators in C++ (or maybe we ALL

Re: [PHP] When is z != z ?

2006-06-06 Thread Adam Zey
tedd wrote: for I can't get it to stop when it passes z -- which I think it should. But, people have posted code solutions for you to do exactly what you want. So have I. Here it is again: foreach (range('a', 'z') as $char) { echo $char; } I don't mean to sound harsh, but why are you

[PHP] Getting totals

2006-06-06 Thread Rob W.
Ok, Here is my next problem. Inside my database, I have a list of ip's of about 10 blocks 192.168.100.0 all the way though 255 along with 192.168.101.0 though 255 and 192.168.102.0 though 255 and soforth My problem is, is i'm trying to figure out a pattern to match so I can count how many ip's

Re: [PHP] When is z != z ?

2006-06-06 Thread Robert Cummings
On Tue, 2006-06-06 at 13:05, tedd wrote: I don't have these issues because I'm not Lithuanian. If a Lithuanian php programmer wants y to fall between i and k in a loop, then good luck -- for I can't get it to stop when it passes z -- which I think it should. This isbecause you're using the

Re: [PHP] When is z != z ?

2006-06-06 Thread Robert Cummings
On Tue, 2006-06-06 at 13:11, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 09:46, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: In C++ they do leave it to the coder, and well, we all know what a mess it can be

Re: [PHP] When is z != z ?

2006-06-06 Thread Paul Novitski
At 10:38 AM 6/4/2006, tedd wrote: for ($i=a; $iz; $i++) { echo($i); } -- it stops at y But, if you use -- for ($i=a; $i=z; $i++) { echo($i); } -- it prints considerably more characters after z than what one would normally expect -- why is that? Tedd, The discussion of PHP

Re: [PHP] When is z != z ?

2006-06-06 Thread tedd
At 1:14 PM -0400 6/6/06, Adam Zey wrote: tedd wrote: for I can't get it to stop when it passes z -- which I think it should. But, people have posted code solutions for you to do exactly what you want. So have I. Here it is again: foreach (range('a', 'z') as $char) { echo $char; } I don't

[PHP] Weird Safari Stalling Issues Sessions?

2006-06-06 Thread Paul Nowosielski
Dear All, I'm having a very frustrating issue w/ Apples Safari web browser. The browser will stall when I try and initiate a sessions on login . So on our login page we validate the username and password and start the session. When a Safari user attempts to login the Safari wheel just spins

Re: [PHP] Getting totals

2006-06-06 Thread Jochem Maas
without actually thinking about your problem I guess that these funcs (the first is most like useful, the second show [at least] how the first can be used and the last func is just for fun) might help you somehow (apologies if If I'm way off base): ALSO: if anyone has a cleaner/faster/better way

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 13:11, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 09:46, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: In C++ they do leave it to the coder,

[PHP] Controlling DomDocument's load and loadHTMLFile Request

2006-06-06 Thread Shu Chow
Is there any way to alter the header of DomDocument's load/loadHTMLFile request? I have a file that will display certain content for certain user agents. I'd like to be able to spoof the UA of the request. TIA, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Controlling DomDocument's load and loadHTMLFile Request

2006-06-06 Thread Shu Chow
Is there any way to alter the header of DomDocument's load/loadHTMLFile request? I have a file that will display certain content for certain user agents. I'd like to be able to spoof the UA of the request. TIA, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] When is z != z ?

2006-06-06 Thread tedd
Tedd, The discussion of PHP strings has been interesting; thanks for sparking that. Of course, your subject line to the contrary, it's not that z != z, it's that storing an alphabetic character assumed to be a single byte in a variable and then incrementing it can result in a two-byte result.

Re: [PHP] Controlling DomDocument's load and loadHTMLFile Request

2006-06-06 Thread Jochem Maas
Shu Chow wrote: Is there any way to alter the header of DomDocument's load/loadHTMLFile request? I have a file that will display certain content for certain user agents. I'd like to be able to spoof the UA of the request. don't know about that (I have my doubts) - but you could write a

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, tedd [EMAIL PROTECTED]: If php is supposed to be open source, doesn't that mean that people can voice their opinion on what they observe and expect? I second that. I believe being open-source doesn't mean Yay, it's free! but Cool, someone is listening to us!

Re: [PHP] When is z != z ?

2006-06-06 Thread Robert Cummings
On Tue, 2006-06-06 at 14:06, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: You must have missed this post: http://marc.theaimsgroup.com/?l=php-generalm=114945456908350w=2 Yes, I haven't read that post. That algorithm has an error, an overflow on a

Re: [PHP] When is z != z ?

2006-06-06 Thread John Nichel
tedd wrote: snip And I thank you for your reply -- you've been much kinder than most (on and off-list). :-) True the subject line was a bit misleading, but that was intentional. Bait causes more fish to rise. I've received the answer several times over since I posted the problem, but I

Re: [PHP] Weird Safari Stalling Issues Sessions?

2006-06-06 Thread tedd
At 11:55 AM -0600 6/6/06, Paul Nowosielski wrote: Dear All, I'm having a very frustrating issue w/ Apples Safari web browser. The browser will stall when I try and initiate a sessions on login . So on our login page we validate the username and password and start the session. When a Safari user

Re: [PHP] Getting totals

2006-06-06 Thread Rob W.
Acutall no, Because in my database is is all them blocks but each ip in all them blocks has a seperate entry in a column. So in listing the whole column in my mysql request, i need a line that will weed out and count how many ip's are in a block. - Original Message - From: [EMAIL

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 14:06, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: You must have missed this post: http://marc.theaimsgroup.com/?l=php-generalm=114945456908350w=2 Yes, I haven't read that post.

Re: [PHP] Cannot read variables

2006-06-06 Thread Jochem Maas
Adam Zey wrote: ... http://www.otton.org/ Turn off register globals. Now. It is a HUGE security hole. it is NOT by definition a security hole - the problem arises from scripts that don't bother to initialize all their variable before using them, which allows blackhats to possibly

Re: [PHP] Getting totals

2006-06-06 Thread Rabin Vincent
On 6/6/06, Rob W. [EMAIL PROTECTED] wrote: So far what I have gotten is a stristr match but it's not working correctly. I have a variable that basically weed's out the last digits of the ip it's self from help previously So my code so far is: if (stristr($block,$address)) { $count_ip++; }

Re: [PHP] When is z != z ?

2006-06-06 Thread tedd
At 2:20 PM -0400 6/6/06, John Nichel wrote: tedd wrote: snip And I thank you for your reply -- you've been much kinder than most (on and off-list). :-) True the subject line was a bit misleading, but that was intentional. Bait causes more fish to rise. I've received the answer several times

[PHP] Sessions

2006-06-06 Thread Oliver Block
Hi, is there any easy way to use differnt sessions on the same domain? I didn't really dig for a solution, but if anybody has one ready? Best Regards, Oliver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] When is z != z ?

2006-06-06 Thread Robert Cummings
On Tue, 2006-06-06 at 14:31, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 14:06, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: You must have missed this post:

RE: [PHP] Sessions

2006-06-06 Thread Jay Blanchard
[snip] is there any easy way to use differnt sessions on the same domain? I didn't really dig for a solution, but if anybody has one ready? [/snip] Yes. http://www.php.net/session -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Weird Safari Stalling Issues Sessions?

2006-06-06 Thread Jochem Maas
tedd wrote: I use Safari ... thefarside slowly but surely it's became evident that tedd had masochistic tendencies. /thefarside ;-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How do I make a HTML tree for a set of nodes?

2006-06-06 Thread Jochem Maas
Niels wrote: Hi, I have a set of nodes. Each node has a parent and so the set can be thought of as a tree. I want to show that tree somehow on a webpage, served by PHP. I cannot use Dot/Graphwiz for various reasons. What I'm looking for is an output of DIVs or tablecells, showing the

Re: [PHP] When is z != z ?

2006-06-06 Thread Martin Alterisio
2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 14:31, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: On Tue, 2006-06-06 at 14:06, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: You must have missed this post:

Re: [PHP] Sessions

2006-06-06 Thread Oliver Block
Am Dienstag, 6. Juni 2006 20:51 schrieb Jay Blanchard: Yes. http://www.php.net/session session_set_cookie_params() ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Control GET data

2006-06-06 Thread Steffen Mazanek
Hello, I want to provide two input text fields lastname and firstname and if the user pushes the submit button the generated url should be ...?name=firstname_lastname. Is this possible and how? Thank you for helping a php newbie. Steffen Mazanek -- Hermann-Löns-Straße 3 53840 Troisdorf

Re: [PHP] When is z != z ?

2006-06-06 Thread Robert Cummings
On Tue, 2006-06-06 at 15:11, Martin Alterisio wrote: 2006/6/6, Robert Cummings [EMAIL PROTECTED]: You lost me there. Can you explain it a little bit further? You said: Still, an overload is an known issue and that can be caught easily. It follows that you need

Re: [PHP] Control GET data

2006-06-06 Thread John Nichel
Steffen Mazanek wrote: Hello, I want to provide two input text fields lastname and firstname and if the user pushes the submit button the generated url should be ...?name=firstname_lastname. Is this possible and how? Yes and JavaScript Thank you for helping a php newbie. You're

Re: [PHP] Control GET data

2006-06-06 Thread Brad Bonkoski
Why are you forcing the input into the GET variable or the URL string? Why not just use the post from the form variable?? As for you question... the answer is yes: make the submit button a button and onclick=javascript_function() Javascript_function() { val1 =

Re: [PHP] Controlling DomDocument's load and loadHTMLFile Request

2006-06-06 Thread Rasmus Lerdorf
Shu Chow wrote: Is there any way to alter the header of DomDocument's load/loadHTMLFile request? I have a file that will display certain content for certain user agents. I'd like to be able to spoof the UA of the request. Ah, a good question the answer to which demonstrates the magic of PHP

[PHP] starting shell script on server: defer acces when running

2006-06-06 Thread Roel Dillen
I have a shell script I want to run which generates an html page after it runs some tests on the software I am writing. I call the script with exec(…); The tests take more than 2 minutes to complete. If I try to run more than one test at the same time: trouble. I want to solve this by

Re: [PHP] Controlling DomDocument's load and loadHTMLFile Request

2006-06-06 Thread Jochem Maas
Rasmus Lerdorf wrote: Shu Chow wrote: Is there any way to alter the header of DomDocument's load/loadHTMLFile request? I have a file that will display certain content for certain user agents. I'd like to be able to spoof the UA of the request. Ah, a good question the answer to which

Re: [PHP] starting shell script on server: defer acces when running

2006-06-06 Thread Jochem Maas
Roel Dillen wrote: I have a shell script I want to run which generates an html page after it runs some tests on the software I am writing. I call the script with exec(…); The tests take more than 2 minutes to complete. If I try to run more than one test at the same time: trouble.

[PHP] Re: [BULK] Re: [PHP] Controlling DomDocument's load and loadHTMLFile Request

2006-06-06 Thread Shu Chow
Exactly what I needed. Thank you! Rasmus Lerdorf wrote: Shu Chow wrote: Is there any way to alter the header of DomDocument's load/loadHTMLFile request? I have a file that will display certain content for certain user agents. I'd like to be able to spoof the UA of the request. Ah, a

Re: [PHP] .htaccess - change index.php to index.abc

2006-06-06 Thread Jochem Maas
Joe Wollard wrote: If you don't want to change the names of the files themselve from .php to .abc then you'd need to use something like mod_rewrite for apache's HTTPD. I'm not entirely certain as to how you'd do this, but I've included what I normally use to hide index.php in the url. If

[PHP] Replacing text of a DOM text node

2006-06-06 Thread Frank Arensmeier
Hello! Basically, I am working on a script that is supposed to convert table data from metric to imperial data. I want to pare XHTML pages (containing up to three different tables) with the PHP DOM functions in order to be able to access and manipulate the tables one by one. Parsing and

Re: [PHP] Control GET data

2006-06-06 Thread tedd
At 9:20 PM +0200 6/7/06, Steffen Mazanek wrote: Hello, I want to provide two input text fields lastname and firstname and if the user pushes the submit button the generated url should be ...?name=firstname_lastname. Is this possible and how? Thank you for helping a php newbie. Steffen Mazanek

Re: [PHP] Weird Safari Stalling Issues Sessions?

2006-06-06 Thread Paul Nowosielski
On Tuesday 06 June 2006 12:26, tedd wrote: At 11:55 AM -0600 6/6/06, Paul Nowosielski wrote: Dear All, I'm having a very frustrating issue w/ Apples Safari web browser. The browser will stall when I try and initiate a sessions on login . So on our login page we validate the username and

Re: [PHP] Replacing text of a DOM text node

2006-06-06 Thread Jochem Maas
Frank Arensmeier wrote: Hello! Basically, I am working on a script that is supposed to convert table data from metric to imperial data. I want to pare XHTML pages (containing up to three different tables) with the PHP DOM functions in order to be able to access and manipulate the tables one

Re: [PHP] Control GET data

2006-06-06 Thread Richard Lynch
On Tue, June 6, 2006 4:55 pm, tedd wrote: At 9:20 PM +0200 6/7/06, Steffen Mazanek wrote: I want to provide two input text fields lastname and firstname and if the user pushes the submit button the generated url should be ...?name=firstname_lastname. Is this possible and how? I think all the

Re: [PHP] .htaccess - change index.php to index.abc

2006-06-06 Thread Richard Lynch
On Tue, June 6, 2006 3:38 pm, Jochem Maas wrote: no warranty is available - I happily lose days trying to get RewriteRules running and tuned :-P chances are it requires tweaking to get working. Which is one of the reasons I abandoned mod_rewrite as a solution for URL-munging. MUCH easier to

Re: [PHP] starting shell script on server: defer acces when running

2006-06-06 Thread Richard Lynch
On Tue, June 6, 2006 3:10 pm, Roel Dillen wrote: I have a shell script I want to run which generates an html page after it runs some tests on the software I am writing. I call the script with exec(…); The tests take more than 2 minutes to complete. If I try to run more than one test at

Re: [PHP] Sessions

2006-06-06 Thread Richard Lynch
On Tue, June 6, 2006 1:43 pm, Oliver Block wrote: is there any easy way to use differnt sessions on the same domain? I didn't really dig for a solution, but if anybody has one ready? ?php session_name(MY_session_data_needs_to_be_separate); session_start(); ? -- Like Music?

Re: [PHP] Controlling DomDocument's load and loadHTMLFile Request

2006-06-06 Thread Richard Lynch
On Tue, June 6, 2006 3:16 pm, Jochem Maas wrote: Rasmus Lerdorf wrote: Shu Chow wrote: Is there any way to alter the header of DomDocument's load/loadHTMLFile request? I have a file that will display certain content for certain user agents. I'd like to be able to spoof the UA of the

Re: [PHP] Weird Safari Stalling Issues Sessions?

2006-06-06 Thread Richard Lynch
On Tue, June 6, 2006 12:55 pm, Paul Nowosielski wrote: I'm having a very frustrating issue w/ Apples Safari web browser. The browser will stall when I try and initiate a sessions on login . So on our login page we validate the username and password and start the session. When a Safari user

Re: [PHP] Getting totals

2006-06-06 Thread Richard Lynch
On Tue, June 6, 2006 12:15 pm, Rob W. wrote: Ok, Here is my next problem. Inside my database, I have a list of ip's of about 10 blocks Some databases, such as PostgreSQL, have native data format of IP and functions to deal with them... I don't suppose you are using one of those? :-)

[PHP] Re: Getting totals

2006-06-06 Thread Rafael
Well, if I understood correctly, and the IP's first 3 segments are all of the same length, the you could do something like this (MySQL) SELECT SUBSTRING(ip, 1, 11) AS ip, COUNT(1) AS cantidad FROM tabla GROUP BY ip Now, if you don't intend to do this in SQL, then you could try

Re: [PHP] Pear DB and memcached

2006-06-06 Thread Richard Lynch
Resources cannot be stored from script to script. PHP cleans them up and nukes their contents at script end. This is what all the frameworks folks are trying to fix... :-) :-) :-) On Tue, June 6, 2006 8:55 am, Ruben Rubio Rey wrote: Hi, Im having a trouble using memcached with pear db.

Re: [PHP] When is z != z ?

2006-06-06 Thread Richard Lynch
On Mon, June 5, 2006 9:00 pm, tedd wrote: Does that make more sense? Maybe to you, but not me. a b c . . . x y z

Re: [PHP] Cannot read variables

2006-06-06 Thread Richard Lynch
On Tue, June 6, 2006 2:36 am, William Stokes wrote: I just set up a test box for PHP/MySQL on a WinXP box and now I'm having trouble with variables passed to browser from a link. For example I have a link that outputs this: http://localhost/index.php?team=CF10b. Now the CF10b cannot be user

Re: [PHP] Getting totals

2006-06-06 Thread Rob W.
if (strstr(192.168.100,192.168.100.10)) { $inc++; } echo $inc; That returns nothing. What am i still doing wrong? - Original Message - From: Rabin Vincent [EMAIL PROTECTED] To: Rob W. [EMAIL PROTECTED] Cc: php-general@lists.php.net Sent: Tuesday, June 06, 2006 1:36 PM Subject: Re:

Re: [PHP] Getting totals

2006-06-06 Thread Rob W.
Sorry for the miss understanding, That's the way the viarable will look, i'm putting it in as a viariable. if (strstr($block,$address)) { $inc++; } - Original Message - From: Richard Lynch [EMAIL PROTECTED] To: Rob W. [EMAIL PROTECTED] Sent: Tuesday, June 06, 2006 8:58 PM Subject:

Re: [PHP] Getting totals

2006-06-06 Thread Paul Novitski
At 06:46 PM 6/6/2006, Rob W. wrote: if (strstr(192.168.100,192.168.100.10)) { $inc++; } echo $inc; That returns nothing. What am i still doing wrong? I would use quotation marks to explicitly type these as strings: strstr(192.168.100,192.168.100.10) Paul -- PHP General Mailing

Re: [PHP] When is z != z ?

2006-06-06 Thread Rasmus Lerdorf
Richard Lynch wrote: On Mon, June 5, 2006 9:00 pm, tedd wrote: Does that make more sense? Maybe to you, but not me. a b c . . . x y

Re: [PHP] When is z != z ?

2006-06-06 Thread Robert Cummings
On Tue, 2006-06-06 at 22:53, Rasmus Lerdorf wrote: Richard Lynch wrote: Or we try to do something a bit more creative which always runs the risk of surprising people. In this case a2++ becomes a3 and c9++ becomes d0. If we have a character that doesn't infer any sort of logical

Re: [PHP] Getting totals

2006-06-06 Thread Rabin Vincent
On 6/7/06, Rob W. [EMAIL PROTECTED] wrote: Sorry for the miss understanding, That's the way the viarable will look, i'm putting it in as a viariable. if (strstr($block,$address)) { $inc++; } Like I said before, strstr's argument list is haystack (what to search in) first and then needle

Re: [PHP] Getting totals

2006-06-06 Thread Rob W.
I got the fix, strstr didnt work right because it was relaying more than just what I was thinking. Here is the fix. $value=array(strstr($block, $address)); foreach ($value as $var) { $block_total_ip++; } - Original Message - From: Rabin Vincent [EMAIL PROTECTED] To:

[PHP] Problem with form

2006-06-06 Thread Rodrigo de Oliveira Costa
Guys I'm getting the following problem: I have a form that asks for one variable that goes into the input box, this box is named chapter, and the box is in a form that is submited to another php, and this php should receive this variable and I should be abble to access it thru $chapter, but when

Re: [PHP] Problem with form

2006-06-06 Thread Robert Cummings
On Wed, 2006-06-07 at 01:14, Rodrigo de Oliveira Costa wrote: Guys I'm getting the following problem: I have a form that asks for one variable that goes into the input box, this box is named chapter, and the box is in a form that is submited to another php, and this php should receive this