php-general Digest 1 Jul 2009 12:20:36 -0000 Issue 6205

Topics (messages 294769 through 294789):

Re: check a variable after EACH function
        294769 by: Shawn McKenzie
        294774 by: Paul M Foster
        294778 by: Phpster
        294780 by: Paul M Foster
        294784 by: Nisse Engström

Re: Best way to reinstate radio-button states from database?
        294770 by: Michael A. Peters

Re: exasperated again - shot in the foot
        294771 by: PJ
        294785 by: Stuart
        294788 by: Lester Caine

Cleaning up automatically when leaving a page
        294772 by: Mary Anderson
        294773 by: Michael A. Peters
        294775 by: Paul M Foster
        294777 by: WenDong Zhang
        294779 by: Phpster
        294789 by: Al

Re: Push an Array, Comma separated.
        294776 by: Louie Miranda

Re: PHP 5.3.0 Released!
        294781 by: Michael A. Peters
        294783 by: Michael A. Peters
        294787 by: Michael A. Peters

my first order job on manages jobs
        294782 by: Suresh Gupta VG
        294786 by: Stuart

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 ---
Flint Million wrote:
> This might seem silly but here's what I'm trying to do
> 
> Suppose I have some kind of check variable - say for example
> $abort_now. Or it could be a function. Something to be evaluated to a
> value.
> 
> I want to execute a block of statements, but after EACH statement
> executes, check the value of $abort_now and if it is true, break; out
> of the block.
> 
> Here's an example
> 
> do {
>   do_something();
>   do_something_else();
>   do_another_thing();
>   do_yet_another_thing();
>   and_keep_doing_things();
> } while ($abort_now != 1);
> 
> What I want to happen is for each statement to execute, and keep
> looping around, until the $abort_now variable is set to 1. Now,
> suppose any one of the statements in that block may cause $abort_now
> to become 1. If that happens, I want the block to stop executing
> immediately and not continue executing further statements.
> 
> For example, do_another_thing() causes $abort_now to equal 1. I do not
> want do_yet_another_thing or keep doing things to execute. I want the
> loop to stop right there.
> 
> The only way I can think of doing it is to insert a check after each 
> statement:
> 
> do {
>   do_something();
>   if ($abort_now == 1) { break; }
>   do_something_else();
>   if ($abort_now == 1) { break; }
>   do_another_thing();
>   if ($abort_now == 1) { break; }
>   do_yet_another_thing();
>   if ($abort_now == 1) { break; }
>   and_keep_doing_things();
>   if ($abort_now == 1) { break; }
> } while (TRUE);
> 
> This might work for 2 or 3 statements but imagine a block of say 15
> statements. Having a check after each one would look ugly, and cause
> trouble if the condition needed to be changed or if I instead decided
> to check it, say, against a function.
> 
> So is this possible to do with built in code? or am I stuck with
> having to put a check after each statement in?
> 
> thanks
> 
> fm

Well, since the functions can set $abort_now, why can't they just abort?
Or throw an exception?

try {
    do {
                do_something();
                do_something_else();
                do_another_thing();
                do_yet_another_thing();
                and_keep_doing_things();
        } while (true);
} catch (Exception $e) {
    //do something or nothing
}

Then in your functions instead of setting $abort_now, do:

throw new Exception('Abort! Abort! Abort!');


-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
On Tue, Jun 30, 2009 at 06:31:54PM -0500, Flint Million wrote:

> This might seem silly but here's what I'm trying to do
> 
> Suppose I have some kind of check variable - say for example
> $abort_now. Or it could be a function. Something to be evaluated to a
> value.
> 
> I want to execute a block of statements, but after EACH statement
> executes, check the value of $abort_now and if it is true, break; out
> of the block.
> 
> Here's an example
> 
> do {
>   do_something();
>   do_something_else();
>   do_another_thing();
>   do_yet_another_thing();
>   and_keep_doing_things();
> } while ($abort_now != 1);
> 
> What I want to happen is for each statement to execute, and keep
> looping around, until the $abort_now variable is set to 1. Now,
> suppose any one of the statements in that block may cause $abort_now
> to become 1. If that happens, I want the block to stop executing
> immediately and not continue executing further statements.
> 
> For example, do_another_thing() causes $abort_now to equal 1. I do not
> want do_yet_another_thing or keep doing things to execute. I want the
> loop to stop right there.
> 
> The only way I can think of doing it is to insert a check after each
> statement:
> 
> do {
>   do_something();
>   if ($abort_now == 1) { break; }
>   do_something_else();
>   if ($abort_now == 1) { break; }
>   do_another_thing();
>   if ($abort_now == 1) { break; }
>   do_yet_another_thing();
>   if ($abort_now == 1) { break; }
>   and_keep_doing_things();
>   if ($abort_now == 1) { break; }
> } while (TRUE);
> 
> This might work for 2 or 3 statements but imagine a block of say 15
> statements. Having a check after each one would look ugly, and cause
> trouble if the condition needed to be changed or if I instead decided
> to check it, say, against a function.
> 
> So is this possible to do with built in code? or am I stuck with
> having to put a check after each statement in?

Aside from Shawn's exception method, you're relatively limited in how
you do this. All the other methods amount to essentially what you're
doing here. There's no other loop structure in PHP that will do it any
better than what you've devised.

FWIW, I've had to do this exact thing with regard to form validation,
except I'm not looping. Check each condition, and if it fails, never
mind validating the rest of the fields.

If you're concerned about the possibility of having to replace the
$abort_now variable with a function later, you have two choices. First,
use an editor which does search-and-replace efficiently. Second, set up
a function which is called wherever you have $abort_now currently. For
the moment, have that function simply check the $abort_now variable. In
the future, you could have it do something else, but not have to change
your existing code.

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---




On Jun 30, 2009, at 10:48 PM, Paul M Foster <pa...@quillandmouse.com> wrote:

On Tue, Jun 30, 2009 at 06:31:54PM -0500, Flint Million wrote:

This might seem silly but here's what I'm trying to do

Suppose I have some kind of check variable - say for example
$abort_now. Or it could be a function. Something to be evaluated to a
value.

I want to execute a block of statements, but after EACH statement
executes, check the value of $abort_now and if it is true, break; out
of the block.

Here's an example

do {
 do_something();
 do_something_else();
 do_another_thing();
 do_yet_another_thing();
 and_keep_doing_things();
} while ($abort_now != 1);

What I want to happen is for each statement to execute, and keep
looping around, until the $abort_now variable is set to 1. Now,
suppose any one of the statements in that block may cause $abort_now
to become 1. If that happens, I want the block to stop executing
immediately and not continue executing further statements.

For example, do_another_thing() causes $abort_now to equal 1. I do not
want do_yet_another_thing or keep doing things to execute. I want the
loop to stop right there.

The only way I can think of doing it is to insert a check after each
statement:

do {
 do_something();
 if ($abort_now == 1) { break; }
 do_something_else();
 if ($abort_now == 1) { break; }
 do_another_thing();
 if ($abort_now == 1) { break; }
 do_yet_another_thing();
 if ($abort_now == 1) { break; }
 and_keep_doing_things();
 if ($abort_now == 1) { break; }
} while (TRUE);

This might work for 2 or 3 statements but imagine a block of say 15
statements. Having a check after each one would look ugly, and cause
trouble if the condition needed to be changed or if I instead decided
to check it, say, against a function.

So is this possible to do with built in code? or am I stuck with
having to put a check after each statement in?

Aside from Shawn's exception method, you're relatively limited in how
you do this. All the other methods amount to essentially what you're
doing here. There's no other loop structure in PHP that will do it any
better than what you've devised.

FWIW, I've had to do this exact thing with regard to form validation,
except I'm not looping. Check each condition, and if it fails, never
mind validating the rest of the fields.


Isn't that a little rough on the user? Wouldn't a better user experience be to check all the fields and report all errors back to the user in one pass, rather than after each element that fails?






If you're concerned about the possibility of having to replace the
$abort_now variable with a function later, you have two choices. First, use an editor which does search-and-replace efficiently. Second, set up
a function which is called wherever you have $abort_now currently. For
the moment, have that function simply check the $abort_now variable. In the future, you could have it do something else, but not have to change
your existing code.

Paul

--
Paul M. Foster

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Bastien

Sent from my iPod

--- End Message ---
--- Begin Message ---
On Tue, Jun 30, 2009 at 11:21:03PM -0400, Phpster wrote:

> On Jun 30, 2009, at 10:48 PM, Paul M Foster <pa...@quillandmouse.com>
> wrote:
>

<snip>

>>
>> FWIW, I've had to do this exact thing with regard to form validation,
>> except I'm not looping. Check each condition, and if it fails, never
>> mind validating the rest of the fields.
>>
>
> Isn't that a little rough on the user? Wouldn't a better user
> experience be to check all the fields and report all errors back to
> the user in one pass, rather than after each element that fails?

<blush>

Well, yes. Early on I tended to do it this way, but I made my error
handling more sophisticated over time.

Actually, where I do something like this now is on some blog software I
wrote. There are numerous fields to be filled out, and if all are
filled out correctly, it updates a database and dumps some files to
disk. At each field check, I increment an error count variable if the
user screws up. And before I check each field, I check the error count.
If there are errors, then I may not update the database and dump the
files, so there's no point in checking the contents of certain fields.
For example, if the user didn't provide a title for the post, I'm not
going to go through the process of XSS checking on their post content,
since I'm not going to store it until they give me a title. I'll report
to them on the missing fields, though, and allow them to repair.

Paul
-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
On Tue, 30 Jun 2009 18:31:54 -0500, Flint Million wrote:

> Suppose I have some kind of check variable - say for example
> $abort_now. Or it could be a function. Something to be evaluated to a
> value.
> 
> I want to execute a block of statements, but after EACH statement
> executes, check the value of $abort_now and if it is true, break; out
> of the block.
> 
> Here's an example
> 
> do {
>   do_something();
>   do_something_else();
>   do_another_thing();
>   do_yet_another_thing();
>   and_keep_doing_things();
> } while ($abort_now != 1);

I would have the functions return true or false and
do something like:

  while (do_something()         &&
         do_something_else()    &&
         do_another_thing()     &&
         do_yet_another_thing() &&
         and_keep_doing_things())
    ;


/Nisse

--- End Message ---
--- Begin Message ---
Tom Worster wrote:
*snip*

michael: radios and checkboxes take the checked attribute -- options in
selects take the selected attribute.

Doh - I knew that.
Typo. I always thought it silly there were two different attributes anyway, when they basically are same thing and can never both occur in same tag.
--- End Message ---
--- Begin Message ---
Jay Blanchard wrote:
> [snip]
> Use the OOP interface to mysqli or PDO and these problems don't happen
> [/snip]
>
> Either that or include a modicum of error checking in your code. 
>
>   
OK, Ok, I feel stupid enough already.
I'm not sure I want to get in that deep... it's tough enough with the
simple stuff...
so, talk to me about the OOP interface or the PDO... :-\

-- 
Hervé Kempf: "Pour sauver la planète, sortez du capitalisme."
-------------------------------------------------------------
Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com/andypantry.php


--- End Message ---
--- Begin Message ---
2009/7/1 PJ <af.gour...@videotron.ca>:
> Jay Blanchard wrote:
>> [snip]
>> Use the OOP interface to mysqli or PDO and these problems don't happen
>> [/snip]
>>
>> Either that or include a modicum of error checking in your code.
>>
>>
> OK, Ok, I feel stupid enough already.
> I'm not sure I want to get in that deep... it's tough enough with the
> simple stuff...
> so, talk to me about the OOP interface or the PDO... :-\

The first step on the road to enlightenment is to learn how to learn
without asking for help.

1) RTFM

2) Try it - set up a sandbox where you can play with code and make
mistakes without consequences

3) Google/Bing it (yeah, Bing's never gonna catch on like that!)

4) Try it again

5) If you're still having problems ask here and include evidence that
you've put some effort into steps 1-4

This list should be your last port of call when you can't figure something out.

Now I have to disagree that the OO variants of the MySQL API are any
better than the plain old mysql_* functions. In particular I have
found PDO to be significantly slower. Yes you have to take care of
escaping values in SQL statements yourself, but having to be
consciously aware of security issues is never a bad thing unless
you're lazy about it.

As Jay says you cannot assume that any code that calls external
services is going to work. You need to check return values, catch
exceptions and do everything else you can to handle unexpected events.
I've found that 99.99% of the time MySQL is perfectly reliable, but in
the 0.01% you may unexpectedly lose the connection for any number of
reasons. If you don't handle it then you could end up losing data but
happily telling your users it was stored successfully.

In general this is known as defensive programming. Never assume
anything, handle every eventuality you can think of including the
"this will never happen" cases, and always make sure you have a
catch-all for stuff you can't think of. Learn to do this early and
you'll have a much better time of it.

Now I have to go and find June - I'm sure I lost a few days in there somewhere.

-Stuart

-- 
http://stut.net/

--- End Message ---
--- Begin Message ---
Stuart wrote:
3) Google/Bing it (yeah, Bing's never gonna catch on like that!)

Of cause it would be nice to see the Bing clockwork toys that run it ...
I couldn't help giggle when they announced they were naming it after a toy manuafacturer :)

--
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 ---
--- Begin Message ---
Hi all,

I have a php application for which I have a page which creates temporary junk and puts it into a persistent store (in this case a postgres database, but that is beside the point.)

I have a Save button which puts the stuff I really want into the persistent store and cleans up the temporary junk. I have a Cancel button which only cleans up the temporary junk.

I would really like to have the cleanup code run anytime a user leaves the page without hitting the Save button. Is there anyway to do this? I.e. have php code called conditionally on exiting the page?

Thanks
Mary

--- End Message ---
--- Begin Message ---
Mary Anderson wrote:
Hi all,

I have a php application for which I have a page which creates temporary junk and puts it into a persistent store (in this case a postgres database, but that is beside the point.)

I have a Save button which puts the stuff I really want into the persistent store and cleans up the temporary junk. I have a Cancel button which only cleans up the temporary junk.

I would really like to have the cleanup code run anytime a user leaves the page without hitting the Save button. Is there anyway to do this? I.e. have php code called conditionally on exiting the page?

Thanks
Mary


I do a similar thing and put a unix timestamp on the temporary database.
A cron job run once a day calls a page that deletes anything in the temporary database that has a timestamp > 24 hours old.

You don't have to do it with a cron job - you can also have the function that writes to the table delete anything older than X hours if you don't have facilities to cron (though you can run the cron job from any machine, doesn't need to run on the server)

something like this

<?php
require('dbconnect.inc.php');
$expire = time() - (24 * 60 * 60);
$sql = "DELETE FROM temporary WHERE stamp < $expire";
mysql_query($sql);
?>

The security of who can access it isn't important, as it only deletes what you no longer want anyway and it returns no data to the browser.

Write a shell script that fetches it via wget and have cron execute it daily.

Maybe there's a better way, but it works for me.

For temporary files on the filesystem, I use http://linux.about.com/library/cmd/blcmdl8_tmpwatch.htm
--- End Message ---
--- Begin Message ---
On Tue, Jun 30, 2009 at 06:38:19PM -0700, Mary Anderson wrote:

> Hi all,
>
>   I have a php application for which I have a page which creates
> temporary junk and puts it into a persistent store  (in this case a
> postgres database, but that is beside the point.)
>
>   I have a Save button which puts the stuff I really want into the
> persistent store and cleans up the temporary junk.  I have a Cancel
> button which only cleans up the temporary junk.
>
>    I would really like to have the cleanup code run anytime a user
> leaves the page without hitting the Save button.  Is there anyway to do
> this?  I.e. have php code called conditionally on exiting the page?

If the user hits the "Back" button or exits via clicking on some link on
the page, there's no reasonable way to do this (Michael's cron versions
excepted). Because the HTTP protocol has no effective memory, there's no
way for it to know that the user exited without saving. You can do
various tricky things like set a $_SESSION variable, and then have it
checked at the top of each page where the user could go, and check and
clean up if the variable has a certain value. But that's pretty tedious.
You could execute the whole thing as part of a class, and put a check in
the constructor of the class (where it will be called on every page)
which cleans up if necessary.

In other words, there are ways to do this, but they are tedious. The
PHP/HTTP execution engines have no way of doing it on their own.

(Oh, there may be a way to do this with Javascript. I'm not good with
Javascript, but maybe there's some "OnExit" event which you could use to
cause a Javascript function to do an AJAX call to a PHP script which
cleans up. I dunno.)

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
yes, the browser evoke unload event when leave the page (back, forward, or
close). you can send a message via ajax, but it may not been received by the
server successful, (when close the browser)

I think the best way is maintaining a timestamp as michael & paul say, and
clear the 'junk' timely.

there is another way if you need to get some INFO when user leaves this page
(such as leave time...):
 save the INFO into cache
 set time interval do the follow:
  1. load INFO from cache
  2. send the INFO via ajax and wait the server confirm it has received the
INFO
  3. if the server response is ture, delete the INFO or send the INFO again
a while later
by this way, even users closed their browser, but the next time they open
your web page, they will send the cached INFO too.

On Wed, Jul 1, 2009 at 10:59 AM, Paul M Foster <pa...@quillandmouse.com>wrote:

> On Tue, Jun 30, 2009 at 06:38:19PM -0700, Mary Anderson wrote:
>
> > Hi all,
> >
> >   I have a php application for which I have a page which creates
> > temporary junk and puts it into a persistent store  (in this case a
> > postgres database, but that is beside the point.)
> >
> >   I have a Save button which puts the stuff I really want into the
> > persistent store and cleans up the temporary junk.  I have a Cancel
> > button which only cleans up the temporary junk.
> >
> >    I would really like to have the cleanup code run anytime a user
> > leaves the page without hitting the Save button.  Is there anyway to do
> > this?  I.e. have php code called conditionally on exiting the page?
>
> If the user hits the "Back" button or exits via clicking on some link on
> the page, there's no reasonable way to do this (Michael's cron versions
> excepted). Because the HTTP protocol has no effective memory, there's no
> way for it to know that the user exited without saving. You can do
> various tricky things like set a $_SESSION variable, and then have it
> checked at the top of each page where the user could go, and check and
> clean up if the variable has a certain value. But that's pretty tedious.
> You could execute the whole thing as part of a class, and put a check in
> the constructor of the class (where it will be called on every page)
> which cleans up if necessary.
>
> In other words, there are ways to do this, but they are tedious. The
> PHP/HTTP execution engines have no way of doing it on their own.
>
> (Oh, there may be a way to do this with Javascript. I'm not good with
> Javascript, but maybe there's some "OnExit" event which you could use to
> cause a Javascript function to do an AJAX call to a PHP script which
> cleans up. I dunno.)
>
> Paul
>
> --
> Paul M. Foster
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Best Regards!
Wen Dong

--- End Message ---
--- Begin Message ---




On Jun 30, 2009, at 10:59 PM, Paul M Foster <pa...@quillandmouse.com> wrote:

On Tue, Jun 30, 2009 at 06:38:19PM -0700, Mary Anderson wrote:

Hi all,

 I have a php application for which I have a page which creates
temporary junk and puts it into a persistent store  (in this case a
postgres database, but that is beside the point.)

 I have a Save button which puts the stuff I really want into the
persistent store and cleans up the temporary junk.  I have a Cancel
button which only cleans up the temporary junk.

  I would really like to have the cleanup code run anytime a user
leaves the page without hitting the Save button. Is there anyway to do
this?  I.e. have php code called conditionally on exiting the page?

If the user hits the "Back" button or exits via clicking on some link on the page, there's no reasonable way to do this (Michael's cron versions excepted). Because the HTTP protocol has no effective memory, there's no
way for it to know that the user exited without saving. You can do
various tricky things like set a $_SESSION variable, and then have it
checked at the top of each page where the user could go, and check and
clean up if the variable has a certain value. But that's pretty tedious. You could execute the whole thing as part of a class, and put a check in
the constructor of the class (where it will be called on every page)
which cleans up if necessary.

In other words, there are ways to do this, but they are tedious. The
PHP/HTTP execution engines have no way of doing it on their own.

(Oh, there may be a way to do this with Javascript. I'm not good with
Javascript, but maybe there's some "OnExit" event which you could use to
cause a Javascript function to do an AJAX call to a PHP script which
cleans up. I dunno.)

Paul

--
Paul M. Foster

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


The js function Onunload() could do that but there is the issue if the user hits the back button, or moves to another page.

It's the same issue as the standard logout button. Users don't have to trip this to leave the site, closing the browser or moving to another site creates the same issues.

Doing the clean up via a cron is prolly gonna be the best option


Bastien

Sent from my iPod
--- End Message ---
--- Begin Message ---


Mary Anderson wrote:
Hi all,

I have a php application for which I have a page which creates temporary junk and puts it into a persistent store (in this case a postgres database, but that is beside the point.)

I have a Save button which puts the stuff I really want into the persistent store and cleans up the temporary junk. I have a Cancel button which only cleans up the temporary junk.

I would really like to have the cleanup code run anytime a user leaves the page without hitting the Save button. Is there anyway to do this? I.e. have php code called conditionally on exiting the page?

Thanks
Mary

I assume you looked at register_shutdown_function() and 
session_set_save_handler()

One way I handled this problem is to save the data in "cleanup" files. Then when the page is called by a new client, a function checks the file's time stamp, say if it's more than 10 minutes earlier, does the cleanup process.

This technique assumes that a new client will come along and that the cleanup process(es) are fairly fast.

Al...

--- End Message ---
--- Begin Message ---
This is what I did. And it worked.

$saveFiles = array();
$arrSize=sizeof($saveFiles);
            for ($number = 0; $number < $arrSize; $number++) {
                $saveFilesDump = "$saveFiles[$number], ";
                echo "$saveFiles[$number], ";
            }

File1.txt, File2.txt, File3.txt,

--
Louie Miranda (lmira...@gmail.com)
http://www.louiemiranda.net

Quality Web Hosting - www.axishift.com
Pinoy Web Hosting, Web Hosting Philippines


2009/6/30 João Cândido de Souza Neto <j...@consultorweb.cnt.br>

> May be array_merge($array, explode(",", $string)).
>
> --
> João Cândido de Souza Neto
> SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS
> Fone: (0XX41) 3033-3636 - JS
> www.siens.com.br
>
> "Louie Miranda" <lmira...@gmail.com> escreveu na mensagem
> news:5016fc50906300125s12389ae1v3323c63c30343...@mail.gmail.com...
> > GPS Administrative Page v2.3.12 (BETA)My array:
> > Array ( [0] => Demo2.txt [1] => Demo.txt [2] => Demo.txt )
> >
> > How could I push the values as:
> >
> > -> Demo2.txt, Demo.txt, Demo.txt?
> >
> > Not sure which approach is good.
> >
> > $saveFiles = array();
> > array_push($saveFiles, $ufName);
> >
> > Help
> > --
> > Louie Miranda (lmira...@gmail.com)
> > http://www.louiemiranda.net
> >
> > Quality Web Hosting - www.axishift.com
> > Pinoy Web Hosting, Web Hosting Philippines
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Lukas Kahwe Smith wrote:
Hello!

The PHP Development Team would like to announce the immediate release of PHP 5.3.0. This release is a major improvement in the 5.X series, which includes a large number of new features and bug fixes.

Release Announcement: http://www.php.net/release/5_3_0.php
Downloads:            http://php.net/downloads.php#v5.3.0
Changelog:            http://www.php.net/ChangeLog-5.php#5.3.0

regards,
Johannes and Lukas


While I don't plan on using it on my production server just yet, I am packaging this for centos 5.3.

One of the neat additions (I think it is an addition) that I saw in the release notes is phar - which looks like a really slick way to distribute php applications.

My i386 build is done, my x86_64 build is going (will go all the way through as I tweaked the rpm on an x86_64 desktop before sending to my mock build machine)

I won't provide binary RPM's, but for the RHEL5/CentOS 5.x community that wants to play with it, src.rpm will be here:

http://www.clfsrpm.net/php53/

I just have to try to rebuild some of the pecl modules, and test it to make sure the build doesn't segfault or give me the finger or anything rude like that before I upload the src.rpm.
--- End Message ---
--- Begin Message ---
Michael A. Peters wrote:

http://www.clfsrpm.net/php53/

I just have to try to rebuild some of the pecl modules, and test it to make sure the build doesn't segfault or give me the finger or anything rude like that before I upload the src.rpm.


Ugh - limited testing shows the interpreter working, but ...

[r...@jerusalem ~]# pear upgrade-all
Nothing to upgrade-all
[r...@jerusalem ~]# pear list-channels
Segmentation fault
[r...@jerusalem ~]#

Seg fault happens w/ both older pear 1.7.2 (from Fedora 9) and pear 1.8.1 (packaged by me) - both versions of pear work dandy on php 5.2.9 - so somewhere something ain't quite right.


--- End Message ---
--- Begin Message ---
Michael A. Peters wrote:
Michael A. Peters wrote:

http://www.clfsrpm.net/php53/

I just have to try to rebuild some of the pecl modules, and test it to make sure the build doesn't segfault or give me the finger or anything rude like that before I upload the src.rpm.


Ugh - limited testing shows the interpreter working, but ...

[r...@jerusalem ~]# pear upgrade-all
Nothing to upgrade-all
[r...@jerusalem ~]# pear list-channels
Segmentation fault
[r...@jerusalem ~]#

Seg fault happens w/ both older pear 1.7.2 (from Fedora 9) and pear 1.8.1 (packaged by me) - both versions of pear work dandy on php 5.2.9 - so somewhere something ain't quite right.



No seg fault if I don't load the suhosin module. (suhosin not an issue in 5.2.9) - works as expected, so suhosin needs an update.
--- End Message ---
--- Begin Message ---
Hi List,
 
This is the first job chain I am creating using manages job chains. I am trying 
to create 2 order jobs, 1 order and one jobchain. First I created an orderjob 
and named it and tried to edit it. A new window displayed with the properties 
of that order job. I choose "executable file" from job type and saved the job. 
Then I clicked on param1 and wrote the code  sh -c "echo hello world" and 
clicked on "store" button. The job summary explorer came. The jobs saved are in 
RED color and "X" mark is indicating. I thought that this is throwing an error 
and checked the log files. I couldn't see any error in the logs. I am following 
the "OSJS Sample - Job Chain Setup in Job Scheduler.mht" file. I observed some 
differences in the screen shots of this demo file and my current view.
 

1.      
        Why it is showing the red color after submit of the order jobs, job 
chain and order too.
2.      
        In the Orderjob edit window, I couldn't see the "Active YES/NO" radio 
buttons", "Scheduler ID" box and at the end of the page there are only 2 
buttons "Store" and "Cancel", but I couldn't see the "store and submit" button.
3.      
        After creating the order job then we need to choose the job scheduler 
from the list where we need to submit the job order. How to get this small 
window with schedulers list.
4.      
        When I edit the job chain there are only 2 buttons not 4. Missing 
buttons are "store and submit" and "store and remove orders". Please advice.
5.      
        Here also I found that the job chain and order are in red color with 
"x" mark on it.

Please advice me to get rid of all these errors and get success in executing 
this sample program.

 

With thanks and Regards, 

Suresh.G
 

--- End Message ---
--- Begin Message ---
2009/7/1 Suresh Gupta VG <sures...@zensar.com>:
> Hi List,
>
> This is the first job chain I am creating using manages job chains. I am 
> trying to create 2 order jobs, 1 order and one jobchain. First I created an 
> orderjob and named it and tried to edit it. A new window displayed with the 
> properties of that order job. I choose "executable file" from job type and 
> saved the job. Then I clicked on param1 and wrote the code  sh -c "echo hello 
> world" and clicked on "store" button. The job summary explorer came. The jobs 
> saved are in RED color and "X" mark is indicating. I thought that this is 
> throwing an error and checked the log files. I couldn't see any error in the 
> logs. I am following the "OSJS Sample - Job Chain Setup in Job Scheduler.mht" 
> file. I observed some differences in the screen shots of this demo file and 
> my current view.
>
>
> 1.
>        Why it is showing the red color after submit of the order jobs, job 
> chain and order too.
> 2.
>        In the Orderjob edit window, I couldn't see the "Active YES/NO" radio 
> buttons", "Scheduler ID" box and at the end of the page there are only 2 
> buttons "Store" and "Cancel", but I couldn't see the "store and submit" 
> button.
> 3.
>        After creating the order job then we need to choose the job scheduler 
> from the list where we need to submit the job order. How to get this small 
> window with schedulers list.
> 4.
>        When I edit the job chain there are only 2 buttons not 4. Missing 
> buttons are "store and submit" and "store and remove orders". Please advice.
> 5.
>        Here also I found that the job chain and order are in red color with 
> "x" mark on it.
>
> Please advice me to get rid of all these errors and get success in executing 
> this sample program.

This would appear to be relating to a specific product and not PHP in
general. You see the clue is in the list name... PHP General.

Please contact the company or developer that supplied the software you
are trying to use - they might know what the heck you're talking
about.

-Stuart

-- 
http://stut.net/

--- End Message ---

Reply via email to