php-general Digest 31 Jan 2013 04:05:36 -0000 Issue 8106

Topics (messages 320120 through 320127):

Web User Management
        320120 by: Adolfo Olivera
        320121 by: Tolga
        320122 by: marco.behnke.biz
        320123 by: Adolfo Olivera
        320124 by: Jonathan Sundquist
        320127 by: tamouse mailing lists

php5.3 exec() : output truncate
        320125 by: patrick ficheux
        320126 by: Jim Lucas

Administrivia:

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

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

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


----------------------------------------------------------------------
--- Begin Message ---
Hi,

   I'm about to start a little project using PHP and MySQL. It involves
some basic user management. Like most web systems. Users would need to be
able to:



1 Create Accounts.

2 Update and recover passwords.

3 Maintain a session to operate.
4 Something else I might be forgetting.



My questions are

1 Is there some kind of library, framework I could utilize to save me some
work?

2 Any thoughts, lessons learned from more senior programmers, I'm fairly
new with PHP.

--- End Message ---
--- Begin Message --- i dont know why, but without framework, it seems to me easier done than said. :)

30.01.2013 06:18 tarihinde, Adolfo Olivera yazdı:
Hi,

    I'm about to start a little project using PHP and MySQL. It involves
some basic user management. Like most web systems. Users would need to be
able to:



1 Create Accounts.

2 Update and recover passwords.

3 Maintain a session to operate.
4 Something else I might be forgetting.



My questions are

1 Is there some kind of library, framework I could utilize to save me some
work?

2 Any thoughts, lessons learned from more senior programmers, I'm fairly
new with PHP.



--- End Message ---
--- Begin Message ---
Adolfo Olivera <olivera.ado...@gmail.com> hat am 30. Januar 2013 um 15:18
geschrieben:
> My questions are
>
> 1 Is there some kind of library, framework I could utilize to save me some
> work?

You can take a look at the classes from the Zend Framework (they can be used
stand alone as well)

> 2 Any thoughts, lessons learned from more senior programmers, I'm fairly
> new with PHP.

Think about security issues like encrypted transfer of passwords, sessions
hijacking, sql injection, sessions without cookies and stuff like that.

--
Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz

--- End Message ---
--- Begin Message ---
>You can take a look at the classes from the Zend Framework (they can be
used
>stand alone as well)

Thanks Marco, which classes specifically are you talking about. Where can I
download them from and get documentation on them? I looked into zend's web
site and it is a bit overwhelming, so may be you can point me in the right
direction.

On Wed, Jan 30, 2013 at 11:53 AM, ma...@behnke.biz <ma...@behnke.biz> wrote:

> Adolfo Olivera <olivera.ado...@gmail.com> hat am 30. Januar 2013 um 15:18
> geschrieben:
> > My questions are
> >
> > 1 Is there some kind of library, framework I could utilize to save me
> some
> > work?
>
> You can take a look at the classes from the Zend Framework (they can be
> used
> stand alone as well)
>
> > 2 Any thoughts, lessons learned from more senior programmers, I'm fairly
> > new with PHP.
>
> Think about security issues like encrypted transfer of passwords, sessions
> hijacking, sql injection, sessions without cookies and stuff like that.
>
> --
> Marco Behnke
> Dipl. Informatiker (FH), SAE Audio Engineer Diploma
> Zend Certified Engineer PHP 5.3
>
> Tel.: 0174 / 9722336
> e-Mail: ma...@behnke.biz
>
> Softwaretechnik Behnke
> Heinrich-Heine-Str. 7D
> 21218 Seevetal
>
> http://www.behnke.biz
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Adolfo Olivera
15-3429-9743

--- End Message ---
--- Begin Message ---
For Zend Framework 2, take a look at https://github.com/ZF-Commons/ZfcUser


On Wed, Jan 30, 2013 at 10:19 AM, Adolfo Olivera
<olivera.ado...@gmail.com>wrote:

> >You can take a look at the classes from the Zend Framework (they can be
> used
> >stand alone as well)
>
> Thanks Marco, which classes specifically are you talking about. Where can I
> download them from and get documentation on them? I looked into zend's web
> site and it is a bit overwhelming, so may be you can point me in the right
> direction.
>
> On Wed, Jan 30, 2013 at 11:53 AM, ma...@behnke.biz <ma...@behnke.biz>
> wrote:
>
> > Adolfo Olivera <olivera.ado...@gmail.com> hat am 30. Januar 2013 um
> 15:18
> > geschrieben:
> > > My questions are
> > >
> > > 1 Is there some kind of library, framework I could utilize to save me
> > some
> > > work?
> >
> > You can take a look at the classes from the Zend Framework (they can be
> > used
> > stand alone as well)
> >
> > > 2 Any thoughts, lessons learned from more senior programmers, I'm
> fairly
> > > new with PHP.
> >
> > Think about security issues like encrypted transfer of passwords,
> sessions
> > hijacking, sql injection, sessions without cookies and stuff like that.
> >
> > --
> > Marco Behnke
> > Dipl. Informatiker (FH), SAE Audio Engineer Diploma
> > Zend Certified Engineer PHP 5.3
> >
> > Tel.: 0174 / 9722336
> > e-Mail: ma...@behnke.biz
> >
> > Softwaretechnik Behnke
> > Heinrich-Heine-Str. 7D
> > 21218 Seevetal
> >
> > http://www.behnke.biz
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> Adolfo Olivera
> 15-3429-9743
>

--- End Message ---
--- Begin Message ---
On Wed, Jan 30, 2013 at 10:21 AM, Jonathan Sundquist
<jsundqu...@gmail.com> wrote:
> For Zend Framework 2, take a look at https://github.com/ZF-Commons/ZfcUser
>
>
> On Wed, Jan 30, 2013 at 10:19 AM, Adolfo Olivera
> <olivera.ado...@gmail.com>wrote:
>
>> >You can take a look at the classes from the Zend Framework (they can be
>> used
>> >stand alone as well)
>>
>> Thanks Marco, which classes specifically are you talking about. Where can I
>> download them from and get documentation on them? I looked into zend's web
>> site and it is a bit overwhelming, so may be you can point me in the right
>> direction.
>>
>> On Wed, Jan 30, 2013 at 11:53 AM, ma...@behnke.biz <ma...@behnke.biz>
>> wrote:
>>
>> > Adolfo Olivera <olivera.ado...@gmail.com> hat am 30. Januar 2013 um
>> 15:18
>> > geschrieben:
>> > > My questions are
>> > >
>> > > 1 Is there some kind of library, framework I could utilize to save me
>> > some
>> > > work?
>> >
>> > You can take a look at the classes from the Zend Framework (they can be
>> > used
>> > stand alone as well)
>> >
>> > > 2 Any thoughts, lessons learned from more senior programmers, I'm
>> fairly
>> > > new with PHP.
>> >
>> > Think about security issues like encrypted transfer of passwords,
>> sessions
>> > hijacking, sql injection, sessions without cookies and stuff like that.
>> >

I'd recommend Symfony, or, well Drupal, even, depending on what you've
got to do.

--- End Message ---
--- Begin Message ---
Hi,

I want to get the list of running processes. also, I call exec() with "ps -A"
(ps -A displays almost all processes of all users)
Unfortunatly, the output of "ps -A" seems incomplete

the test file test.php:
<?php
unset($buf);
unset($res);
exec("ps -A", $buf, $res);
for($i=0; $i < count($buf); $i++)
{
    echo($buf[$i]."<br>");
}
?>

If I run the test.php under the context of httpd (from http://<server>/test.php), I can see only a subset of running processes (some processes of user "apache")

PID TTY TIME CMD
3207 ? 00:00:00 httpd
3359 ? 00:00:00 httpd
3360 ? 00:00:00 httpd
3361 ? 00:00:00 httpd
3362 ? 00:00:00 httpd
3363 ? 00:00:00 httpd
3364 ? 00:00:00 httpd
3365 ? 00:00:00 httpd
3366 ? 00:00:00 httpd
3569 ? 00:00:00 ps

If I run the same script directly from php (from user apache) , I can see *all* processes as expected

# sudo -u apache php -f test.php
  PID TTY          TIME CMD<br>
    1 ?        00:00:01 init<br>
    2 ?        00:00:00 migration/0<br>
    3 ?        00:00:00 ksoftirqd/0<br>
    4 ?        00:00:00 watchdog/0<br>
    5 ?        00:00:00 events/0<br>
    6 ?        00:00:00 khelper<br>
[...]

Is it a problem with exec() or with "ps -A" or with .... ?

any ideas ?


more information :
OS = centos 5.5
# httpd -v
Server version: Apache/2.2.3
Server built:   Jan 10 2013 08:22:14
# php -v
PHP 5.3.3 (cli) (built: Jun 27 2012 12:25:37)


--- End Message ---
--- Begin Message ---
On 01/30/2013 10:14 AM, patrick ficheux wrote:
Hi,

I want to get the list of running processes. also, I call exec() with
"ps -A"

What user is your httpd process running as?

run this from your cli:

ps aux | grep httpd

and show us the output


--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/

--- End Message ---

Reply via email to