[PHP] PHP 4.4.3RC2
Hello! I packed PHP 4.4.3RC2 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 second half of this month. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Chnage Management in PHP
I have been searching and digging for a PHP based change management application but have had little luck. Can anyone make a recommendation? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chnage Management in PHP
Jay Blanchard wrote: I have been searching and digging for a PHP based change management application but have had little luck. Can anyone make a recommendation? Yeah, write your own you lazy sack. And get your finger out of your nose. -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Chnage Management in PHP
[snip] Yeah, write your own you lazy sack. And get your finger out of your nose. [/snip] John obviously had a fine Fourth! LOL! Hey John, could you write it for me? It's a homework assignment. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chnage Management in PHP aka version control?
By 'change management' do you mean something like version control software? CVS, Subversion, etc? We use CVS at work and tried setting up Subversion at one point. I don't know, maybe we're all a bunch of retarded monkies here or maybe both systems are just overly complicated, but I don't like either of them. We have a working CVS setup right now, but it's not integrated with Zend Studio (which would be nice) and we couldn't get Subversion to integrate nicely either so we're just sticking with CVS for now. Sad to say, but the easiest, most user-transparent and still functional file locking system I've ever used was what's built into Microsoft Office applications where it'll tell you "This file is already open, would you like to open read-only and be alerted when you can write to it?". But that doesn't contain any version control (unless you turn on "change tracking" in some MS Office apps). I don't know about you, Jay, but all we really want to do is keep a record of revisions and be able to 'diff' between them and have the files lock so if someone tries to open the file and it's already open, that the user is alerted and allowed to open read-only if they desire. What kind of features are you looking for in a 'change management' software package? Maybe someone can recommend an app or two that will fit yours (and maybe our) needs. -TG = = = Original message = = = I have been searching and digging for a PHP based change management application but have had little luck. Can anyone make a recommendation? Thanks! ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Chnage Management in PHP aka version control?
[snip] By 'change management' do you mean something like version control software? CVS, Subversion, etc? [/snip] Sort of, but broader. More like a log. Maybe I should build it myself. For instance we have a server. That server requires that PHP be recompiled with additional features. I would like to record the change, and maybe even plan for the change. I would need a baseline for PHP and then be able to setup maintenance to be done or maintenance that was performed. That way, if something goes kablooey (ka-bloo-E) we can roll back to where things were prior to the change. Or we could record that the power supply failed on x and was replaced on y with xyz power supply. Etc. Make more sense? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chnage Management in PHP aka version control?
[EMAIL PROTECTED] wrote: By 'change management' do you mean something like version control software? CVS, Subversion, etc? We use CVS at work and tried setting up Subversion at one point. I don't know, maybe we're all a bunch of retarded monkies here or maybe both systems are just overly complicated, but I don't like either of them. We have a working CVS setup right now, but it's not integrated with Zend Studio (which would be nice) and we couldn't get Subversion to integrate nicely either so we're just sticking with CVS for now. Sad to say, but the easiest, most user-transparent and still functional file locking system I've ever used was what's built into Microsoft Office applications where it'll tell you "This file is already open, would you like to open read-only and be alerted when you can write to it?". But that doesn't contain any version control (unless you turn on "change tracking" in some MS Office apps). I don't know about you, Jay, but all we really want to do is keep a record of revisions and be able to 'diff' between them and have the files lock so if someone tries to open the file and it's already open, that the user is alerted and allowed to open read-only if they desire. What kind of features are you looking for in a 'change management' software package? Maybe someone can recommend an app or two that will fit yours (and maybe our) needs. -TG = = = Original message = = = I have been searching and digging for a PHP based change management application but have had little luck. Can anyone make a recommendation? Thanks! ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. His message seemed to indicate that he wanted a version control application WRITTEN in PHP, not that supported PHP. Regards, Adam. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Filter php page
can I create a script that will search a php page for iframes. And have it check the path of the iframe, If the iframe is listed as bad don't show. (list I make) Trying to do something with virus like through an iframe. I don't really know where to start looking for help. --Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Chnage Management in PHP aka version control?
On Wed, 2006-07-05 at 10:50 -0500, Jay Blanchard wrote: > For instance we have a server. That server requires that PHP be > recompiled with additional features. I would like to record the change, > and maybe even plan for the change. I would need a baseline for PHP and > then be able to setup maintenance to be done or maintenance that was > performed. That way, if something goes kablooey (ka-bloo-E) we can roll > back to where things were prior to the change. Way back when, I wrote something like that. It sucked, but was really easy to write very quickly. The hardest part was the DB design... I would suggest looking through some of the projects on Sourceforge andd freshmeat though, there is bound to be a useful app there. On the other hand you could just roll out a BugZilla Helpdesk from Mozilla, but that is designed for a huge company with many servers, desktops etc. You could use our framework to roll out a solution in a few hours, but you would have to learn it first... I agree with the first reply - roll your own, its less stress than you think! --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Filter php page
[snip] can I create a script that will search a php page for iframes. And have it check the path of the iframe, If the iframe is listed as bad don't show. (list I make) Trying to do something with virus like through an iframe. I don't really know where to start looking for help. [/snip] Virus? You'll get no quarter here. Unless you have described this badly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chnage Management in PHP
Jay Blanchard wrote: [snip] Yeah, write your own you lazy sack. And get your finger out of your nose. [/snip] John obviously had a fine Fourth! LOL! Hey John, could you write it for me? It's a homework assignment. I had to stay home with the baby while my wife took the 6yo to see the fireworks. Fun stuff. First, I need you to run some test code to see what type of work your system needs. Run this from the command line, and let me know when you get a result... for ( $i=0; $i = $i; $i++ ) { } -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Filter php page
On 05/07/06, Jay Blanchard <[EMAIL PROTECTED]> wrote: [snip] can I create a script that will search a php page for iframes. And have it check the path of the iframe, If the iframe is listed as bad don't show. (list I make) Trying to do something with virus like through an iframe. I don't really know where to start looking for help. [/snip] Best thing to do is open the file, use regular expressions to capture all text that begins and ends with 'iframe', parse that for src=url, attempt to get the url, if it fails it's bad and you can rewrite the string back into the file, perhaps adding a css class such as 'class=bad' that has display set to none. So, have a look at files, regular expressions and css. -- http://www.web-buddha.co.uk http://www.projectkarma.co.uk
Re: [PHP] What's the regex for this...?
Brian, I was trying to do this the other day using file_get_contents to load a page into a variable, but never quite got round to finishing it off. However, I recently received a very good Reg Exp tutorial which I hope is of use to you... *Basic Syntax of Regular Expressions (as from PHPBuilder.com)* First of all, let's take a look at two special symbols: '^' and '$'. What they do is indicate the start and the end of a string, respectively, like this: "^The": matches any string that starts with "The"; "of despair$": matches a string that ends in the substring "of despair"; "^abc$": a string that starts and ends with "abc" -- that could only be "abc" itself! "notice": a string that has the text "notice" in it. You can see that if you don't use either of the two characters we mentioned, as in the last example, you're saying that the pattern may occur anywhere inside the string -- you're not "hooking" it to any of the edges. There are also the symbols '*', '+', and '?', which denote the number of times a character or a sequence of characters may occur. What they mean is: "zero or more", "one or more", and "zero or one." Here are some examples: "ab*": matches a string that has an a followed by zero or more b's ("a", "ab", "abbb", etc.); "ab+": same, but there's at least one b ("ab", "abbb", etc.); "ab?": there might be a b or not; "a?b+$": a possible a followed by one or more b's ending a string. You can also use bounds, which come inside braces and indicate ranges in the number of occurences: "ab{2}": matches a string that has an a followed by exactly two b's ("abb"); "ab{2,}": there are at least two b's ("abb", "a", etc.); "ab{3,5}": from three to five b's ("abbb", "a", or "ab"). Note that you must always specify the first number of a range (i.e, "{0,2}", not "{,2}"). Also, as you might have noticed, the symbols '*', '+', and '?' have the same effect as using the bounds "{0,}", "{1,}", and "{0,1}", respectively. Now, to quantify a sequence of characters, put them inside parentheses: "a(bc)*": matches a string that has an a followed by zero or more copies of the sequence "bc"; "a(bc){1,5}": one through five copies of "bc." There's also the '|' symbol, which works as an OR operator: "hi|hello": matches a string that has either "hi" or "hello" in it; "(b|cd)ef": a string that has either "bef" or "cdef"; "(a|b)*c": a string that has a sequence of alternating a's and b's ending in a c; A period ('.') stands for any single character: "a.[0-9]": matches a string that has an a followed by one character and a digit; "^.{3}$": a string with exactly 3 characters. Bracket expressions specify which characters are allowed in a single position of a string: "[ab]": matches a string that has either an a or a b (that's the same as "a|b"); "[a-d]": a string that has lowercase letters 'a' through 'd' (that's equal to "a|b|c|d" and even "[abcd]"); "^[a-zA-Z]": a string that starts with a letter; "[0-9]%": a string that has a single digit before a percent sign; ",[a-zA-Z0-9]$": a string that ends in a comma followed by an alphanumeric character. You can also list which characters you DON'T want -- just use a '^' as the first symbol in a bracket expression (i.e., "%[^a-zA-Z]%" matches a string with a character that is not a letter between two percent signs). In order to be taken literally, you must escape the characters "^.[$()|*+?{\" with a backslash ('\'), as they have special meaning. On top of that, you must escape the backslash character itself in PHP3 strings, so, for instance, the regular expression "(\$|¥)[0-9]+" would have the function call: ereg("(\\$|¥)[0-9]+", $str) (what string does that validate?) Example 1. Examples of valid patterns * /<\/\w+>/ * |(\d{3})-\d+|Sm * /^(?i)php[34]/ * {^\s+(\s+)?$} Example 2. Examples of invalid patterns * /href='(.*)' - missing ending delimiter * /\w+\s*\w+/J - unknown modifier 'J' * 1-\d3-\d3-\d4| - missing starting delimiter Some useful PHP Keywords and their use (php.net man pages) preg_split (PHP 3>= 3.0.9, PHP 4 ) preg_split -- Split string by a regular expression Description array preg_split ( string pattern, string subject [, int limit [, int flags]]) Returns an array containing substrings of subject split along boundaries matched by pattern. If limit is specified, then only substrings up to limit are returned, and if limit is -1, it actually means "no limit", which is useful for specifying the flags. flags can be any combination of the following flags (combined with bitwise | operator): PREG_SPLIT_NO_EMPTY If this flag is set, only non-empty pieces will be returned by preg_split(). PREG_SPLIT_DELIM_CAPTURE If this flag is set, parenthesized expression in the delimiter pattern will be captured and returned as well. This flag was added for 4.0.5. PREG_SPLIT_OFFSET_CAPTURE If this flag is set, for every occuring match the appendant string offset will also be returned. Note that this changes the return value in an array where every eleme
Re: [PHP] global class instance
On 7/1/06, sempsteen <[EMAIL PROTECTED]> wrote: hi all, i wonder if there is a way of creating an instance of a class and reach it direcly from any scope in PHP4. basically what i want is: class a { function print() { echo 'sth'; } } $a = new a(); and use this "a" instance from anywhere ex, in a function that is a method of another class. class b { function print() { $a->print(); } } i don't want to: - declare global $foo, - use pre-defined $GLOBALS variable, - or use a::print thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Static is your friend. http://www.horde.org/papers/kongress2002-design_patterns/11_singleton_impl.xml.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] global class instance
>> hi all, >> i wonder if there is a way of creating an instance of a class and >> reach it direcly from any scope in PHP4. basically what i want is: >> i don't want to: >>- declare global $foo, >>- use pre-defined $GLOBALS variable, >>- or use a::print >> >> thanks. > Static is your friend. > http://www.horde.org/papers/kongress2002-design_patterns/11_singleton_impl.x ml.html Also, if using PHP 4, make sure to read the "References with global and static variables" section. It doesn't work quite the way a lot of people expect it to. http://us2.php.net/static The manual isn't all that clear, but the user comments help a lot (which, I have found, is often the case, but that's a rant for another day... At least we have a manual that accepts such comments!) class Singleton { function &getFoo() { $object =& Singleton::getFooRef(); if (!is_a('Foo', $object)) { $object =& new Foo(); } return $object; } function &getFooRef() { static $object = null; return $object; } } $myFoo =& Singleton::getFoo(); Hope that helps. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About GD Version 2 or above..
> Take out the ; in that line and re-start your computer and you should > have GD installed, with any luck... Thank for your answer... I tried your suggestion to take out the ';'. Somehow the error still there but different out put. "GD version 2 or above is needed" or something. So I got the conclusion that I need to upgrade my GD version, I visited this page http://www.php.net/manual/en/install.windows.extensions.php as Chris told me. But I couldn't find the 'GD' version 2 or above. I got only explanation about GD but not the GD it self. Huh.. someone please tell me where can I get that GD or should I upgrade my PHP v4.1.1, so I can get that GD v2 or above > On Sun, July 2, 2006 12:42 pm, BBC wrote: > >> Did you check if you had the required "gd" extension? I believe > >> someone > > already told you and how to check. > > > > Sorry I resent my question unintentionally > > I believe no one did. > > btw, what is GD extension, and how to install or load it? > > I have read my 'php.ini', and then I found this: > > ;extension=php_gd.dll > > But I don't know what's that suppose to mean.. > > My system is winXP > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printing in php
> weetat wrote: > > Hi all , > > > > I am using PHP 4.3.2 and MYSQL . > > > > I need to do printing function in php . > > Basically , in my client web page , it will display the list of items > > on the html page. And i have a print button , so that the user can print > > the html page to their local printer. > > > > Any way how to do this in PHP ? I believe someone already told you, I guess we can't do it in PHP, so why not in JavaScript Sorry I don't mean to take you belittle, but I write this completely for easy to look for others: Print this page Best Regards BBC **o<0>o** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] About GD Version 2 or above..
BBC wrote: Take out the ; in that line and re-start your computer and you should have GD installed, with any luck... Thank for your answer... I tried your suggestion to take out the ';'. Somehow the error still there but different out put. "GD version 2 or above is needed" or something. So I got the conclusion that I need to upgrade my GD version, I visited this page http://www.php.net/manual/en/install.windows.extensions.php as Chris told me. But I couldn't find the 'GD' version 2 or above. I got only explanation about GD but not the GD it self. Huh.. someone please tell me where can I get that GD or should I upgrade my PHP v4.1.1, so I can get that GD v2 or above I doubt gd2 works with php4.1.1, I'd suggest an upgrade for many reasons apart from this particular one (security fixes are very high on that list). -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] require_once and E_WARNING?
Hello all, According to the PHP Manual, when require or require_once failes, an E_ERROR is triggered: "require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error." (With 'Fatal Error' being a link to E_ERROR). Thing is, when using a custom error handler via set_error_handler(), it appears to be triggering an E_WARNING, not an E_ERROR. Using PHP 5.1.4 under Linux. There are one of three possibilities: I am suffering from a lapse in lucidity (common), the manual is wrong (possible), or PHP is broken somehow (unlikely). I'm guessing it's the first, but what am I doing wrong? I'd like to get a second opinion before submitting a bug. I searched bugs.php.net but was unable to find anything relevant for 5.1.4. Code: function default_error_handler($code, $error, $file, $line) { switch ($code) { case E_ERROR: die ("Error: $error"); case E_WARNING: die("Warning: $error"); default: die("Something else entirely: $error"); } } set_error_handler('default_error_handler'); require('This file does not exist. At least not here!'); Result: Warning: require(This file does not exist. At least not here!) [function.require]: failed to open stream: No such file or directory Expected Result: Error: require(This file does not exist. At least not here!) [function.require]: failed to open stream: No such file or directory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] require_once and E_WARNING?
[EMAIL PROTECTED] wrote: Hello all, According to the PHP Manual, when require or require_once failes, an E_ERROR is triggered: "require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error." (With 'Fatal Error' being a link to E_ERROR). Thing is, when using a custom error handler via set_error_handler(), it appears to be triggering an E_WARNING, not an E_ERROR. Using PHP 5.1.4 under Linux. There are one of three possibilities: I am suffering from a lapse in lucidity (common), the manual is wrong (possible), or PHP is broken somehow (unlikely). I'm guessing it's the first, but what am I doing wrong? I'd like to get a second opinion before submitting a bug. I searched bugs.php.net but was unable to find anything relevant for 5.1.4. Code: function default_error_handler($code, $error, $file, $line) { switch ($code) { case E_ERROR: die ("Error: $error"); case E_WARNING: die("Warning: $error"); default: die("Something else entirely: $error"); } } set_error_handler('default_error_handler'); require('This file does not exist. At least not here!'); Result: Warning: require(This file does not exist. At least not here!) [function.require]: failed to open stream: No such file or directory Expected Result: Error: require(This file does not exist. At least not here!) [function.require]: failed to open stream: No such file or directory If you comment out the 'set_error_handler' line what happens? Do you get what you expect (and what should happen) ? It looks like a pretty simple bug report to me but others may have reasons why it's not working. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] require_once and E_WARNING?
>> Code: >> function default_error_handler($code, $error, $file, $line) { >>switch ($code) { >>case E_ERROR: >> die ("Error: $error"); >>case E_WARNING: >> die("Warning: $error"); >>default: >> die("Something else entirely: $error"); >>} >> } >> set_error_handler('default_error_handler'); >> require('This file does not exist. At least not here!'); >> >> Result: >> Warning: require(This file does not exist. At least not here!) >> [function.require]: failed to open stream: No such file or directory >> >> Expected Result: >> Error: require(This file does not exist. At least not here!) >> [function.require]: failed to open stream: No such file or directory >> > > If you comment out the 'set_error_handler' line what happens? Do you get > what you expect (and what should happen) ? > > It looks like a pretty simple bug report to me but others may have > reasons why it's not working. Without the error handler, I get the expected result: A fatal error with the script dying. That is what makes this so mysterious. Doesn't make sense that it would raise a different kind of error under different circumstances. It should have the same value every time. I'm going to sit on this for a day or so and see what people say before I toss it over to the bug folks. No sense in bothering them if I'm being a bonehead. (o; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php