[PHP] error_log() bug on PHP 5.4.11?

2013-01-30 Thread J.S.
Hi,

When I call error_log() to log a message to the log file, I end up with 
duplicate entries. Here is a minimal test script which reproduces the 
problem for me:



will log:

[30-Jan-2013 09:41:13 UTC] some log message that, via a bug, will be logged 
twice
[30-Jan-2013 09:41:13 UTC] some log message that, via a bug, will be logged 
twice

If it matters, I am running the VC9 x86 Thread Safe build of PHP 5.4.11 on a 
Windows XP box but I had seen this problem in PHP 5.3.6 as well. I am 
running Apache 2.2 for Web server.

Can somebody confirm whether this is a bug? I checked the bug database on 
php.net but did not find anything relevant.

Best regards

J.S. 



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



[PHP] Web User Management

2013-01-30 Thread Adolfo Olivera
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.


Re: [PHP] Web User Management

2013-01-30 Thread Tolga
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.




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



Re: [PHP] Web User Management

2013-01-30 Thread ma...@behnke.biz
Adolfo Olivera  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



Re: [PHP] Web User Management

2013-01-30 Thread Adolfo Olivera
>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  wrote:

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


Re: [PHP] Web User Management

2013-01-30 Thread Jonathan Sundquist
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
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 
> wrote:
>
> > Adolfo Olivera  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
>


[PHP] php5.3 exec() : output truncate

2013-01-30 Thread patrick ficheux

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:
");
}
?>

If I run the test.php under the context of httpd (from 
http:///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
1 ?00:00:01 init
2 ?00:00:00 migration/0
3 ?00:00:00 ksoftirqd/0
4 ?00:00:00 watchdog/0
5 ?00:00:00 events/0
6 ?00:00:00 khelper
[...]

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)


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



Re: [PHP] php5.3 exec() : output truncate

2013-01-30 Thread Jim Lucas

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/

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



Re: [PHP] Web User Management

2013-01-30 Thread tamouse mailing lists
On Wed, Jan 30, 2013 at 10:21 AM, Jonathan Sundquist
 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
> 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 
>> wrote:
>>
>> > Adolfo Olivera  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.

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



[PHP] [SOLVED] Re: [PHP] php5.3 exec() : output truncate

2013-01-30 Thread patrick ficheux

I found the reason of this issue : SELinux

by defaut, SELinux is enabled on CentOS5.5 =>  httpd runs with 
"restricted rights"


If I temporary disabled SELinux + restart httpd => "ps -A" from my 
script  runs as expected

$ setenforce 0
$ /etc/init.d/httpd restart



Le 30/01/2013 19:14, patrick ficheux a écrit :

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:
");
}
?>

If I run the test.php under the context of httpd (from 
http:///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
1 ?00:00:01 init
2 ?00:00:00 migration/0
3 ?00:00:00 ksoftirqd/0
4 ?00:00:00 watchdog/0
5 ?00:00:00 events/0
6 ?00:00:00 khelper
[...]

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)





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