[PHP] PHP 5.2.17 zend_mm_panic Called

2011-05-05 Thread Bruce Bailey

Hi

I recently upgraded from PHP 5.2.3 to PHP 5.2.17.

After that, some of my pages keep failing with either Segfaults or calls to 
zend_mm_panic.  My gdb backtrace shows:

(gdb) bt
#0  zend_mm_panic (message=0xb71fbda4 "zend_mm_heap corrupted") at 
/src/php-5.2.17/Zend/zend_alloc.c:92
#1  0xb70a1555 in zend_mm_remove_from_free_list (heap=0x80a61c8, 
mm_block=0x422d97a4) at /src/php-5.2.17/Zend/zend_alloc.c:838
#2  0xb70a0a21 in _zend_mm_free_int (heap=0x80a61c8, p=0x422d9964) at 
/src/php-5.2.17/Zend/zend_alloc.c:1984
#3  0xb70a0f8e in _efree (ptr=0x422d97d4) at 
/src/php-5.2.17/Zend/zend_alloc.c:2311
#4  0xb70a91c9 in free_zend_constant (c=0x82f8398) at 
/src/php-5.2.17/Zend/zend_variables.h:35
#5  0xb70bc4cc in zend_hash_apply_deleter (ht=0x80a6978, p=0x82f8358) at 
/src/php-5.2.17/Zend/zend_hash.c:611
#6  0xb70bc7ba in zend_hash_reverse_apply (ht=0x80a6978, apply_func=0xb70a922c 
)
at /src/php-5.2.17/Zend/zend_hash.c:760
#7  0xb70a9523 in clean_non_persistent_constants () at 
/src/php-5.2.17/Zend/zend_constants.c:162
#8  0xb70aa1a5 in shutdown_executor () at 
/src/php-5.2.17/Zend/zend_execute_API.c:303
#9  0xb70b4a83 in zend_deactivate () at /src/php-5.2.17/Zend/zend.c:860
#10 0xb708102e in php_request_shutdown (dummy=0x0) at 
/src/php-5.2.17/main/main.c:1504
#11 0xb711106e in apache_php_module_main (r=0x828ce5c, display_source_mode=0) 
at /src/php-5.2.17/sapi/apache/sapi_apache.c:59
#12 0xb7111a5b in send_php (r=0x828ce5c, display_source_mode=0, filename=0x0) 
at /src/php-5.2.17/sapi/apache/mod_php5.c:666
#13 0xb7111b67 in send_parsed_php (r=0x828ce5c) at 
/src/php-5.2.17/sapi/apache/mod_php5.c:681
#14 0x08054aa4 in ap_invoke_handler ()
#15 0x0806a2db in process_request_internal ()
#16 0x0806a737 in ap_internal_redirect ()
#17 0x400a071f in mod_gzip_redir1_handler () from 
/adp/home/www_serv/libexec/mod_gzip.so
#18 0x4009eb06 in mod_gzip_handler () from 
/adp/home/www_serv/libexec/mod_gzip.so
#19 0x08054aa4 in ap_invoke_handler ()
#20 0x0806a2db in process_request_internal ()
#21 0x0806a33a in ap_process_request ()
#22 0x0806109c in child_main ()
#23 0x08061322 in make_child ()
#24 0x08061661 in perform_idle_server_maintenance ()
#25 0x08061c9a in standalone_main ()
#26 0x080622ba in main ()

Has anyone seen this before?  Any assistance would be greatly appreciated.

Thanks in advance,

Bruce
  

[PHP] 'dl() is deprecated' Error in PHP5.2.3

2010-09-01 Thread Bruce Bailey

Hi

Can someone explain to me why I'm getting the 'dl() is deprecated' error? 
I'm running PHP5.2.3 and I believe that I have the php.ini settings correct:

error.log:[2010-08-24T13:38:53] PC Error: dl() 
[function.dl]: dl() is deprecated - use extension=test.so in your 
php.ini


bash-2.05b$ php --version
PHP 5.2.3 (cli) (built: May  4 2009 16:23:02)

bash-2.05b$ php -i | grep -i safe
Thread Safety => disabled
safe_mode => Off => Off
safe_mode_exec_dir => no value => no value
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sql.safe_mode => Off => Off


bash-2.05b$ php -i | grep -i dl
enable_dl => On => On

I thought that 'dl' wasn't deprecated until version 5.3.x

Thanks in advance,

Bruce

  

[PHP] still having trouble with time-stamp subtraction two mysql fields

2010-05-27 Thread Bruce Gilbert
Hi there,

I am still attempting to get a display of the result of my two
timestamp fields subtracted from one another in minutes and hours if
needed. This is for a form and the timestamps are recorded when a user
logs in [login_timestamp] and when the form is
submitted[submit_timestamp]. The display still doesn't appear to be
accurate and for some reason the results are displayed three times for
each record underneath the results for one person. So it looks
something like.

Tom Thumb
Answer 1
Answer 2
Answer 3 etc.
[time 1]
[time 2]
[time 3]

Sally Smith
Answer 1
Answer 2
Answer 3 etc.
[time 1]
[time 2]
[time 3]

Bob Jones
Answer 1
Answer 2
Answer 3
[time 1]
[time 2]
[time 3]

time1,2,3 being for Tom Thumb, Sally Smith and Bob Jones respectively.

My entire code for the form looks like this.



Exam Results



exam results

Candidate Name

{$row['name']}";
echo "Section 1";

   for ($i =1;$i<9;++$i) {
echo "{$row['Answer'.$i]}";
  }
echo "Section 2";

echo "{$row['Answer10']}";
echo "Section 3";

echo "{$row['Answer11']}";
echo "Section 4";

echo "{$row['Answer12']}";



$sql_timestamp = "SELECT
TIMESTAMPDIFF(SECOND,submit_timestamp,login_timestamp) as cTime FROM
Responses LEFT JOIN Candidates USING (user_id)";

$result_timestamp = mysql_query($sql_timestamp);
if (!$result_timestamp) {
echo "Could not successfully run query ($sql_timestamp) from DB: "
. mysql_error();
exit;
}
while($row = mysql_fetch_assoc($result_timestamp)){
  $formatted_completion_time = formatTime($row['cTime']);
  echo "Completion Time:\n";
  echo $formatted_completion_time;
  echo "";
}

}
mysql_free_result($result);



?>





and my function code for the subtracting of the two fields is here:



any assistance that can be provided is greatly appreciated.

-- 
::Bruce::

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



Re: [PHP] determining time difference between two timestamp fields.

2010-05-25 Thread Bruce Gilbert
thanks again for all the help.

>The output of strtotime() is an int - specifically a number of
>seconds. Subtract two number of seconds from each other and what do
>you get? Furthermore, divide by 60 and what do you get?
> Should you want to format this, you can consider sprintf(), though,
>if you just want a whole number of minutes, just use floor().

I am using floor() now instead of date()

> Try just selecting all values from your database, to see what's
> actually in there.

I found out the problem.the value in (user_id) in the two tables has
to be the same. That is why the Query wasn't working.

I still am not getting the desired result though. Something that
should be displaying as five minutes displays as -117 minutes

My current code.
$submit_time = strtotime($row['submit_timestamp']);
$login_time = strtotime($row['login_timestamp']);

$completion_time = $submit_time - $login_time;
$completion_time /= 60;

$formatted_completion_time = floor($completion_time );

echo "Completion Time:";
echo $formatted_completion_time;
echo " minutes";
echo "";


On Tue, May 25, 2010 at 3:54 PM, Peter Lind  wrote:
> On 25 May 2010 21:50, Bruce Gilbert  wrote:
>> yea, not sure why my Query isn't returning a value though? If I don't
>> use date(), what should I use?
>
> The output of strtotime() is an int - specifically a number of
> seconds. Subtract two number of seconds from each other and what do
> you get? Furthermore, divide by 60 and what do you get?
>  Should you want to format this, you can consider sprintf(), though,
> if you just want a whole number of minutes, just use floor().
>
>> the SQL for the timestamps looks like this.
>> `login_timestamp` datetime NOT NULL default '-00-00 00:00:00',
>> `submit_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
>
> Try just selecting all values from your database, to see what's
> actually in there.
>
>> sorry for the top-posting, but I think you have to in gmail.
>
> No you don't, that's ridiculous.
>
> --
> 
> WWW: http://plphp.dk / http://plind.dk
> LinkedIn: http://www.linkedin.com/in/plind
> BeWelcome/Couchsurfing: Fake51
> Twitter: http://twitter.com/kafe15
> 
>



-- 
::Bruce::

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



Re: [PHP] determining time difference between two timestamp fields.

2010-05-25 Thread Bruce Gilbert
yea, not sure why my Query isn't returning a value though? If I don't
use date(), what should I use?

the SQL for the timestamps looks like this.
`login_timestamp` datetime NOT NULL default '-00-00 00:00:00',
`submit_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,

sorry for the top-posting, but I think you have to in gmail.


On Tue, May 25, 2010 at 3:14 PM, Peter Lind  wrote:
> On 25 May 2010 21:09, Bruce Gilbert  wrote:
>> the resulting output with that code is a little weird. I get September
>> 3, 1970 2:39:32pm
>>
>> I think part of the problem is my Query. When I run it in PHP MyAdmin
>> I get a null value for login_timestamp even though there is indeed a
>> timestamp there. The Query again is:
>>
>> SELECT 
>> Responses.editor_name,Answer1,Answer2,Answer3,Answer4,Answer5,Answer6,Answer7,Answer8,Answer9,Answer10,Answer11,Answer12,submit_timestamp,login_timestamp
>>        FROM Responses LEFT JOIN Candidates USING (user_id)
>>
>> login_timestamp is in a table called 'Candidates' and submit_timestamp
>> is in a tables called 'Responses'.
>>
>> thanks for all the help to this point.
>>
>> On Tue, May 25, 2010 at 2:28 PM, Ashley Sheridan
>>  wrote:
>>> On Tue, 2010-05-25 at 14:22 -0400, Bruce Gilbert wrote:
>>>> echo "Completion Time:". date('F j, Y
>>>> g:i:sa',strtotime($row['submit_timestamp']) -
>>>> strtotime($row['login_timestamp']))/60 , "";
>>>
>>> There's a good reason for that! What you're actually doing is this:
>>>
>>> echo "Completion Time:" .
>>>  date('F j, Y g:i:sa',
>>>    strtotime($row['submit_timestamp']) -
>>>    strtotime($row['login_timestamp'])
>>>  )
>>>  / 60
>>>  , "";
>>>
>>> You're trying to divide a string by 60, because date() returns a string.
>>> Put that division inside the brackets for date() rather than outside.
>>>
>>> It might help to break up that whole line of output into several parts.
>>> Put the date into a variable and then just output the HTML line:
>>>
>>> $date = date('F j, Y g:i:sa', (strtotime($row['submit_timestamp']) -
>>> strtotime($row['login_timestamp']))/60);
>>> echo "Completion Time:$date";
>>>
>
> There are two problems you're looking at. The first is the null value
> you're getting, which will invalidate the whole thing. The second
> problem is that you were looking for output along the lines of "60
> minutes" but you're using date() which as the second parameter expects
> a unix timestamp - not two timestamps subtracted from each other.
>  On another note, subtracting the output of two strtotime() calls
> inside the date() call doesn't amount to subtracting anything from a
> string.
>
> Regards
> Peter
>
> --
> 
> WWW: http://plphp.dk / http://plind.dk
> LinkedIn: http://www.linkedin.com/in/plind
> BeWelcome/Couchsurfing: Fake51
> Twitter: http://twitter.com/kafe15
> 
>



-- 
::Bruce::

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



Re: [PHP] determining time difference between two timestamp fields.

2010-05-25 Thread Bruce Gilbert
the resulting output with that code is a little weird. I get September
3, 1970 2:39:32pm

I think part of the problem is my Query. When I run it in PHP MyAdmin
I get a null value for login_timestamp even though there is indeed a
timestamp there. The Query again is:

SELECT 
Responses.editor_name,Answer1,Answer2,Answer3,Answer4,Answer5,Answer6,Answer7,Answer8,Answer9,Answer10,Answer11,Answer12,submit_timestamp,login_timestamp
FROM Responses LEFT JOIN Candidates USING (user_id)

login_timestamp is in a table called 'Candidates' and submit_timestamp
is in a tables called 'Responses'.

thanks for all the help to this point.

On Tue, May 25, 2010 at 2:28 PM, Ashley Sheridan
 wrote:
> On Tue, 2010-05-25 at 14:22 -0400, Bruce Gilbert wrote:
>> echo "Completion Time:". date('F j, Y
>> g:i:sa',strtotime($row['submit_timestamp']) -
>> strtotime($row['login_timestamp']))/60 , "";
>
> There's a good reason for that! What you're actually doing is this:
>
> echo "Completion Time:" .
>  date('F j, Y g:i:sa',
>    strtotime($row['submit_timestamp']) -
>    strtotime($row['login_timestamp'])
>  )
>  / 60
>  , "";
>
> You're trying to divide a string by 60, because date() returns a string.
> Put that division inside the brackets for date() rather than outside.
>
> It might help to break up that whole line of output into several parts.
> Put the date into a variable and then just output the HTML line:
>
> $date = date('F j, Y g:i:sa', (strtotime($row['submit_timestamp']) -
> strtotime($row['login_timestamp']))/60);
> echo "Completion Time:$date";
>
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
>



-- 
::Bruce::

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



Re: [PHP] determining time difference between two timestamp fields.

2010-05-25 Thread Bruce Gilbert
probably not fully understanding what I need to do.

I am trying this.

echo "Completion Time:". date('F j, Y
g:i:sa',strtotime($row['submit_timestamp']) -
strtotime($row['login_timestamp']))/60 , "";


but just returns a zero value.


On Tue, May 25, 2010 at 12:55 PM, Ashley Sheridan
wrote:

>  On Tue, 2010-05-25 at 12:46 -0400, Bruce Gilbert wrote:
>
> Here is what I currently have.
>
> echo "Completion Time:" .
> (strtotime($row['submit_timestamp']) -
> strtotime($row['login_timestamp']))/60 , "";
>
> this gives me an output of 21235172.75
>
> not sure what format that is in? I was hoping for something like 60
> minutes, 30 minutes etc. Don't need the days or seconds. The MySQL
> timestamp is in this format.
>
> 2010-05-17 11:32:45 - 2010-05-17 12:26:13
>
> On Tue, May 25, 2010 at 11:11 AM, Peter Lind  wrote:
> > On 25 May 2010 16:14, Bruce Gilbert  wrote:
> >> Thanks. I know my syntax isn't quite right, but is this close to what
> >> I need to do?
> >>
> >> echo "Completion Time:" . date('F j, Y
> >> g:i:sa', strtotime($row["login_timestamp"] - ["submit_timestamp"])/60)
> >> . "";
> >>
> >
> > No. Assuming that your timestamp is of the -mm-dd HH:ii:ss form,
> > you need to do (strtotime(["submit_timestamp"]) -
> > strtotime($row["login_timestamp"]))/60.
> >
> > Regards
> > Peter
> >
> >>
> >> On Tue, May 25, 2010 at 10:01 AM, Peter Lind  
> >> wrote:
> >>> On 25 May 2010 15:55, Bruce Gilbert  wrote:
> >>>> Here is the situation. I have a form which sets a timestamp when a
> >>>> user logs in using UPDATE in SQL. The field is called
> >>>> 'login_timestamp' and is in a table called 'Candidates'. I have
> >>>> another timestamp which is set when a user submits the form data into
> >>>> the DB and it is called 'submit_timestamp' . What I want to do is
> >>>> determine the amount of time the user takes to complete the form by
> >>>> subtracting the 'login_timestamp' time form the 'submit_timestamp'
> >>>> time. I am using SQL to extract the data here.
> >>>>
> >>>> $sql = "SELECT Responses.name,Answers,submit_timestamp,login_timestamp
> >>>>   FROM Responses LEFT JOIN Candidates USING (user_id)";
> >>>>
> >>>> and then to display the timestamp in readable form.
> >>>>
> >>>> echo "Completion Time:" . date('F j, Y
> >>>> g:i:sa', strtotime($row["login_timestamp"])) . "";
> >>>>
> >>>> so I need to know how to subtract from two timestamp fields, two
> >>>> different tables and come up with the difference in minutes.
> >>>>
> >>>
> >>> In case you're using MySQL, timediff can do the job:
> >>> http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_timediff
> >>>
> >>> Otherwise, just do strtotime(endtime) - strtotime(starttime) / 60.
> >>> That's the difference in minutes.
> >>>
> >>> Regards
> >>> Peter
> >>>
> >>>
> >>> --
> >>> 
> >>> WWW: http://plphp.dk / http://plind.dk
> >>> LinkedIn: http://www.linkedin.com/in/plind
> >>> BeWelcome/Couchsurfing: Fake51
> >>> Twitter: http://twitter.com/kafe15
> >>> 
> >>>
> >>
> >>
> >>
> >> --
> >> ::Bruce::
> >>
> >
> >
> >
> > --
> > 
> > WWW: http://plphp.dk / http://plind.dk
> > LinkedIn: http://www.linkedin.com/in/plind
> > BeWelcome/Couchsurfing: Fake51
> > Twitter: http://twitter.com/kafe15
> > 
> >
>
>
>
> --
> ::Bruce::
>
>
>
> The value returned from strtotime() is a timestamp, the value you output
> from MySQL isn't a timestamp, it's a string-formatted timestamp. If you need
> to format a timestamp use the date() function.
>
>   Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>


-- 
::Bruce::


Re: [PHP] determining time difference between two timestamp fields.

2010-05-25 Thread Bruce Gilbert
Here is what I currently have.

echo "Completion Time:" .
(strtotime($row['submit_timestamp']) -
strtotime($row['login_timestamp']))/60 , "";

this gives me an output of 21235172.75

not sure what format that is in? I was hoping for something like 60
minutes, 30 minutes etc. Don't need the days or seconds. The MySQL
timestamp is in this format.

2010-05-17 11:32:45 - 2010-05-17 12:26:13

On Tue, May 25, 2010 at 11:11 AM, Peter Lind  wrote:
> On 25 May 2010 16:14, Bruce Gilbert  wrote:
>> Thanks. I know my syntax isn't quite right, but is this close to what
>> I need to do?
>>
>> echo "Completion Time:" . date('F j, Y
>> g:i:sa', strtotime($row["login_timestamp"] - ["submit_timestamp"])/60)
>> . "";
>>
>
> No. Assuming that your timestamp is of the -mm-dd HH:ii:ss form,
> you need to do (strtotime(["submit_timestamp"]) -
> strtotime($row["login_timestamp"]))/60.
>
> Regards
> Peter
>
>>
>> On Tue, May 25, 2010 at 10:01 AM, Peter Lind  wrote:
>>> On 25 May 2010 15:55, Bruce Gilbert  wrote:
>>>> Here is the situation. I have a form which sets a timestamp when a
>>>> user logs in using UPDATE in SQL. The field is called
>>>> 'login_timestamp' and is in a table called 'Candidates'. I have
>>>> another timestamp which is set when a user submits the form data into
>>>> the DB and it is called 'submit_timestamp' . What I want to do is
>>>> determine the amount of time the user takes to complete the form by
>>>> subtracting the 'login_timestamp' time form the 'submit_timestamp'
>>>> time. I am using SQL to extract the data here.
>>>>
>>>> $sql = "SELECT Responses.name,Answers,submit_timestamp,login_timestamp
>>>>           FROM Responses LEFT JOIN Candidates USING (user_id)";
>>>>
>>>> and then to display the timestamp in readable form.
>>>>
>>>> echo "Completion Time:" . date('F j, Y
>>>> g:i:sa', strtotime($row["login_timestamp"])) . "";
>>>>
>>>> so I need to know how to subtract from two timestamp fields, two
>>>> different tables and come up with the difference in minutes.
>>>>
>>>
>>> In case you're using MySQL, timediff can do the job:
>>> http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_timediff
>>>
>>> Otherwise, just do strtotime(endtime) - strtotime(starttime) / 60.
>>> That's the difference in minutes.
>>>
>>> Regards
>>> Peter
>>>
>>>
>>> --
>>> 
>>> WWW: http://plphp.dk / http://plind.dk
>>> LinkedIn: http://www.linkedin.com/in/plind
>>> BeWelcome/Couchsurfing: Fake51
>>> Twitter: http://twitter.com/kafe15
>>> 
>>>
>>
>>
>>
>> --
>> ::Bruce::
>>
>
>
>
> --
> 
> WWW: http://plphp.dk / http://plind.dk
> LinkedIn: http://www.linkedin.com/in/plind
> BeWelcome/Couchsurfing: Fake51
> Twitter: http://twitter.com/kafe15
> 
>



-- 
::Bruce::

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



Re: [PHP] determining time difference between two timestamp fields.

2010-05-25 Thread Bruce Gilbert
Thanks. I know my syntax isn't quite right, but is this close to what
I need to do?

echo "Completion Time:" . date('F j, Y
g:i:sa', strtotime($row["login_timestamp"] - ["submit_timestamp"])/60)
. "";



On Tue, May 25, 2010 at 10:01 AM, Peter Lind  wrote:
> On 25 May 2010 15:55, Bruce Gilbert  wrote:
>> Here is the situation. I have a form which sets a timestamp when a
>> user logs in using UPDATE in SQL. The field is called
>> 'login_timestamp' and is in a table called 'Candidates'. I have
>> another timestamp which is set when a user submits the form data into
>> the DB and it is called 'submit_timestamp' . What I want to do is
>> determine the amount of time the user takes to complete the form by
>> subtracting the 'login_timestamp' time form the 'submit_timestamp'
>> time. I am using SQL to extract the data here.
>>
>> $sql = "SELECT Responses.name,Answers,submit_timestamp,login_timestamp
>>           FROM Responses LEFT JOIN Candidates USING (user_id)";
>>
>> and then to display the timestamp in readable form.
>>
>> echo "Completion Time:" . date('F j, Y
>> g:i:sa', strtotime($row["login_timestamp"])) . "";
>>
>> so I need to know how to subtract from two timestamp fields, two
>> different tables and come up with the difference in minutes.
>>
>
> In case you're using MySQL, timediff can do the job:
> http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_timediff
>
> Otherwise, just do strtotime(endtime) - strtotime(starttime) / 60.
> That's the difference in minutes.
>
> Regards
> Peter
>
>
> --
> 
> WWW: http://plphp.dk / http://plind.dk
> LinkedIn: http://www.linkedin.com/in/plind
> BeWelcome/Couchsurfing: Fake51
> Twitter: http://twitter.com/kafe15
> 
>



-- 
::Bruce::

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



[PHP] determining time difference between two timestamp fields.

2010-05-25 Thread Bruce Gilbert
Here is the situation. I have a form which sets a timestamp when a
user logs in using UPDATE in SQL. The field is called
'login_timestamp' and is in a table called 'Candidates'. I have
another timestamp which is set when a user submits the form data into
the DB and it is called 'submit_timestamp' . What I want to do is
determine the amount of time the user takes to complete the form by
subtracting the 'login_timestamp' time form the 'submit_timestamp'
time. I am using SQL to extract the data here.

$sql = "SELECT Responses.name,Answers,submit_timestamp,login_timestamp
   FROM Responses LEFT JOIN Candidates USING (user_id)";

and then to display the timestamp in readable form.

echo "Completion Time:" . date('F j, Y
g:i:sa', strtotime($row["login_timestamp"])) . "";

so I need to know how to subtract from two timestamp fields, two
different tables and come up with the difference in minutes.


thanks.

-- 
::Bruce::

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



[PHP] php - page flow issue...

2010-03-14 Thread bruce
hi.

got a situation for a potential page that i'm playing with. i'm trying
to figure out how to implement it, and the best/good approach to this.
i'm actually considering integrating this kind of process within a cms
(joomla/mambo/cmsms/etc..) but right now, this is in the initia
thought stage...

if you have a thought/page that i can lok at that's actually
implementing this kind of flow.. i'd really like to see it..

so, here goes...

===

--need to figure out a way to have the user invoke an action on the
top section of
 a page, and have that action, trigger an action on a separate part of the page


example:

i have a page that looks something like this:

 +---+

 initial navbar stuff (always shown on the page)

 
   stateList (select/option)
 


 +--+
based on the user
 selected state {
   based on the user{  < based on
the selected state
   user state   {
{
  "cancelBTN"  "submitBTN"
   

 +--+

(page1)
 +---+

i need to have a way to have the user select a "state" from the
 statelist, and to then have the tbl/section of the site under
 the "cat" form, generated, based on the selected state.

at the same time, i need a way to have the user select an item
 from the "dog" tbl, and to have the user select the
 cancelBTN/submitBTN, with the app then generating the
 subsequent action/logic. the page below, is a kind of
 example of what i'm thinking of...

 +---+

 initial navbar stuff (always shown on the page)

 
   stateList (select/option)
 


 +--+
based on the user
 selected state, and the cat1.submitBTN

  confirmation section
  {
   based on the user selection from page1/cat1{ <<<
based on the previous
   cancel/submitBTN   {
cancel/submitBTN

  "cancelBTN"  "submitBTN"
   

 +--+

(page2)
 +---+


i can see a couple of ways of accomplishing this...

1) i can have a page of logic, that is composed of a bunch of
 logic, that is basically an "if block", that generates/displays
 the different parts of the page, based on the user actions of
 the preceding pages/sections (the cancel/submitBTNs). this approach
 would essentially require the entire page to be regenerated with
 each BTN selection.

 the logic would generate/invoke the correct page elements based
 on the user selection/action of the previous page/section.

2) i could possibly utilize div/frames, to allow the content in
 the targeted div/frame to be updated/redrawn/regenerated based
 on the user action/selection of the previous page/section...

 this might be able to be done (not familiar with the
 underlying processes to know if this is doable/suitable)
 or even a goof approach..

 would this apaproach still require the entire page to be
 redrawn? or just the portion that's in the targeted
 div/frame...

3) somehow invoke javascript/ajax function/features/logic,
 to allow the actions/interaction to occur, such that the
 content in the targeted div/frame is modified, without
 requiring the rest of the page to be modified...

 i have no idea if this is doable, or what this would mean,
 or involve, or how to apprach this..


or, there might be a different way of accomplishing this
 that i haven't even thought of...

any example sites/docs/code would be greatly appreciated...
heck, i'd even be glad to see an actual site/code that
demonstrates how this can/might/should be implemented!!!


thoughts/comments...

thanks

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



[PHP] gmail filter test

2010-03-14 Thread bruce
test

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



RE: [PHP] How to Delete the parent node, and child nodes/leafs for a db/tbl in php

2009-10-16 Thread bruce
hi ash...

thanks for getting back to me.

my situation isn't that complex, but i'm looking for an efficient method.

i've got a start tbl
 universityTBL

the universityTBL can have either
 schoolTBL, or
 deptTBL
as the next child tbl

 the schoolTBL will have
 deptTBL
 as the child tbl

 the deptTBL wil have
 classTBL
 as the childTBL...

to get around some of the headaches of this approach, i maintain
 a mapTBL where i have the parent_uuid,child_uuid as entries
mapTBL
-parent_uuid
-child_uuid

so my issue is that if i have a given parent_uuid, that i want to
 delete, as well as the associated leaf/nodes of the parent..
 how can this be accomplished?

you can't just start to delete the parent_uuid, as you completely miss
 the underlying/associated nodes/leafs for the parent_uuid...

thoughts/comments/etc...


-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Friday, October 16, 2009 8:38 AM
To: bruce
Cc: php-general@lists.php.net
Subject: Re: [PHP] How to Delete the parent node, and child nodes/leafs
for a db/tbl in php


On Fri, 2009-10-16 at 08:34 -0700, bruce wrote:

> Hi.
>
> I've got a situation where I have a couple of tables. The relationship
> between the tables is one of parent/child. I'm trying to figure out the
best
> approach to being able to delete the associated children in the child
tbls,
> of a given parentID in the parentTBL...
>
> I've checked into various sites/articles on the 'net.. but i'm not sure
how
> best to accomplish this...
>
> I'm using php as the interface language to the test tbls..
>
> Any pointers/articles/test code (code/schema) would be helpful...
>
> Thanks
>
>
>


Well if the tables truly have a relationship, then no PHP is necessary.

I assume that to connect the 'parent' row with the 'children' rows of
the secondary table you've used an identifying field. For example:

users table:
user_id
forename
surname

emails table:
email_id
user_id
email_address

So in the above example, a user on the users table could have several
entries in the emails table for each email address they have.
emails.user_id will match up users.user_id so you can run a query like

DELETE FROM emails WHERE user_id=id

Is this any help?


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




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



[PHP] How to Delete the parent node, and child nodes/leafs for a db/tbl in php

2009-10-16 Thread bruce
Hi.

I've got a situation where I have a couple of tables. The relationship
between the tables is one of parent/child. I'm trying to figure out the best
approach to being able to delete the associated children in the child tbls,
of a given parentID in the parentTBL...

I've checked into various sites/articles on the 'net.. but i'm not sure how
best to accomplish this...

I'm using php as the interface language to the test tbls..

Any pointers/articles/test code (code/schema) would be helpful...

Thanks



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



[PHP] Error message

2009-09-05 Thread Bruce Dobson
Hi folks,

I am new on this list and to php. I have just downloaded and gotten php 5.3.0 
working with IIS on one computer but my efforts to install it on another 
computer come up with the error message:  

14001 (0x36b1) 

Can anybody tell me what this relates to?

Thanks
Bruce



  

[PHP] php/sqlite3

2009-07-08 Thread bruce
hi...

i've got an issue where i'm trying to incorporate sqlite3 into my php.

i'm running fedora 9, php5.2.9.

the php app was  installed using the tun install process...

i know the docs say that php5+ is supposed to have sqlite incorporate
natively...

however, on this box, it doesn't! when i do a phpinfo(), i get the pdo
stuff, but not the sqlite.

i went ahead and followed a thread on the php.net that walked through adding
sqlite3, using the phpize, and managed to create the sqlite3.so...

the phpinfo now has a sqlite section, with a sqlite3.extension_dir that
points to the dir that contains the sqlite3.so..

however, when i run a test app using "sqlite_open", i'm getting an error
saying that the "sqlite_open" is undefined...

so... my question..

how the heck can i resolve this issue!

thanks..

-bruce


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



[PHP] berkeley database

2009-07-08 Thread bruce
hi...

trying to find a link to a good/basic sample/tutorial for berkeley db using
php...

so far, looking over the net, haven't found any!

pointers, links would be greatly appreciated!!

thanks




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



RE: [PHP] Passing Values between C App and PHP

2009-06-22 Thread bruce
if memory serves...

you can look into using a shared memory block, or pipes to communicate
between the php/c app


-Original Message-
From: Tobias Krieger [mailto:tobias.krie...@teamfrednet.org]
Sent: Sunday, June 21, 2009 2:44 PM
To: Nathan Nobbe
Cc: php-general@lists.php.net
Subject: Re: [PHP] Passing Values between C App and PHP



Am 21.06.2009 um 23:31 schrieb Nathan Nobbe:

> On Sun, Jun 21, 2009 at 3:25 PM, Tobias Krieger
 > wrote:
> Hi,
>
> I've recently written an eMail regarding I2C and PHP - since I
> haven't found a nice solution yet, I'm considering writting the I2C
> part (opening device, writing, reading,...) in C (that's simple) and
> to recieve (and returning) the values through PHP and Javascript.
>
> E.g. Website (PHP/Javascript) -> set a new motorspeed -> PHP passes
> the new speed to C Application -> C AP opens and writes the new
> speed onto the I2C Bus -> Motor executes -> returns ack ->
>
> Is this somehow, and not complicated possible?
>
> if the C program is written such that it can start and stop on every
> request rather than as a daemon, its as simple as shell_exec().
>
> write your C app to take args over the cli and then pass them in
> through the call:
>
>  $result = shell_exec('myI2C -speed 50');
> ?>
>
> something of that nature.
>
> -nathan
>
This would be a nice and fast solution, but unfortunatelly, it's like
that the C programm needs to surveilance the hardware all the time
(controlling values,...) hence, it would run more as a "daemon".

thx,

tobias


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



[PHP] need someone to bounce some thoughts with for a project!

2009-06-18 Thread bruce
hi list...

sorry to post here, but i figured you might be able to help...

i'm working on a project, that deals with building a crawler, and i'm
working out the details for the mgmt app for the crawler. i'm currently
looking at how to deal with the status/actions of the crawler, and how the
different components of what i call a job would be compiled, and reported
back to the batabase.

i'm wondering.. is there anyone on this list that i might be able to email
with, talk to about this.. while i've got a few ideas, never hurts to be
able to talk/share thoughts with others..

thanks much!

basically:
 my methodology is that i create a batchfile
  (the batchfile consists of the underlying apps that do the crawling)
 each batchfile can be run by multiple jobs (as required)
 i'm creating the piece of the mgmt app that will track/manage the jobs
 i'm lookin at being able to track the health of the 'jobs' as they run

 i'm considering the 'actions' as well as the 'status'

 i'm thinking of:
disable/enable
stop/restart
waiting to start
running
complete/finished

 status might have things like:
success/complete (no errs at all)
complete/errs (ran through all the scripts, but some had errs)
failed (didn't complete all the scripts)
etc...


 i'm looking for someone i might be able to talk to, or exchange a few
ideas/emails with on this..

thanks much!


ps.. and yeah.. the web app is all in php!!!



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



RE: [PHP] PHP5 SOAP...

2009-06-16 Thread bruce
hi russell...

isn't the actual soap data/packet that's being sent over the wire viewable
via an app like livehttpheaders... (at least from firefox)

or are you looking for something in much more detail...



-Original Message-
From: rjon...@gmail.com [mailto:rjon...@gmail.com]on Behalf Of Russell
Jones
Sent: Tuesday, June 16, 2009 8:22 AM
To: PHP General
Subject: [PHP] PHP5 SOAP...


I'm working on a project using SOAP and WS-Security in which I am failing
miserably.

Is there a way to inspect the actual XML, header, etc. that is actually
being sent. I feel like I am constructing the call correctly, and I know
exactly what needs to be sent, but I dont know how to see exactly what is
sent - all I get back are useless errors like "not enough information sent",
etc...

Any ideas? Any SOAP pros out there?


Russell Jones
CTO Virante, Inc.
r...@virante.com
919-459-1035


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



RE: [PHP] Periodic Actions in PHP?

2009-06-13 Thread bruce
hi...

is this a php/web based app...
are the users using the chat function via the browser..
if this is a browser/web app, are you looking for a way for the
 php web app to refetch the textfile... i would assume so...

have you figured out a rough architecture/design for your app..
in your design, you're going to need to figure out how to
 accomplish updates to the text file, and when you do, you'll
 also have figured out how to do the reads...

i'm assuming that you don't want a continuously running thread
 for your php/web app.. ie one continuously, never ending loop...
 -so you'll have the user add some text, the app will write this to
  a file..
 the user will either select a refresh kind of btn, or your
 app will have to implement a refresh process, which will then
 fetch new/updated data from your files..
 etc...






-Original Message-
From: richard.he...@gmail.com [mailto:richard.he...@gmail.com]on Behalf
Of Richard Heyes
Sent: Saturday, June 13, 2009 2:17 AM
To: Parham Doustdar
Cc: php-general@lists.php.net
Subject: Re: [PHP] Periodic Actions in PHP?


Hi,

> I'm going to create a small chat script with PHP. The messages you want
others to see
> will be added to a flat file (I.E. TXT file), and read and displayed by
PHP. However, I want
> this reading and displaying to be periodic. This means that I want PHP to
check the file for
> new lines every,say, fifteen seconds. How may I do that? I have been
unable to find any
> function that acts like a timer.

If you're on Unix then look into using cron. Type the following at the
command prompt to get info on cron:

man 5 crontab

Cron tasks can be scheduled at most once per minute. And if you're
using Windows then I believe the equivalent would be task scheduler,
but I've no idea how you would go about using it.

--
Richard Heyes
HTML5 graphing: RGraph (www.rgraph.net - updated 6th June)
PHP mail: RMail (www.phpguru.org/rmail)
PHP datagrid: RGrid (www.phpguru.org/rgrid)
PHP Template: RTemplate (www.phpguru.org/rtemplate)
PHP SMTP: http://www.phpguru.org/smtp

--
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



[PHP] Book site question

2009-06-02 Thread bruce
Hi List...

A little while ago... (in a land far away!!).. Someone posted some questions
about a site he/she was creating having to do with textbooks... I'm trying
to find that person to talk to them about what they were doing... I've
searched my past emails but can't find it.. So, maybe I imagined it!!

I've got a situation where I'm going to be dealing with books, and it might
be useful to talk with whoever was working on the app..

If this email finds you, and you were the person working on the app...
Please get back to me!!

Thanks

-bruce


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



RE: [PHP] Web application design considerations - a good reference ?

2009-06-02 Thread bruce
hi angus...

You're probably going to get a lot of different approaches to this one! as a
long term/time developer in a past life.. In my humble opinion, a reasonable
approach is to start by laying out the key things that the app has to
accomplish, and then to break this down into a list/sublist until you get a
comprehensive list of things that your app should do... You can put these
items into buckets to help keep track of what you've thought about. Each
bucket can then be aligned with a given section of your website as you start
to get into the UI/Look-feel of the site.

One of the most important/key things you can try to do, is to find someone a
few people, who are willing to act as a sounding board for the different
aspects/parts of your project.

Once you've gotten the list, and a basic UI/Wireframe kind of overview (and
you can use word/openoffice/etc.. to create a wireframe) you can then have
something that you can kind of look at, kick the tires so to speak of what
you're envisioning the app to be. This overall process forces you to really
think about what the app should consist of, as well well as how it's going
to be put together, how the different sections are going to flow...

Once you all of the above, you can focus on the workflow/processes of the
app. What happens when the user does X, who gets notified, when the user
does Y, that kind of thing...

There's a lot more, but this should get you started!!!

Good luck!


-Original Message-
From: Angus Mann [mailto:angusm...@pobox.com]
Sent: Monday, June 01, 2009 9:51 PM
To: php-general@lists.php.net
Subject: [PHP] Web application design considerations - a good reference
?


Hi all.

I'm working on a PHP project for my own personal business use. It will
handle billing and invoices as well as payments and time management,
bookings, appointments and a few more. I may add things like personal
messaging between the various users and a customer login to check on the
progress of their accounts.

It is a big project and will probably take a year or so to complete in my
spare time.

I have made a couple of starts but I have no experience in creating such
large applications and I find I often end up with spaghetti code. I've tried
using session variables to keep track of where and what the program is doing
but there are so many permuations and combinations I found myself writing
endless streams of if's, and's and or's just to figure out what page to
display.

The code is not the probblem for me...it's the flow and organization of the
code.

Can anybody point me to a good book or tutorial that lays down the
principles and gives some suggestions for integrating the many subroutines
of a large application? I want to make the code readable and logical in its
flow, and avoid repetition of code segments.

Much appreciated.
Angus






--
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] spawning a process that uses pipes -doesn'tterminatewhen webpage download is canceled

2009-06-01 Thread bruce
aha...

got it.. i was thinking that he somehow wanted to use a completely separate
process, to then somehow reconnect to the closed browser session...

which is why i was wondering wtf!!!

thanks!



-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Monday, June 01, 2009 8:02 AM
To: bruce
Cc: 'PHP-General List'
Subject: RE: [PHP] spawning a process that uses pipes
-doesn'tterminatewhen webpage download is canceled


On Mon, 2009-06-01 at 07:52 -0700, bruce wrote:
> hi robert...
>
> i got the popen/php process but i don't see how one can stop a
> browser/apache process, and somehow reattach to the browser process..
unless
> he's talking about stopping a process within the app's context.. and then
> contniuing..

Hi Bruce,

He's spawning child processes to handle the audio changes. These
processes are separate processes from the PHP script being run by the
webserver. However, they are children of the PHP script process since
they have been started by the PHP script via popen() or proc_open(). His
problem is that when the user changes page mid load, or shuts down the
browser, the PHP script (the parent) is killed off by the webserver, but
the child processes, sox and lame, continue to run. This ends up
polluting CPU/memory with useless processes. What he wants is to have
these processes also die. So by using proc_open() he can retrieve the
output from the processes he has started and send that to the connected
browser in chunks, but also detect if the browser has dropped its
connection in which case he can manually kill of the child processes
that aren't being killed automatically. HTH.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


--
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] spawning a process that uses pipes - doesn'tterminatewhen webpage download is canceled

2009-06-01 Thread bruce

hi robert...

i got the popen/php process but i don't see how one can stop a
browser/apache process, and somehow reattach to the browser process.. unless
he's talking about stopping a process within the app's context.. and then
contniuing..



-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Monday, June 01, 2009 5:46 AM
To: bruce
Cc: 'flint'; 'PHP-General List'
Subject: RE: [PHP] spawning a process that uses pipes -
doesn'tterminatewhen webpage download is canceled


On Sun, 2009-05-31 at 21:23 -0700, bruce wrote:
> hi robert.,,
>
> now you've got me curious..
>
> you state...
>
> -Use something else to pass the data back to the user... popen() comes to
> -mind or proc_open(). Then disable auto abort on user disconnect via
> -ignore_user_abort(). Then after sending periodic data chunks, check the
> -user connection status via connection_aborted(). If your script finds
> -that the user has aborted, then kill all the processes in the pipeline
> -from the PHP script before finally aborting the PHP script itself.
>
> but if the user is using a browser session... which has a web server
> connection... are you siggesting that the server app spawns off a child
> process via the popen, and that the child somehow connects to the existing
> browser session??
>
> walk through the psuedo logic/flow of this if you don't mind.. i must be
> missing something..

The PHP session controls the popen() or proc_open() session. The PHP
session can detect that the user has aborted and then shutdown the
popen() or proc_open() processes.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


--
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] spawning a process that uses pipes - doesn't terminatewhen webpage download is canceled

2009-05-31 Thread bruce
hi robert.,,

now you've got me curious..

you state...

-Use something else to pass the data back to the user... popen() comes to
-mind or proc_open(). Then disable auto abort on user disconnect via
-ignore_user_abort(). Then after sending periodic data chunks, check the
-user connection status via connection_aborted(). If your script finds
-that the user has aborted, then kill all the processes in the pipeline
-from the PHP script before finally aborting the PHP script itself.

but if the user is using a browser session... which has a web server
connection... are you siggesting that the server app spawns off a child
process via the popen, and that the child somehow connects to the existing
browser session??

walk through the psuedo logic/flow of this if you don't mind.. i must be
missing something..

thanks


-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Sunday, May 31, 2009 8:16 PM
To: flint
Cc: PHP-General List
Subject: Re: [PHP] spawning a process that uses pipes - doesn't
terminatewhen webpage download is canceled


On Sun, 2009-05-31 at 08:52 -0500, flint wrote:
> sent this before, don't know if it went through... someone please reply if
> it went, even if they don't know answer?...
>
> so here's the scenario..
>
> I have a site that uses php with a database to offer sound files to
> users using streaming methods.
>
> the request page has options, allowing the user to modify the sound
> file in various ways, before having it sent to them
>
> Here's the problem:
>
> The method i'm using to feed the data to the user is to run the source
> file through various piped commands, with the resulting audio being
> dumped to stdout, and then using passthru in php to get that data to
> the enduser.
>
> here's an example, for serving an MP3 with its pitch/speed changed by sox:
>
> passthru("lame --quiet --decode \"" . $in_file . "\" - | " .
>  "sox -V -S -t wav - -t wav - speed " . $speed_factor . " | "
.
>  "lame --quiet " . $lame_params . " - -");
>
> This works just fine, except the problem is if the end user aborts the
> transfer (e.g. stops playback in the media player, cancels download of
> the mp3, whatever) then it leaves behind both the sox process and the
> decoder LAMe process along with the sh that's running them. the only
> process that exits is the final encoding lame process. If the sound
> file runs to completion, everythign exits properly.
>
> But this obviously means enough "cancelling" of downloads means the
> server ends up with a huge batch of stuck processes! And I even tried
> simply killing the 'host' sh process, and the lame and sox processes
> remain anyway. The only way I've been able to deal with this is
> manually killing the lame and sox processes directly.
>
> is there any way I can make this work, such so that if the user
> cancels the transfer, all relavent processes are killed rather than
> just the single process that's feeding output into php?

Use something else to pass the data back to the user... popen() comes to
mind or proc_open(). Then disable auto abort on user disconnect via
ignore_user_abort(). Then after sending periodic data chunks, check the
user connection status via connection_aborted(). If your script finds
that the user has aborted, then kill all the processes in the pipeline
from the PHP script before finally aborting the PHP script itself.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


--
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] spawning a process that uses pipes - doesn't terminate when webpage download is canceled

2009-05-31 Thread bruce
we answered this a number of times... 

was there something in the replies that didn't satisfy you?



-Original Message-
From: flint [mailto:fmill...@gmail.com]
Sent: Sunday, May 31, 2009 6:53 AM
To: PHP-General List
Subject: [PHP] spawning a process that uses pipes - doesn't terminate
when webpage download is canceled


sent this before, don't know if it went through... someone please reply if 
it went, even if they don't know answer?...

so here's the scenario..

I have a site that uses php with a database to offer sound files to
users using streaming methods.

the request page has options, allowing the user to modify the sound
file in various ways, before having it sent to them

Here's the problem:

The method i'm using to feed the data to the user is to run the source
file through various piped commands, with the resulting audio being
dumped to stdout, and then using passthru in php to get that data to
the enduser.

here's an example, for serving an MP3 with its pitch/speed changed by sox:

passthru("lame --quiet --decode \"" . $in_file . "\" - | " .
 "sox -V -S -t wav - -t wav - speed " . $speed_factor . " | " .
 "lame --quiet " . $lame_params . " - -");

This works just fine, except the problem is if the end user aborts the
transfer (e.g. stops playback in the media player, cancels download of
the mp3, whatever) then it leaves behind both the sox process and the
decoder LAMe process along with the sh that's running them. the only
process that exits is the final encoding lame process. If the sound
file runs to completion, everythign exits properly.

But this obviously means enough "cancelling" of downloads means the
server ends up with a huge batch of stuck processes! And I even tried
simply killing the 'host' sh process, and the lame and sox processes
remain anyway. The only way I've been able to deal with this is
manually killing the lame and sox processes directly.

is there any way I can make this work, such so that if the user
cancels the transfer, all relavent processes are killed rather than
just the single process that's feeding output into php?

-FM


-- 
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] Re: Numerical Recipe - Scheduling Question - update...

2009-05-30 Thread bruce
4 for the
next 'X' month)
this computes every 'X' month, on the 'date:hour:min' using
strtotime(interval, secs)
need to include logic to cut limit future month to the 'end date' of the
 month. don't want to roll over into the next month.. ie, if the date
is jan 29,
 and the next feb only has 28 days.. stop at jan 28...
need to incorporate leap year checks, etc...
-gives every Month at the current 'date:hour:min', based on the above
 logic/restrictions/implementation...


user selects every 'day' (mtwthf)
covered by the weekly section.. (no need for a separate selection)

user selects 1st of month
covered by the monthly section (no need for a separate selection)

user selects 'last-of-month'
 user selects 'X' as the numeric interval
(if 'X' is blank, app defaults 'X' to 1)
  app gets the startime in linuxsecs, based on user input, or 'default
now()'
  app determines the month based on the computed secs data
  app app then detemines the last date of the computed month
  app uses date(-t,secs) to get date...
  app gets year:month hour:min from the startime/linuxsecs
  use the date, and the year:month and hour:min to get the
final eventsecs for the last-of-month




-Original Message-
From: Shawn McKenzie [mailto:nos...@mckenzies.net]
Sent: Friday, May 29, 2009 2:48 PM
To: php-general@lists.php.net
Subject: [PHP] Re: Numerical Recipe - Scheduling Question


bruce wrote:
> Hi..
>
> Got a need to be able to allow a user to specify the frequency to run
> certain apps/processes.. I need to be able to have the user specify a
start
> Time, as well as a periodic frequency (once, hourly, daily, weekly...) as
> well as allow the user to specify every XX minutes...
>
> So i basically need to be able to determine when the future
> events/occurances are, based on the user input.
>
> I've searched the net for alogorithms dealing with scheduling and haven't
> come up with any php based solutions.. I've also looked at numerical
recipes
> and some other sources (freshmeat/sourceforge/etc..) with no luck..
>
> I have found an approach in another language that I could port to php..
But
> before I code/recreate this, I figured I'd see if anyone here has pointers
> or suggestions...
>
> Cron doesn't work for me, as it can run a process at a given time.. but it
> doesn't tell me when the next 'X' occurance would be...
>
> Thoughts/Comments..
>
> Thanks
>

This is confusing.  When and where do you need to "be able to determine
when the future events/occurances are"?  You need to display this after
the user schedules the app/process or an admin needs to login and see
this at any given time?

Regardless it is easy with the PHP time/date functions.  Once you've
collected and stored the start/stop times and interval, something
similar to:

$interval = "1 week";

$next = $start_time;
while ($next <= $end_time) {
$next = strtotime("+$interval", $next);
echo date(DATE_RFC822, $next) ."\n";
}


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

--
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] Re: Numerical Recipe - Scheduling Question

2009-05-29 Thread bruce
hey shawn...

on the strtotime function... it appears to simply take intervals of a string
type..

is there a way to have it take intervals of the number of secs? or is there
another time function that takes the current date/time, and allows you to
add an interval in secs?

thanks



-Original Message-
From: Shawn McKenzie [mailto:nos...@mckenzies.net]
Sent: Friday, May 29, 2009 2:48 PM
To: php-general@lists.php.net
Subject: [PHP] Re: Numerical Recipe - Scheduling Question


bruce wrote:
> Hi..
>
> Got a need to be able to allow a user to specify the frequency to run
> certain apps/processes.. I need to be able to have the user specify a
start
> Time, as well as a periodic frequency (once, hourly, daily, weekly...) as
> well as allow the user to specify every XX minutes...
>
> So i basically need to be able to determine when the future
> events/occurances are, based on the user input.
>
> I've searched the net for alogorithms dealing with scheduling and haven't
> come up with any php based solutions.. I've also looked at numerical
recipes
> and some other sources (freshmeat/sourceforge/etc..) with no luck..
>
> I have found an approach in another language that I could port to php..
But
> before I code/recreate this, I figured I'd see if anyone here has pointers
> or suggestions...
>
> Cron doesn't work for me, as it can run a process at a given time.. but it
> doesn't tell me when the next 'X' occurance would be...
>
> Thoughts/Comments..
>
> Thanks
>

This is confusing.  When and where do you need to "be able to determine
when the future events/occurances are"?  You need to display this after
the user schedules the app/process or an admin needs to login and see
this at any given time?

Regardless it is easy with the PHP time/date functions.  Once you've
collected and stored the start/stop times and interval, something
similar to:

$interval = "1 week";

$next = $start_time;
while ($next <= $end_time) {
$next = strtotime("+$interval", $next);
echo date(DATE_RFC822, $next) ."\n";
}


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

--
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] Re: Numerical Recipe - Scheduling Question

2009-05-29 Thread bruce
hey shawn...

strtotime (or something similar) might just work

i'll always know the interval... which can be used to compute the nexttime,
which then becomes the next starttime...

i'm assuming there's an equally simple way to find the last day of a given
month if i choose that as an interval as well..

for my initial needs.. this might work.. until i free up time to actually
craft a more generic solution, independent of the underlying language/os..

thanks



for next month.. and the start

-Original Message-
From: Shawn McKenzie [mailto:nos...@mckenzies.net]
Sent: Friday, May 29, 2009 2:48 PM
To: php-general@lists.php.net
Subject: [PHP] Re: Numerical Recipe - Scheduling Question


bruce wrote:
> Hi..
>
> Got a need to be able to allow a user to specify the frequency to run
> certain apps/processes.. I need to be able to have the user specify a
start
> Time, as well as a periodic frequency (once, hourly, daily, weekly...) as
> well as allow the user to specify every XX minutes...
>
> So i basically need to be able to determine when the future
> events/occurances are, based on the user input.
>
> I've searched the net for alogorithms dealing with scheduling and haven't
> come up with any php based solutions.. I've also looked at numerical
recipes
> and some other sources (freshmeat/sourceforge/etc..) with no luck..
>
> I have found an approach in another language that I could port to php..
But
> before I code/recreate this, I figured I'd see if anyone here has pointers
> or suggestions...
>
> Cron doesn't work for me, as it can run a process at a given time.. but it
> doesn't tell me when the next 'X' occurance would be...
>
> Thoughts/Comments..
>
> Thanks
>

This is confusing.  When and where do you need to "be able to determine
when the future events/occurances are"?  You need to display this after
the user schedules the app/process or an admin needs to login and see
this at any given time?

Regardless it is easy with the PHP time/date functions.  Once you've
collected and stored the start/stop times and interval, something
similar to:

$interval = "1 week";

$next = $start_time;
while ($next <= $end_time) {
$next = strtotime("+$interval", $next);
echo date(DATE_RFC822, $next) ."\n";
}


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

--
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



[PHP] Numerical Recipe - Scheduling Question

2009-05-29 Thread bruce
Hi..

Got a need to be able to allow a user to specify the frequency to run
certain apps/processes.. I need to be able to have the user specify a start
Time, as well as a periodic frequency (once, hourly, daily, weekly...) as
well as allow the user to specify every XX minutes...

So i basically need to be able to determine when the future
events/occurances are, based on the user input.

I've searched the net for alogorithms dealing with scheduling and haven't
come up with any php based solutions.. I've also looked at numerical recipes
and some other sources (freshmeat/sourceforge/etc..) with no luck..

I have found an approach in another language that I could port to php.. But
before I code/recreate this, I figured I'd see if anyone here has pointers
or suggestions...

Cron doesn't work for me, as it can run a process at a given time.. but it
doesn't tell me when the next 'X' occurance would be...

Thoughts/Comments..

Thanks


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



RE: [PHP] spawning a process that uses pipes - doesn't terminate when webpage download is canceled

2009-05-28 Thread bruce
Hi Flint.

Not sure if you have a solution to this yet, or if I fully understand! But
if your issue is basically that you have a situation where you might have
orphaned processes that never finish and that are consuming real resources
you could have the app get/monitor the process ID for each process you
create, and then simply periodically check to see if that process is in a
run state.

Bow, if the situation is one where the user aborts the transfer process, and
the underlying processes are still 'running' then I would still think the
above appproach would work, but you'd have to have your app keep track of
when the user 'kills' the download process..

But are you sure the orphaned processes are consuming resources, or are they
zombie processes, which are resident in the process tbl, but aren't really
consuming resources... sombie processes will (should) eventually be dealt
with by the operating system...

regards



-Original Message-
From: Flint Million [mailto:fmill...@gmail.com]
Sent: Wednesday, May 27, 2009 11:39 PM
To: php-general@lists.php.net
Subject: [PHP] spawning a process that uses pipes - doesn't terminate
when webpage download is canceled


so here's the scenario..

I have a site that uses php with a database to offer sound files to
users using streaming methods.

the request page has options, allowing the user to modify the sound
file in various ways, before having it sent to them

Here's the problem:

The method i'm using to feed the data to the user is to run the source
file through various piped commands, with the resulting audio being
dumped to stdout, and then using passthru in php to get that data to
the enduser.

here's an example, for serving an MP3 with its pitch/speed changed by sox:

passthru("lame --quiet --decode \"" . $in_file . "\" - | " .
 "sox -V -S -t wav - -t wav - speed " . $speed_factor . " | " .
 "lame --quiet " . $lame_params . " - -");

This works just fine, except the problem is if the end user aborts the
transfer (e.g. stops playback in the media player, cancels download of
the mp3, whatever) then it leaves behind both the sox process and the
decoder LAMe process along with the sh that's running them. the only
process that exits is the final encoding lame process. If the sound
file runs to completion, everythign exits properly.

But this obviously means enough "cancelling" of downloads means the
server ends up with a huge batch of stuck processes! And I even tried
simply killing the 'host' sh process, and the lame and sox processes
remain anyway. The only way I've been able to deal with this is
manually killing the lame and sox processes directly.

is there any way I can make this work, such so that if the user
cancels the transfer, all relavent processes are killed rather than
just the single process that's feeding output into php?

-FM

--
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] continue working after finishing up with the http client

2009-05-27 Thread bruce
hi tom...

if i understand your state diagram/workflow process. your server repsonds to
the client request, with two actions...

 action 1) return data to client relatively fast
 action 2) insert the data into your cache (or whereever) which takes
time...

is this correct?

do you have to somehow use the 'new'/updated cache data in the future
actions with the client...

it might be possible for you to have a setup, where you have an external
cron process, or other continually running process that does the cache
insertions



-Original Message-
From: Tom Worster [mailto:f...@thefsb.org]
Sent: Wednesday, May 27, 2009 7:14 AM
To: bruce; php-general@lists.php.net
Subject: Re: [PHP] continue working after finishing up with the http
client


On 5/27/09 9:50 AM, "bruce"  wrote:

> exacly what are you trying to accomplish? is this in a web app? has the
user
> hit the site, logged in, etc?
>
> can you provide an example of what the sequence of events are that you're
> trying to deal with..

it is a web app.

let's say for example that we're processing an ajax query. say we can
normally generate and deliver the response to the client quickly but the
speed depends on a cache with a relatively low miss rate.

now, when we get a cache miss, imagine that generating the client response
from scratch takes significantly less time than generating and inserting the
new cache entry corresponding to the query. so we want to send the response
to the client and then process the cache entry.

without getting into whether or not this cache design makes sense, my
question in this example is: what options are there for ending the http
transition and then continuing on to do the cache update work?


> -Original Message-
> From: Tom Worster [mailto:f...@thefsb.org]
> Sent: Wednesday, May 27, 2009 6:27 AM
> To: php-general@lists.php.net
> Subject: [PHP] continue working after finishing up with the http client
>
>
> what options are there to do the following:
>
> 1. receive request from client (including post data)
>
> 2. do some work, update the db, prepare output for client
>
> 3. send output and finish up with the client
>
> 4. do some more work that might take considerable time, updating the db
some
> more
>
> it would be convenient and efficient if step 4 took place within the same
> process as steps 1-3. but output control seems not to be sufficient:
> ob_flush(); flush(); sends the output but leave the client waiting for
more.
> is there a way to close the connection as though exit; were called but
> without quitting the script?
>
> alternatively the script could start another process, copy over whatever
> data is needed and disconnect from it. but that has its overheads on the
> server.
>
> are the other possibilities?



--
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] continue working after finishing up with the http client

2009-05-27 Thread bruce
hi tom...

exacly what are you trying to accomplish? is this in a web app? has the user
hit the site, logged in, etc?

can you provide an example of what the sequence of events are that you're
trying to deal with..

thanks


-Original Message-
From: Tom Worster [mailto:f...@thefsb.org]
Sent: Wednesday, May 27, 2009 6:27 AM
To: php-general@lists.php.net
Subject: [PHP] continue working after finishing up with the http client


what options are there to do the following:

1. receive request from client (including post data)

2. do some work, update the db, prepare output for client

3. send output and finish up with the client

4. do some more work that might take considerable time, updating the db some
more

it would be convenient and efficient if step 4 took place within the same
process as steps 1-3. but output control seems not to be sufficient:
ob_flush(); flush(); sends the output but leave the client waiting for more.
is there a way to close the connection as though exit; were called but
without quitting the script?

alternatively the script could start another process, copy over whatever
data is needed and disconnect from it. but that has its overheads on the
server.

are the other possibilities?

tia
tom



--
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



[PHP] Startup Stuff in the san Francisco/Bay Area

2009-05-24 Thread bruce
Hi guys...

Before you start flaming/shouting.. thought I'd post this here, as I'm at my
wit's end, and this might help others as well. And yeah, this has nothing to
do with solving a php coding issue!!

I'm trying to figur eout if there are guys/gals/groups/etc.. of developers
here in the San Fran/San Jose/East Bay area that are into the pure sweat
equity startup thing. I'm simply looking to find if there are people/groups
that you might know of, how are into creating/starting projects. I've done
the Craigslist Posting thing, with no real luck, so I thought I'd post this
here...

Feel free to get to me off line to reduce the amount of time on the list for
this thread, unless you think it might be useful for others as well...

Thanks!



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



RE: Fwd: [PHP] SECURITY PRECAUTION BEFORE SUBMITTING DATA INDATABASE

2009-05-21 Thread bruce
if you really want to get to the real low level details of an app...

unless you're dealing with an app that's seriously crunching, and extremely
sensitive to returning data to the user's browser in a timely manner, you
should write all replies back to a db/tbl... this would allow you as the
developer to have a complete trek of the actions/paths (to an extent) for
any potential debugging issue.



-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Thursday, May 21, 2009 7:00 AM
To: Sumit Sharma
Cc: php-general@lists.php.net
Subject: Re: Fwd: [PHP] SECURITY PRECAUTION BEFORE SUBMITTING DATA
INDATABASE


On Thu, 2009-05-21 at 19:17 +0530, Sumit Sharma wrote:
> One more thing, should I use @ for security purpose or not so that the use
> can reply me with the errors so that I can troubleshoot the problem more
> effectively.
>
>
> Sumit
>
> -- Forwarded message --
> From: Ashley Sheridan 
> Date: Thu, May 21, 2009 at 6:36 PM
> Subject: Re: [PHP] SECURITY PRECAUTION BEFORE SUBMITTING DATA IN DATABASE
> To: Sumit Sharma 
> Cc: php-general@lists.php.net
>
>
> On Thu, 2009-05-21 at 18:22 +0530, Sumit Sharma wrote:
> > Hi,
> >
> > I am designing a php website for my client which interact with database.
> > This is my first project for any client (I hope he is not reading this
> mail
> > ;-)  ). I am a bit more concerned with database security. Can somebody
> shed
> > some light on the security measurements, precautions, and functions
> related
> > to database security in general to make sure that the data is safely
> stored
> > updated and retried from database. I have already used htmlentities(),
> > strip_tags(), addhashes(), and some regular expressions to check
security.
> > Looking for help beyond this.
> >
> >
> > Thanks in advance...
> > Sumit
>
> I'd advise using something like mysql_real_escape_string() (assuming you
> are using a MySQL database that is) on each variable of data before you
> insert it into the database. You could go further and validate specific
> data, so check that a field which you expect a number only contains a
> number, etc.
>
>
> Ash
> www.ashleysheridan.co.uk


I'd avoid using @ in favour of turning the errors off in your php.ini
or .htaccess, as there's no chance of you missing a statement here or
there.  It's generally accepted practice to have errors and warnings
turned off on a live server, and to only use them on development
servers.


Ash
www.ashleysheridan.co.uk


--
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] speaking of control structures...

2009-05-07 Thread bruce
you know...

interesting that goto can be found in code!!



-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Thursday, May 07, 2009 7:36 AM
To: Tom Worster
Cc: Clancy; php-general@lists.php.net
Subject: Re: [PHP] speaking of control structures...


On Thu, 2009-05-07 at 09:33 -0400, Tom Worster wrote:
> On 5/6/09 9:31 PM, "Clancy"  wrote:
>
> > I can understand your reluctance to disregard your mother's advice, but
> > unfortunately she
> > had been brainwashed to accept the dogma of the day.
>
> actually, i don't believe so. she did numerical work so she continued
using
> fortran and therefore gotos for the rest of her life. i think she just
> didn't like goto. moreover, she was never dogmatic on any topic, it wasn't
> in her nature.
>
> anyway, how do you know how she came by her opinions?

Because that's how most people came by their opinion of goto? How did
you come by your opinion of goto? Oh yeah, your momma! Here let me open
your eyes a bit... I've done a grep on the PHP 5.2.9 source code, Apache
2.2.11 source code, and MySQL 5.1.33 source code for use of goto:

PHP 5.2.9: http://pastebin.com/f6b88957

   Apache 2.2.11: http://pastebin.com/f2c7f5d93

   MySQL 5.1.33:  http://pastebin.com/f4441a891

It would seem that goto has a lot of use in modern code. Just because
someone tells you something, doesn't mean you should believe it at face
value. Goto has many important uses in programming. The goto that was
spurned is not really the goto in use today. The goto in use today
generally has scope within a well defined context such as a function.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


--
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



[PHP] Need Help! - Looking over a wireframe doc...

2009-05-05 Thread bruce
Hi..

I'm playing around with creating an app to allow users to
add/checkin/checkout docs from a web based app. The backend will tie into
SVN as a repository.

The app is intended to be a php/mysql/linux app.

I'm trying to find a few people that I might get to take a look at the
current doc(s) I have and give me some comments/feedback...

The goal of the app is to allow a user to register, and then select the
given doc he wants to work on, as well as the given workflow phase. This
allows the app to kind of restrict the access rights a user has to the doc,
based on where in the workflow the doc is..

Get to me offline if you're interested in taking a look.

thanks

-bruce


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



RE: [PHP] 800 pound gorilla

2009-04-20 Thread bruce
hmmm...

a developer might not (won't) give you voting rights? (is there sucj a
thing!!!)

however, if you put together a number of really skilled c/c++ (whatever)
developers, then you could easily take the current existing sourcebase of
code, and go ahead and fork your own version, and never need to worry about
what oracle is going to do with the current tree...

of course i'd have a better chance of winning the lottery!! but stranger
thing have happened...

but you should also remember that some major companies are using mysql for
various projects, and they could/might get together to form a dev core team
to keep it moving...

peace..


-Original Message-
From: Marc Christopher Hall [mailto:m...@hallmarcwebsites.com]
Sent: Monday, April 20, 2009 6:58 AM
To: 'Daniel Brown'
Cc: php-general@lists.php.net
Subject: RE: [PHP] 800 pound gorilla




-Original Message-
From: paras...@gmail.com [mailto:paras...@gmail.com] On Behalf Of Daniel
Brown
Sent: Monday, April 20, 2009 9:52 AM
To: Marc Christopher Hall
Cc: php-general@lists.php.net
Subject: Re: [PHP] 800 pound gorilla

On Mon, Apr 20, 2009 at 09:48, Marc Christopher Hall
 wrote:
> Sun buys MySQL and now Oracle buys Sun (not final, yet). What will happen
> with the main db we PHP'ers have come to know and love especially since v
5

Become a MySQL developer and help make the decision.

--

daniel.br...@parasane.net || danbr...@php.net
http://www.parasane.net/ || http://www.pilotpig.net/
50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1


Ahhh, I love the smell of condescension first thing in the morning. BTW I am
a MySQL developer thank you. A developer does not an owner make. Where do
you get the idea that Oracle would put this to a democratic vote?


--
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] Out of the blue question..

2009-04-07 Thread bruce
chris...

did you read the entire msg.. this isn't/wasn't a hunt for someone for a
project...

please re-read..


-Original Message-
From: Chris [mailto:dmag...@gmail.com]
Sent: Monday, April 06, 2009 8:14 PM
To: bruce
Cc: php-general@lists.php.net
Subject: Re: [PHP] Out of the blue question..


bruce wrote:
> Hi Ladies/Gents of the list...
>
> I've got an issue/question and figured I'd fire it to the list.
>
> Over time, I've had a few projects that I've worked on, where I've
required
> someone with skills way beyond mine for a given area. And rather than
spend
> hours trying to figure it out, I've sometimes hired someone to aid for a
> very short amount of time..
>
> The issues have ranged from serious db optimization, to server security
> issues, etc...
>
> I was wondering, I'm assuming that other developers here have had similar
> issues. Has anyone thought about doing a group hire of someone with the
> advanced skills to solve the particular issue for the problem domain.
>
> IE if enough people have, or know you're going to have mysql questions...
> Then we find someone who's good/skilled and more or less have that person
on
> retainer for the group. This of course depends on how many people would
want
> to use the person's skills, and how often we'd need the person, and other
> issues...
>
> I figured that I'd post here to see what the list thinks/thought.. etc...

You can post job requests for stuff like this on elance.com,
rentacoder.com and I'm sure hundreds of other places.

I don't think this list is the appropriate place for it really but
that's just my opinion.

--
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] Out of the blue question..

2009-04-06 Thread bruce
Hi Ladies/Gents of the list...

I've got an issue/question and figured I'd fire it to the list.

Over time, I've had a few projects that I've worked on, where I've required
someone with skills way beyond mine for a given area. And rather than spend
hours trying to figure it out, I've sometimes hired someone to aid for a
very short amount of time..

The issues have ranged from serious db optimization, to server security
issues, etc...

I was wondering, I'm assuming that other developers here have had similar
issues. Has anyone thought about doing a group hire of someone with the
advanced skills to solve the particular issue for the problem domain.

IE if enough people have, or know you're going to have mysql questions...
Then we find someone who's good/skilled and more or less have that person on
retainer for the group. This of course depends on how many people would want
to use the person's skills, and how often we'd need the person, and other
issues...

I figured that I'd post here to see what the list thinks/thought.. etc...


thanks

ps. And no, I have no one in mind, and this isn't an around the way
solicitation for $$$/work!!! (for all you cynics out there!!)



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



RE: [PHP] Workflow app for software

2009-04-01 Thread bruce
now that.. was funny

actually laughed out loud!


-Original Message-
From: George Larson [mailto:george.g.lar...@gmail.com]
Sent: Wednesday, April 01, 2009 12:08 PM
To: Robert Cummings
Cc: bruce; haliphax; php-general@lists.php.net
Subject: Re: [PHP] Workflow app for software


Please quit side-posting.  Thanks.

On Wed, Apr 1, 2009 at 2:58 PM, Robert Cummings wrote:

> I for one don't find you very  | On Wed, 2009-04-01 at 11:46 -0700,
> funny Bruce. It's common knowledge | bruce wrote: so haliphax...
> that it's very difficult to follow | >
> side posts. If not already, then   | > since you seem to be the primary
> they should certainly be   | > person with this issue.. at
> dictatorily banned from being used.| > least for now... i'll ahead and
>| > nominate you to the guy in
> Cheers,| > charge of making sure posters
> Rob.   | > follow the written rule to not
>| > top/down/side/left/right post...
>   | >
>   | > have fun!!!
>   | >
>   | >
>   | >
>   | > -Original Message- From:
>   | > haliphax
>   | > [mailto:halip...@gmail.com]
>   | > Sent: Wednesday, April 01, 2009
>   | > 11:42 AM To:
>   | > php-general@lists.php.net
>   | > Subject: Re: [PHP] Workflow app
>   | > for software
>   | >
>   | >
>   | > On Wed, Apr 1, 2009 at 1:38 PM,
>   | > Robert Cummings
>   | >  wrote:
>   | > > On Wed, 2009-04-01 at 13:30
>   | > >> -0500, haliphax wrote: On
>   | > >> Wed, Apr 1, 2009 at 11:53
>   | > >> > AM, bruce
>   | > >> > 
>   | > >> > wrote: and haliphax...
>   | > >> >
>   | > >> > i specifically sent the
>   | > >> > reply to only you.. you
>   | > >> > then felt the need to reply
>   | > >> > to the list as a whole
>   | > >> >
>   | > >> > hmm.. ok.. this thread is
>   | > >> > officially dead!!
>   | > >> >
>   | > >> > unless of course it gets
>   | > >> > back to the initial
>   | > >> > question...
>   | > >> >
>   | > >> > peace!!
>   | > >> >
>   | > >> >
>   | > >> >> > -Original
>   | > >> >> > Message- From:
>   | > >> >> > haliphax
>| > >> >> > Sent: Wednesday, April
>   | > >> >> > 01, 2009 5:38 AM To:
>   | > >> >> > php-general@lists.php.net
>   | > >> >> > Subject: Re: [PHP]
>   | > >> >> > Workflow app for
>   | > >> >> > software
>   | > >>
>   | > >> --8<--
>   | > >>
>   | > >> >> Again, please do not
>   | > >> >> top-post. It is the
>

RE: [PHP] Workflow app for software

2009-04-01 Thread bruce
so haliphax...

since you seem to be the primary person with this issue.. at least for now... 
i'll ahead and nominate you to the guy in charge of making sure posters follow 
the written rule to not top/down/side/left/right post...

have fun!!!



-Original Message-
From: haliphax [mailto:halip...@gmail.com]
Sent: Wednesday, April 01, 2009 11:42 AM
To: php-general@lists.php.net
Subject: Re: [PHP] Workflow app for software


On Wed, Apr 1, 2009 at 1:38 PM, Robert Cummings  wrote:
> On Wed, 2009-04-01 at 13:30 -0500, haliphax wrote:
>> On Wed, Apr 1, 2009 at 11:53 AM, bruce  wrote:
>> > and haliphax...
>> >
>> > i specifically sent the reply to only you.. you then felt the need to reply
>> > to the list as a whole
>> >
>> > hmm.. ok.. this thread is officially dead!!
>> >
>> > unless of course it gets back to the initial question...
>> >
>> > peace!!
>> >
>> >
>> >> > -Original Message-
>> >> > From: haliphax [mailto:halip...@gmail.com]
>> >> > Sent: Wednesday, April 01, 2009 5:38 AM
>> >> > To: php-general@lists.php.net
>> >> > Subject: Re: [PHP] Workflow app for software
>>
>> --8<--
>>
>> >> Again, please do not top-post. It is the agreed-upon procedure in this
>> >> list to bottom-post when replying to threads. (I am not just going
>> >> "renegade thread-Nazi" on you.)
>> >
>> > Could you show me the signed agreement list. While it's convention on
>> > this list, it's certainly not something everyone agreed upon.
>>
>> To Rob,
>> I meant agreed-upon as in: it's been written... so somebody had to
>> agree to it up to the point that it was posted here -
>> http://us3.php.net/reST/php-src/README.MAILINGLIST_RULES
>
> "It has been written" and "it has been agreed upon" are two completely
> different things. Many things have been written, few things are agreed
> upon.

Unless the PHP development process has become a dictatorship, I'm
pretty sure more than one person decided it was a good idea before
putting it in the mailing list rules.


-- 
// Todd

-- 
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] Workflow app for software

2009-04-01 Thread bruce
and haliphax...

i specifically sent the reply to only you.. you then felt the need to reply
to the list as a whole

hmm.. ok.. this thread is officially dead!!

unless of course it gets back to the initial question...

peace!!


-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Wednesday, April 01, 2009 9:30 AM
To: haliphax
Cc: php-general@lists.php.net
Subject: Re: [PHP] Workflow app for software


On Wed, 2009-04-01 at 11:25 -0500, haliphax wrote:
> On Wed, Apr 1, 2009 at 8:33 AM, bruce  wrote:
> > not another top/side/bottom post thread again!!!
> >
> >
> >
> > -Original Message-
> > From: haliphax [mailto:halip...@gmail.com]
> > Sent: Wednesday, April 01, 2009 5:38 AM
> > To: php-general@lists.php.net
> > Subject: Re: [PHP] Workflow app for software
> >
> >
> > On Tue, Mar 31, 2009 at 4:37 PM, bruce  wrote:
> >> hey todd...
> >>
> >> just toook a look at the polarion svn-web app i thought that was
closed source... i see that it's open!!!
> >>
> >> -----Original Message-
> >> From: haliphax [mailto:halip...@gmail.com]
> >> Sent: Tuesday, March 31, 2009 2:18 PM
> >> To: bruce; php-general@lists.php.net
> >> Subject: Re: [PHP] Workflow app for software
> >>
> >>
> >> On Tue, Mar 31, 2009 at 1:47 PM, bruce  wrote:
> >>> Ladies/Gents...
> >>>
> >>> Hi. Trying to get some input to a web based app for dealing with
managing
> >>> software apps/scripts.
> >>>
> >>> Basically, i'm envisioning a system where people register/signup, and
then
> >>> check in/out apps for development/testing/production... I need a way
of
> >>> dealing with users, assigning/accepting roles for the users, and to
manage
> >>> the flow of the "file" as it moves through the basic
> >>> "development/testing/production" process. i'd like to have a database
> >>> backend, combines with some kind of source/file reqpository...
> >>>
> >>> I've seen things like knowledgetree, owl, etc... but figured I'd get
input
> >>> from here. So, any thoughts to open source apps that you guys have
actual
> >>> experience using??
> >>
> >> This sounds like something Subversion (SVN) is suited for. Three
> >> repositories in the same realm: dev, test, prod. Slap a web front-end
> >> on it like Polarion's "svn-web" (for JSP/Tomcat) and you're in
> >> business.
> >
> > Well, whether it's open source or not, the software is free to use...
> > that's all I ever really cared about. :)
> > (Please stop top-posting.)
>
> Again, please do not top-post. It is the agreed-upon procedure in this
> list to bottom-post when replying to threads. (I am not just going
> "renegade thread-Nazi" on you.)

Could you show me the signed agreement list. While it's convention on
this list, it's certainly not something everyone agreed upon.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


--
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] Workflow app for software

2009-03-31 Thread bruce
hey todd...

just toook a look at the polarion svn-web app i thought that was closed 
source... i see that it's open!!!

-Original Message-
From: haliphax [mailto:halip...@gmail.com]
Sent: Tuesday, March 31, 2009 2:18 PM
To: bruce; php-general@lists.php.net
Subject: Re: [PHP] Workflow app for software


On Tue, Mar 31, 2009 at 1:47 PM, bruce  wrote:
> Ladies/Gents...
>
> Hi. Trying to get some input to a web based app for dealing with managing
> software apps/scripts.
>
> Basically, i'm envisioning a system where people register/signup, and then
> check in/out apps for development/testing/production... I need a way of
> dealing with users, assigning/accepting roles for the users, and to manage
> the flow of the "file" as it moves through the basic
> "development/testing/production" process. i'd like to have a database
> backend, combines with some kind of source/file reqpository...
>
> I've seen things like knowledgetree, owl, etc... but figured I'd get input
> from here. So, any thoughts to open source apps that you guys have actual
> experience using??

This sounds like something Subversion (SVN) is suited for. Three
repositories in the same realm: dev, test, prod. Slap a web front-end
on it like Polarion's "svn-web" (for JSP/Tomcat) and you're in
business.

-- 
// Todd

-- 
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



[PHP] Workflow app for software

2009-03-31 Thread bruce
Ladies/Gents...

Hi. Trying to get some input to a web based app for dealing with managing
software apps/scripts.

Basically, i'm envisioning a system where people register/signup, and then
check in/out apps for development/testing/production... I need a way of
dealing with users, assigning/accepting roles for the users, and to manage
the flow of the "file" as it moves through the basic
"development/testing/production" process. i'd like to have a database
backend, combines with some kind of source/file reqpository...

I've seen things like knowledgetree, owl, etc... but figured I'd get input
from here. So, any thoughts to open source apps that you guys have actual
experience using??

Thanks



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



RE: [PHP] Regex

2009-03-26 Thread bruce
hi...

if you haven't solved your issue... can you tell me in detail what you're
trying to accomplish? what are the steps to running the script?

thanks


-Original Message-
From: jesse.ha...@arvatousa.com [mailto:jesse.ha...@arvatousa.com]
Sent: Thursday, March 26, 2009 1:23 PM
To: php-general@lists.php.net
Subject: [PHP] Regex


Hi,

 

Brand new to regex. So I have a cli which runs a regex on users input,
to make sure that only 0-9 and A-Z are accepted. It should strip
everything else. My problem is that when you press control-Z (on
Windows; I have not yet tested this on linux, and I will, but I would
like this to be compatible with both OS's) it loops infinitely saying
invalid data (because of the next method call, which decides what to do
based on your input). So, here is the input code. Is there a way I can
ensure that control commands are stripped, here?

 

 

 

 

 

public function getSelection() {

 

$choice =
$this->validateChoice(trim(strtoupper(fgets(STDIN;

return $choice;

 

}

 

private function validateChoice($choice) {

 

$choice =
ereg_replace("/[^0-9A-Z]/","",$choice);

return $choice;

 

}

 

 

 

I have tried a ton of different things to try and fix this. Tried
/\c.|[^0-9A-Z]/, and many variations of \c and the [^0-9A-Z], to no
avail. I also tried using both preg_replace() as well as ereg_replace().
I spent a lot of time on the regex section of the PHP manual, but I am
not finding anything. Any advise on how to accomplish this?

 

 

 

Thanks,

 

Jesse Hazen


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

[PHP] webmin mods..

2009-03-22 Thread bruce
oh...

has anyone ever played/used/modified the webmin app??

i'm looking for a web based app/tool that i can modify to be able to manage
my distribbuted client/server crawler on my network of boxes. i'd rather
start with an existing framework/app that already kind of works with
modules/apps on a system, and then modify it to meet my needs...

i'm ultimately looking for a php based web app that i can modify to allow me
to schedule running my crawler... along with a huge number of additional
functions..

thanks



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



[PHP] quick question - need a site i can more or less copy from

2009-03-22 Thread bruce
Hi...

Working on a test app, and I need a web interface to test/view the
underlying information. Looking for (hopefully) quick pointers/suggestions.

I'm dealing with a number of cli web crawling apps that return data. I'm
trying to find a quick app that I can modify the db schema, as well as some
of the underlying logic to display my data.

my returned data consists of:
 university
   school
 dept
  class
   classname
   classID
   classdescription
   classA
   classB
   faculty


The above is a represenation of the levels of data. I'm looking to have
multiple tbls, each of which links to the child tbl...

I'm not a web dev, and i'm looking for some sort of web app that i might rip
apart/modify so i can start to be able to view this data on a web app..

i'm currently looking through sourceforge/freshmeat/etc...

thanks...



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



[PHP] linux sha1sum .vs php sha1

2009-03-20 Thread bruce
hi...

doing some testing with linux sha1sum, and php's sha1 function... are they
both supposed to return the same results for the same chunk of text.

test

file "a.dat" = "1234567890"

linux:
 echo a.dat > sha1sum -t!= php 

any thoughts...

thanks



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



RE: [PHP] Re: Problems with exec() on windows

2009-03-20 Thread bruce
when dealing with windows.. or any file/pathname.. you can't simply
quote/double quote the name using the "~" symbol as well..

haven't done it for awhile.. but i believe you need to explode/derive the
complete path/filename and then quote/double quote it for use by the app...



-Original Message-
From: l...@beyonic.com [mailto:l...@beyonic.com]on Behalf Of Kyohere
Luke
Sent: Thursday, March 19, 2009 11:48 PM
To: Shawn McKenzie
Cc: php-general@lists.php.net
Subject: Re: [PHP] Re: Problems with exec() on windows


You might have something there - never really thought about how windows
forms the 8.3 names... & not many resources online about it ...

The actual path is "c:\Program File\Gammu 1.23.91\bin\gammu.exe"
I'd used "c:\Progra~1\Gammu~1\bin\gammu.exe"

Luke

On Thu, Mar 19, 2009 at 8:57 PM, Shawn McKenzie wrote:

> Kyohere Luke wrote:
> > Hi,
> >
> > Tried all that - it'd work well until one of the arguments also had
> spaces
> > and thus had "" or '' encapsulating it - this weirdness is the reason
for
> > this post.
> > Shawn, even the good old "C:\pathwi~1\gammu.exe" failed :-(
>
> Well, you didn't do it properly then.  What is the actual path?
>
> >
> > The only way I've gotten it to work was to get rid of the spaces in the
> > path/to/exe.
> >
> > Luke.
> >
> > On Thu, Mar 19, 2009 at 8:24 PM, bruce  wrote:
> >
> >> hey...
> >>
> >> if you're going to deal with file/pathnames in windows/linux.. you're
> going
> >> to have to encapsulate them with "" or with '' ie double/single
> quotes...
> >>
> >>
> >>
> >> -Original Message-
> >> From: Kyohere Luke [mailto:l...@beyonic.com]
> >> Sent: Thursday, March 19, 2009 10:18 AM
> >> To: Bastien Koert
> >> Cc: Shawn McKenzie; php-general@lists.php.net
> >> Subject: Re: [PHP] Re: Problems with exec() on windows
> >>
> >>
> >> Eventually settled for getting rid of the spaces in the path. That
> worked.
> >> Thanks.
> >> Luke
> >>
> >> On Thu, Mar 19, 2009 at 8:06 PM, Bastien Koert 
> wrote:
> >>
> >>>
> >>> On Thu, Mar 19, 2009 at 12:48 PM, Kyohere Luke 
> wrote:
> >>>
> >>>> Thanks, but I tried this. Doesn't work because the path\to\gammu.exe
> has
> >>>> spaces in it
> >>>> Haliphax, thanks for your comments. I tried escapeshellarg() to no
> end.
> >>>>
> >>>> I'm exploring your reply regarding proc_open, but how exactly does
> >>>> proc_open
> >>>> separate the arguments from the command?
> >>>>
> >>>> Unless i'm mistaken, data written to the process's stdin (for the
> other
> >>>> process) is not treated like an argument.
> >>>>
> >>>> If I add the arguments to the process name/path? I'm back to square
> one.
> >>>>
> >>>> Luke.
> >>>>
> >>>> On Thu, Mar 19, 2009 at 6:25 PM, Shawn McKenzie  >>>>> wrote:
> >>>>> Kyohere Luke wrote:
> >>>>>> Hi,
> >>>>>> I'm trying to use exec to call gammu.exe and send sms on windows
XP.
> >>>>>>
> >>>>>> This works from commandline:
> >>>>>>
> >>>>>> C:\path\to\gammu.exe 1 --sendsms EMS 200 -text "test1 test2"
> >>>>>>
> >>>>>> But if I run it through php like this:
> >>>>>>
> >>>>>> $command = "\"C:\path\to\gammu.exe\" --sendsms EMS 200 -text
\"test1
> >>>>>> test2\"".;
> >>>>>> @exec($command, $response, $retval);
> >>>>>>
> >>>>>> This always fails, returns 1 and the response is empty.
> >>>>>>
> >>>>>> If the last argument is a string with no spaces, and the double
> >> quotes
> >>>>> were
> >>>>>> omitted, it works perfectly.
> >>>>>>
> >>>>>> If the double quotes are added around the string with no spaces, it
> >>>> fails
> >>>>>> again, which makes me believe that the problem is with the double
> >>>> quotes.
> >>>>>> I've used procmon and it shows that when the double quotes are
added
> >>>>> around
> >>>>>> the last argument, gammu.exe is not even called at all.
> >>>>>>
> >>>>>> Problem is that the double quotes are required by gammu to send an
> >> sms
> >>>>> with
> >>>>>> spaces in it.
> >>>>>>
> >>>>>> Any ideas? :-(
> >>>>>>
> >>>>>> Luke
> >>>>>>
> >>>>> Why not try:
> >>>>>
> >>>>> $command = 'C:\path\to\gammu.exe --sendsms EMS 200 -text "test1
> >> test2"';
> >>>>> --
> >>>>> Thanks!
> >>>>> -Shawn
> >>>>> http://www.spidean.com
> >>>>>
> >>>>> --
> >>>>> PHP General Mailing List (http://www.php.net/)
> >>>>> To unsubscribe, visit: http://www.php.net/unsub.php
> >>>>>
> >>>>>
> >>> try double slashes for the path and wrap the pathin quotes if there
are
> >>> spaces in it. Or if possible get rid of the spaces in the folder names
> >>>
> >>> --
> >>>
> >>> Bastien
> >>>
> >>> Cat, the other other white meat
> >>>
> >>
> >
>
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
>
> --
> 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] Re: Problems with exec() on windows

2009-03-19 Thread bruce
hey...

if you're going to deal with file/pathnames in windows/linux.. you're going
to have to encapsulate them with "" or with '' ie double/single quotes...



-Original Message-
From: Kyohere Luke [mailto:l...@beyonic.com]
Sent: Thursday, March 19, 2009 10:18 AM
To: Bastien Koert
Cc: Shawn McKenzie; php-general@lists.php.net
Subject: Re: [PHP] Re: Problems with exec() on windows


Eventually settled for getting rid of the spaces in the path. That worked.
Thanks.
Luke

On Thu, Mar 19, 2009 at 8:06 PM, Bastien Koert  wrote:

>
>
> On Thu, Mar 19, 2009 at 12:48 PM, Kyohere Luke  wrote:
>
>> Thanks, but I tried this. Doesn't work because the path\to\gammu.exe has
>> spaces in it
>> Haliphax, thanks for your comments. I tried escapeshellarg() to no end.
>>
>> I'm exploring your reply regarding proc_open, but how exactly does
>> proc_open
>> separate the arguments from the command?
>>
>> Unless i'm mistaken, data written to the process's stdin (for the other
>> process) is not treated like an argument.
>>
>> If I add the arguments to the process name/path? I'm back to square one.
>>
>> Luke.
>>
>> On Thu, Mar 19, 2009 at 6:25 PM, Shawn McKenzie > >wrote:
>>
>> > Kyohere Luke wrote:
>> > > Hi,
>> > > I'm trying to use exec to call gammu.exe and send sms on windows XP.
>> > >
>> > > This works from commandline:
>> > >
>> > > C:\path\to\gammu.exe 1 --sendsms EMS 200 -text "test1 test2"
>> > >
>> > > But if I run it through php like this:
>> > >
>> > > $command = "\"C:\path\to\gammu.exe\" --sendsms EMS 200 -text \"test1
>> > > test2\"".;
>> > > @exec($command, $response, $retval);
>> > >
>> > > This always fails, returns 1 and the response is empty.
>> > >
>> > > If the last argument is a string with no spaces, and the double
quotes
>> > were
>> > > omitted, it works perfectly.
>> > >
>> > > If the double quotes are added around the string with no spaces, it
>> fails
>> > > again, which makes me believe that the problem is with the double
>> quotes.
>> > >
>> > > I've used procmon and it shows that when the double quotes are added
>> > around
>> > > the last argument, gammu.exe is not even called at all.
>> > >
>> > > Problem is that the double quotes are required by gammu to send an
sms
>> > with
>> > > spaces in it.
>> > >
>> > > Any ideas? :-(
>> > >
>> > > Luke
>> > >
>> >
>> > Why not try:
>> >
>> > $command = 'C:\path\to\gammu.exe --sendsms EMS 200 -text "test1
test2"';
>> >
>> > --
>> > Thanks!
>> > -Shawn
>> > http://www.spidean.com
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
>
> try double slashes for the path and wrap the pathin quotes if there are
> spaces in it. Or if possible get rid of the spaces in the folder names
>
> --
>
> Bastien
>
> Cat, the other other white meat
>


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



RE: [PHP] whoami explanation

2009-03-03 Thread bruce
hi pj...

single quotes are entered via the key directly left from the "return/enter"
key on most/all qwerty keyboards...

the 'backtic' is normally the shift '~' key... the key, right to the left of
the '1' key... in the upper left position of the keyboard...




-Original Message-
From: PJ [mailto:af.gour...@videotron.ca]
Sent: Tuesday, March 03, 2009 7:57 AM
To: Per Jessen
Cc: php-general@lists.php.net
Subject: Re: [PHP] whoami explanation


Per Jessen wrote:
> PJ wrote:
>
>
>> This really needs some explanation
>> I found this on the web:
>> 
>> with it there was the comment "the direction of those single-quotes
>> matters" (WHY ?) and it works
>>
>>
>
> GIYF - look up "back quotes".
>
>
>> But this (_*FROM THE PHP MANUAL***_ * -  exec()* executes the given
>> /command/ ) does not,
>> COPIED AND PASTED:
>> |> // outputs the username that owns the running php/httpd process
>> // (on a system with the "whoami" executable in the path)
>> echo exec('whoami');
>> ?> |
>> What is going on here?
>>
>
> What sort of error did you get?  (it works fine here).
>
>
> /Per
>
forgot to add:
What's the difference between back ticks or quotes and regular single
quotes?
How does one enter back quotes from the keyboard?

--

Phil Jourdan --- p...@ptahhotep.com
   http://www.ptahhotep.com
   http://www.chiccantine.com


--
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



[PHP] RE: file locking...

2009-03-03 Thread bruce
Hi Dennis...

Thanks for the reply... Here's my solution up to now.. might change in the
future...

The problem:
App has a bunch of clients that need to get a separate/unique list of files
from a master server app. The files are created by the master server
process, and reside on the filesystem behind the server process. (this is a
client/server based app. client sends a request to the server.. the backend
operation of the server fetches the required files, and returns them to the
client app.)

A key issue is that I don't want to run into potential race conditions,
which would result in a given client never being served the files it's
trying to fetch.

Potential Soln:
1) Invoke a form of file locking, with each client processes waiting
   until it gets its lock.
2) Invoke some form of round-robin process, where the master process
   puts files in different dirs, so each client can have a better
   chance of getting a "lock" for the different dir..

Final Soln: (for now)
I decided to cheat!
I realized that since each client process is essentially unique, I can
create a uniqueId (uuid) for each process. Remember, the client app is
hitting the master server/file process via a webservice. So I have each
client send it's uuid to the master server via the webprocess. this
information is appended to a file, which gives me kind of a fifo approach
for creating unique dirs for each client. the server (on the backend) then
reads the fifo file, for the uuid. in getting the uuid for the 'client', a
master cron process then reads the fifo file, and for each uuid in the file,
creates a tmp dir for the uuid. the master cron process then populates this
dir, with the required files for the given client.

on the client side, the client loops through a wait loop, checking to see if
anything is created/placed in its tmp 'uuid' dir.. if files are there, it
fetches the files, and proceeds..

This approach ensures that a client would never run into a situation where
it might never get files where files are available for processing. in the
event there are no files, the client simply sleeps until there are files..
in the event a client requests files via the sending of the uuid, and the
client dies before getting the files, but the master cron had already placed
them in the uuid dir.. there will be a cleanup process to reabsorb those
files back into the system...

thanks to all who gave input/pointers!!

thoughts/comments/etc...



-Original Message-
From: python-list-bounces+bedouglas=earthlink@python.org
[mailto:python-list-bounces+bedouglas=earthlink@python.org]on Behalf
Of Dennis Lee Bieber
Sent: Sunday, March 01, 2009 11:41 AM
To: undisclosed-recipients:
Subject: Re: file locking...


On Sun, 1 Mar 2009 10:00:54 -0800, "bruce" 
declaimed the following in comp.lang.python:

>
> Except in my situation.. the client has no knowledge of the filenaming
> situation, and i might have 1000s of files... think of the FIFO, first in,
> first out.. so i'm loking for a fast solution that would allow me to
create
> groups of say, 500 files, that get batched and processed by the client
> app...
>
My silly thoughts...

Main process creates temp/scratch directories for each subprocess;
spawn each subprocess, passing the directory path to it;
main process then just loops over the files moving them, one at a time,
to one of the temp/scratch directories, probably in cyclic order to
distribute the load;
when main/input directory is empty, sleep then check again (or, if the
OS supports it -- use some directory change notification) for new files.

Each subprocess only sees its files in the applicable temp/scratch
directory.
--
WulfraedDennis Lee Bieber   KD6MOG
wlfr...@ix.netcom.com   wulfr...@bestiaria.com
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff:   web-a...@bestiaria.com)
HTTP://www.bestiaria.com/
--
http://mail.python.org/mailman/listinfo/python-list


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



RE: [PHP] file locking...

2009-03-01 Thread bruce
hi rob...

what you have written is similar to my initial approach... my question, and
the reason for posting this to a few different groups.. is to see if someone
has pointers/thoughts for something much quicker...

this is going to handle processing requests from client apps to a
webservice.. the backend of the service has to quickly process the files in
the dir as fast as possible to return the data to the web client query...

thanks



-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Sunday, March 01, 2009 9:54 AM
To: bruce
Cc: php-general@lists.php.net
Subject: RE: [PHP] file locking...


On Sun, 2009-03-01 at 09:09 -0800, bruce wrote:
> hi rob...
>
> here's the issue in more detail..
>
> i have multiple processes that are generated/created and run in a
> simultaneous manner. each process wants to get XX number of files from the
> same batch of files... assume i have a batch of 50,000 files. my issue is
> how do i allow each of the processes to get their batch of unique files as
> fast as possible. (the 50K number is an arbotrary number.. my project will
> shrink/expand over time...
>
> if i dump all the 50K files in the same dir, i can have a lock file that
> would allow each process to sequentially read/write the lock file, and
then
> access the dir to get the XX files the process is needing. (each process
is
> just looking to get the next batch of files for processing. there's no
> searching based on text in the name of the files. it's a kind of fifo
queing
> system) this approach could work, but it's basically sequential, and could
> in theory get into race conditions regarding the lockfile.
>
> i could also have the process that creates the files, throw the files in
> some kind of multiple directory processes, where i split the 50K files
into
> separate dirs and somehow implement logic to allow the cient process to
> fetch the files from the unique/separate dirs.. but this could get ugly.
>
> so my issue is essentially how can i allow as close to simultaneous access
> by client/child processes to a kind of FIFO of files...
>
> whatever logic i create for this process, will also be used for the next
> iteration of the project, where i get rid of the files.. and i use some
sort
> of database as the informational storage.
>
> hopefully this provides a little more clarity.

Would I be right in assuming that a process grabs X of the oldest
available files and then begins to work on them. Then the next process
would essentially grab the next X oldest files so on and so forth over
and over again? Also is the file discarded once processed? Would I be
correct in presuming that processing of the files takes longer than
grabbing the files wanted? If so then I would have a single lock upon
which all processes wait. Each process grabs the lock when it can and
then moves X oldest files to a working directory where it can then
process them.

So... directory structure:

/ROOT
/ROOT/queue
/ROOT/work

Locks...

/ROOT/lock

So let's say you have 500 files:

/ROOT/queue/file_001.dat
/ROOT/queue/file_002.dat
/ROOT/queue/file_003.dat
...
/ROOT/queue/file_499.dat
/ROOT/queue/file_500.dat

And you have 5 processes...

/proc/1
/proc/2
/proc/3
/proc/4
/proc/5

Now to start all processes try to grab the lock at the same time, by
virtue of lock mechanics only one process gets the lock... let's say for
instance 4 While 4 has the lock all the other processes go to sleep
for say... 1 usecs... upon failing to get the lock.

So process 4 transfers file_001.dat through to file_050.dat
into /ROOT/work.

/ROOT/work/file_001.dat
/ROOT/work/file_002.dat
/ROOT/work/file_003.dat
...
/ROOT/work/file_049.dat
/ROOT/work/file_050.dat

Then it releases the lock and begins processing meanwhile the other
processes wake up and try to grab the lock again... this time PID 2 gets
it. It does the same...

/ROOT/work/file_043.dat
/ROOT/work/file_044.dat
/ROOT/work/file_045.dat
...
/ROOT/work/file_049.dat
/ROOT/work/file_100.dat

/ROOT/queue/file_101.dat
/ROOT/queue/file_102.dat
/ROOT/queue/file_103.dat
...
/ROOT/queue/file_499.dat
/ROOT/queue/file_500.dat

Now while it was doing that PID 4 finished and all it's files are now
deleted. The first thing it does is try to get the lock so it can get
more... but it's still owned by PID 2 so PID 4 goes to sleep. Once PID 2
gets it's files it releases the lock and off it goes and the cycle
continued. Now there's still an issue with respect to incoming partially
written files. During the incoming process those should be written
elsewhere... lets say /ROOT/incoming. Once writing of the file is
complete it can be moved to /ROOT/queue. Also if you don't want
processes to delete the

RE: [PHP] file locking...

2009-03-01 Thread bruce
hi rob...

here's the issue in more detail..

i have multiple processes that are generated/created and run in a
simultaneous manner. each process wants to get XX number of files from the
same batch of files... assume i have a batch of 50,000 files. my issue is
how do i allow each of the processes to get their batch of unique files as
fast as possible. (the 50K number is an arbotrary number.. my project will
shrink/expand over time...

if i dump all the 50K files in the same dir, i can have a lock file that
would allow each process to sequentially read/write the lock file, and then
access the dir to get the XX files the process is needing. (each process is
just looking to get the next batch of files for processing. there's no
searching based on text in the name of the files. it's a kind of fifo queing
system) this approach could work, but it's basically sequential, and could
in theory get into race conditions regarding the lockfile.

i could also have the process that creates the files, throw the files in
some kind of multiple directory processes, where i split the 50K files into
separate dirs and somehow implement logic to allow the cient process to
fetch the files from the unique/separate dirs.. but this could get ugly.

so my issue is essentially how can i allow as close to simultaneous access
by client/child processes to a kind of FIFO of files...

whatever logic i create for this process, will also be used for the next
iteration of the project, where i get rid of the files.. and i use some sort
of database as the informational storage.

hopefully this provides a little more clarity.

thanks


-Original Message-
From: Robert Cummings [mailto:rob...@interjinn.com]
Sent: Sunday, March 01, 2009 2:50 AM
To: bruce
Cc: php-general@lists.php.net
Subject: Re: [PHP] file locking...


On Sat, 2009-02-28 at 21:46 -0800, bruce wrote:
> Hi.
>
> Got a bit of a question/issue that I'm trying to resolve. I'm asking this
of
> a few groups so bear with me.
>
> I'm considering a situation where I have multiple processes running, and
> each process is going to access a number of files in a dir. Each process
> accesses a unique group of files, and then writes the group of files to
> another dir. I can easily handle this by using a form of locking, where I
> have the processes lock/read a file and only access the group of files in
> the dir based on the  open/free status of the lockfile.
>
> However, the issue with the approach is that it's somewhat synchronous.
I'm
> looking for something that might be more asynchronous/parallel, in that
I'd
> like to have multiple processes each access a unique group of files from
the
> given dir as fast as possible.
>
> So.. Any thoughts/pointers/comments would be greatly appreciated. Any
> pointers to academic research, etc.. would be useful.

Threads? Or spawn off child processes. Maybe I'm not understanding your
issues well enough.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


--
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



[PHP] file locking...

2009-02-28 Thread bruce
Hi.

Got a bit of a question/issue that I'm trying to resolve. I'm asking this of
a few groups so bear with me.

I'm considering a situation where I have multiple processes running, and
each process is going to access a number of files in a dir. Each process
accesses a unique group of files, and then writes the group of files to
another dir. I can easily handle this by using a form of locking, where I
have the processes lock/read a file and only access the group of files in
the dir based on the  open/free status of the lockfile.

However, the issue with the approach is that it's somewhat synchronous. I'm
looking for something that might be more asynchronous/parallel, in that I'd
like to have multiple processes each access a unique group of files from the
given dir as fast as possible.

So.. Any thoughts/pointers/comments would be greatly appreciated. Any
pointers to academic research, etc.. would be useful.

thanks




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



[PHP] redirecting output for a spawned child process..

2009-02-21 Thread bruce
hi...

got a situation where i have a parent app that spawns children. trying to
figure out how to get the output of the spawned/forked children to be
written to an external file...

can't seem to find any examples of how to accomplish this... do i have to
insert something within the child php app itself to redirect the output
that's currently being sent to the term? i'd prefer to have the output
displayed, as well as redirected...

these are cli apps...

code chunks would be appreciated..

thanks



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



[PHP] fork/spawnzombie question

2009-02-12 Thread bruce
Hi Nathan/Torok...

Hey guys... got a bit of a question.

I'm playing around with the php/for/pcntl_exec functions and I've got a process 
that spawns off a bunch of child processes. Unfortunately, I'm getting to where 
I have 100's of zombie child processes that I can see from the 
linux/processTBL. 

I don't want to have my master loop do a waitpid() call, as it would block on 
the wait for one of the child processes to exit. I recognize that the 
zombie/child process is essentially a placeholder in the processTBL slt, and 
really doesn't take up any system resources, but I'd still like to have the 
zombie processes removed. 

I'm wondering. Is it possible to fork off a process, and have it essentially do 
the wait on all the zombie/shild processes from the parent app? Or would this 
be a peer process, waiting on it's peers?


Thanks

-bruce
bedoug...@earthlink.net
925-249-1844





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



[PHP] webapp to drive/monitor a bunch of system processes

2009-02-11 Thread bruce
hi...

i've got a project (goal) where i'm looking for a webbased app that
drives/runs/monitors different linux/system processes. i'm basically looking
for different apps that i can look at to get ideas/see their
layout/structure. i'm going to have to create a similar app to run some
processes that i'm dealing with.

i'm currently looking/searchin sourceforge.net/freshmeat/etc.. but i thought
i'd fire off the question here as well, in case someone has an app that
they're aware of that you can pass on to me..

my overall/ultimate goal is going to be to interface with underlying
database/tbls, to drive processes on a distributed network of machines that
i'm putting together... so i'm going to need to be able to to
monitor/start/stop a number of different apps that i create. i'm also
looking to be able to see past history of the apps that have been run using
the webapp...

but for now, any app that i can find that allows a user to manage/start/stop
different processes on a server/network would be useful.. (already looked at
nagios!)

thanks!!




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



RE: [PHP] Re: preg_match question...

2009-02-06 Thread bruce
hmmm...

tried your preg__match/regex...

i get:
0 - 1145 total
1 - 1145
2 - l

i would have thought that the 2nd array item should have had "total"...



-Original Message-
From: Frank Stanovcak [mailto:blindspot...@comcast.net]
Sent: Friday, February 06, 2009 6:15 AM
To: php-general@lists.php.net
Subject: [PHP] Re: preg_match question...



""bruce""  wrote in message 
news:234801c98863$88f27260$0301a...@tmesa.com...
> hi...
>
> trying to figure out the best approach to using preg_match to extract the
> number from the follwing type of line...
>
> " 131646 sometext follows.."
>
> basically, i want to extract the number, without the text, but i have to 
> be
> able to match on the "text"
>
> i've been playing with different preg_match regexs.. but i'm missing
> something obvious!
>
> thoughts/comments..
>

How about
preg_match('#(\d+)(.)+#',$haystack,$match)

if I remember right
$match[0] would be all of it
$match[1] would be the numbers
$match[2] would be the text 



-- 
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



[PHP] preg_match question...

2009-02-06 Thread bruce
hi...

trying to figure out the best approach to using preg_match to extract the
number from the follwing type of line...

" 131646 sometext follows.."

basically, i want to extract the number, without the text, but i have to be
able to match on the "text"

i've been playing with different preg_match regexs.. but i'm missing
something obvious!

thoughts/comments..


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



RE: [PHP] Connect local app to a web app

2009-02-05 Thread bruce
hi...

can you describe in psuedocode what you're trying to accomplish?

might be able to help if i have a better understanding of where you're
trying to go.



-Original Message-
From: Jônatas Zechim [mailto:zechim@gmail.com]
Sent: Thursday, February 05, 2009 11:25 AM
To: php-general@lists.php.net
Subject: [PHP] Connect local app to a web app


Hi there, i'm here again, but now with another doubt.

What's the best way to connect a local app write in php or php-gtk to a web
app writen in php.
The database is MySql, and i need to do this connection every 3s to check
data, get the data back and save into localhost database.


--
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



[PHP] php forking/spawning question...

2009-01-27 Thread bruce
Hi...

got the follwoing example... basically, when i call the function "spawn_" i
get the passed vars for appname/args...

the $appname,$args are valid when the spawn_ function is initially invoked.
however, when the app does the fork, the $appname, $args get lost. when the
function gets to the pcntl_exec, the vars ($appname, $args) are no longer
set.

so what did i miss, how is this process supposed to work?

thoughts/comments...

thanks


=
/*
test func to spawn client thread
*/
function spawn_($appname, $args)
{
print "appname =".$appname."\n";
print_r($args);
//exit();

$pid = pcntl_fork();
if ($pid == -1)
{
die('cannot fork');
}
elseif ($pid)
{
print "child pid = ".$pid."\n";
//pcntl_waitpid($pid, $status);
//break;
//exit();
$par=1;
}
else
{
// Note that pcntl_exec() automatically prepends the program
name
// to the array of arguments; the program name cannot be
spoofed.
print "running cmd \n";
 pcntl_exec($appname, $args);
//system("./clientmgr.php");
 exit();
}
}



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



RE: [PHP] process creation

2009-01-23 Thread bruce
Hi Török.

My test code had/has something similar.. but it kept displaying zombie 
processes as well as legitimate processes in the ps tbl/display...

Turns out I had a mistake in the test "client" ap/process that I was 
creating... This was causing the child process to die, resulting in a "zombie" 
process, until the parent got around to doing a waitpid call...

i think it's ok now...

thanks

ps, torok... are you in the US/Canada? Also, are you up to talking to me about 
this project that I'm playing with?



-Original Message-
From: Török Alpár [mailto:torokal...@gmail.com]
Sent: Friday, January 23, 2009 10:09 AM
To: bruce
Cc: php-general@lists.php.net
Subject: Re: [PHP] process creation


2009/1/23 bruce 

> A simple question (or so I thought).
>
> Does php allow an app to create/start a process/application that can
> continue to run on its own, after the initiating program/app terminates?
>
> It appears that the spawning/forking functions might work, but the child
> apps would be in a zombie status, and couldn't be killed by an external
> program.
>
> Basically, I'd like to create a bunch of test apps/processes, and then to
> be
> able to kill them by a separate process if the apps take too long to run..

  You can have the  parent sleep, and then clean up like :

$aPids = array();
for ($i=0;$i
> So.. thoughts/comments would be appreciated!
>
> thanks
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Torok, Alpar Istvan


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



[PHP] process creation

2009-01-23 Thread bruce
A simple question (or so I thought).

Does php allow an app to create/start a process/application that can
continue to run on its own, after the initiating program/app terminates?

It appears that the spawning/forking functions might work, but the child
apps would be in a zombie status, and couldn't be killed by an external
program.

Basically, I'd like to create a bunch of test apps/processes, and then to be
able to kill them by a separate process if the apps take too long to run..

So.. thoughts/comments would be appreciated!

thanks



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



[PHP] php spawing/forking issues

2009-01-22 Thread bruce
Hi...

Playing around with a test app to spawn external child processes.

I'd like to be able to spawn/fork/run am external child process, that:
 -allows the child processes to run as separate independent processes (pid)
 -allows the child process(es) to be terminated via cmdline (kill -9 pid)


i've got a dynamic situation, where i'm reading from an array, and for each
item in the array, i want to spawn/fork the child process. i'd like to be
able to have 10 copies of the spawned child process running at the same
time.

the only way i've been able to get my test working, is to spawn a group of
processes, and then to iterate through the group, using an array of pids,
and doing a wait for each pid in the array. however, this doesn't satisfy me
wanting to have a certain number of simultaneous processes running at the
same time..

thoughts/comments/pointers to articles that might demonstrate this would be
useful.

thanks...

i can easily post the sample chunk of code i'm playing with if someone wants
to look at it!




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



RE: [PHP] killing a child process from pcntl_exec

2009-01-22 Thread bruce
i'm pretty sure that's not the issue...

i should be able to spawn/fork any kind of external app/process... "kill -9
pid", especially if done as root, should terminate the process...

i suspect that the issue has to do with zombie processes, and how
php/pnctl_exec/etc.. operates.



-Original Message-
From: c...@l-i-e.com [mailto:c...@l-i-e.com]
Sent: Thursday, January 22, 2009 10:00 AM
To: php-general@lists.php.net
Subject: Re: [PHP] killing a child process from pcntl_exec



There are functions/settings in pcntl docs about how to "listen" for
specific signals.

If you don't listen for -9, maybe you don't get it.

http://php.net/manual/en/function.pcntl-signal.php


--
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] Re: killing a child process from pcntl_exec

2009-01-22 Thread bruce
hi carlos..

yeah.. the pid is correct.

it appears that spawning/creating a child process using pcntl_exec(foo)
results in a child process that you can see running from the cmdline, but
that you can't kill using "kill -9". php might allow some other function
within the parent app to allow the kill signal to be received by the child,
but i'm not familiar enough with php to know.

if i spawn the child process using something like "system()" then i can kill
the child, but i essentially have a bunch of parent processes running as
well. (ie, one parent process for each child process in the pid tbl)

what i really want, is the ability to spawn/create multiple external child
apps, each with their own child process ID, so I can kill it from the
cmdline. I'd also like to have a single parent processID in the pid tbl...

thoughts/comments/etc...

thanks


-Original Message-
From: Carlos Medina [mailto:i...@simply-networks.de]
Sent: Thursday, January 22, 2009 8:04 AM
To: php-general@lists.php.net
Subject: [PHP] Re: killing a child process from pcntl_exec


bruce schrieb:
> Hi..
>
> I fork a child process, using pcntl_exec. I see the process from the
cmdline
> (using pgrep 123), but I can't seem to kill the pid from the cmdline,
using
> "kill -9 123"..
>
> Is there something that I need to implement within the php test in order
for
> the kill signal to be effective?
>
> If I wait, the child eventually dies.. but I'd like to be able to kill it
> from the cmdline.
>
> thoughts/pointers/comments...
>
> thanks
>
Hi Bruce,
my ask: it is the pnum really 123? Check it out with ps -aux or ps -aix

Regards

Carlos Medina

--
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



[PHP] killing a child process from pcntl_exec

2009-01-22 Thread bruce
Hi..

I fork a child process, using pcntl_exec. I see the process from the cmdline
(using pgrep 123), but I can't seem to kill the pid from the cmdline, using
"kill -9 123"..

Is there something that I need to implement within the php test in order for
the kill signal to be effective?

If I wait, the child eventually dies.. but I'd like to be able to kill it
from the cmdline.

thoughts/pointers/comments...

thanks


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



[PHP] Looking for an app...

2009-01-15 Thread bruce
Hi List!


I know this is somewhat basic.. and I am searching google as I type! I'm
looking for a client/server app that allows me to have a quick/dirty client
that can upload/download a file to a server app, with the server app copying
the file to a given dir...

Code samples, or pointers to a site where I can download this would be
great!! I don't want a straight FTP, as I want to do more things with the
server piece...

And yes, a php/apache kind of app would be cool..

thanks!!

-g


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



RE: [PHP] setting up FTP account names via PHP

2009-01-05 Thread bruce
are you moving the files from the ftpdir, to a separate dir?

if you are, you can run your cron process from the top level dir... get a
list of any underlying files, and then iterate through the list to copy the
files to whereever you need to copy them...

you'd use the 'ls -R...' or the 'find' cmd for what you're looking to
do...



-Original Message-
From: Merlin Morgenstern [mailto:merli...@fastmail.fm]
Sent: Monday, January 05, 2009 3:56 PM
To: php-general@lists.php.net
Subject: Re: [PHP] setting up FTP account names via PHP


Hello everybody,

thank you all for your help. I got a solution running. In pure-ftpd you
can authenticate via mysql. Via a user table, exactly the thing I was
searching for.

However, there is a problem araising. Every user get's his own directory
for uploads. My next step would have been to create a php script which
will be run by cron every 5 minutes that scans one dir and if there is
content inside import it into the mysql db.
With the current setup I would need to scan all dirs to see if there are
changes inside.

Is there some kind of command where I could find out if there are new
files inside those folders? I don't see any other solution.

Any suggestions?

Thank you for any help,

merlin

bruce schrieb:
> merlin..
>
> if you're going to allow a user to use the same user/passwd for the site,
> and the FTP server.. i would strongly argue that you should allow the user
> only the minimal access on the FTP server. if someone hacks your site, no
> need to have them running rampant over your FTP server.
>
> i would actually argue that you can have the same username, but separate
> passwds, but i don'w know exactly what you're going to have on the FTP
> server, nor do I know your skill at securing servers/services...
>
> it doesn't really make a difference if you have separate dbs for the
> user/passwd auth systems. if you secure the overall system, it's secure.
if
> you don't, well you're going to run into issues..
>
> you might also look into existing web based mgmt apps for FTP servers to
see
> if any already exist.
>
>
>
> -Original Message-
> From: Merlin Morgenstern [mailto:merli...@fastmail.fm]
> Sent: Monday, January 05, 2009 6:56 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] setting up FTP account names via PHP
>
>
> Yes, it would be great if he could use the already existing username and
> password. It should not be a one time password.
>
> I am just now looking into mysql support for pure ftpd. One solution I
> have in mind is to write the password into the pureftp DB upon signup.
> That would be the easiest. The other solution to write to a conf file
> would be OK, too. What do you think?
>
> bruce wrote:
>> are you trying to allow a user who logs in, to use his same username when
>> interfacing with the FTP server?
>>
>> obviously, the password for the FTP server will be different. Or are you
>> looking to dynamically create a one time user/passwd for the user so that
> it
>> changes each time they access the FTP server?
>>
>>
>> -Original Message-
>> From: Merlin Morgenstern [mailto:merli...@fastmail.fm]
>> Sent: Monday, January 05, 2009 6:44 AM
>> To: php-general@lists.php.net
>> Subject: Re: [PHP] setting up FTP account names via PHP
>>
>>
>> Marc Steinert wrote:
>>> Merlin Morgenstern schrieb:
>>>> Hello everybody,
>>>>
>>>> I am running a real estate site where I would like to enable bulk
>>>> upload via real estate software that exports an xml file into an ftp
>>>> account.
>>>>
>>>> In order to give every user unique access I would need to generate
>>>> individual ftp name and passwords for each member. I can not see how
>>>> this should work. My portal is written in PHP 4.x and there every
>>>> members loges in with a unique ID. The FTP Server runns on the same
>>>> linux machine. How could I generate users for this FTP server with
>>>> php, for example on sign up?
>>>>
>>>> Thank you for any help on this.
>>>>
>>>> Best regards,
>>>>
>>>> Merlin
>>>>
>>> What ftp server are you using?
>>>
>> I just installed pureftpd. One possible sollution as I figured is to
>> alter the virtual user table of the ftp server with php.
>>
>> Is this the way to go, or does somebody have a better idea that saves
>> dev. time?
>>
>>
>> --
>> 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
>

--
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] setting up FTP account names via PHP

2009-01-05 Thread bruce
merlin..

if you're going to allow a user to use the same user/passwd for the site,
and the FTP server.. i would strongly argue that you should allow the user
only the minimal access on the FTP server. if someone hacks your site, no
need to have them running rampant over your FTP server.

i would actually argue that you can have the same username, but separate
passwds, but i don'w know exactly what you're going to have on the FTP
server, nor do I know your skill at securing servers/services...

it doesn't really make a difference if you have separate dbs for the
user/passwd auth systems. if you secure the overall system, it's secure. if
you don't, well you're going to run into issues..

you might also look into existing web based mgmt apps for FTP servers to see
if any already exist.



-Original Message-
From: Merlin Morgenstern [mailto:merli...@fastmail.fm]
Sent: Monday, January 05, 2009 6:56 AM
To: php-general@lists.php.net
Subject: Re: [PHP] setting up FTP account names via PHP


Yes, it would be great if he could use the already existing username and
password. It should not be a one time password.

I am just now looking into mysql support for pure ftpd. One solution I
have in mind is to write the password into the pureftp DB upon signup.
That would be the easiest. The other solution to write to a conf file
would be OK, too. What do you think?

bruce wrote:
> are you trying to allow a user who logs in, to use his same username when
> interfacing with the FTP server?
>
> obviously, the password for the FTP server will be different. Or are you
> looking to dynamically create a one time user/passwd for the user so that
it
> changes each time they access the FTP server?
>
>
> -Original Message-
> From: Merlin Morgenstern [mailto:merli...@fastmail.fm]
> Sent: Monday, January 05, 2009 6:44 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] setting up FTP account names via PHP
>
>
> Marc Steinert wrote:
>> Merlin Morgenstern schrieb:
>>> Hello everybody,
>>>
>>> I am running a real estate site where I would like to enable bulk
>>> upload via real estate software that exports an xml file into an ftp
>>> account.
>>>
>>> In order to give every user unique access I would need to generate
>>> individual ftp name and passwords for each member. I can not see how
>>> this should work. My portal is written in PHP 4.x and there every
>>> members loges in with a unique ID. The FTP Server runns on the same
>>> linux machine. How could I generate users for this FTP server with
>>> php, for example on sign up?
>>>
>>> Thank you for any help on this.
>>>
>>> Best regards,
>>>
>>> Merlin
>>>
>> What ftp server are you using?
>>
>
> I just installed pureftpd. One possible sollution as I figured is to
> alter the virtual user table of the ftp server with php.
>
> Is this the way to go, or does somebody have a better idea that saves
> dev. time?
>
>
> --
> 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


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



RE: [PHP] setting up FTP account names via PHP

2009-01-05 Thread bruce
are you trying to allow a user who logs in, to use his same username when
interfacing with the FTP server?

obviously, the password for the FTP server will be different. Or are you
looking to dynamically create a one time user/passwd for the user so that it
changes each time they access the FTP server?


-Original Message-
From: Merlin Morgenstern [mailto:merli...@fastmail.fm]
Sent: Monday, January 05, 2009 6:44 AM
To: php-general@lists.php.net
Subject: Re: [PHP] setting up FTP account names via PHP


Marc Steinert wrote:
> Merlin Morgenstern schrieb:
>> Hello everybody,
>>
>> I am running a real estate site where I would like to enable bulk
>> upload via real estate software that exports an xml file into an ftp
>> account.
>>
>> In order to give every user unique access I would need to generate
>> individual ftp name and passwords for each member. I can not see how
>> this should work. My portal is written in PHP 4.x and there every
>> members loges in with a unique ID. The FTP Server runns on the same
>> linux machine. How could I generate users for this FTP server with
>> php, for example on sign up?
>>
>> Thank you for any help on this.
>>
>> Best regards,
>>
>> Merlin
>>
> What ftp server are you using?
>

I just installed pureftpd. One possible sollution as I figured is to
alter the virtual user table of the ftp server with php.

Is this the way to go, or does somebody have a better idea that saves
dev. time?


--
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



[PHP] email app/script/needs...

2009-01-03 Thread bruce
HI...

Playing around with an app and I need to implement some functionality
allowing a user to email some text.

Basically, I want to allow the user to select some text from a dropdown
list. I then want to allow the user to edit the text if needed, and to then
submit the text for email to a given user. In order to perform some basic
QA, I want to have an additional user be notified of the email/text to be
sent, and to then have to authorize the email/text in order for it to be
sent.

The QA process is required as this is going to be part of a kind of stripped
down call center process.

I'm asking the list to see if anyone has come across this kind of
functionality in an app that you can point me to. I've been searching the
'net with no luck, and I'd rather not reinvent the wheel on this one..

Pointers/Comments appreciated!

Thanks!!!




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



[PHP] Need a brain to bounce some Mysql/DB thoughts off of!!

2008-12-11 Thread bruce
Hi guys.

Architecting an app that's going to have users interacting with different
levels of the db/tbls, and trying to figure out a few things.

The highlevel layout looks like:
 collegeTBL
 deptTBL

 with ->collegeTBL.id = deptTBL.colID

I also have a status tbl for each collegeTBL/deptTBL

 college_statusTBL
   userID
   collegeID

 dept_statusTBL
   userID
   deptID

 with:
  collegeTBL.id=college_statusTBL.collegeID
  deptTBL.id=dept_statusTBL.deptID

So I limk the statusTBLs to the college/dept TBLs...

This is due to the fact that a user can elect to work on either a college,
or a given dept of the college.

I'm struggling with a good/best way to figure out how to develop a query to
determine what level of a college, (if any) a user has elected to work with.

I can do a multiple join across the collegeTBL/deptTBL, and the statusTBLs,
but this simply gets a large tbl, and I'd have to then parse the results...
I'm trying to figure out if there's a better way, with a single query. The
query would look at the college(status), and then at the dept(status) to
determine what level (if any ) the user has selected.

I've got a mysql layout of the various tbls, and inserts if anyone's
interested in helping me shake my mind out on this...

thanks

-bruce




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



[PHP] trying to figure out how to create the right query...

2008-12-11 Thread bruce
Hi.

I have the following test db/tbl setup. 

stateTBL
+--+
| stateName|
| stateID  |>>>+
+--+   V
   V
   V
collegeTBL V
+--+   V
| collegeName  |   V
| stateID  |<<<+
| collegeID|>>>+
+--+   V
   V
   V
deptTBLV
+--+   V
| deptName |   V
| collegeID|<<<+
| deptID   |>>>+
+--+   V
   V
   V
courseTBL  V
+--+   V
| courseName   |   V
| deptID   |<<<+
| courseID |>>>+
+--+   V
   V
   V
facultyTBL V
+--+   V
| facultyName  |   V
| courseID |<<<+
| ID   |
+--+


my intended app will allow the user to select a given
 item (college, dept, course, faculty) and to store
 this data. when a user is displaying a list of
 items, i'd like to have my app determine if the
 child of the item has been selected by the user.

so. if a user has selected stanford, i'd like to
 be able to have a query that returns 'true' for
 any item, that has a 'child' (leaf) already selected by
 the user. (this should work for any level of
 childTBL)

so if a user has selected a course, from the 
 stanford, physics dept, physics 101, i'd like to 
 have a query that returns 'true' if the user 
 selects 'stanford' from the list of colleges...

i can't quite seem to figure out the sql to make it happen...

thoughts/comments/etc..


i'm hoping that this makes sense!!

thanks



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



RE: [PHP] category and sub category traversal

2008-12-01 Thread bruce
hey vamvan...

you might pop this to the mysql email list as well, if you haven't already!

[EMAIL PROTECTED]


-Original Message-
From: VamVan [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2008 5:13 PM
To: php List
Subject: [PHP] category and sub category traversal


Hello,

I need some help in figuring out this logic.

I have two tables one for category and other for category_hierarchy.
category_hirerarchy has a column to determine the parent.

So the query I have to retrieve tree of one specific category is:

SELECT t.tid, t.*, parent FROM term_data t INNER JOIN term_hierarchy h ON
t.tid = h.tid WHERE t.vid = 16 ORDER BY weight, name;

The ones with parent = 0 is the top category

Now I need to prepare an associative array with parent child relation.

So bascially I need to retrieve [parentID] => array('childID', 'chidName')

Can anyone shed some light on the logic involved in preparation of this
array with out using multiple sql queries?

Thanks


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



[PHP] Trre/Drop Down quick app for testing database tbls

2008-11-28 Thread bruce
Hi.

I've got a few tbls that I'm testing. I'd like to have a simple web app to
be able to iterate through the tbls to test out what I have in them.

I'd like to be able to have each tbl as a drop-down/select box, so I select
from selecta, which lists items from TBL-A, which then uses the id from
TBL-A, to get the items from TBL-B that matches. Selecting from drop-down
for TBL-B, then gets me the list on TBL-C...

I've got 3-4 tbls that are linked by their id.

Rather than reinvent the wheel, I'm asking if anyone has a quick app that
they can point to that I can extract/modify the functionality for my
needs...

thanks


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



RE: [PHP] array/iteration issue!!

2008-11-27 Thread bruce
both ways work...!!!

this is a really simple/quick issue to populate some test db tbls.. i've
only played with multi php arrays (sp??) in passing... and my days of being
a serious eng/software guy are long over!!

although.. with this economy!

thanks




-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2008 8:40 PM
To: Micah Gersten
Cc: bruce; 'PHP General list'
Subject: Re: [PHP] array/iteration issue!!


On Thu, 2008-11-27 at 22:22 -0600, Micah Gersten wrote:
>
> This is actually a much smaller data structure.
>
> $colleges = array
> (
>   'Blah Blah University' =>
> array
> (
> 'physics' => array
> (
> 'sss',
> 'sffgg',
> ),
> 'english' => array
> (
> 'sss',
> 'sffgg',
> )
>   ),
>   'Glah Gleh University' =>
> array
> (
> 'physics' => array
> (
> 'sss',
> 'sffgg',
> ),
> 'english' => array
> (
> 'sss',
> 'sffgg',
> ),
> )
>  );
>
>
> foreach( $colleges as $collegeName => $depts )
> {
>  foreach( $depts as $deptName => $classes)
> {
> foreach( $classes as $className )
>     {
> echo "$collegeName, $deptName, $className\n";
> }
> }
> }

Yes, I thought of that one too, but it's less flexible. What if you need
to add other fields to the college, or department. Then you'd need to
redo the whole structure to something more similar to what I did. Since
bruce was having issues, I gave him a flexible format that could handle
other fields if they arose.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


--
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] array/iteration issue!!

2008-11-27 Thread bruce
much props guys!!!

thanks!!


-Original Message-
From: Micah Gersten [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2008 8:23 PM
To: Robert Cummings
Cc: bruce; 'PHP General list'
Subject: Re: [PHP] array/iteration issue!!


Robert Cummings wrote:
> On Thu, 2008-11-27 at 19:36 -0800, bruce wrote:
>
>> hey robert!!
>>
>> thanks. and yeah, you're right, it's not the best.. so tell me, given
that
>> i'm ripping through this on the fly, and i can have the structure in any
way
>> i choose. this is just to simulate/populate some test tbls.. what's a
better
>> way to create an array structure to have a collegename, followed by some
>> deptnames, followed by some classnames for the depts...
>>
>> perhaps something like this??
>>
>> $a = array
>> (
>> "college" => "foo",
>> array
>> (
>> "dept"  => "physics",
>> "class" => array
>> (
>> "class1" => "sss",
>> "class2" => "sffgg"
>> )
>> ),
>> array
>> (
>> "dept"  => "english",
>> "class" => array
>> (
>> "class1" => "sss",
>> "class2" => "sffgg"
>> )
>> )
>> );
>>
>
> Not quite. The following is probably what you want:
>
> 
> $colleges = array
> (
> array
> (
> 'name'  => 'Blah Blah University',
> 'depts' => array
> (
> array
> (
> 'name'=> 'physics',
> 'classes' => array
> (
> 'sss',
> 'sffgg',
> ),
> ),
> array
> (
> 'name'=> 'english',
> 'classes' => array
> (
> 'sss',
> 'sffgg',
> ),
> ),
> ),
> ),
> array
> (
> 'name'  => 'Glah Gleh University',
> 'depts' => array
> (
> array
> (
> 'name'=> 'physics',
> 'classes' => array
> (
> 'sss',
> 'sffgg',
> ),
> ),
> array
> (
> 'name'=> 'english',
> 'classes' => array
> (
> 'sss',
> 'sffgg',
> ),
> ),
> ),
> ),
> );
>
> foreach( $colleges as $college )
> {
> $collegeName = $college['name'];
> foreach( $college['depts'] as $dept )
> {
> $deptName = $dept['name'];
> foreach( $dept['classes'] as $className )
> {
> echo "$collegeName, $deptName, $className\n";
> }
> }
> }
>
> ?>
>
> Cheers,
> Rob.
>
This is actually a much smaller data structure.

$colleges = array
(
'Blah Blah University' =>
array
(
'physics' => array
(
'sss',
'sffgg',
),
'english' => array
(
'sss',
'sffgg',
)
),
'Glah Gleh University' =>
array
(
'physics' => array
(
'sss',
'sffgg',
),
'english' => array
(
'sss',
'sffgg',
),
)
 );


foreach( $colleges as $collegeName => $depts )
{
 foreach( $depts as $deptName => $classes)
{
foreach( $classes as $className )
{
echo "$collegeName, $deptName, $className\n";
}
}
}


Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com





--
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] array/iteration issue!!

2008-11-27 Thread bruce
hey robert!!

thanks. and yeah, you're right, it's not the best.. so tell me, given that
i'm ripping through this on the fly, and i can have the structure in any way
i choose. this is just to simulate/populate some test tbls.. what's a better
way to create an array structure to have a collegename, followed by some
deptnames, followed by some classnames for the depts...

perhaps something like this??

$a = array
(
"college" => "foo",
array
(
"dept"  => "physics",
"class" => array
(
"class1" => "sss",
"class2" => "sffgg"
)
),
array
(
"dept"  => "english",
"class" => array
(
"class1" => "sss",
"class2" => "sffgg"
)
)
);


-Original Message-----
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2008 7:10 PM
To: bruce
Cc: 'PHP General list'
Subject: RE: [PHP] array/iteration issue!!


On Thu, 2008-11-27 at 18:55 -0800, bruce wrote:
> hey robert..
>
> ok.. so if i changed the array to have a dept1, and a dept2
>
> $a=array("college"=> "foo",
>"dept1"=>array("dept"=> "physics",
>   "class"=>array("class1"=>"sss","class2"=>"sffgg")
>   ),
>   "dept2"=>array("dept"=> "english",
> "class"=>array("class1"=>"sss","class2"=>"sffgg")
> )
>   );
> how would i iterate through this..??

Your array is terribly structured. But the following provides traversal
in the way you want:

 "foo",
"dept1"   => array
(
"dept"  => "physics",
"class" => array
(
"class1" => "sss",
"class2" => "sffgg"
)
),
"dept2" => array
(
"dept"  => "english",
"class" => array
(
"class1" => "sss",
"class2" => "sffgg"
)
)
);

$college = $a['college'];
foreach( $a as $deptKey => $deptInfo )
{
if( strpos( $deptKey, 'dept' ) === 0 )
{
$dept = $deptInfo['dept'];
foreach( $deptInfo['class'] as $class )
{
echo "$college, $dept, $class\n";
}
}
}

?>

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


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



RE: [PHP] array/iteration issue!!

2008-11-27 Thread bruce
hey robert..

ok.. so if i changed the array to have a dept1, and a dept2

$a=array("college"=> "foo",
 "dept1"=>array("dept"=> "physics",
  "class"=>array("class1"=>"sss","class2"=>"sffgg")
),
"dept2"=>array("dept"=> "english",
"class"=>array("class1"=>"sss","class2"=>"sffgg")
)
);
how would i iterate through this..??

thanks


-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 27, 2008 6:18 PM
To: bruce
Cc: 'PHP General list'
Subject: Re: [PHP] array/iteration issue!!


On Thu, 2008-11-27 at 17:31 -0800, bruce wrote:
> hi.
>
> i have the following test multidiminsional array. i'm trying to figure out
> how to iterate through the array, to produce something like
>
> foo, physics, sss
> foo, physics, sffgg
> foo, english, sss
> foo, english, sffgg
>
> can't quite seem to get it right!!
>
> thoughts/comments... etc...
>
> thanks
>
> 
> $a=array("college"=> "foo",
>"dept"=>array("dept"=> "physics",
>   "class"=>array("class1"=>"sss","class2"=>"sffgg")
>   ),
>   "dept"=>array("dept"=> "english",
> "class"=>array("class1"=>"sss","class2"=>"sffgg")
> )
>   );

You can't. You're array is valid but the second 'dept' key overwrites
the first. Thus the physics dept is lost.

Check it for yourself... print_r( $a )

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


--
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



[PHP] array/iteration issue!!

2008-11-27 Thread bruce
hi.

i have the following test multidiminsional array. i'm trying to figure out
how to iterate through the array, to produce something like

foo, physics, sss
foo, physics, sffgg
foo, english, sss
foo, english, sffgg

can't quite seem to get it right!!

thoughts/comments... etc...

thanks


$a=array("college"=> "foo",
 "dept"=>array("dept"=> "physics",
  "class"=>array("class1"=>"sss","class2"=>"sffgg")
),
"dept"=>array("dept"=> "english",
"class"=>array("class1"=>"sss","class2"=>"sffgg")
)
);


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



RE: [PHP] Model Web Site

2008-11-21 Thread bruce
hi...

for what it's worth. the best approach might be to find a few sites that
have the functionality/layout you like. there are probably a few of them
that you'll run across that meet what you have in mind. use these as your
basic guides. add additional features that you'd like.

you now have (roughly speaking) the requirements/functions that you want
your final site to have. from here, you can figure out which "scripts" you
want to apply, and what you're still going to have to provide. keep in mind
that you can't simply throw scripts together, but you can use them to get a
sense of the underlying logic. you can also use them to see how to develop
your look/feel of your site.

looking at various scripts also gives you a chance to think about how you
want to implement your security/setup, as well as the underlying database
schema..

you can find plenty of apps/scripts on freshmeat.net/sourceforge.net as
well.

have fun!


-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 20, 2008 2:17 PM
To: PHP-General
Subject: [PHP] Model Web Site


My prime hobby is photography and the next is web site building.

So now I have a young model (18+) asking me about getting a web site.

The idea is members can see content, that will include, photos, her blog
and a discussion forum.

I like the idea of building it, but it includes a lot of things I have
no experience in.

Can someone point me to documentation/tutorials/scripts or anything that
might help.

I don't want a turnkey solution. I want to learn how to do this.

Thank you!
Stephen

--
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] while-question

2008-11-19 Thread bruce
interesting points regarding college and programming..

my degrees bsee/msee covered alot more than pure programing.. as a double 
ee/cs, the ability to articulate an issue/problem, and bring to mind a cogent 
thought process was valuable. the ability to understand how different 
algorithms worked, and how code actually played with the lower intracacies of 
the processor where quite valuable. 

and no.. i'm no longer the engineer i was a time ago..

so.. interesting...


-Original Message-
From: Wolf [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2008 11:55 AM
To: tedd
Cc: php-general@lists.php.net
Subject: RE: [PHP] while-question


> Dabbling?
> 
> I think that making a living from it isn't dabbling, so I may not be 
> qualified to speak for the dabblers.
> 
> But for me, I was writing code before there were such courses. Later, 
> when I went to college I was taught adventures in keypunching and 
> received several "next to worthless" degrees.
> 
> I say "next to worthless" only because what they taught really wasn't 
> applicable to real world programming. As for management, clients, and 
> hr types, the degrees mattered, but not for much more than that.
> 
> In any event, I doubt if any college courses are keeping up with 
> current web technology -- there has always been a lag between what's 
> practiced and what's taught. What I've seen of college web sites, 
> seems to support that claim.
> 
> If I was taught in college all I needed to know, then what am I doing 
> with these dozens of web books scattered about my office? I probably 
> read a new book every other week.

I don't "dabble" in it either, unless you consider making my living from being 
a dabbler, in which case I'll continue to dabble and see the pay for it.  My 
alma-mater tried to stay current to some degree, but when they let someone who 
wrote the C++ book try to teach it, well they gave that person more rope then 
they needed.

Tedd, glad you got hooked on Phonics.  One of these days I hope from graduating 
from just looking at the pictures, but right now the pictures are oh so 
enticing!. ;)  

Wolf

-- 
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] Scheduling scripts?

2008-11-18 Thread bruce
he's looking to create a script/app for his own.clent usage..

not to just use google's cal app,,,

check out freshmeat.net, or sourceforge if you haven't already...


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
Of Richard Heyes
Sent: Tuesday, November 18, 2008 3:42 PM
To: tedd
Cc: PHP General Mailing List
Subject: Re: [PHP] Scheduling scripts?


> Dones anyone have any scheduling scripts that they might share OR can give
> me a link to some?
>
> I need a way for a user to register an appointment via a calendar.
>
> I don't want to write something that's already been done and available.

Not sure if it does what you want, but you might try looking at Google
calendar. It's very good.

--
Richard Heyes

HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated November 15th)

--
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] while-question

2008-11-17 Thread bruce
curious qiestion

to all on here who dabble in php... how many of you have actully gone to
college, taken algorithm courses, microprocessor courses,
design/architecture courses, etc..

or is the majority of the work here from people who've grabbed the tools and
started programming... ?


-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Monday, November 17, 2008 9:53 AM
To: Stut
Cc: Nathan Rixham; php-general@lists.php.net
Subject: Re: [PHP] while-question


On Mon, 2008-11-17 at 14:54 +, Stut wrote:
> On 17 Nov 2008, at 14:31, Nathan Rixham wrote:
> > if you really want a challenge try this one..
> >
> > task: add the numbers 5 and 17 together, using php, without using
> > the + operator. fill it in:
> >
> > function add($a , $b) {
> > //code here but no + - / * operators
> > return $answer;
> > }
> >
> > echo add(5, 17);
>
> Elemental my dear Mr Rixham...

What level is that elemental?

> function add($a , $b)
> {
>$answer = $a ^ $b;
>while (0 != ($a & $b))
>{
>  $b = ($a & $b) << 1;
>  $answer = $answer ^ $b;
>}
>return $answer;
> }

He only said you couldn't use the + operator... nothing was said about
using the - operator.

$total = -(-5 - 17);

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP


--
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] ability to find include files...

2008-11-17 Thread bruce
hi t!!

strace is something i would have used.. but unfortunately, strace (at least as 
far as i can tell) doesn't work with web based apps...

thanks


-Original Message-
From: Thodoris [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 16, 2008 11:42 PM
To: Andrew Ballard
Cc: bruce; php-general@lists.php.net
Subject: Re: [PHP] ability to find include files...




On Sat, Nov 15, 2008 at 6:07 PM, bruce <[EMAIL PROTECTED]> wrote:
  
Hi list...

starting to go through a debug/understanding session of a couple of php web
apps. i'm wondering if there's any kind of tool/method that i can use to see
which files are accessed/included/required when a given page is displayed..

this would allow me to quickly understand the "flow" of the apps. searching
via google hasn't really turned up anything...

thoughts/comments/pointers welcome.

thanks!



Yes. How about get_included_files().

http://www.php.net/get_included_files

Andrew

  

This of course shows the included files but if you *really* need to go much 
deeper (although this is probably an overkill) you could try tracing when the 
process opens a file using strace along with grep if you are in unix.


-- 
Thodoris


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



[PHP] ability to find include files...

2008-11-15 Thread bruce
Hi list...

starting to go through a debug/understanding session of a couple of php web
apps. i'm wondering if there's any kind of tool/method that i can use to see
which files are accessed/included/required when a given page is displayed..

this would allow me to quickly understand the "flow" of the apps. searching
via google hasn't really turned up anything...

thoughts/comments/pointers welcome.

thanks!





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



[PHP] user access/roles/privs functionality

2008-11-15 Thread bruce
Hi list...

I need a way of managing users/teams/etc.. implementing roles/access
rights/privs,etc...

I'd like a way of being able to have users "report to" the resource above
them, ie, the ability to have a hierarchical kind of tree approach would be
good as wel, as this would allow different user/mgr/teams to be moved
up/down in the tree as required.

If I can find the right process, I'll implement it in my targeted app. I'd
prefer something that's fairly well compartmentalized.. but if need be, I'm
willing to rip the right system out of it's parent app if I can find one
that's good!!!

I've reviewed the systems in the vtiger/knowledgetree apps.

thoughts/comments/pointers would be useful!

thanks!





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



[PHP] user access/roles/privs functionality

2008-11-14 Thread bruce
Hi list...

I need a way of managing users/teams/etc.. implementing roles/access
rights/privs,etc...

I'd like a way of being able to have users "report to" the resource above
them, ie, the ability to have a hierarchical kind of tree approach would be
good as wel, as this would allow different user/mgr/teams to be moved
up/down in the tree as required.

If I can find the right process, I'll implement it in my targeted app. I'd
prefer something that's fairly well compartmentalized.. but if need be, I'm
willing to rip the right system out of it's parent app if you can show me
one that's good!!!

thanks!





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



RE: [PHP] PHP - Web/list Question...

2008-11-10 Thread bruce
hi T!!

This might work!

The items in my "list" are really scripts for given colleges, that have been
created by developers. This phase is a part of the workflow for the script
so the app can test the script, or run it in the production phase.

The testing portion involves testing the script, looking at the results, and
then either promoting the successful script to the production folder, or
returning the script back to the dev folder.

so, the testing portion is where i want to "group" the scripts. in reality,
i should look to test files either:
 -individual script (just want to run a quick test for a college)
 -by a user (might have made a few mistakes, so i want to test all his/her
scripts)
 -based on the date of completed dev (test all the scripts in the last 24hrs
that are in dev)
 -any other possible groups???

this process could work, as i could then simply have some checkboxes that
would interface with the mysql select to generate the list... i could then
allow the user to "delete" if nessasary from the list..

on the production side, since i'm going to crawl all the colleges to update
the data, i'd simply create/update a group that has all the colleges, which
can be automated, with no need for manual interaction...

this could work, and would eliminate the need for the pagination/session
approach..

if you have any other thoughts regarding possible selects/issues for the
testing/grouping process let me know your thoughts!!

thanks guys..



-Original Message-
From: Thodoris [mailto:[EMAIL PROTECTED]
Sent: Monday, November 10, 2008 5:53 AM
To: tedd
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP - Web/list Question...



> At 4:08 PM -0800 11/9/08, bruce wrote:
>> hi tedd...
>>
>> no offense... but how does this get me to where i was talking about
>> going???
>> this is simply a demo of breaking a list up across multiple pages...
>>
>> thanks
>>
>
>
> No offense taken.
>
> I read:
>
>> I have a list that extends over multiple pages. there might be 200
>> items,
>> and i don't want to have the items listed on the same page as it
>> would be
>> too long. i can break the list up, so i can have it be displayed over
>> multiple pages.
>
> And I thought that you were asking for a way to do that.
>
> However, now seeing what you actually asked, I would use a database to
> record each item the user picked and then when displaying the pages
> again, would check the dB first to see if the item should be noted as
> checked or not. I would tie it all together with a session.
>
> If your user wants to check-out, then you have a record of all the
> items he selected during his visit and can show them on a single page.
>
> This of course would require the user to post/get each page UNLESS you
> use ajax and write to the dB via a slave php script. That's not all
> that difficult to do.
>
> In any event, those are the two ways I would consider.
>
> Cheers,
>
> tedd
>
>
>>
>> -Original Message-
>> From: tedd [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, November 09, 2008 4:02 PM
>> To: bruce; php-general@lists.php.net
>> Subject: Re: [PHP] PHP - Web/list Question...
>>
>>
>> At 8:26 PM -0800 11/8/08, bruce wrote:
>>> Hi.
>>>
>>> I've got a question/issue that I want to bounce off the list.
>>>
>>  >I have a list that extends over multiple pages. there might be 200
>> items,
>>> and i don't want to have the items listed on the same page as it
>>> would be
>>> too long. i can break the list up, so i can have it be displayed over
>>  >multiple pages. however, i want the user to select different items
>> from the
>>> list. given that the selected items might be over different pages,
>>> what's
>>> the best way of keeping a running track of the items that have been
>>> selected??
>>>
>>> I could have each page be a form, and do a post/get where i then
>>> keep track
>>> of the selected items from page to page, but that would appear to
>>> get ugly.
>>> i'm looking for pointers to other sites/code that might have already
>>> implemented this kind of scenario.
>>>
>>> thoughts/pointers would be appreciated...
>>
>> Without reading any one else's reply, here's something you might
>> consider.
>>
>> http://webbytedd.com/bbb/paging/index.php?page=1
>>
>> Cheers,
>>
>> tedd
>>
>>
>>
>> --
>> ---
>> http://sperling.com  http://ancientstones.com  http://earthstones.com
>>
>> --
>> PHP General 

RE: [PHP] PHP - Web/list Question...

2008-11-09 Thread bruce
h

if one uses sessions, or a db store, the underlying logic to get the input
vars from the form on the individual pages (for the list) will essentially
be the same.

i'll have to have a form element, with the input items. i'll need to process
the checkboxes for each item, and when the user selects the
"continue/submit" btn, i'll perform the get/post action which then
accumulates the items from the previous page...

for each page, i'll have to process logic for the items listed in the form,
to see if the user has changed his/her mind... (ie, when the user goes back
to a previous page.)

when the user submits the "continue" btn, it'll present a list of the
selected items, allowing the user to revise the list, by going back to the
original lists (via the "back" btn) items can be deleted, via a delete
checkbox for each item in the list...

checking a "submit" btn will then write the final data to the db storage...


page 1,2,...:

  previous  - next
  state cityhospital   checkbox

  continue

the "continue" page

 -provides the list of the user selected items

  state cityhospital   checkbox

  revise - finish

on the "continue" page, the the user can "uncheck" the checkbox, to remove
an item, or the user can "add" additional items, by selecting the "revise"
btn, which goes back to the initial pages/list..



thoughts/comments



-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 09, 2008 10:49 AM
To: Micah Gersten
Cc: Stut; bruce; php-general@lists.php.net
Subject: Re: [PHP] PHP - Web/list Question...


On Sun, 2008-11-09 at 12:39 -0600, Micah Gersten wrote:
> Robert Cummings wrote:
> > On Sun, 2008-11-09 at 12:26 -0600, Micah Gersten wrote:
> >
> >> Stut wrote:
> >>
> >>> On 9 Nov 2008, at 18:14, Robert Cummings wrote:
> >>>
> >>>> On Sun, 2008-11-09 at 18:00 +, Stut wrote:
> >>>>
> >>>>> On 9 Nov 2008, at 07:16, Robert Cummings wrote:
> >>>>>
> >>>>>> On Sat, 2008-11-08 at 20:26 -0800, bruce wrote:
> >>>>>>
> >>>>>>> I've got a question/issue that I want to bounce off the list.
> >>>>>>>
> >>>>>>> I have a list that extends over multiple pages. there might be 200
> >>>>>>> items,
> >>>>>>> and i don't want to have the items listed on the same page as it
> >>>>>>> would be
> >>>>>>> too long. i can break the list up, so i can have it be displayed
over
> >>>>>>> multiple pages. however, i want the user to select different items
> >>>>>>> from the
> >>>>>>> list. given that the selected items might be over different pages,
> >>>>>>> what's
> >>>>>>> the best way of keeping a running track of the items that have
been
> >>>>>>> selected??
> >>>>>>>
> >>>>>>> I could have each page be a form, and do a post/get where i then
> >>>>>>> keep track
> >>>>>>> of the selected items from page to page, but that would appear to
> >>>>>>> get ugly.
> >>>>>>> i'm looking for pointers to other sites/code that might have
already
> >>>>>>> implemented this kind of scenario.
> >>>>>>>
> >>>>>>> thoughts/pointers would be appreciated...
> >>>>>>>
> >>>>>> Accumulate them in the session. When done, and before final action
you
> >>>>>> could let them view a summary of selected items and allow deletion
of
> >>>>>> any entries they don't want.
> >>>>>>
> >>>>> Unless they're likely to select hundreds of items I'd either go with
a
> >>>>> persisted GET var or a cookie. No need to drag server-side storage
> >>>>> into this.
> >>>>>
> >>>> Well he did say he had multiple pages. Maybe he's only displaying 5
per
> >>>> page though. Still, sessions are easier to manage than GET vars since
> >>>> you don't need to append them to every form action URL to accumulate
> >>>> them. Session is managed transparently by PHP in most cases an
amounts
> >>>> to

RE: [PHP] PHP - Web/list Question...

2008-11-09 Thread bruce
h

if one uses sessions, or a db store, the underlying logic to get the input
vars from the form on the individual pages (for the list) will essentially
be the same.

i'll have to have a form element, with the input items. i'll need to process
the checkboxes for each item, and when the user selects the
"continue/submit" btn, i'll perform the get/post action which then
accumulates the items from the previous page...

for each page, i'll have to process logic for the items listed in the form,
to see if the user has changed his/her mind... (ie, when the user goes back
to a previous page.)

when the user submits the "continue" btn, it'll present a list of the
selected items, allowing the user to revise the list, by going back to the
original lists (via the "back" btn) items can be deleted, via a delete
checkbox for each item in the list...

checking a "submit" btn will then write the final data to the db storage...


page 1,2,...:

  previous  - next
  state cityhospital   checkbox

  continue

the "continue" page

 -provides the list of the user selected items

  state cityhospital   checkbox

  revise - finish

on the "continue" page, the the user can "uncheck" the checkbox, to remove
an item, or the user can "add" additional items, by selecting the "revise"
btn, which goes back to the initial pages/list..



thoughts/comments



-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 09, 2008 10:49 AM
To: Micah Gersten
Cc: Stut; bruce; php-general@lists.php.net
Subject: Re: [PHP] PHP - Web/list Question...


On Sun, 2008-11-09 at 12:39 -0600, Micah Gersten wrote:
> Robert Cummings wrote:
> > On Sun, 2008-11-09 at 12:26 -0600, Micah Gersten wrote:
> >
> >> Stut wrote:
> >>
> >>> On 9 Nov 2008, at 18:14, Robert Cummings wrote:
> >>>
> >>>> On Sun, 2008-11-09 at 18:00 +, Stut wrote:
> >>>>
> >>>>> On 9 Nov 2008, at 07:16, Robert Cummings wrote:
> >>>>>
> >>>>>> On Sat, 2008-11-08 at 20:26 -0800, bruce wrote:
> >>>>>>
> >>>>>>> I've got a question/issue that I want to bounce off the list.
> >>>>>>>
> >>>>>>> I have a list that extends over multiple pages. there might be 200
> >>>>>>> items,
> >>>>>>> and i don't want to have the items listed on the same page as it
> >>>>>>> would be
> >>>>>>> too long. i can break the list up, so i can have it be displayed
over
> >>>>>>> multiple pages. however, i want the user to select different items
> >>>>>>> from the
> >>>>>>> list. given that the selected items might be over different pages,
> >>>>>>> what's
> >>>>>>> the best way of keeping a running track of the items that have
been
> >>>>>>> selected??
> >>>>>>>
> >>>>>>> I could have each page be a form, and do a post/get where i then
> >>>>>>> keep track
> >>>>>>> of the selected items from page to page, but that would appear to
> >>>>>>> get ugly.
> >>>>>>> i'm looking for pointers to other sites/code that might have
already
> >>>>>>> implemented this kind of scenario.
> >>>>>>>
> >>>>>>> thoughts/pointers would be appreciated...
> >>>>>>>
> >>>>>> Accumulate them in the session. When done, and before final action
you
> >>>>>> could let them view a summary of selected items and allow deletion
of
> >>>>>> any entries they don't want.
> >>>>>>
> >>>>> Unless they're likely to select hundreds of items I'd either go with
a
> >>>>> persisted GET var or a cookie. No need to drag server-side storage
> >>>>> into this.
> >>>>>
> >>>> Well he did say he had multiple pages. Maybe he's only displaying 5
per
> >>>> page though. Still, sessions are easier to manage than GET vars since
> >>>> you don't need to append them to every form action URL to accumulate
> >>>> them. Session is managed transparently by PHP in most cases an
amounts
> >>>> to

[PHP] PHP - Web/list Question...

2008-11-08 Thread bruce
Hi.

I've got a question/issue that I want to bounce off the list.

I have a list that extends over multiple pages. there might be 200 items,
and i don't want to have the items listed on the same page as it would be
too long. i can break the list up, so i can have it be displayed over
multiple pages. however, i want the user to select different items from the
list. given that the selected items might be over different pages, what's
the best way of keeping a running track of the items that have been
selected??

I could have each page be a form, and do a post/get where i then keep track
of the selected items from page to page, but that would appear to get ugly.
i'm looking for pointers to other sites/code that might have already
implemented this kind of scenario.

thoughts/pointers would be appreciated...


thanks

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

RE: [PHP] basic php question...

2008-11-04 Thread bruce
hi Kaleb

looks like the header approach will work for my needs..

thanks


-Original Message-
From: Kaleb Pomeroy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2008 11:46 AM
To: bruce
Cc: 'Micah Gersten'; php-general@lists.php.net
Subject: Re: [PHP] basic php question...




There can be no output before this (even whitespace before open php  
tags)

Kaleb <><

On Nov 4, 2008, at 1:41 PM, bruce wrote:

> and what's the best way to do the redirect 
>
> sample code would be cool!
>
>
> -Original Message-
> From: Micah Gersten [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 04, 2008 11:33 AM
> To: bruce
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] basic php question...
>
>
> Is anything changing on the page?  If not, AJAX might be the way to  
> go,
> http://xajaxproject.org
> Otherwise, pass the parameters you want to foo.php and have it  
> redirect
> to the proper page with the proper arguments.
> Another alternative, is to store the parameters in the session and  
> pass
> them from foo.php without passing them to it.
>
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
>
>
>
> bruce wrote:
>> hi guys...foo
>>
>> i've got a button that i want to select, and i want the app to  
>> process
> some
>> logic, and then return the user to the page. my question is how??
>>
>> something like
>>
>> base page:
>>
>> button link"
>>
>> foo.php
>> -process logic
>> -return the user to the base page, with the same querystring that
>>  was initially used to generate the initial base page
>>
>>
>> foo.php doesn't have any display function, just the logic
>>
>> thoughts/sample php pages/psuedo code chunks...
>>
>> thanks
>>
>>
>>
>
> --
> 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
>


-- 
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] basic php question...

2008-11-04 Thread bruce
and what's the best way to do the redirect 

sample code would be cool!


-Original Message-
From: Micah Gersten [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2008 11:33 AM
To: bruce
Cc: php-general@lists.php.net
Subject: Re: [PHP] basic php question...


Is anything changing on the page?  If not, AJAX might be the way to go,
http://xajaxproject.org
Otherwise, pass the parameters you want to foo.php and have it redirect
to the proper page with the proper arguments.
Another alternative, is to store the parameters in the session and pass
them from foo.php without passing them to it.

Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com



bruce wrote:
> hi guys...foo
>
> i've got a button that i want to select, and i want the app to process
some
> logic, and then return the user to the page. my question is how??
>
> something like
>
> base page:
>
> button link"
>
> foo.php
>  -process logic
>  -return the user to the base page, with the same querystring that
>   was initially used to generate the initial base page
>
>
> foo.php doesn't have any display function, just the logic
>
> thoughts/sample php pages/psuedo code chunks...
>
> thanks
>
>
>

--
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



[PHP] basic php question...

2008-11-04 Thread bruce
hi guys...

i've got a button that i want to select, and i want the app to process some
logic, and then return the user to the page. my question is how??

something like

base page:

button link"

foo.php
 -process logic
 -return the user to the base page, with the same querystring that 
  was initially used to generate the initial base page


foo.php doesn't have any display function, just the logic 

thoughts/sample php pages/psuedo code chunks...

thanks


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

RE: [PHP] Re: Simple app to Fill in TBL/Access Control Function.

2008-11-02 Thread bruce
Hi Maciek,

My bad for the confusion. A number of apps allow users to sign up, and
perform certain functions on the site, based on the user roles/access privs.
In some cases, the apps allow the user(s) to modify underlying data, that's
written to a given tbl. The ADMIN function for some of these apps allow the
admin user to disable/enable the user to perform certain functions, as well
as to change/modify the user access roles regarding the app.

I'm looking for an app that has the ADMIN function (user roles/access privs
built into it) that I can rip apart.

For my initial functionality, I'm looking to allow users to register/login,
be verified/validated by an ADMIN. The user will be able to create/modify
tbl entries. The user will also be able to modify the entries based upon the
roles/access privs assigned by the ADMIN.

I'm looking for pointers to basic apps that provide this kind of
functionality as a subset of the overall app. I can then rip apart/add what
I need to the app...

thanks



-Original Message-
From: Maciek Sokolewicz [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 02, 2008 3:33 PM
To: bruce
Cc: 'PHP List'
Subject: [PHP] Re: Simple app to Fill in TBL/Access Control Function.


bruce wrote:
> Hi guys...
>
> Forgive me! I'm looking for a simple app that has the user complete a TBL
> (don't care what), and has an access control process, along with an ADMIN
> function
I have no idea what you want, that explenation is _so_ vague ("a TBL
(don't care what"... means... what exactly?). What exactly do you think
is "an ADMIN function" ?

> Something simple that I can rip apart, and build on top of!!! The
> CMS/Drupal/Typo/etc.. are way too complex. I'm currently looking over the
> freshmeat/sourceforge sites. I'm going to be adding additional
> functionality, so this will be a start.
>
> Any/all pointers would be helpful.
>
> Thanks

Try to make it a bit more clear what you're looking for and we might be
able to help you. Your description is very confusing to me.

--
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



  1   2   3   4   5   6   7   >