php-general Digest 20 Dec 2007 10:25:54 -0000 Issue 5191

2007-12-20 Thread php-general-digest-help
php-general Digest 20 Dec 2007 10:25:54 - Issue 5191 Topics (messages 266123 through 266144): Re: Change case of HTML tags 266123 by: Daniel Brown 266124 by: Jim Lucas 266125 by: Daniel Brown Re: About PHP Implements 266126 by: Chris building PHP5.2.5 on

[PHP] Chisimba Release

2007-12-20 Thread Paul Scott
The next release of the Chisimba PHP5 framework is now available. Major enhancements included in this release are: - Better APC support - Improved database performance - Bug fixes - Better code documentation - XML-RPC API for Video conversions module - XML-RPC API for the Active Dynamic

[PHP] about __get,__set Overloading, read-only properties

2007-12-20 Thread ked
Hi. all , I got a article from php 5.0 manual's comments. It's useful, offer readonly properties for classes. (look at the end of this message for the article ) find out function __construct(), I want to modify $this-id in it , then I got a readonly Exception (defined in __set function).

Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?

2007-12-20 Thread Per Jessen
René Fournier wrote: I'm really not sure what to try next. ps -aux shows MySQL as hogging the CPU, not PHP or Terminal: When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's doing. /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Re: Assign variable to a block of html code

2007-12-20 Thread Darren Whitlen
php mail wrote: Hi All, Is it possible to assign variable to a block of html code ? Something like this : $myblokvar = table width=487 border=0 cellspacing=0 cellpadding=0 tr tdtable width=487 border=0 cellspacing=0 cellpadding=0 tr tdimg src=images/bartitle_login.gif

Re: [PHP] Assign variable to a block of html code

2007-12-20 Thread Darren Whitlen
Xavier de Lapeyre wrote: You should try the HEREDOC structure. See link: http://php.net/heredoc It should look to something like: $myblokvar = EOF table blabla tr td Welcome $name to this website! /td /tr /table EOF; Xavier, You should test this

Re: [PHP] Assign variable to a block of html code

2007-12-20 Thread Peter Ford
You could just swap all the double quotes in the HTML tags for single quotes - that would work in this instance... $myblokvar = table width='487' border='0' cellspacing='0' cellpadding='0' ... /table ; Or perhaps a HereDoc syntax: $myblokvar = EndOfMyHTMLBlock table width=487 border=0

Re: [PHP] Just to confirm...

2007-12-20 Thread Richard Heyes
Bah! You're right, I changed it to just be an easter egg in the code. The original (now commented out) was: ? if(stristr($_SERVER['HTTP_USER_AGENT'],msie)) { die(No friend of Internet Exploder is a friend of mine.); } ? It initially started to try to stop cURL, wget,

[PHP] Footnote Class

2007-12-20 Thread OOzy Pal
Hello, I am looking for class the do footnote like: Then the above is transformed as Lorem [1] diam nonummy ___ 1 FOOTNOTE -- OOzy Ubuntu-Gutsy (7.10) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Change case of HTML tags

2007-12-20 Thread Stut
Jim Lucas wrote: Daniel Brown wrote: On Dec 19, 2007 4:10 PM, Christoph Boget [EMAIL PROTECTED] wrote: I've been looking through the docs but haven't found an internal function that does what I'm looking for. Perhaps I missed it? Or perhaps someone can point me in the right direction? I'm

[PHP] PHP 4.4.8RC1

2007-12-20 Thread Derick Rethans
Hello! I packed PHP 4.4.8RC1 today, which you can find here: http://downloads.php.net/derick/ Please test it carefully, and report any bugs in the bug system, but only if you have a short reproducable test case. If everything goes well, we can release it somewhere in the first week of 2008.

[PHP] Re: [PHP-DEV] PHP 4.4.8RC1

2007-12-20 Thread Marcus Boerger
Hello Derick, to stick with our announced plan, can we release this in 2007? marcus Thursday, December 20, 2007, 1:43:18 PM, you wrote: Hello! I packed PHP 4.4.8RC1 today, which you can find here: http://downloads.php.net/derick/ Please test it carefully, and report any bugs in the bug

[PHP] Re: [PHP-DEV] PHP 4.4.8RC1

2007-12-20 Thread Derick Rethans
On Thu, 20 Dec 2007, Marcus Boerger wrote: Hello Derick, to stick with our announced plan, can we release this in 2007? That would be exactly in one week, on the 27th then. I prefer doing it just in the new year cause all the sysadms are back to work then. I think Jan 3rd is still

Re: [PHP] Change case of HTML tags

2007-12-20 Thread Christoph
If you're using PHP5, you can use the tidy functions - http://us2.php.net/tidy. The default settings output html tags in lower-case. For tidy config settings, see http://tidy.sourceforge.net/docs/quickref.html Awesome! This is exactly what I was looking for. Thank you very much! :) thnx,

Re: [PHP] Which file called the function?

2007-12-20 Thread Christoph Boget
I believe __FILE__ is resolved at compile time, not run-time which means what you're seeing is expected behavior. I'm not sure how you'd get the name of the file that a function call was made from. Could you explain why you need this information in your application, and perhaps someone

Re: [PHP] Which file called the function?

2007-12-20 Thread Stut
Christoph Boget wrote: I believe __FILE__ is resolved at compile time, not run-time which means what you're seeing is expected behavior. I'm not sure how you'd get the name of the file that a function call was made from. Could you explain why you need this information in your application,

Re: [PHP] Which file called the function?

2007-12-20 Thread Jochem Maas
Christoph Boget schreef: I believe __FILE__ is resolved at compile time, not run-time which means what you're seeing is expected behavior. I'm not sure how you'd get the name of the file that a function call was made from. Could you explain why you need this information in your

Re: [PHP] Which file called the function?

2007-12-20 Thread Daniel Brown
On Dec 20, 2007 9:47 AM, Christoph Boget [EMAIL PROTECTED] wrote: [snip!] I need it primarily for debugging purposes. I've got a single function that's called by several files. And instead of modifying all the files calling the function to add logging, it would be nice to just modify the

Re: [PHP] Which file called the function?

2007-12-20 Thread Nilesh Ashra
On 20 Dec 2007, at 14:37, Christoph Boget wrote: Let's say I have the following 3 files global.php ? function myFunc() { echo __FILE__; } ? one.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(); ? two.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(); ?

[PHP] Which file called the function?

2007-12-20 Thread Christoph Boget
Let's say I have the following 3 files global.php ? function myFunc() { echo __FILE__; } ? one.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(); ? two.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(); ? In each case, what is echoed out for

Re: [PHP] Re: php sockets

2007-12-20 Thread vixle
well i mean even if we would not consider that particular piece of code as an example of the code that i have issues with im still rather interesting if theres some different between the socket model used by say, c++(winsock in my case) and the sockets used in php because when made a simple c++

Re: [PHP] Assign variable to a block of html code

2007-12-20 Thread Daniel Brown
On Dec 19, 2007 10:38 PM, php mail [EMAIL PROTECTED] wrote: Hi All, Is it possible to assign variable to a block of html code ? Something like this : $myblokvar = table width=487 border=0 cellspacing=0 cellpadding=0 tr tdtable width=487 border=0 cellspacing=0 cellpadding=0

Re: [PHP] Change case of HTML tags

2007-12-20 Thread Arvids Godjuks
In preg_replace case need's to be done like this: $s = preg_replace('/(\.*\)/Uem', 'strtolower($1)', $s);

[PHP] Re: Which file called the function?

2007-12-20 Thread Shawn McKenzie
This should work: global.php ? function myFunc($file) { echo $file; } ? one.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(__FILE__); ? two.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(__FILE__); ? Christoph Boget wrote: Let's say I have the

[PHP] HTML parser (maybe even HTML to BBCode)

2007-12-20 Thread Arvids Godjuks
Hi! I'm looking for fast HTML parser, witch can give me a tree of tags with their attributes. Maybe some one know a good HTML to BBCode parser, because that's exactly what i need. tried looking Google, doesn't helped much, still need to make a HTML to BBCode parser myself.

Re: [PHP] Just to confirm...

2007-12-20 Thread Daniel Brown
On Dec 20, 2007 5:25 AM, Richard Heyes [EMAIL PROTECTED] wrote: Bah! You're right, I changed it to just be an easter egg in the code. The original (now commented out) was: ? if(stristr($_SERVER['HTTP_USER_AGENT'],msie)) { die(No friend of Internet Exploder is a friend

Re: [PHP] HTML parser (maybe even HTML to BBCode)

2007-12-20 Thread Daniel Brown
On Dec 20, 2007 10:30 AM, Arvids Godjuks [EMAIL PROTECTED] wrote: Hi! I'm looking for fast HTML parser, witch can give me a tree of tags with their attributes. Maybe some one know a good HTML to BBCode parser, because that's exactly what i need. tried looking Google, doesn't helped much,

[PHP] MySQL to blame? (was Re: [PHP] Command-line PHP script CPU usage goes sky-high, stays there--why?)

2007-12-20 Thread M5
On 20-Dec-07, at 1:17 AM, Per Jessen wrote: René Fournier wrote: I'm really not sure what to try next. ps -aux shows MySQL as hogging the CPU, not PHP or Terminal: When this happens, do a 'SHOW PROCESSLIST' in mysql to see what it's doing. I have, and I can't see anything unusual. There

Re: [PHP] HTML parser (maybe even HTML to BBCode)

2007-12-20 Thread Arvids Godjuks
I saw it, it only converts BBCode to HTML. BBCode to HTML isn't a problem - a child can do that with str_replace and a little help of preg_replace for links and images. The trick is that i need a HTML to BBCode parser. 2007/12/20, Daniel Brown [EMAIL PROTECTED]: On Dec 20, 2007 10:30 AM,

[PHP] Is there any Open Source Mailing List Manager that works good

2007-12-20 Thread srihari naidu
Hi, I am searching for a good open source php mailing list manager for some days. can any one suggest me one please. Thanks in advance. Regards, Sri. - Looking for last minute shopping deals? Find them fast with Yahoo! Search.

Re: [PHP] Is there any Open Source Mailing List Manager that works good

2007-12-20 Thread Stut
srihari naidu wrote: I am searching for a good open source php mailing list manager for some days. can any one suggest me one please. Why PHP? Mailman is way better than anything out there in PHP. I've used PHPList (phplist.com) before, and it didn't suck too much, but I'd still take

[PHP] Best way to allow users to post youtube video links ?

2007-12-20 Thread Don Don
I want to allow people to be able to post links to videos on youtube. I've implemented it in a certain way by allowing them to copy the embed tag into a textarea and then submit the form. I pick up the form data, validate and display on the site. Is there any better way to do this or php

Re: [PHP] Is there any Open Source Mailing List Manager that works good

2007-12-20 Thread Don Don
phplist. its awesome, opensource and will support all your needs. srihari naidu [EMAIL PROTECTED] wrote: Hi, I am searching for a good open source php mailing list manager for some days. can any one suggest me one please. Thanks in advance. Regards, Sri.

Re: [PHP] Re: php sockets

2007-12-20 Thread Jim Lucas
vixle wrote: well i mean even if we would not consider that particular piece of code as an example of the code that i have issues with im still rather interesting if theres some different between the socket model used by say, c++(winsock in my case) and the sockets used in php because when

Re: [PHP] Opinion about the using $GLOBALS directly

2007-12-20 Thread Sancar Saran
Hello All, Thanks for joining the conversation. It seems there where no real technical dead end for using $GLOBALS directly. Using $GLOBALS directly very similar to coding standarts. It just up to you. Also I try explain my enviroment a liddle bit. First of all my function declarationgs gonna

Re: [PHP] Best way to allow users to post youtube video links ?

2007-12-20 Thread TG
Just a thought.. it might be better to control the output a little more. I assume if you're letting them submit the embed code that you're turning around and just displaying what they posted. It might be easier for the user and more secure if you have them submit either the full youtube URL:

[PHP] Why I sart getting Fatal error: Allowed memory size... after php upgrade?

2007-12-20 Thread afan pasalic
The hosting company I have one account (and several Add Domains) upgraded php on the server from 4.4.7 to 5.2.5. After the upgrade I start getting the error message: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 122880 bytes) in... on domains they use Gallery2 or

[PHP] PGCon 2008 - call for papers

2007-12-20 Thread Dan Langille
Hello folks, PGCon 2008 will be held 22-23 May 2008, in Ottawa at the University of Ottawa. It will be preceded by two days of tutorials on 20-21 May 2008. We are now requesting proposals for presentations. If you are doing something interesting with PostgreSQL, please submit a proposal. You

Re: [PHP] Why I sart getting Fatal error: Allowed memory size... after php upgrade?

2007-12-20 Thread Stephen Johnson
It sounds to me like the allowed memory size went back to the default after they upgraded php. I usually have to update some of my config files after an upgrade. Nothing seems strange to me here... But maybe I am missing something. I'm going to edit php.ini though what if client doesn't have

Re: [PHP] Which file called the function?

2007-12-20 Thread Richard Lynch
On Thu, December 20, 2007 8:37 am, Christoph Boget wrote: Let's say I have the following 3 files global.php ? function myFunc() { echo __FILE__; } ? one.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(); ? two.php ? include( 'global.php' ); echo 'You

Re: [PHP] building PHP5.2.5 on Mac OS X Leopard (anyone know how to build a just an extension)

2007-12-20 Thread Frank Arensmeier
20 dec 2007 kl. 00.55 skrev Jochem Maas: hi guys, well having tried for countless hours to build php on leopard I pretty much gave up. that's too bad... apparently it's pretty much impossible unless your name is Marc Liyanage (entropy.ch) ... the problem lies with the fact that you

Re: [PHP] Profiling PHP App

2007-12-20 Thread Richard Lynch
On Wed, December 19, 2007 10:21 pm, php mail wrote: Is there any tool to profiling PHP app ? Compile PHP --with-debug and then use: valgrind --tool=callgrind php -q yourscript.php You get a nifty fabulous listing of where X% of your time is being spent and a really cool diagram of your

Re: [PHP] Why I sart getting Fatal error: Allowed memory size... after php upgrade?

2007-12-20 Thread afan pasalic
Richard Lynch wrote: On Thu, December 20, 2007 11:37 am, afan pasalic wrote: The hosting company I have one account (and several Add Domains) upgraded php on the server from 4.4.7 to 5.2.5. After the upgrade I start getting the error message: Fatal error: Allowed memory size of 8388608 bytes

Re: [PHP] Using require instead of redirect architecture

2007-12-20 Thread Richard Lynch
On Wed, December 19, 2007 1:37 pm, Robert Erbaron wrote: Problems: - hitting back on p2.php shows the dreaded The page you are trying to view contains POST... If you dread seeing this, then play pinball with the user... -- OK and Cancel both generated unsatisfactory results Unsatisfactory

Re: [PHP] building PHP5.2.5 on Mac OS X Leopard (anyone know how to build a just an extension)

2007-12-20 Thread Richard Lynch
./configure --with-interbase should build the interbase extension, as well as a PHP binary that you don't want. Then just copy the interbase.so thingie over, and Bob's your uncle. You might need some stuff from Marc's configure line to convince it to compile the extension in 64-bit mode, but

Re: [PHP] Ham marked as Spam with BAYES_99 - PhpMailer to old?

2007-12-20 Thread Merlin Morgenstern
Richard Lynch schrieb: On Tue, December 18, 2007 8:41 am, Merlin Morgenstern wrote: I am running a small community page with PHP. Members can select notification e-mails on comments etc. Since today those e-mails - or basically all e-mails from the system - get taged as spam with a score of

Re: [PHP] Why I sart getting Fatal error: Allowed memory size... after php upgrade?

2007-12-20 Thread afan pasalic
Stephen Johnson wrote: It sounds to me like the allowed memory size went back to the default after they upgraded php. I usually have to update some of my config files after an upgrade. Nothing seems strange to me here... But maybe I am missing something. I'm going to edit php.ini

Re: [PHP] building PHP5.2.5 on Mac OS X Leopard (anyone know how to build a just an extension)

2007-12-20 Thread Daniel Brown
On Dec 20, 2007 2:30 PM, Richard Lynch [EMAIL PROTECTED] wrote: ./configure --with-interbase should build the interbase extension, as well as a PHP binary that you don't want. Then just copy the interbase.so thingie over, and Bob's your uncle. I don't know who Bob is, but it should also

Re: [PHP] Opinion about the using $GLOBALS directly

2007-12-20 Thread Richard Lynch
On Wed, December 19, 2007 11:22 am, Stut wrote: well, if you have a long and complex function declaration which begins with global $whatever, and then all over the function $whatever is used, some dozens of lines later when looking for something in the code you might not have any idea that

RE: [PHP] Which file called the function?

2007-12-20 Thread George Pitcher
On Thu, December 20, 2007 8:37 am, Christoph Boget wrote: Let's say I have the following 3 files global.php ? function myFunc() { echo __FILE__; } ? one.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(); ? two.php ? include( 'global.php'

Re: [PHP] HTML parser (maybe even HTML to BBCode)

2007-12-20 Thread Richard Lynch
On Thu, December 20, 2007 9:30 am, Arvids Godjuks wrote: Hi! I'm looking for fast HTML parser, witch can give me a tree of tags with their attributes. Maybe some one know a good HTML to BBCode parser, because that's exactly what i need. tried looking Google, doesn't helped much, still need

Re: [PHP] Why I sart getting Fatal error: Allowed memory size... after php upgrade?

2007-12-20 Thread Richard Lynch
On Thu, December 20, 2007 11:37 am, afan pasalic wrote: The hosting company I have one account (and several Add Domains) upgraded php on the server from 4.4.7 to 5.2.5. After the upgrade I start getting the error message: Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to

Re: [PHP] [SOLVED] Why I sart getting Fatal error: Allowed memory size... after php upgrade?

2007-12-20 Thread afan pasalic
Richard Lynch wrote: On Thu, December 20, 2007 11:37 am, afan pasalic wrote: The hosting company I have one account (and several Add Domains) upgraded php on the server from 4.4.7 to 5.2.5. After the upgrade I start getting the error message: Fatal error: Allowed memory size of 8388608 bytes

[PHP] Re: Best way to allow users to post youtube video links ?

2007-12-20 Thread Dan
Don Don [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I want to allow people to be able to post links to videos on youtube. I've implemented it in a certain way by allowing them to copy the embed tag into a textarea and then submit the form. I pick up the form data, validate and

RE: [PHP] Which file called the function?

2007-12-20 Thread Robert Cummings
On Thu, 2007-12-20 at 19:54 +, George Pitcher wrote: On Thu, December 20, 2007 8:37 am, Christoph Boget wrote: Let's say I have the following 3 files global.php ? function myFunc() { echo __FILE__; } ? one.php ? include( 'global.php' ); echo 'You are in

Re: [PHP] building PHP5.2.5 on Mac OS X Leopard (anyone know how to build a just an extension)

2007-12-20 Thread Jochem Maas
Frank Arensmeier schreef: 20 dec 2007 kl. 00.55 skrev Jochem Maas: hi guys, well having tried for countless hours to build php on leopard I pretty much gave up. that's too bad... 'give up' is too strong - but deadlines and frustration has caused me to put it aside right now. ...

Re: [PHP] building PHP5.2.5 on Mac OS X Leopard (anyone know how to build a just an extension)

2007-12-20 Thread Jochem Maas
Daniel Brown schreef: On Dec 20, 2007 2:30 PM, Richard Lynch [EMAIL PROTECTED] wrote: ./configure --with-interbase should build the interbase extension, as well as a PHP binary that you don't want. Then just copy the interbase.so thingie over, and Bob's your uncle. I don't know who

Re: [PHP] about __get,__set Overloading, read-only properties

2007-12-20 Thread Jochem Maas
pleae don't reply to an existing thread when posting a new question. ked schreef: Hi. all , I got a article from php 5.0 manual's comments. It's useful, offer readonly properties for classes. (look at the end of this message for the article ) find out function __construct(), I want

Re: [PHP] building PHP5.2.5 on Mac OS X Leopard (anyone know how to build a just an extension)

2007-12-20 Thread Jochem Maas
I hit send too soon ... Frank Arensmeier schreef: 20 dec 2007 kl. 00.55 skrev Jochem Maas: ... is interbase available via PEAR or PECL? alas no. it would be PECL at any rate - and I don't hold much faith in PECL being able to build anything usable anyway How desperately are you trying

RE: [PHP] about __get,__set Overloading, read-only properties

2007-12-20 Thread ked
My idea is just your answer...happy..ing ^_^ You are so warmhearted. Thanks a lot! : ) I will never post a question to a existing thread . -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Friday, December 21, 2007 9:11 AM To: ked Cc:

RE: [PHP] Which file called the function?

2007-12-20 Thread Shelley Shyan
Richard is right. If you want to get where __FILE__ is exactly in, __FILE__ is the option. Else, use $_SERVER['PHP_SELF']. (And this should be what you expected) Regards, Shelley -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Christoph Boget Sent:

RE: [PHP] Assign variable to a block of html code

2007-12-20 Thread Xavier de Lapeyre
Yeps, Sorry bout that. Thnks for pointing it out. Xavier -Original Message- From: Darren Whitlen [mailto:[EMAIL PROTECTED] Sent: jeudi 20 décembre 2007 13:13 To: php-general@lists.php.net Subject: Re: [PHP] Assign variable to a block of html code Xavier de Lapeyre wrote: You should

RE: [PHP] Assign variable to a block of html code

2007-12-20 Thread Xavier de Lapeyre
Quote: You could just swap all the double quotes in the HTML tags for single quotes - that would work in this instance... $myblokvar = table width='487' border='0' cellspacing='0' cellpadding='0' ... /table ; That's a way too, but it does not preserve the indentation. The HEREDOC syntax

RE: [PHP] Just to confirm...

2007-12-20 Thread Xavier de Lapeyre
? if(stristr($_SERVER['HTTP_USER_AGENT'],msie)) { die(No friend of Internet Exploder is a friend of mine.); } ? Lol!!! I need to implement that on ALL my sites ... XD!! Xavier de Lapeyre -Original Message- From: Richard Heyes [mailto:[EMAIL PROTECTED] Sent:

Re: [PHP] Re: php sockets

2007-12-20 Thread vixle
With any code doing a basic socket functionality, the code that i gave in the original post is suppossed to connect to a deamon, and get a message from it , instead it makes the deamon go crazy in the sense that it starts endless looping and loads the system resources up to max. Jim Lucas