php-general Digest 2 Nov 2009 23:24:53 -0000 Issue 6423

Topics (messages 299558 through 299576):

Re: Help with my first recursion menu
        299558 by: MEM

Re: PHP and Javascript escape character problem, --> those who like to solve 
things can try to solve this issue, its tricky I think ;)
        299559 by: Devendra Jadhav
        299561 by: Ashley Sheridan
        299562 by: Stuart
        299563 by: Devendra Jadhav
        299564 by: Ashley Sheridan
        299565 by: acetrader
        299566 by: Devendra Jadhav

Re: Converting tables into forms
        299560 by: David Robley

Re: Classes and Functions
        299567 by: Martin Scotta

Re: What PHP version are you using?
        299568 by: O. Lavell
        299569 by: Israel Ekpo
        299570 by: Martin Scotta
        299571 by: John Black
        299572 by: Bob McConnell
        299573 by: John Black
        299574 by: Israel Ekpo
        299575 by: John Black
        299576 by: Lester Caine

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
 
From: Lex Braun [mailto:lex.br...@gmail.com] 
Sent: segunda-feira, 2 de Novembro de 2009 02:58
To: MEM
Cc: php-gene...@lists.php.net
Subject: Re: [PHP] RE: Help with my first recursion menu
 
Hi,
On Sat, Oct 31, 2009 at 11:07 AM, MEM <tal...@gmail.com> wrote:
 
From: Lex Braun [mailto:lex.br...@gmail.com] 
Sent: sábado, 31 de Outubro de 2009 14:05
To: MEM
Cc: php-gene...@lists.php.net
Subject: Re: [PHP] RE: Help with my first recursion menu
 
Hi,
On Wed, Oct 28, 2009 at 5:22 PM, MEM <tal...@gmail.com> wrote:
I've been told that stack is the way to go, so I'm trying to understand the
following code:
http://pastebin.com/m5616c88f
I've commented every line so that any of you could see if I'm interpreting
something wrong:


I have two questions about this code, that hopefully someone on the list
could explain:

1)
Why do we need to remove the last array item? (on line 32):
array_pop($urlStack);
On line 20, $url creates an URL path that includes the $cat path.  Once you've 
completed iteration on all children of $cat, the url path should no longer 
include $cat path, thus it is removed from $urlStack.
 

2)
Why we print the closed tag of the li element, after the recursive call? (on
line 29)
echo "</li>\n";
Line 29 is closing the li element that was opened on line 23 for $cat.


Thanks a lot in advance,
Márcio
-Lex
 
 
 
 
Thanks a lot. I knew that:
“Line 29 is closing the li element that was opened on line 23 for $cat.”
 
My question intend to be more like:
Why that line to close the li element is *after* the recursive call? 
Somehow, it seems that instead of creating something like this:
<ul>
<li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
 
We are doing:
<ul>
<li>item1
<li>item2
<li>item3
</li>
</ul>
 
Say you have a tree menu that contains :
$arr = array('item1' => 'Item 1', 'item2' => array('item2a' => 'Item 2a', 
'item2b' => 'Item 2b'));
$urlStack = array('category');

When you call the tree() function with the above $arr values, the function acts 
as follows:
1. First time through the function, the opening ul element is printed
2. First time through the foreach loop sets $cat = 'item1' and $val = 'Item 1'. 
3. As this is not an array, the else condition prints <li>Item 1</li>
4. Second time through the foreach loop sets $cat = 'Item 2' and $val = 
array('item2a' => 'Item 2a', 'item2b' => 'Item 2b').  
5. As this is an array, the if condition prints <li><a href=''>Item</a> and 
calls the tree function recursively
6. Second time through the tree function, another <ul> element is printed and 
the two sub items are printed as <li>sub item</li> as they do not contain 
additional arrays.  Tree function ends by printing the closing </ul> tag.
7. The foreach loop from step 5 continues and prints the closing </li>. Tree 
function ends by printing the closing </ul> tag.

The output from calling tree($arr, $urlStack) would thus be:
<ul>
<li>Item 1</li>
<li>
<a href="?path=category/Item 2">Item 2</a>
<ul>
<li>Item 2a</li>
<li>Item 2b</li>
</ul>
</li>
</ul>
 
 
 
Perfectly clear. Thanks a lot Lex. :)

--- End Message ---
--- Begin Message ---
Hey,
You can do it this way as well
$myFeedHTML .=  "<TH ROWSPAN=3 BGCOLOR='#99CCFF'> $feedItemImagePath <br />
<br /> <input type='Button' value='Edit' width='100px'
onClik=\"javascript:
>
> DeleteChannelAndAllOfItsFeeds()\" /> <br /> <br
> />DELETE<br /></TH>";


So you can escape double quotes by \ (slash)
try this .. It will work...
you can escape any special character that you want to use as it is by
prepend it by \

On Mon, Nov 2, 2009 at 2:23 PM, acetrader <saliba...@gmail.com> wrote:

>
> Hi there,
>
> I am doing an application that allows me to create RSS channels and put
> feeds inside of each channel. Everything works so far, but - now I have
> started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and 'Delete
> Feed' functionalities and have run into a problem. For me its a big problem
> cause Im not a guru programmer but for you out there it may be a piece of
> cake.
>
> I have the following line of code:
>
> $myFeedHTML .=  "<TH ROWSPAN=3 BGCOLOR='#99CCFF'> $feedItemImagePath <br />
> <br /> <input type='Button' value='Edit' width='100px'
> onClik='javascript:DeleteChannelAndAllOfItsFeeds()' /> <br /> <br
> />DELETE<br /></TH>";
>
> In $myFeedHTML I'am always appending new HTML data to it, in this case I'am
> appending a table row/header row that has an image in it and underneath the
> image it has two buttons, one is for the EDIT functionality and the other
> is
> for the DELETE functionality.
>
> Now... notice the onClik events ->
> onClik='javascript:DeleteChannelAndAllOfItsFeeds()'    . I ususally use
> that
> method to call a javascript function from within a button or a link....and
> like this is works (on its own - ie when its not being appended as a normal
> string to the variable $myFeedHTML).
>
> But...When it is appended to a variable so that I echo everything at once
> in
> the end, the onClik action must be included inside a " (double quotes) and
> inside  ' (single quotes) so that it can be appeneded to the string, now
> when this is being done everything gets mixed because of of all the " and '
> thus the program thinks that these are normal escape characters and just
> skips over the javascript call function that is nested within the onClik
> event. So the onClik is not getting a function assigned to it. (you can see
> this in the code I've pasted above)
>
> What can I do in order to append it to my $myFeedHTML variable and at the
> same time have it assigend a javascript function inside of its EDIT/DELETE
> button onClik event ?
>
> Can you give me some example maybe etc ?
>
> Image Preview:
>
> http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg
>
> btw: I know I've written onClik wrong but I wrote it this way in this forum
> cause it wouldn't let me post my thread because it regards it as an illegal
> tag lol. B-)B-)
>
> Thank you very much :) ,
> The Ace
>
>
> --
> View this message in context:
> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
> Sent from the PHP - General mailing list archive at Nabble.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Devendra Jadhav

--- End Message ---
--- Begin Message ---
On Mon, 2009-11-02 at 00:53 -0800, acetrader wrote:

> Hi there,
> 
> I am doing an application that allows me to create RSS channels and put
> feeds inside of each channel. Everything works so far, but - now I have
> started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and 'Delete
> Feed' functionalities and have run into a problem. For me its a big problem
> cause Im not a guru programmer but for you out there it may be a piece of
> cake.
> 
> I have the following line of code:
> 
> $myFeedHTML .=        "<TH ROWSPAN=3 BGCOLOR='#99CCFF'> $feedItemImagePath 
> <br />
> <br /> <input type='Button' value='Edit' width='100px'
> onClik='javascript:DeleteChannelAndAllOfItsFeeds()' /> <br /> <br
> />DELETE<br /></TH>";
> 
> In $myFeedHTML I'am always appending new HTML data to it, in this case I'am
> appending a table row/header row that has an image in it and underneath the
> image it has two buttons, one is for the EDIT functionality and the other is
> for the DELETE functionality.
> 
> Now... notice the onClik events ->
> onClik='javascript:DeleteChannelAndAllOfItsFeeds()'    . I ususally use that
> method to call a javascript function from within a button or a link....and
> like this is works (on its own - ie when its not being appended as a normal
> string to the variable $myFeedHTML). 
> 
> But...When it is appended to a variable so that I echo everything at once in
> the end, the onClik action must be included inside a " (double quotes) and
> inside  ' (single quotes) so that it can be appeneded to the string, now
> when this is being done everything gets mixed because of of all the " and '
> thus the program thinks that these are normal escape characters and just
> skips over the javascript call function that is nested within the onClik
> event. So the onClik is not getting a function assigned to it. (you can see
> this in the code I've pasted above)
> 
> What can I do in order to append it to my $myFeedHTML variable and at the
> same time have it assigend a javascript function inside of its EDIT/DELETE
> button onClik event ?
> 
> Can you give me some example maybe etc ?
> 
> Image Preview: 
> 
> http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg 
> 
> btw: I know I've written onClik wrong but I wrote it this way in this forum
> cause it wouldn't let me post my thread because it regards it as an illegal
> tag lol. B-)B-)
> 
> Thank you very much :) ,
> The Ace
> 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
> Sent from the PHP - General mailing list archive at Nabble.com.
> 
> 


I've noticed also that in your code you've always referred to onclik,
when it should be onclick. I hope this was just a typo in the email!

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
2009/11/2 Ashley Sheridan <a...@ashleysheridan.co.uk>:
> On Mon, 2009-11-02 at 00:53 -0800, acetrader wrote:
>
>> Hi there,
>>
>> I am doing an application that allows me to create RSS channels and put
>> feeds inside of each channel. Everything works so far, but - now I have
>> started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and 'Delete
>> Feed' functionalities and have run into a problem. For me its a big problem
>> cause Im not a guru programmer but for you out there it may be a piece of
>> cake.
>>
>> I have the following line of code:
>>
>> $myFeedHTML .=        "<TH ROWSPAN=3 BGCOLOR='#99CCFF'> $feedItemImagePath 
>> <br />
>> <br /> <input type='Button' value='Edit' width='100px'
>> onClik='javascript:DeleteChannelAndAllOfItsFeeds()' /> <br /> <br
>> />DELETE<br /></TH>";
>>
>> In $myFeedHTML I'am always appending new HTML data to it, in this case I'am
>> appending a table row/header row that has an image in it and underneath the
>> image it has two buttons, one is for the EDIT functionality and the other is
>> for the DELETE functionality.
>>
>> Now... notice the onClik events ->
>> onClik='javascript:DeleteChannelAndAllOfItsFeeds()'    . I ususally use that
>> method to call a javascript function from within a button or a link....and
>> like this is works (on its own - ie when its not being appended as a normal
>> string to the variable $myFeedHTML).
>>
>> But...When it is appended to a variable so that I echo everything at once in
>> the end, the onClik action must be included inside a " (double quotes) and
>> inside  ' (single quotes) so that it can be appeneded to the string, now
>> when this is being done everything gets mixed because of of all the " and '
>> thus the program thinks that these are normal escape characters and just
>> skips over the javascript call function that is nested within the onClik
>> event. So the onClik is not getting a function assigned to it. (you can see
>> this in the code I've pasted above)
>>
>> What can I do in order to append it to my $myFeedHTML variable and at the
>> same time have it assigend a javascript function inside of its EDIT/DELETE
>> button onClik event ?
>>
>> Can you give me some example maybe etc ?
>>
>> Image Preview:
>>
>> http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg
>>
>> btw: I know I've written onClik wrong but I wrote it this way in this forum
>> cause it wouldn't let me post my thread because it regards it as an illegal
>> tag lol. B-)B-)
>>
>> Thank you very much :) ,
>> The Ace
>>
>>
>> --
>> View this message in context: 
>> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
>> Sent from the PHP - General mailing list archive at Nabble.com.
>>
>>
>
>
> I've noticed also that in your code you've always referred to onclik,
> when it should be onclick. I hope this was just a typo in the email!

I've noticed also that you didn't read his email properly. I hope that
was just an oversight.

-Stuart

-- 
http://stut.net/

--- End Message ---
--- Begin Message ---
Ashley Sheridan:
> btw: I know I've written onClik wrong but I wrote it this way in this
forum
> cause it wouldn't let me post my thread because it regards it as an
illegal
> tag lol. B-)B-)

:D


On Mon, Nov 2, 2009 at 4:38 PM, Ashley Sheridan 
<a...@ashleysheridan.co.uk>wrote:

> On Mon, 2009-11-02 at 00:53 -0800, acetrader wrote:
>
> > Hi there,
> >
> > I am doing an application that allows me to create RSS channels and put
> > feeds inside of each channel. Everything works so far, but - now I have
> > started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and
> 'Delete
> > Feed' functionalities and have run into a problem. For me its a big
> problem
> > cause Im not a guru programmer but for you out there it may be a piece of
> > cake.
> >
> > I have the following line of code:
> >
> > $myFeedHTML .=        "<TH ROWSPAN=3 BGCOLOR='#99CCFF'>
> $feedItemImagePath <br />
> > <br /> <input type='Button' value='Edit' width='100px'
> > onClik='javascript:DeleteChannelAndAllOfItsFeeds()' /> <br /> <br
> > />DELETE<br /></TH>";
> >
> > In $myFeedHTML I'am always appending new HTML data to it, in this case
> I'am
> > appending a table row/header row that has an image in it and underneath
> the
> > image it has two buttons, one is for the EDIT functionality and the other
> is
> > for the DELETE functionality.
> >
> > Now... notice the onClik events ->
> > onClik='javascript:DeleteChannelAndAllOfItsFeeds()'    . I ususally use
> that
> > method to call a javascript function from within a button or a
> link....and
> > like this is works (on its own - ie when its not being appended as a
> normal
> > string to the variable $myFeedHTML).
> >
> > But...When it is appended to a variable so that I echo everything at once
> in
> > the end, the onClik action must be included inside a " (double quotes)
> and
> > inside  ' (single quotes) so that it can be appeneded to the string, now
> > when this is being done everything gets mixed because of of all the " and
> '
> > thus the program thinks that these are normal escape characters and just
> > skips over the javascript call function that is nested within the onClik
> > event. So the onClik is not getting a function assigned to it. (you can
> see
> > this in the code I've pasted above)
> >
> > What can I do in order to append it to my $myFeedHTML variable and at the
> > same time have it assigend a javascript function inside of its
> EDIT/DELETE
> > button onClik event ?
> >
> > Can you give me some example maybe etc ?
> >
> > Image Preview:
> >
> > http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg
> >
> > btw: I know I've written onClik wrong but I wrote it this way in this
> forum
> > cause it wouldn't let me post my thread because it regards it as an
> illegal
> > tag lol. B-)B-)
> >
> > Thank you very much :) ,
> > The Ace
> >
> >
> > --
> > View this message in context:
> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
> > Sent from the PHP - General mailing list archive at Nabble.com.
> >
> >
>
>
> I've noticed also that in your code you've always referred to onclik,
> when it should be onclick. I hope this was just a typo in the email!
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>


-- 
Devendra Jadhav

--- End Message ---
--- Begin Message ---
On Mon, 2009-11-02 at 16:51 +0530, Devendra Jadhav wrote:

> Ashley Sheridan:
> > btw: I know I've written onClik wrong but I wrote it this way in this
> forum
> > cause it wouldn't let me post my thread because it regards it as an
> illegal
> > tag lol. B-)B-)
> 
> :D
> 
> 
> On Mon, Nov 2, 2009 at 4:38 PM, Ashley Sheridan 
> <a...@ashleysheridan.co.uk>wrote:
> 
> > On Mon, 2009-11-02 at 00:53 -0800, acetrader wrote:
> >
> > > Hi there,
> > >
> > > I am doing an application that allows me to create RSS channels and put
> > > feeds inside of each channel. Everything works so far, but - now I have
> > > started to do the 'Edit Channel', 'Edit Feed', 'Delete Channel' and
> > 'Delete
> > > Feed' functionalities and have run into a problem. For me its a big
> > problem
> > > cause Im not a guru programmer but for you out there it may be a piece of
> > > cake.
> > >
> > > I have the following line of code:
> > >
> > > $myFeedHTML .=        "<TH ROWSPAN=3 BGCOLOR='#99CCFF'>
> > $feedItemImagePath <br />
> > > <br /> <input type='Button' value='Edit' width='100px'
> > > onClik='javascript:DeleteChannelAndAllOfItsFeeds()' /> <br /> <br
> > > />DELETE<br /></TH>";
> > >
> > > In $myFeedHTML I'am always appending new HTML data to it, in this case
> > I'am
> > > appending a table row/header row that has an image in it and underneath
> > the
> > > image it has two buttons, one is for the EDIT functionality and the other
> > is
> > > for the DELETE functionality.
> > >
> > > Now... notice the onClik events ->
> > > onClik='javascript:DeleteChannelAndAllOfItsFeeds()'    . I ususally use
> > that
> > > method to call a javascript function from within a button or a
> > link....and
> > > like this is works (on its own - ie when its not being appended as a
> > normal
> > > string to the variable $myFeedHTML).
> > >
> > > But...When it is appended to a variable so that I echo everything at once
> > in
> > > the end, the onClik action must be included inside a " (double quotes)
> > and
> > > inside  ' (single quotes) so that it can be appeneded to the string, now
> > > when this is being done everything gets mixed because of of all the " and
> > '
> > > thus the program thinks that these are normal escape characters and just
> > > skips over the javascript call function that is nested within the onClik
> > > event. So the onClik is not getting a function assigned to it. (you can
> > see
> > > this in the code I've pasted above)
> > >
> > > What can I do in order to append it to my $myFeedHTML variable and at the
> > > same time have it assigend a javascript function inside of its
> > EDIT/DELETE
> > > button onClik event ?
> > >
> > > Can you give me some example maybe etc ?
> > >
> > > Image Preview:
> > >
> > > http://old.nabble.com/file/p26156627/my%2BEscape%2BProblem.jpg
> > >
> > > btw: I know I've written onClik wrong but I wrote it this way in this
> > forum
> > > cause it wouldn't let me post my thread because it regards it as an
> > illegal
> > > tag lol. B-)B-)
> > >
> > > Thank you very much :) ,
> > > The Ace
> > >
> > >
> > > --
> > > View this message in context:
> > http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156627.html
> > > Sent from the PHP - General mailing list archive at Nabble.com.
> > >
> > >
> >
> >
> > I've noticed also that in your code you've always referred to onclik,
> > when it should be onclick. I hope this was just a typo in the email!
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
> 
> 


oops, lol!

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
lol thank you very much guys :) the escape character worked and now its
accepting my javascript functions, thank you all very much :)
:jumping::jumping:
-- 
View this message in context: 
http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156680.html
Sent from the PHP - General mailing list archive at Nabble.com.


--- End Message ---
--- Begin Message ---
:)

On Mon, Nov 2, 2009 at 4:56 PM, acetrader <saliba...@gmail.com> wrote:

>
> lol thank you very much guys :) the escape character worked and now its
> accepting my javascript functions, thank you all very much :)
> :jumping::jumping:
> --
> View this message in context:
> http://old.nabble.com/PHP-and-Javascript-escape-character-problem%2C---%3E-those-who-like-to-solve-things-can-try-to-solve-this-issue%2C-its-tricky-I-think--%29-tp26156627p26156680.html
> Sent from the PHP - General mailing list archive at Nabble.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Devendra Jadhav

--- End Message ---
--- Begin Message ---
Bastien Koert wrote:

> On Wed, Oct 28, 2009 at 8:53 AM, Bob McConnell <r...@cbord.com> wrote:
>> From: Ashley Sheridan
>>
>>> On Tue, 2009-10-27 at 21:07 -0700, ben...@gmail.com wrote:
>>>
>>>> I am trying to take MySQL tables and use the table structure to
>> create
>>>> HTML/PHP forms in as few steps as possible for further development. I
>>>> have a project that has hundreds of tables and requires hundreds of
>>>> forms to be created and don't want to do so field by field by hand.
>>>>
>>>> On Tuesday, October 27, 2009, Allen McCabe <allenmcc...@gmail.com>
>> wrote:
>>>> > Please explain with much greater detail.
>>>> >
>>>> > On Tue, Oct 27, 2009 at 6:12 PM, ben...@gmail.com
>> <ben...@gmail.com> wrote:
>>>> > Does anyone have a quick way of converting tables into forms?
>>>> >
>>>
>>> There is still the issue of exactly what db fields will translate
>> into.
>>> Where is a good time to use radio buttons instead of select lists, or
>>> checkboxes instead of select-multiple lists? What about text fields in
>>> the db? Should they be textareas or text inputs? Do all the db fields
>>> need to be translated as visible fields? Should you hide ID fields?
>>>
>>> There are so many questions, that you might be better off rolling your
>>> own, as a one-size-fits-all will not always work for everyone.
>>
>> I have a feeling in the pit of my stomach that your project is going to
>> create a support nightmare. Either you will have to hand code forms for
>> each table, or find a framework that dynamically creates the forms from
>> schema and create suitable maps for each form. In either case, it will
>> take weeks or months to complete and be nearly impossible to maintain
>> when tables are changed or added.
>>
>> If your solution requires you to create hundreds of forms, which could
>> take months to code, you need to take another look at the problem. I
>> don't believe you have thought it through very well.
>>
>> Bob McConnell
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 
> symfony might be another option, but it will take you some time to
> sort out the yaml config.
> 
> 
Recent versions of symfony (at least >= 1.0) can create the schema.yml from
an existing database structure or a .sql file.



Cheers
-- 
David Robley

This building is so high, the elevator shows movies.
Today is Sweetmorn, the 14th day of The Aftermath in the YOLD 3175. 


--- End Message ---
--- Begin Message ---
On Sun, Nov 1, 2009 at 6:46 PM, Larry Garfield <la...@garfieldtech.com>wrote:

> On Sunday 01 November 2009 2:50:55 pm Daniel Kolbo wrote:
> > Hello,
> >
> > Is there a way to see what objects and functions a script
> > loaded/required/used?
> >
> > I could recursively loop through the globals, but if objects were unset,
> > then i may miss some.
> >
> > I could make a 'tracking' object and every time i load/include a file
> > (which contains a class def or a function def) to add that file to the
> > tracking object...but it would be nice if i didn't have to modify my
> > existing code to see which objects and functions a script actually used,
> > or at least, requested and loaded into memory.
> >
> > Thanks in advance,
> > Daniel Kolbo
> > `
>
> Depends what you are trying to do with it, but I suspect these are a good
> start:
>
> http://www.php.net/get_defined_functions
> http://www.php.net/get_defined_vars
> http://www.php.net/get_defined_constants
> http://www.php.net/get_declared_classes
> http://www.php.net/get_declared_interfaces
> http://www.php.net/get_included_files
>
> --
> Larry Garfield
> la...@garfieldtech.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
You can use the tokenizer's functions to parse the files and recover the
information.
They are easy to understand and make the perfect tool for this kind of
scenario.

I'd like to know how do you solve this.

cheers
-- 
Martin Scotta

--- End Message ---
--- Begin Message ---
Israel Ekpo wrote:

> Hi Guys,
> 
> I just want to conduct a quick survey to find out what version of PHP
> people are using in their production environments.

A few days late to answer perhaps, but in case you still want another 
reply: I use 5.2.6, the version that comes with Debian "Lenny". I do not 
usually install anything from outside the official Debian archives, makes 
my life much easier this way.

[..]

> I cannot go below 5.2.0 though but I am thinking about starting at 5.2.4
> and newer.

That would make sense for us Debian users at least, as explained above. 
Other distros I'm not sure about.

--- End Message ---
--- Begin Message ---
On Mon, Nov 2, 2009 at 12:21 PM, O. Lavell <olav...@xs4all.nl> wrote:

> Israel Ekpo wrote:
>
> > Hi Guys,
> >
> > I just want to conduct a quick survey to find out what version of PHP
> > people are using in their production environments.
>
> A few days late to answer perhaps, but in case you still want another
> reply: I use 5.2.6, the version that comes with Debian "Lenny". I do not
> usually install anything from outside the official Debian archives, makes
> my life much easier this way.
>
> [..]
>
> > I cannot go below 5.2.0 though but I am thinking about starting at 5.2.4
> > and newer.
>
> That would make sense for us Debian users at least, as explained above.
> Other distros I'm not sure about.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Thanks.

I am still looking for responses. So you are not late.

I just finishing testing against 5.2.10 down to 5.2.4. I am not sure how
many people are still using versions between 5.2.0 and 5.2.3

I would like to know those ones too

-- 
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.

--- End Message ---
--- Begin Message ---
On Mon, Nov 2, 2009 at 2:29 PM, Israel Ekpo <israele...@gmail.com> wrote:

> On Mon, Nov 2, 2009 at 12:21 PM, O. Lavell <olav...@xs4all.nl> wrote:
>
> > Israel Ekpo wrote:
> >
> > > Hi Guys,
> > >
> > > I just want to conduct a quick survey to find out what version of PHP
> > > people are using in their production environments.
> >
> > A few days late to answer perhaps, but in case you still want another
> > reply: I use 5.2.6, the version that comes with Debian "Lenny". I do not
> > usually install anything from outside the official Debian archives, makes
> > my life much easier this way.
> >
> > [..]
> >
> > > I cannot go below 5.2.0 though but I am thinking about starting at
> 5.2.4
> > > and newer.
> >
> > That would make sense for us Debian users at least, as explained above.
> > Other distros I'm not sure about.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> Thanks.
>
> I am still looking for responses. So you are not late.
>
> I just finishing testing against 5.2.10 down to 5.2.4. I am not sure how
> many people are still using versions between 5.2.0 and 5.2.3
>
> I would like to know those ones too
>
> --
> "Good Enough" is not good enough.
> To give anything less than your best is to sacrifice the gift.
> Quality First. Measure Twice. Cut Once.
>

Hi!

I develop for 4.3.10 and 5.2.6 at work.
At home I use 5.2.9, it was installed by xubuntu

Our hosting providers have 5.2.0 or 5.2.4

-- 
Martin Scotta

--- End Message ---
--- Begin Message ---
Israel Ekpo wrote:
I just finishing testing against 5.2.10 down to 5.2.4. I am not sure how
many people are still using versions between 5.2.0 and 5.2.3
I would like to know those ones too

Well anybody running CentOS 5 or RedHat Linux Enterprise 5 using the official repo will be using PHP 5.1.x so you might want to thing twice about going any higher then that.

--
John
Insanity in individuals is something rare - but in groups, parties,
nations and epochs, it is the rule.
[Friedrich Nietzsche]

--- End Message ---
--- Begin Message ---
From: John Black
> Israel Ekpo wrote:
>> I just finishing testing against 5.2.10 down to 5.2.4. I am not sure
how
>> many people are still using versions between 5.2.0 and 5.2.3
>> I would like to know those ones too
> 
> Well anybody running CentOS 5 or RedHat Linux Enterprise 5 using the 
> official repo will be using PHP 5.1.x so you might want to thing twice

> about going any higher then that.

I just checked the Red Hat 5.4 manifest and it shows php-5.1.6-23.el5 -
php-5.1.6-23.2.el5_3. CentOS simply repackages the Red Hat kit without
the proprietary bits. I don't understand why they are so far behind on a
build that was just released last month, but our hosting service only
provides what's in the official release.

Bob McConnell

--- End Message ---
--- Begin Message ---
Bob McConnell wrote:
I just checked the Red Hat 5.4 manifest and it shows php-5.1.6-23.el5 -
php-5.1.6-23.2.el5_3. CentOS simply repackages the Red Hat kit without
the proprietary bits. I don't understand why they are so far behind on a
build that was just released last month, but our hosting service only
provides what's in the official release.

I just check the CentOS repo and the repo lists php-5.1.6-23.2.el5_3.x86_64.rpm as latest.
So CentOS is as upto date as RedHat, the way it should be.

--
John
Define: Ubuntard => The drivel this guy spews is inane and forgettable
stuff, characterized by comments that treat Ubuntu as if it is the only
distribution in existence.

--- End Message ---
--- Begin Message ---
On Mon, Nov 2, 2009 at 2:15 PM, John Black <s...@network-technologies.org>wrote:

> Bob McConnell wrote:
>
>> I just checked the Red Hat 5.4 manifest and it shows php-5.1.6-23.el5 -
>> php-5.1.6-23.2.el5_3. CentOS simply repackages the Red Hat kit without
>> the proprietary bits. I don't understand why they are so far behind on a
>> build that was just released last month, but our hosting service only
>> provides what's in the official release.
>>
>
> I just check the CentOS repo and the repo lists
> php-5.1.6-23.2.el5_3.x86_64.rpm as latest.
> So CentOS is as upto date as RedHat, the way it should be.
>
> --
> John
> Define: Ubuntard => The drivel this guy spews is inane and forgettable
> stuff, characterized by comments that treat Ubuntu as if it is the only
> distribution in existence.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

That is not good.

5.1.6 was released in August 2006.

More than 3 years ago. There are a lot of bug fixes since then

http://www.php.net/ChangeLog-5.php

It looks like the php libraries are not maintained in CentOS and Red Hat
Repositories.
-- 
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.

--- End Message ---
--- Begin Message ---
Israel Ekpo wrote:
That is not good.
5.1.6 was released in August 2006.
More than 3 years ago. There are a lot of bug fixes since then
http://www.php.net/ChangeLog-5.php
It looks like the php libraries are not maintained in CentOS and Red Hat
Repositories.

I posted the current RHEL version because, personally, I would look at the latest release of one of the biggest Enterprise class Linux vendors before deciding on a PHP version.

The larger distros only tend to upgrade packages when required because other packages need them or when a security issues has been discovered.
Other times they will patch in security fixes applied to packages.
The tradeoff here is that you get something older but the system you receive is solid.

I run ARCH Linux on my home system because I like to test the latest releases BUT I want stable software on my servers.

--
John
They hurt you at home and they hit you at school,
They hate you if you're clever and they despise a fool,
Till you're so fucking crazy you can't follow their rules...
[John Lennon]

--- End Message ---
--- Begin Message ---
Israel Ekpo wrote:
On Mon, Nov 2, 2009 at 2:15 PM, John Black <s...@network-technologies.org>wrote:

Bob McConnell wrote:

I just checked the Red Hat 5.4 manifest and it shows php-5.1.6-23.el5 -
php-5.1.6-23.2.el5_3. CentOS simply repackages the Red Hat kit without
the proprietary bits. I don't understand why they are so far behind on a
build that was just released last month, but our hosting service only
provides what's in the official release.

I just check the CentOS repo and the repo lists
php-5.1.6-23.2.el5_3.x86_64.rpm as latest.
So CentOS is as upto date as RedHat, the way it should be.

That is not good.
5.1.6 was released in August 2006.
More than 3 years ago. There are a lot of bug fixes since then
http://www.php.net/ChangeLog-5.php
It looks like the php libraries are not maintained in CentOS and Red Hat
Repositories.

There are very good reasons why a 'long time supported' build does not keep replacing packages all the time. It is gauranteed NOT to change them, so compatibility problems introduced by PHP such as the 'date' problem will not come up and bit ANY of their customers.

I believe that there is a new version due on a couple of 'long time supported' distributions, but the current 'instability' with PHP5.3 potentially requiring changes to deployed applications is the sort of thing that these builds are supposed to avoid. I'll be staying with 5.2.x for a while simply because I know that is stable with my current code base.

So it IS good that a stable and understood build of PHP is used as no one would gaurantee that later builds will not introduce problems - especially following a change of minor versions.

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--- End Message ---

Reply via email to