RE: [PHP] Strange behaviour overriding methods in 5.0.4

2005-09-28 Thread Rob Agar
hi Norbert, Have you tried print_r($_SESSION['view'])? I'm wondering if there's some problem recreating the class instance from the session data... Rob > -Original Message- > From: Norbert Wenzel [mailto:[EMAIL PROTECTED] > Sent: Thursday, 29 September 2005 2:58 AM > To: php-general@li

Re: [PHP] Strange behaviour overriding methods in 5.0.4

2005-09-28 Thread Jochem Maas
mail wrote: Norbert Wenzel wrote: Hi, i have a very strange example of code. Maybe you know where my mistake could be. I've got an index.php with a few div's and a short php code, like: echo $_SESSION['view']->getContent(); The view is in every case one of my view objects. And there's the pro

Re: [PHP] Array - partical path to the array's path (part 2)

2005-09-28 Thread Jochem Maas
Scott Fletcher wrote: Aw!!! This is driving me nut... It still does :-) get to grips with var_dump() ... Um Interesting thought... ($array.$suffix) will never be an array $suffix .= "['".$key."']"; Yea, you are correct... I was trying to integrate the coding and stumpl

Re: [PHP] ODBC and DB2 functions (PDO_ODBC)

2005-09-28 Thread Oscar Gosdinski
Check this article, it will help you using PDO and DB2: http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0505furlong/index.html However, you can access a DB2 server using the unified ODBC extension which actually i configured on a production enviroment. http://www-128.ibm.com/devel

Re: [PHP] bad use of foreach() when building xml str from xml tree(source code provided here).

2005-09-28 Thread Scott Fletcher
Here's we go. A better script here. Now I only need to figure out how to add data to the string and assigned it to string 1 when done. I used hte break command there to make a point here. Maybe this will work... --snip-- $array = array ( 'NEWSFEED' => array ( '0' => array ( '

Re: [PHP] Strange behaviour overriding methods in 5.0.4

2005-09-28 Thread mail
>Norbert Wenzel wrote: >> Hi, i have a very strange example of code. Maybe you know where my >> mistake could be. >> >> I've got an index.php with a few div's and a short php code, like: >> echo $_SESSION['view']->getContent(); >> >> The view is in every case one of my view objects. And there's t

[PHP] ODBC and DB2 functions (PDO_ODBC)

2005-09-28 Thread Dan McCullough
Anyone have any experience with DB2 over ODBC or JDBC from PHP on Linux? Looking for some idea of what I will need to be able to connect to a DB2 server on our network. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] bad use of foreach() when building xml str from xml tree(source code provided here).

2005-09-28 Thread Scott Fletcher
> $array = array('NEWSFEED' => array( > '0' => array( >'MESSAGE' => array( > '0' => array( > 'COMMENT' => array( > '0' => array( >'VALUE' => 'Comment #1', > '1' => array( >'MESSAGE' => array( > '0' => array( > 'C

Re: [PHP] Array - partical path to the array's path (part 2)

2005-09-28 Thread Scott Fletcher
> Aw!!! This is driving me nut... It still does :-) > get to grips with var_dump() ... Um Interesting thought... > ($array.$suffix) will never be an array > $suffix .= "['".$key."']"; Yea, you are correct... I was trying to integrate the coding and stumpled upon this. It's a mind

Re: [PHP] bad use of foreach() when building xml str from xml tree (source code provided here).

2005-09-28 Thread Jochem Maas
Scott Fletcher wrote: Need some help here... The script didn't turned out right, especially with the tags... For your conveince, I posted the code of my work here with a slim-down testcase... --snip-- $array = array ( 'NEWSFEED' => array ( '0' => array ( 'MESSAGE' => array

Re: [PHP] Array - partical path to the array's path (part 2)

2005-09-28 Thread Jochem Maas
Scott Fletcher wrote: To the top... Aw!!! This is driving me nut... I can't get it to do what I want it to do... Also, another problem is that we're all not thinking at the same level so I'll just dump the simple code so you all can see what I'm trying to do... [code] fantastic function -

Re: [PHP] Strange behaviour overriding methods in 5.0.4

2005-09-28 Thread Jochem Maas
Norbert Wenzel wrote: Hi, i have a very strange example of code. Maybe you know where my mistake could be. I've got an index.php with a few div's and a short php code, like: echo $_SESSION['view']->getContent(); The view is in every case one of my view objects. And there's the problem. In my s

[PHP] Code broken after upgrading from Oracle 10.1.0.4 to 10.2.0.1

2005-09-28 Thread Chuck
After upgrading my database to 10.2 I get the following error when trying to connect: (Using Solaris 9, Apache 2.0.54, and php 5.0.5) *Warning*: ocilogon() [function.ocilogon]: _oci_open_server: Error while trying to retrieve text for error ORA-12154 in */usr/

[PHP] bad use of foreach() when building xml str from xml tree (source code provided here).

2005-09-28 Thread Scott Fletcher
Need some help here... The script didn't turned out right, especially with the tags... For your conveince, I posted the code of my work here with a slim-down testcase... --snip-- $array = array ( 'NEWSFEED' => array ( '0' => array ( 'MESSAGE' => array ( '0' => ar

RE: [PHP] Regex Help

2005-09-28 Thread Pablo Gosse
Greetings folks. Thanks Murray and Philip for the quick responses. Adding the /s modifier worked perfectly. Cheers, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Regex Help

2005-09-28 Thread Murray @ PlanetThoughtful
> Hi, folks. I'm having trouble with a simple regex. I'm sure it's just > something small that I'm missing but nothing I'm trying is working. > > In an HTML file I have comments like this: > > > various html crap here > > > Here's the regex I'm using: > > /(.*?)/ > > And then the call to

Re: [PHP] Regex Help

2005-09-28 Thread Philip Hallstrom
Hi, folks. I'm having trouble with a simple regex. I'm sure it's just something small that I'm missing but nothing I'm trying is working. In an HTML file I have comments like this: various html crap here Here's the regex I'm using: /(.*?)/ And then the call to preg_match_all(): preg_mat

[PHP] Error with DOMDocument->saveXML()

2005-09-28 Thread Stephen Leaf
Ok how I have things set up is I have a Document Object which when instantiated creates a root element and adds it to the DOM object. After that all population of this node is done on the requested page. When I'm done populating I output my header()'s and then echo my Document Object. I've overr

[PHP] Regex Help

2005-09-28 Thread Pablo Gosse
Hi, folks. I'm having trouble with a simple regex. I'm sure it's just something small that I'm missing but nothing I'm trying is working. In an HTML file I have comments like this: various html crap here Here's the regex I'm using: /(.*?)/ And then the call to preg_match_all(): preg_matc

[PHP] Re: PHP CLI - possible for mass mailing?

2005-09-28 Thread Manuel Lemos
Hello, on 09/27/2005 02:44 AM Denis Gerasimov said the following: I was said that using Perl script is more suitable for such task since PHP scripts have problems with sending large amount of mail. Is that true or not? Any success/failure stories? It is a myth that Perl is better (or worse) t

Re: [PHP] Object Function-call handling in PHP5

2005-09-28 Thread Ondrej Ivanič
Dmitry committed a path for improved __toString() support. However, im not sure if it will be PHP6 only... I know about this patch. I think, it will be PHP6 only. -- Ondrej Ivanic ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/un

[PHP] Re: Strange behaviour overriding methods in 5.0.4

2005-09-28 Thread Norbert Wenzel
Norbert Wenzel wrote: echo $_SESSION['view']->getContent(); of course this echo IS in , i just forgot here in my message -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Array Select from database

2005-09-28 Thread Chris W. Parker
Silvio Porcellana on Wednesday, September 28, 2005 9:37 AM said: > In addiction, I would (SQL)escape the values joined: supposing you are > using MySQL, I'd do: > $values = join("', '", array_map('mysql_real_escape_string', $array)); Now that's a Freudian slip if I

[PHP] Strange behaviour overriding methods in 5.0.4

2005-09-28 Thread Norbert Wenzel
Hi, i have a very strange example of code. Maybe you know where my mistake could be. I've got an index.php with a few div's and a short php code, like: echo $_SESSION['view']->getContent(); The view is in every case one of my view objects. And there's the problem. In my specific case $_SESSION[

Re: [PHP] Object Function-call handling in PHP5

2005-09-28 Thread l0t3k
Dmitry committed a path for improved __toString() support. However, im not sure if it will be PHP6 only... ""Ondrej Ivanic"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Beware! This bugs are related to __toString() method: > > 31766 Open printf and __toString > 34286 Assi

Re: [PHP] Array Select from database

2005-09-28 Thread Silvio Porcellana
A.J. Brown wrote: > > [code] > $values = join(', ', $array); > $query = "SELECT * FROM client WHERE clientaccountmanager IN ('$values')" > [/code] > Actually this doesn't seem right, the join should be: $values = join("', '", $array); # notice the ' inside the " In addiction, I would (SQL)escape

Re: [PHP] serializing result sets or what?

2005-09-28 Thread Rasmus Lerdorf
> A very similar question was asked recently on this list. You might like > to consider caching whatever you create from those result sets rather > than the result sets themselves, but APC [1] is worth looking at as I > believe it can cache (some?) PHP vars without serialisation, using > apc_st

Re: [PHP] error when open files

2005-09-28 Thread Emil Novak
If this isn't local webserver, you maybe have a problem with allow_url_fopen: http://www.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen Or if this is on your local server, you can try this: $fp = fopen("/A.zip", "r"); Your sincerely Emil NOVAK, Slovenia, EU

Re: [PHP] Object Function-call handling in PHP5

2005-09-28 Thread Ondrej Ivanič
Thorsten Suckow-Homberg wrote: In your case the __toString() method would be valuable... Beware! This bugs are related to __toString() method: 31766 Open printf and __toString 34286 Assigned __toString() behavior is inconsistent -- Ondrej Ivanič ([EMAIL PROTECTED]) -- PHP General Mai

Re: [PHP] Array - partical path to the array's path (part 2)

2005-09-28 Thread Scott Fletcher
To the top... Aw!!! This is driving me nut... I can't get it to do what I want it to do... Also, another problem is that we're all not thinking at the same level so I'll just dump the simple code so you all can see what I'm trying to do... [code] function getVal($arr, $path) { $retval

Re: [PHP] Object Function-call handling in PHP5

2005-09-28 Thread Thorsten Suckow-Homberg
This is a toughy I've been working over for a bit. I was wondering if there is a way to cause objects to have certain behaviors when builtin functions are called, or maybe a way of setting, for example, a "primary" string which is used whenever a function requiring a string calls it. Take a look

[PHP] Object Function-call handling in PHP5

2005-09-28 Thread Jake Gardner
This is a toughy I've been working over for a bit. I was wondering if there is a way to cause objects to have certain behaviors when builtin functions are called, or maybe a way of setting, for example, a "primary" string which is used whenever a function requiring a string calls it. IE: Class my

Re: [PHP] mail function-new line-security

2005-09-28 Thread Peppy
AJ, So what your reply means is that I should not have a new line character in any variable on my page??? Then is there any way to format the email so it is readable? Thanks.

[PHP] Re: error when open files

2005-09-28 Thread A.J. Brown
Are you positive the second file exists? If you have access to your logs, you may want to check for an error. Maybe you don't have permission to access the file? You might also try urlencoding the filename before passing it to your function. On a lighter note, If you're using PHP version 4

Re: [PHP] Array Select from database

2005-09-28 Thread A.J. Brown
There is a small bug in your code: [snip] $values = join(', ', $array); $query = "SELECT * FROM client WHERE clientaccountmanager IN ($values)" [/snip] You'll need to surround "$values" with a single quote after joining: [code] $values = join(', ', $array); $query = "SELECT * FROM client WHERE c

Re: [PHP] serializing result sets or what?

2005-09-28 Thread Jake Gardner
"You may download this PECL extension DLL from the PHP Downloads page or at http://snaps.php.net/. Note: On Windows, APC expects c:\tmp to exist, and be writable by the web server." On 9/28/05, Thomas <[EMAIL PROTECTED]> wrote: > Thanks, that looks good. But what do I do if OS is WinDoze? The i

[PHP] array_shift not working?

2005-09-28 Thread Frank Keessen
Hi, Can you please help me with the following This is in the array($info[0]["bdnadvocaat"]) Array ( [count] => 2 [0] => 210 [1] => 149 ) This is the code: $testje=array($info[0]["bdnadvocaat"]); $test=array_shift($testje); print_r($test); This is the output Array ( [count] => 2 [0] => 210 [1]

[PHP] error when open files

2005-09-28 Thread 宋琦
Hi everyone I`m a phper from chinese, I`v got a problem when opening files. In the web server there are two files named A.zip and B.zip, when I open them with "$fp=fopen("http://mysite.com/A.zip","r";);" and "$fp1=fopen("http://mysite.com/B.zip","r";);", the first file was opened correctly but

Re: [PHP] Array Select from database

2005-09-28 Thread Robin Vickery
On 9/28/05, Frank Keessen <[EMAIL PROTECTED]> wrote: > O.K. Again; > I have an array with one or more values, which must be selected in the > database > Array ( [count] => 1 [0] => Array ( [clientaccountmanager] => Array ( > [count] => 2 [0] => 210 [1] => 149 ) > Now i this is my select.. > I've

[PHP] Re: mail function-new line-security

2005-09-28 Thread A.J. Brown
I think you're thinking of "spam injection" through register_globals. If so, yes it is vulnerable. You need to force the variable data to come from the $_POST variable: [code] $name = $_POST['name']; $phone = $_POST['phone']; $user_mail = $_POST['user_mail']; $my_email = $_POST['my_email']; $

Re: [PHP] Array Select from database

2005-09-28 Thread Frank Keessen
O.K. Again; I have an array with one or more values, which must be selected in the database Array ( [count] => 1 [0] => Array ( [clientaccountmanager] => Array ( [count] => 2 [0] => 210 [1] => 149 ) Now i this is my select.. I've got the following Query="select * from client WHERE clientaccountm

[PHP] Re: Array Select from database

2005-09-28 Thread Mark Rees
Array ( [count] => 1 [0] => Array ( [clientaccountmanager] => Array ( [count] => 2 [0] => 210 [1] => 149 ) I've got the following Query="select * from client WHERE clientaccountmanager='$value of array1' OR '$2nd value of array 1'" So that the query loops through the whole array... -

RE: [PHP] Array Select from database

2005-09-28 Thread Jay Blanchard
[snip] Hope you can help me out.. Array ( [count] => 1 [0] => Array ( [clientaccountmanager] => Array ( [count] => 2 [0] => 210 [1] => 149 ) I've got the following Query="select * from client WHERE clientaccountmanager='$value of array1' OR '$2nd value of array 1'" So that the query loops throug

RE: [PHP] IIS/PWS 5 Help

2005-09-28 Thread Jay Blanchard
[snip] I've done everything and can't get PHP to run on IIS/PWS 5 on Windows 2000. If I double click on the PHP file, then the browser opens and displays my PHP script without interpreting it. What am I missing? [/snip] Did you follow the instructions here... http://us3.php.net/manual/en/install.w

[PHP] Array Select from database

2005-09-28 Thread Frank Keessen
Hi All, Hope you can help me out.. Array ( [count] => 1 [0] => Array ( [clientaccountmanager] => Array ( [count] => 2 [0] => 210 [1] => 149 ) I've got the following Query="select * from client WHERE clientaccountmanager='$value of array1' OR '$2nd value of array 1'" So that the query loops throu

RE: [PHP] Web Service Php - Currency Conversion

2005-09-28 Thread Thomas
I have used nusoap and a xmethods service. You can get the ziped files here: http://www.thomash.co.za/uploads/forex/forex.nusoap.zip Hope that helps BTW: also had issues with the PEAR package. T -Original Message- From: Sylvain Gourvil [mailto:[EMAIL PROTECTED] Sent: 28 September 2005

Re: [PHP] Web Service Php - Currency Conversion

2005-09-28 Thread Sylvain Gourvil
Jasper Bryant-Greene wrote: Sylvain Gourvil wrote: I am looking of a webservice whiwh could permit to convert euro price in dollar and uk pounds on my php website ! http://pear.php.net/package/Services_ExchangeRates Thanks for that but there is a bug in installation. It seems to be great

RE: [PHP] serializing result sets or what?

2005-09-28 Thread Thomas
Thanks, that looks good. But what do I do if OS is WinDoze? The install of the pecl only gives a .so *feeling sorry not everything runs on xp* ... I will take the time to benchmark the serializing vs db calls ... is there a good benchmark tool out there (without having to use microtime inside the

Re: [PHP] serializing result sets or what?

2005-09-28 Thread Jasper Bryant-Greene
Thomas wrote: Q: What would be the best way to save db calls for large result sets? I thought about serializing the data and then caching it (with Cache_Lite - maybe there will be a future inclusion of such a caching scheme into the php core or pecl?). I was not sure about performance though (n

[PHP] serializing result sets, or what?

2005-09-28 Thread Thomas
Hi, Having spent a little time on Google (and reading unrelated articles ...) I would like post my question here again (as advice on the list is always very valuable indeed!): Q: What would be the best way to save db calls for large result sets? I thought about serializing the data and then c

[PHP] serializing result sets or what?

2005-09-28 Thread Thomas
Hi, Having spent a little time on Google (and reading unrelated articles ...) I would like post my question here again (as advice on the list is always very valuable indeed!): Q: What would be the best way to save db calls for large result sets? I thought about serializing the data and then c

Re: [PHP] Web Service Php - Currency Conversion

2005-09-28 Thread Jasper Bryant-Greene
Sylvain Gourvil wrote: I am looking of a webservice whiwh could permit to convert euro price in dollar and uk pounds on my php website ! http://pear.php.net/package/Services_ExchangeRates -- Jasper Bryant-Greene Freelance web developer http://jasper.bryant-greene.name/ -- PHP General Mailing

[PHP] Web Service Php - Currency Conversion

2005-09-28 Thread Sylvain Gourvil
Hi all, I am looking of a webservice whiwh could permit to convert euro price in dollar and uk pounds on my php website ! Does somene know one ? Thanks a lot -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] update page n display

2005-09-28 Thread hope
i have a text area on my page. As page is uploaded it displays certain text in it. It has also has a text area with same text that is being displayed above in the page . If user changes this text of text area n presses submit button the page needs to display updated text in the text area and as

Re: [PHP] Two MySQL connections in one script not working as expected

2005-09-28 Thread Robin Vickery
If you make two calls to mysql_connect with the same parameters, the second will not make a new connection - it will return the existing connection. The manual explains this: http://www.php.net/mysql_connect "If a second call is made to mysql_connect() with the same arguments, no new link will b

Re: [PHP] Re: why does this not work?

2005-09-28 Thread Lendy Chen
if (screen.width<1064) { document.write(""); } else { document.write(""); } or use cookie, js write screen.width to cookie,then php read screen.width from cookie. 20