[PHP] Referencing Containing (Non-Parent) Object?

2005-10-28 Thread Morgan Doocy
I'm trying to figure out if PHP has the facility to reference containing, non-parent objects. I have three classes, embedded hierarchically, but which are NOT extended classes of their containing objects. I'd like to be able to reference variables in the higher-level objects from the lower-level

Re[2]: [PHP] calling static method within class

2005-10-28 Thread Tom Rogers
Hi, Saturday, October 29, 2005, 5:42:15 AM, you wrote: CR> If you're expecting the statement CR> Echo Foo::getUs(); CR> To echo "me& me" it will not because you never returned $us from the CR> getUs() method. I'm assuming also that xxx is a variable to mean "some CR> class library" correct? C

[PHP] Re: DataCodecCompress and zLib problem (solved)

2005-10-28 Thread Graham Anderson
DOH! OK, I was starting at the wrong place in the hex I misread the QTFF docs which include two more atoms on the NEXT page: Four-character code Atom type 'cmvd'Compressed movie data Uncompressed size32-bit integer The correct output

[PHP] Re: DataCodecCompress and zLib problem (solved)

2005-10-28 Thread Graham Anderson
DOH! OK, I was starting at the wrong place in the hex I misread the QTFF docs which include two more atoms on the next page: Four-character code Atom type 'cmvd'Compressed movie data Uncompressed size32-bit integer The correct output

Re: [PHP] Decompressing a string with zlib problems

2005-10-28 Thread Graham Anderson
Well, maybe QT has a very wacked out version of zLib ? This is what I sent to the Quicktime API list: //-- -- Ok, here we go :) Isn't looking through reams of hex data a blast ? Kind of like a hot poker in the eye ;)

Re: [PHP] OCI8

2005-10-28 Thread Richard Lynch
On Fri, October 28, 2005 10:19 am, Kilbride, James wrote: > I'm running php5.0.5 and I'm trying to get connected to an oracle > server. Pear's DB requires the PHP OCI8 extension. The php website > doesn't give 'installation' instructions for getting php_oci8.dll > which > seems to be required in or

[PHP] UTF-8 to ISO-8859-1

2005-10-28 Thread Richard Lynch
So, I'm parsing some XML and dumping some stuff to a web-site. The character-encoding for the HTML of the output has already been set by headers() to ISO-8859-1 for me, and I'm stuck with that. So be it. The XML has this at the top: We don't (and won't soon) have recode nor iconv installed, bu

Re: [PHP] foreach / unset

2005-10-28 Thread Richard Lynch
On Fri, October 28, 2005 8:47 am, Jochem Maas wrote: > John Nichel wrote: >> Richard Lynch wrote: >> >>> Somewhere in the manual (damned if I can find it now) it says (or >>> used >>> to say) that you can or can't safely do this: >>> >>> while (list($k, $v) = each($array)){ >>> if (...) unset($ar

RE: [PHP] calling static method within class

2005-10-28 Thread Carlo Razzeto
If you're expecting the statement Echo Foo::getUs(); To echo "me& me" it will not because you never returned $us from the getUs() method. I'm assuming also that xxx is a variable to mean "some class library" correct? Carlo Razzeto Programmer Mortgage Information Services Phone: (216) 514-1025

Re: [PHP] Re: Type of form element

2005-10-28 Thread Greg Donald
On Fri, 28 Oct 2005, James Benson wrote: If you have a checkbox you just test if the value is set with isset() if it's not set they never selected the checkbox. I have some checkboxes on my page which correspond with boolean fields in my database - actually they are TINYINT's in which I store a

[PHP] Re: Type of form element

2005-10-28 Thread James Benson
If you have a checkbox you just test if the value is set with isset() if it's not set they never selected the checkbox. Or if thats not what you mean maybe this could help http://php.net/variables.external Shaun wrote: Hi, I have some checkboxes on my page which correspond with boolean

Re: [PHP] calling static method within class

2005-10-28 Thread Greg Donald
On Fri, 28 Oct 2005, blackwater dev wrote: I have a class that won't be instantiated...so basically just a bunch of static methods. How do I call one of the class' static methods from within another method? Can't use this, and self doesn't work...this is php4. Same way you do it outside the

[PHP] calling static method within class

2005-10-28 Thread blackwater dev
I have a class that won't be instantiated...so basically just a bunch of static methods. How do I call one of the class' static methods from within another method? Can't use this, and self doesn't work...this is php4. Thanks. Class Foo{ function getMe(){ return "me"; } function ge

RE: [PHP] Re: How to account for misspellings and alternatives insearching?

2005-10-28 Thread Chris W. Parker
Jochem Maas on Friday, October 28, 2005 1:33 AM said: > James Benson wrote: >> Not sure about the numbers but soundex could be useful >> >> http://php.net/soundex > > right and maybe its easier to just index thing like '5.11' as > '511' - ie just stripping off ever

Re: [PHP] XML-RPC Error:-32300:transport error - could not open socket

2005-10-28 Thread Dan McCullough
It was the version of class-IXR.php, there was a small bug in that library and the fix had just come out, so it was until I went back and download some updates that it worked. On 10/22/05, Richard Lynch <[EMAIL PROTECTED]> wrote: > On Sat, October 22, 2005 10:19 am, Dan McCullough wrote: > > I'm h

[PHP] OCI8

2005-10-28 Thread Kilbride, James
I'm running php5.0.5 and I'm trying to get connected to an oracle server. Pear's DB requires the PHP OCI8 extension. The php website doesn't give 'installation' instructions for getting php_oci8.dll which seems to be required in order to connect to an Oracle server. I've got the oracle instant clie

Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Jochem Maas
Christoph Freundl wrote: Am Freitag, 28. Oktober 2005 13:42 schrieb Jochem Maas: ok, and if you stick the following in 1 file and call it?: ... just thinking out loud here. I just looked at apache_getenv(): string apache_getenv ( string variable [, bool walk_to_top] ) the second arg m

Re: [PHP] Decompressing a string with zlib problems

2005-10-28 Thread Robin Vickery
On 10/28/05, Graham Anderson <[EMAIL PROTECTED]> wrote: > I am having problems decompressing a zlib'd string located in a file. > > In the file headers, the compression says that it is zlib. > But, when I 'gzinflate' the string, I get the error: gzinflate(): > data error in Is the below NOT a zl

RE: [PHP] Type of form element

2005-10-28 Thread Jay Blanchard
[snip] I have some checkboxes on my page which correspond with boolean fields in my database - actually they are TINYINT's in which I store a 0 or 1 in for false and true values respectively. Is it possible to loop through all $_POST values to see if it is a checkbox? If so then for that elemen

RE: [PHP] Type of form element

2005-10-28 Thread Jim Moseby
> > Is it possible to loop through all $_POST values to see if it > is a checkbox? > If so then for that element if it is equal to 'on' then > change it to 1 > otherwise change it to 0? foreach($_POST as $key => $value){ if ($value=='on'){$_POST[$key]='1';}elseif($value=='off';){$_POST[$ke

Re: [PHP] Type of form element

2005-10-28 Thread Leif Gregory
Hello Shaun, Friday, October 28, 2005, 9:00:05 AM, you wrote: > Is it possible to loop through all $_POST values to see if it is a > checkbox? If so then for that element if it is equal to 'on' then > change it to 1 otherwise change it to 0? Yes and no. 1. You can't determine by the POST variabl

[PHP] Type of form element

2005-10-28 Thread Shaun
Hi, I have some checkboxes on my page which correspond with boolean fields in my database - actually they are TINYINT's in which I store a 0 or 1 in for false and true values respectively. Is it possible to loop through all $_POST values to see if it is a checkbox? If so then for that element

Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Christoph Freundl
Am Freitag, 28. Oktober 2005 13:42 schrieb Jochem Maas: > ok, and if you stick the following in 1 file and call it?: > > > > > ... just thinking out loud here. Ok, I tried this by configuring Apache such that .php-files are also parsed for Server Side Includes and wrote it the way you suggest.

Re: [PHP] Use sqlite with php 4.4 ?

2005-10-28 Thread Greg Donald
On Fri, 28 Oct 2005, mbneto wrote: is it possible to use sqlite with php 4.4 ? What do I have to do ? I could not find and option in ./configure. http://php.net/sqlite -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP General Mailing List (http:/

[PHP] Use sqlite with php 4.4 ?

2005-10-28 Thread mbneto
Hi, is it possible to use sqlite with php 4.4 ? What do I have to do ? I could not find and option in ./configure. tks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] foreach / unset

2005-10-28 Thread Jochem Maas
John Nichel wrote: Richard Lynch wrote: Somewhere in the manual (damned if I can find it now) it says (or used to say) that you can or can't safely do this: while (list($k, $v) = each($array)){ if (...) unset($array[$k]); } I don't even remember if it's safe or not, but I swear I saw it not

Re: [PHP] foreach / unset

2005-10-28 Thread John Nichel
Richard Lynch wrote: Somewhere in the manual (damned if I can find it now) it says (or used to say) that you can or can't safely do this: while (list($k, $v) = each($array)){ if (...) unset($array[$k]); } I don't even remember if it's safe or not, but I swear I saw it not that long ago... An

Re: [PHP] Trouble using DOM component with PHP 4.4.0

2005-10-28 Thread Alessandro Rossini
> And what DOM library, which is compatible with PHP 5.0 and PHP 4.4 can > I use to avoid the conflict I currently have? In PHP4 I never used any DOM implementation, I started to use DOM only after the PHP5 release, so I'm not the best to answer your question. :) Anyway I think that there is some

Re: [PHP] foreach / unset

2005-10-28 Thread Brent Baisley
The foreach statement works because you are getting the array index ($k) to unset the array item. I think somewhere in the manual it says it's unsafe because some people might think you could just use unset ($v) to unset the array item. Which wouldn't work because $v is more of a temporary v

Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Jochem Maas
Christoph Freundl wrote: Am Freitag, 28. Oktober 2005 13:22 schrieb Jochem Maas: info.php - have yuou tried include/require here instead of virtual() I imagine that the env of the subprocess wouldn't affect the env of the parent process - i.e.

Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Christoph Freundl
Am Freitag, 28. Oktober 2005 13:22 schrieb Jochem Maas: > > info.php > > - > > > virtual( "setvar.shtml" ); > > have yuou tried include/require here instead of virtual() > > I imagine that the env of the subprocess wouldn't affect > the env of the

Re: [PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Jochem Maas
Christoph Freundl wrote: Hello, I have a problem with the persistence of environment variables when mixing PHP and SSI (Apache) and I am not sure if I just made an error or if this approach cannot work at all. So please consider the following files: setvar.shtml -

Re: [PHP] printing from php

2005-10-28 Thread Jochem Maas
don't post a new question to an existing thread - it lessens your exposure! Tom Cruickshank wrote: Hello, I've been reading up on printing out documents using PHP (using Printer functions calls in the php manual) I'm using a Linux and/or FreeBSD operating system to run my php code on (in a

[PHP] printing from php

2005-10-28 Thread Tom Cruickshank
Hello, I've been reading up on printing out documents using PHP (using Printer functions calls in the php manual) I'm using a Linux and/or FreeBSD operating system to run my php code on (in apache). However, I am surfing these pages using a Windows XP machine. Has anyone ever tried having a

Re[2]: [PHP] regex and global vars problem

2005-10-28 Thread Tom Rogers
Hi, Friday, October 28, 2005, 7:20:58 PM, you wrote: RV> On 10/28/05, Tom Rogers <[EMAIL PROTECTED]> wrote: >> >> I would do it with a small class like this: RV> $mactest = new mac("there are a few gotchas for anyone using this"); print $mactest->>is_valid ? "valid\n" : "invalid\n"; RV> // vali

Re: [PHP] PHP version check

2005-10-28 Thread Marcus Bointon
On 28 Oct 2005, at 07:46, Richard Davey wrote: Friday, October 28, 2005, 7:41:21 AM, you wrote: How can I query for PHP version? phpversion() ! While it's true that that will get you a version string, if you're going to actually check it, you need: http://www.php.net/manual/en/functio

[PHP] Mixed PHP/SSI and environment variables

2005-10-28 Thread Christoph Freundl
Hello, I have a problem with the persistence of environment variables when mixing PHP and SSI (Apache) and I am not sure if I just made an error or if this approach cannot work at all. So please consider the following files: setvar.shtml - --

Re: [PHP] regex and global vars problem

2005-10-28 Thread Robin Vickery
On 10/28/05, Tom Rogers <[EMAIL PROTECTED]> wrote: > > I would do it with a small class like this: > > class mac{ > var $mac=''; > var $is_valid = false; > function mac($mac){ > $mac = preg_replace('/[^0-9A-F]/','',strtoupper($mac)); > if($this->is_valid = > preg_match('/^(\w{2})(\w

Re: [PHP] foreach / unset

2005-10-28 Thread Jochem Maas
Richard Lynch wrote: Somewhere in the manual (damned if I can find it now) it says (or used to say) that you can or can't safely do this: while (list($k, $v) = each($array)){ if (...) unset($array[$k]); } I don't even remember if it's safe or not, but I swear I saw it not that long ago... An

Re: [PHP] How to account for misspellings and alternatives in searching?

2005-10-28 Thread Robin Vickery
On 10/27/05, Chris W. Parker <[EMAIL PROTECTED]> wrote: > Hello, > > On my site right now if someone searches for "511" (a misspelling of the > manufacturer 5.11) they are not presented with the right products > because 511 is not found anywhere in the database. > > I've got a few ideas on how to s

Re: [PHP] Decompressing a string with zlib problems

2005-10-28 Thread Jochem Maas
you have another problem - in that all these very specific strings that you are posting could very well be being mangled in someway because of the mail transport. in fact I doubt it comes thru in way that makes it testable at all. it doesn't help that googling for 'dcomzlib' brings up your own po

Re: [PHP] Re: How to account for misspellings and alternatives in searching?

2005-10-28 Thread Jochem Maas
James Benson wrote: Not sure about the numbers but soundex could be useful http://php.net/soundex right and maybe its easier to just index thing like '5.11' as '511' - ie just stripping off everything not alphanumeric ... amnd doing the same with whatever people search on. I have used a simila

Re: [PHP] Using PHP for accsess control, preventing access to static files

2005-10-28 Thread Richard Heyes
Dan Trainor wrote: Hello, all - I'm designing a controlled access system in PHP, and it's coming along quite well. It's very simple, and just sets a session varibale, such as $_SESSION['authenticated'] = 1, not a whole lot. If you do this this, you must make sure you have some sort of session

Re: [PHP] foreach / unset

2005-10-28 Thread Karlos Zafra
This syntax has the work done perfectly for me. 2005/10/28, Niels Ganser <[EMAIL PROTECTED]>: > > Why should this be "unsafe" (whatever the heck that means) in any way? Of > course you can do it. > > Regards, > Niels. > > [sorry for mailing to your private address. wrong button :)] > > > Anyway, c