[PHP] HELP TO GET OUT OF PHP MAILING LIST

2005-03-10 Thread Abiodun Akala
Hello everyone, I just need your assistance on how to unsubscribe from PHP mail list. I have tried all the automated approach but no luck. The system keeps rejecting my "unsubscribe" request. I get more than 200 unsolicited mailS on PHP daily that do not mean anything to me because I did not s

[PHP] Re: Using javascript function from php

2005-03-10 Thread b
It's OK I worked it out. On Fri, 11 Mar 2005 15:44:55 +1100, <[EMAIL PROTECTED]> wrote: Hi, I am just learning php, and am currently converting some jsp pages to php. I used the follwing code in jsp to toggle between two images
function toggle(imagename,src1,src2){
if(document.imag

Re: [PHP] PHP help Quotations, Quotations, Quotations

2005-03-10 Thread Stephen Johnson
http://www.php.net/stripslashes On Mar 10, 2005, at 9:17 PM, stg wrote: Hello, I am having a small issue with posting from forms; It goes like such: I have a form in which a user can type in a message and in a hidden text field a link is sent, then in the page the form goes to it sends and ema

[PHP] PHP help Quotations, Quotations, Quotations

2005-03-10 Thread stg
Hello, I am having a small issue with posting from forms; It goes like such: I have a form in which a user can type in a message and in a hidden text field a link is sent, then in the page the form goes to it sends and email to a mailing list with the message and a link underneath botto

[PHP] Using javascript function from php

2005-03-10 Thread b
Hi, I am just learning php, and am currently converting some jsp pages to php. I used the follwing code in jsp to toggle between two images
function toggle(imagename,src1,src2){
if(document.images && document.images[imagename])
{
image1=new Image;

Re: [PHP] warning & question about mysql sessions & concurrency

2005-03-10 Thread Josh Whiting
On Wed, Mar 09, 2005 at 02:52:52PM -0800, Richard Lynch wrote: > > Agreed, initially I thought of that but I also need to use transactions > > in my business logic and MySQL doesn't support nested transactions, so > > I'd have to open a separate connection to the DB to handle the session > > transa

[PHP] free php live chat with visitor/customer script

2005-03-10 Thread p80
I was recently visiting a commercial site and suddunly a window chat popped up and some assistant asked me if I needed some help. I thought this was pretty cool and I was wondering if such a thing existed in php, i know there are lots of php live chat script out there but I'm not sure if they al

[PHP] Re: Imap and attachments

2005-03-10 Thread Jim Plush
here is a script I use to get jpg attachments with IMAP.. good luck from[0]->mailbox."@".$header->from[0]->host.''; return $header->from[0]->mailbox."@".$header->from[0]->host; } function get_structure($mbox,$i) { $structure = imap_fetchstructure($mbox, $i); return $structure; } function no_at

Re: [PHP] Temporary storage of data

2005-03-10 Thread dan
dan wrote: Hello, all - I am building a script that basically records some data on the local server for a period of about one hour. At that time, the data is sent to another server by means of HTTP POST. The problem I'm faced with is how to store the data locally. There are a few things that

[PHP] Temporary storage of data

2005-03-10 Thread dan
Hello, all - I am building a script that basically records some data on the local server for a period of about one hour. At that time, the data is sent to another server by means of HTTP POST. The problem I'm faced with is how to store the data locally. There are a few things that we're going

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
Owkay i fixed it :D. The regexp needed a /s (Pattern Modifier) also so that the "."(DOT) also does newlines :). Now it is fixed... Thank you very much Eli :) /me is happy. THE CODE: --- http://www.php.net/index.php> key=value "; echo 'Normal HTML:'; echo $html; echo ""; $improved_html = preg_

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
Owkay.. i fixed it :). Here is the final code. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] destructor not called for static members?

2005-03-10 Thread Jochem Maas
Richard, OP, Richard Lynch wrote: Richard Lynch wrote: class c2 { private static $_ref; public function __construct() { self::$_ref = new c1(); //$this->_ref = new c1(); } } $obj = new c2(); unset($obj); ?> self::$_ref is completely independent of any instance of that class. c2::$_ref

[PHP] Re: Increase execution time

2005-03-10 Thread Jason Barnett
Jeremy Schreckhise wrote: > How do you increase the execution time in php? > A better question: why is it taking so long to execute? Most web requests should be far less than 360 seconds. Or is this some kind of CLI script??? > > > I have set max_execution_time to 360 and setting set_time_limit

[PHP] Increase execution time

2005-03-10 Thread Jeremy Schreckhise
How do you increase the execution time in php? I have set max_execution_time to 360 and setting set_time_limit(0); nothing works. I still get Fatal Error: maximum execution time of 60 seconds. Please Help.

Re: [PHP] sorting arrays

2005-03-10 Thread Dotan Cohen
On Wed, 9 Mar 2005 15:11:11 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > Any newbie could RTFM and not "get" that when you see: > bool arsort ( array &array [, int sort_flags] ) > > the "bool" up front tells you that the function returns a boolean > (true/false) value. > > That should

[PHP] PHP causes Apache segmentation fault?

2005-03-10 Thread John Swartzentruber
I am running Fedora core3 with Apache 2.0.52 (from default RPMs), MySQL 4.1.10 (from RPMs from MySQL site), and PHP 5.0.3 built from source. I'm going through the PHP manual and trying some of the mysqli examples. The last one I tried didn't work. The problem appears to be this line: $row = $re

Re: [PHP] Re: Question re empty query SOLVED

2005-03-10 Thread Jackson Linux
Hi, Jochem and everyone This: On 10 Mar 2005, at 15:23, Jochem Maas wrote: if (!isset($_GET['r']) || empty($_GET['r']) || !($r = intval($_GET['r']))) { // show a list of R's include('showlist.inc.php'); } else { // process an R include('process.inc.php'); } Solved my issue entirely, as did Jo

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Ross Becker
Incorrect. Setup now: Server A: Authenticates User SSL -> runs PHP -> runs SSH [EMAIL PROTECTED] Server B: Authenticates user SSH -> runs command "su" is not involved, and has not been involved- I stated in my original post, and in my last reply to you that it was only used in order for me to

Re: [PHP] destructor not called for static members?

2005-03-10 Thread Richard Lynch
> Richard Lynch wrote: >class c1 { >>> public function __destruct() { >>> echo '__destruct'; >>> } >>>} >>> >>>class c2 { >>> private static $_ref; >>> >>> public function __construct() { >>> self::$_ref = new c1(); >>> >>> //$this->_ref = new c1(); >>> } >>>} >>> >>>$ob

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Richard Lynch
>I'm really not sure what you're asking here. I've created a limited > access user account on a remote host so that I can kick off some things > on the remote host by hitting a web page. Access to the web page is > protected via SSL and user authentication. The things which are > executed on

Re: [PHP] incrementing a number from a text file

2005-03-10 Thread Richard Lynch
> I want to read a number from an external (txt) file and increment it.then > save the number back on the text file. > I know this is possible but want a simple amd economical way to do this. That's what you *THINK* you want to do :-) But what happens when *TWO* users hit that same script at exac

Re: [PHP] destructor not called for static members?

2005-03-10 Thread Jochem Maas
Richard Lynch wrote: class c2 { private static $_ref; public function __construct() { self::$_ref = new c1(); //$this->_ref = new c1(); } } $obj = new c2(); unset($obj); ?> i thought this should display __destruct in both cases from c2::__construct, but only the one with non static

Re: [PHP] PHP 5.0.3 and base64 encoded cookie value issue?

2005-03-10 Thread Richard Lynch
> OK, after a little more closer examination, it does > appear that the 'urlencode' is being used. I did the > encode/decode thingy. BUT, the only character that is > being messed up (at least the ones I had) appears to > be '+'. This (and following) should make it pretty clear that PHP is doing

Re: [PHP] `ls -l /` does not reproduce same info than when executed in bash.

2005-03-10 Thread Hans Deragon
Richard Lynch wrote: BASH --- lrwxrwxrwx1 rootroot 28 Mar 3 07:25 app -> /afs/sunrise.ericsson.se/app drwxr-xr-x2 rootroot 0 Mar 7 13:06 apps lrwxrwxrwx1 rootroot 24 Mar 7 14:11 archives -> PHP -

[PHP] Re: how to verify image and not http error is returned to browser

2005-03-10 Thread Jason Barnett
Cindy Reeves wrote: ... > > I don't trust their server will always be up/respond, so I want to use a PHP > function to determine whether a GIF has been returned (oppsed to an HTTP > error) before sending it to the browser. Any recommendations how to do this? > Several ways to skin this cat. cURL

RE: [PHP] destructor not called for static members?

2005-03-10 Thread Richard Lynch
> class c1 { >public function __destruct() { > echo '__destruct'; >} > } > > class c2 { >private static $_ref; > >public function __construct() { > self::$_ref = new c1(); > > //$this->_ref = new c1(); >} > } > > $obj = new c2(); > unset($obj); > ?> > > i though

[PHP] how to verify image and not http error is returned to browser

2005-03-10 Thread Cindy Reeves
Hi. I want to include an image on my home page that is dynamically created from another website. The source code on a typical HTML page would be http://www.othersite.com/returnedimage.aspx";> I don't trust their server will always be up/respond, so I want to use a PHP function to determine whether

Re: [PHP] `ls -l /` does not reproduce same info than when executed in bash.

2005-03-10 Thread Hans Deragon
Rory Browne wrote: Perhaps Jay has a point, but I don't think so. To confirm this, you can probably check some variable in phpinfo, or you can run 'whoami'. How are you running ls -ld? system? exec? Try backticks or shell_exec(). Tried popen() and backticks. I do not think that the other functions

[PHP] Imap and attachments

2005-03-10 Thread Evert | Rooftop Solutions
Hi, I started using the IMAP functions and ran into a problem with some headers for attachments. The first one is: Content-type: image/psd; x-unix-mode=0644; name=FinalVersion6.psd Content-transfer-encoding: base64 Content-disposition: inline; filename=FinalVersion6.psd Generated by Mac Mail. The

Re: [PHP] `ls -l /` does not reproduce same info than when executed in bash.

2005-03-10 Thread Richard Lynch
> BASH --- > lrwxrwxrwx1 rootroot 28 Mar 3 07:25 app -> > /afs/sunrise.ericsson.se/app > drwxr-xr-x2 rootroot 0 Mar 7 13:06 apps > lrwxrwxrwx1 rootroot 24 Mar 7 14:11 archives -> > PHP --

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Ross Becker
Richard, I'm really not sure what you're asking here. I've created a limited access user account on a remote host so that I can kick off some things on the remote host by hitting a web page. Access to the web page is protected via SSL and user authentication. The things which are executed

Re: [PHP] PHP Fedora rpm on RedHat9

2005-03-10 Thread Richard Lynch
> can I install rpm for Fedora on RedHat9 server? I suppose those are > almost similar systems. I sure wouldn't count on it working, at all. Do a backup first, just in case. If RPM has any brains at all, it won't let you do that, or at least require you to use --force to over-ride it and tell it

Re: [PHP] howto kill proc stream after X seconds

2005-03-10 Thread Richard Lynch
> $process = proc_open(''ssh somehost someremotecommand';', $spec, $pipes); If you have any control at all over that other server, just set up a password-protected web page *THERE* to run the process (known technology) and then use cURL to access it (known technology) and call it done. Beating yo

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jochem Maas
Jackson Linux wrote: all you need is 1 if (or if/else) statement, note that my example is the logical reverse of the first if statement I posted (in reply to your question): if (!isset($_GET['r']) || empty($_GET['r']) || !($r = intval($_GET['r']))) { // _GET['r'] is either not set, empty or

Re: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Richard Lynch
> I actually do care about the return code from the program, as well as > knowing that the program executed and completed successfully, so > background execution is not a valid option. > > I tried using system("ssh [EMAIL PROTECTED] mycommand > /dev/null 2>&1") and > got > the same results. > > Yo

RE: [PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Chris W. Parker
Ross Becker on Thursday, March 10, 2005 11:50 AM said: ugh: top posting. ugh ugh: no trimming! oy vey! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Ross Becker
I actually do care about the return code from the program, as well as knowing that the program executed and completed successfully, so background execution is not a valid option. I tried using system("ssh [EMAIL PROTECTED] mycommand > /dev/null 2>&1") and got the same results. You are correct

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Jamie Alessio
There is no output to stderr or stdout from the script being executed. All I care about are the side-effects of running this remote program. If something fails, a numeric error-code will be returned. Ross, Since you don't care about the output from the program can you start the process in the b

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Ross Becker
There is no output to stderr or stdout from the script being executed. All I care about are the side-effects of running this remote program. If something fails, a numeric error-code will be returned. I have tried this using: system(), shell_exec() - same as backtick operator, and popen(). I ha

[PHP] Re: PHP hangs when exec'ing SSH

2005-03-10 Thread Jamie Alessio
I'm attempting to execute some things on remote servers using ssh, using a strictly limited account created for this express purpose. I set up passwordless key authentication from the user the web server runs as to the limited account on the remote server. I wrote some PHP code which calls: sys

Fwd: [PHP] `ls -l /` does not reproduce same info than when executed in bash.

2005-03-10 Thread Rory Browne
Forwarding to list - forgot to cc. -- Forwarded message -- From: Rory Browne <[EMAIL PROTECTED]> Date: Thu, 10 Mar 2005 18:50:41 + Subject: Re: [PHP] `ls -l /` does not reproduce same info than when executed in bash. To: Hans Deragon <[EMAIL PROTECTED]> Perhaps Jay has a point

[PHP] Re: Best way to validate a date

2005-03-10 Thread Jamie Alessio
I'm looking to validate a date submitted through a form and I cannot decide which would be the best way to do it. The form of the date needs to be: -MM-DD. At the moment I'm torn between using a regex, something like: 20[\d][\d]-[0-1][\d]-[0-3][\d] or using the checkdate() function. Does anyon

Re: [PHP] PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
"Jason Petersen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Thu, 10 Mar 2005 00:18:05 +0100, BlackDex <[EMAIL PROTECTED]> wrote: >> Hello ppl, >> >> I have a question about regex and html parsing. >> >> I have the following code: >> --- >> > style='font-size:12.0pt;font-fami

[PHP] howto kill proc stream after X seconds

2005-03-10 Thread Michael Caplan
Hi, I am struggling to find a way to kill a proc_open() stream if it remains idle (hangs). Specifically, I am opening an SSH connection up and running a remote command - all from a PHP script run from the shell. Under the rare circumstance that my passwordless authentication fails (ie: it sit

Re: [PHP] Working with 3 arrays

2005-03-10 Thread Steve Slater
If you are certain that your keys are the same for each array, you can reference them by using the key as in foreach ($fields as $key=>$value) { $a = $fields[$key]; $b = $types[$key]; etc... } Steve I need to work with 3 different arrays where I get the value of the same key for all 3 (proba

Re: [PHP] mysql query update two table in one?

2005-03-10 Thread Christian Heinrich
Tyler Replogle schrieb: Can you update two tables in one mysql query i've got these two queries $db->query("update `dbn_members_counters` set views =(views +1) where id = '$this->id' "); $db->query("update `dbn_members` set lastaction = $conf->site_time, page = '$this->page' where id = '$this->i

Re: [PHP] PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread Jason Petersen
On Thu, 10 Mar 2005 00:18:05 +0100, BlackDex <[EMAIL PROTECTED]> wrote: > Hello ppl, > > I have a question about regex and html parsing. > > I have the following code: > --- > style='font-size:12.0pt;font-family:"Comic Sans MS"'>  I'm guessing that you're writing a function to parse "HTML" that

[PHP] PHP Fedora rpm on RedHat9

2005-03-10 Thread Bronislav Klucka
Hi, can I install rpm for Fedora on RedHat9 server? I suppose those are almost similar systems. Brona -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] `ls -l /` does not reproduce same info than when executed in bash.

2005-03-10 Thread Hans Deragon
Jay Blanchard wrote: [snip] I did "su - apache" to switch to the same user under which the Apache server is running and tried the "ls -ld /" under bash, and it worked fine. Thus the server's has all the permissions to read the root directory. Yet PHP does not seam to have these permis

RE: [PHP] PHP5.0.3-3 on RedHat

2005-03-10 Thread Chris W. Parker
Kim Madsen on Thursday, March 10, 2005 12:52 AM said: > I´m using a shell script and just add the php-version whenever I need > to upgrade, then _all_ my extensions are included and I can easily > add new ones or remove unsued/unsage ones. Depending on the download >

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jackson Linux
On 10 Mar 2005, at 07:38, Jochem Maas wrote: Jackson Linux wrote: Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, at 13:44, Jochem Ma

[PHP] `ls -l /` does not reproduce same info than when executed in bash.

2005-03-10 Thread Hans Deragon
Greetings. When running "ls -ld /" under bash, I get a normal directory output. However, when I run `ls -ld /` under php (running under Apache 2.0.52), I get many entries with "?" in their fields and permissions all closed. What causes this? I did "su - apache" to switch to the same user

RE: [PHP] `ls -l /` does not reproduce same info than when executed in bash.

2005-03-10 Thread Jay Blanchard
[snip] I did "su - apache" to switch to the same user under which the Apache server is running and tried the "ls -ld /" under bash, and it worked fine. Thus the server's has all the permissions to read the root directory. Yet PHP does not seam to have these permissions. [/snip] Good

Re: [PHP] Re: Working with 3 arrays

2005-03-10 Thread Robert Sossomon
$fields = $_POST[field]; foreach ($fields as $field) { $currentType = next($type); $currentChar = next($char); // Do the stuff } Thanks!! I knew I was missing something simple in doing this! Robert -- Robert Sossomon, Business and Technology Application Technician 4-H Youth Development Department

[PHP] `ls -l /` does not reproduce same info than when executed in bash.

2005-03-10 Thread Hans Deragon
Greetings. When running "ls -ld /" under bash, I get a normal directory output. However, when I run `ls -ld /` under php (running under Apache 2.0.52), I get many entries with "?" in their fields and permissions all closed. What causes this? I did "su - apache" to switch to the same user

[PHP] Re: Working with 3 arrays

2005-03-10 Thread M. Sokolewicz
Robert Sossomon wrote: I need to work with 3 different arrays where I get the value of the same key for all 3 (probably a term for this one). The three arrays are: field[] type[] char[] and each will be assigned via another form. What will happen is at the end of the form I want to be able to pul

[PHP] Working with 3 arrays

2005-03-10 Thread Robert Sossomon
I need to work with 3 different arrays where I get the value of the same key for all 3 (probably a term for this one). The three arrays are: field[] type[] char[] and each will be assigned via another form. What will happen is at the end of the form I want to be able to pull field[0] type[0] char

RE: [PHP] Need help with file permissions for PHP files

2005-03-10 Thread Jay Blanchard
[snip] I think you have to face facts. There is no way you're going to have your code secure against other users so long as it has to be readable by apache. One _PARTIAL_ solution: If like most linux distros, you have a group called users, which contains every human user on the system, but doesn't

Re: [PHP] destructor not called for static members?

2005-03-10 Thread M. Sokolewicz
Jochem Maas wrote: Robert Janeczek wrote: [EMAIL PROTECTED] wrote: Hi It is an expected behavior because when you define a static variableit is shared by all objects of the same class. If When you unset one object and the destruct of the static object will be called, all the other objects will l

Re: [PHP] Need help with file permissions for PHP files

2005-03-10 Thread John Nichel
Kresimir Cosic wrote: Additional information (if that helps): The website is located in directory home/vriho/public_html/ The mysql database is in home/vriho/db/mysql/ (not shared to other users) The local socket file for mysql is at home/vriho/db/socket/ The parts of website that are "hidden", in

RE: [PHP] Need help with file permissions for PHP files

2005-03-10 Thread Jay Blanchard
[snip] The problem is that, in order for PHP to be able to access *.php files, the files must in a directory with execute permission, and files themselves must have read permission. This makes my files open to reading by anyone, that is, anyone can look at my PHP source code, which I do not wan

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
Thx... it works almost :P I Changed the code a bit so you can see the results quicker :). It doesn't change every attribute/value. I think this has to do something with the opening and closing of a tag <>. My code: --- http://www.php.net/index.php> key=value "; echo 'Normal HTML:'; echo $html;

[PHP] Need help with file permissions for PHP files

2005-03-10 Thread Kresimir Cosic
Hi! I am running a website on server where I am not administrator, and there are other users of the same machine. The machine is linux running Apache. The website is written in PHP. The problem is that, in order for PHP to be able to access *.php files, the files must in a directory with execut

Re: [PHP] PHP 5.0.3 and base64 encoded cookie value issue?

2005-03-10 Thread Jochem Maas
don't forget that there is also: rawurlencode() and rawurldecode() possible php is using these internally instead? Pink Floyd wrote: OK, after a little more closer examination, it does appear that the 'urlencode' is being used. I did the encode/decode thingy. BUT, the only character that is being m

Re: [PHP] Re: Question re empty query

2005-03-10 Thread Jochem Maas
Jackson Linux wrote: Okay, guys, I hope I'm getting closer with your help here but I am still highly confused (that's actually a general blanket statement these days). I've taken your advice and made several changes, On 9 Mar 2005, at 13:44, Jochem Maas wrote: M. Sokolewicz wrote: Jackson Linux

Re: [PHP] destructor not called for static members?

2005-03-10 Thread Jochem Maas
Robert Janeczek wrote: [EMAIL PROTECTED] wrote: Hi It is an expected behavior because when you define a static variableit is shared by all objects of the same class. If When you unset one object and the destruct of the static object will be called, all the other objects will lose the static var

Re: [PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread Jochem Maas
Eli wrote: BlackDex wrote: Hello ppl, I have a question about regex and html parsing. I have the following code: --- style='font-size:12.0pt;font-family:"Comic Sans MS"'>  you realise that that HTML ammounts the to the display of a SINGLE space!!! that what I call progress... 144+ bytes to displ

Re: [PHP] PHP5.0.3-3 on RedHat

2005-03-10 Thread Bauglir
Yeah, well I've tried to do it, but i was not able to configure it with additional modules, I do not konw, what was wrong... It's beyond my knowledges... That's why I'm looking for RPM... Oiii, drop the rpm and install it from source instead. RPMs are easy to install, but it sometimes takes _ag

Re: [PHP] destructor not called for static members?

2005-03-10 Thread Robert Janeczek
[EMAIL PROTECTED] wrote: Hi It is an expected behavior because when you define a static variableit is shared by all objects of the same class. If When you unset one object and the destruct of the static object will be called, all the other objects will lose the static var as well. yes, but why d

RE: [PHP] destructor not called for static members?

2005-03-10 Thread YaronKh
Hi It is an expected behavior because when you define a static variable it is shared by all objects of the same class. If When you unset one object and the destruct of the static object will be called, all the other objects will lose the static var as well. Hope I've helped yaron -Origi

[PHP] destructor not called for static members?

2005-03-10 Thread Robert Janeczek
am i missing something or destructor isn`t called for objects that are assigned to static fields in other objects? here is some example code: class c1 { public function __destruct() { echo '__destruct'; } } class c2 { private static $_ref; public function __construct() { self::$_

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread Eli
Sorry for the spam.. here it is: function tag_rep($tag) { return preg_replace('/(? } $html="http://www.php.net/index.php> key=value "; $improved_html=preg_replace('/\<(.*)\>/Ue','"<".tag_rep("\1").">"',$html); echo str_replace("\\'","'",$improved_html); ?> :) -- PHP General Mailing List (htt

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread Eli
Yup.. that was a good point.. ;) Take a look at this example: function tag_rep($tag) { return reg_replace('/(? } $html="http://www.php.net/index.php> key=value "; $improved_html=preg_replace('/\<(.*)\>/Ue','"<".tag_rep("\1").">"',$html); echo str_replace("\'","'",$improved_html); ?> -- PHP

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
"Eli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Eli wrote: >> >> Try: >> >> preg_replace('/(?<=\<)([^>]*)(\w+)=(?\s]+)(?=\s|\>)([^<]*)(?=\>)/U','\1\2="\3"\4',$html); >> Hmm.. that could be a >> start.. and don't ask me how it works... :P > > Well.. problem with that, is that

[PHP] Re: PHP RegExp and HTML tags attributes values etc...

2005-03-10 Thread BlackDex
"Eli" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Eli wrote: >> >> Try: >> >> preg_replace('/(?<=\<)([^>]*)(\w+)=(?\s]+)(?=\s|\>)([^<]*)(?=\>)/U','\1\2="\3"\4',$html); >> Hmm.. that could be a >> start.. and don't ask me how it works... :P > > Well.. problem with that, is that

RE: [PHP] PHP5.0.3-3 on RedHat

2005-03-10 Thread Kim Madsen
-Original Message- From: Bronislav Klucka [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 6:23 PM > does anybody have PHP5.0.3-3 rpms files for RH9? I also need imap, > openssl, curl, etc. :) > I'm looking every day on internet, but I cannot find it. Oiii, drop the rpm and i

[PHP] mysql query update two table in one?

2005-03-10 Thread Tyler Replogle
Can you update two tables in one mysql query i've got these two queries $db->query("update `dbn_members_counters` set views =(views +1) where id = '$this->id' "); $db->query("update `dbn_members` set lastaction = $conf->site_time, page = '$this->page' where id = '$this->id' "); and i was wonder