php-general Digest 3 Nov 2008 12:39:05 -0000 Issue 5770
Topics (messages 282758 through 282787):
Re: phpbb forum & site login integratio
282758 by: Maciek Sokolewicz
282763 by: Robert Cummings
Re: Simple app to Fill in TBL/Access Control Function.
282759 by: Maciek Sokolewicz
282760 by: bruce
take me off the list
282761 by: Dennison, Deborah
282762 by: Chris
282764 by: Robert Cummings
282778 by: Ashley Sheridan
282784 by: Stut
php exec()
282765 by: cheesiong
282766 by: cheesiong
282767 by: Chris
282768 by: cheesiong
282769 by: Chris
282770 by: cheesiong
282771 by: Chris
282772 by: cheesiong
282774 by: Chris
282775 by: cheesiong
282776 by: Chris
282777 by: cheesiong
282779 by: cheesiong
282780 by: Ashley Sheridan
282781 by: cheesiong
282782 by: Zoltan Ormandi
282785 by: Stut
Re: Write my own extensions
282773 by: Lupus Michaelis
Re: Write my own extensionsþ
282783 by: Gautier Di Folco
Re: Mailing lists
282786 by: Richard Heyes
Re: how to kill a session by closing window or tab clicking on X?
282787 by: Martin Zvarík
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Richard Heyes wrote:
Hi All I am looking to integrate phpbb forum with an existing site login system.
Not having looked at it, you could look at using HTTP auth. Might make
things easier. Then again, it might not. [shrugs]
Ask on the phpbb forums, I don't know how they handle logins exactly
anymore as I haven't done much forum-coding for a while now. This is a
general mailinglist about the php language, not about very specific
developed web-applications like phpbb, so most people won't be able to
give you an answer without looking for it themselves. Go to the phpbb
website and ask them how you would do that; I'm sure someone there will
be able to help you better and faster than on this list.
- tul
--- End Message ---
--- Begin Message ---
On Mon, 2008-11-03 at 00:31 +0100, Maciek Sokolewicz wrote:
> Richard Heyes wrote:
> >> Hi All I am looking to integrate phpbb forum with an existing site login
> >> system.
> >
> > Not having looked at it, you could look at using HTTP auth. Might make
> > things easier. Then again, it might not. [shrugs]
> >
> Ask on the phpbb forums, I don't know how they handle logins exactly
> anymore as I haven't done much forum-coding for a while now. This is a
> general mailinglist about the php language, not about very specific
> developed web-applications like phpbb, so most people won't be able to
> give you an answer without looking for it themselves. Go to the phpbb
> website and ask them how you would do that; I'm sure someone there will
> be able to help you better and faster than on this list.
PHPBB has come some ways I'm sure since 3 years ago... but 3 years ago
(or so) I did exactly what you're asking. It was simple enough... but
oooooooooooh what a mess :) If I recall correctly they had all the logic
interspersed within the actual login page. There was no way to create a
simple patch and play. That may be different now *shrug*.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
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.
--- End Message ---
--- Begin Message ---
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
--- End Message ---
--- Begin Message ---
Sorry to have to do this to the list but I have tried 4 rimes to
unsubscribe from this list the suggested way yet I continue to get mail.
List Master please remove me.
---------------------------------------------
Deborah Dennison
email: [EMAIL PROTECTED]
Phone: 978-614-6073
--- End Message ---
--- Begin Message ---
Dennison, Deborah wrote:
Sorry to have to do this to the list but I have tried 4 rimes to
unsubscribe from this list the suggested way yet I continue to get mail.
List Master please remove me.
Very clear instructions here:
http://php.net/unsub.php
If you still can't work it out, read the "Still need help?" section at
the bottom.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
On Sun, 2008-11-02 at 19:52 -0500, Dennison, Deborah wrote:
> Sorry to have to do this to the list but I have tried 4 rimes to
> unsubscribe from this list the suggested way yet I continue to get mail.
> List Master please remove me.
On time.. at band camp... I tried 4 rhymes AND a limerick.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--- End Message ---
--- Begin Message ---
On Sun, 2008-11-02 at 19:52 -0500, Dennison, Deborah wrote:
> Sorry to have to do this to the list but I have tried 4 rimes to
> unsubscribe from this list the suggested way yet I continue to get mail.
> List Master please remove me.
>
>
>
> ---------------------------------------------
>
> Deborah Dennison
>
> email: [EMAIL PROTECTED]
>
> Phone: 978-614-6073
>
>
>
Also, the unsubscribe email address is on EVERY email header from the
mailing list.
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
On 3 Nov 2008, at 00:52, Dennison, Deborah wrote:
Sorry to have to do this to the list but I have tried 4 rimes to
unsubscribe from this list the suggested way yet I continue to get
mail.
List Master please remove me.
There is no list master so you're out of luck there.
You're having an identity crisis. Your email came from
Deborah.Dennison@ but you state your email address as...
email: [EMAIL PROTECTED]
...in your sig. My guess is that you subscribed with a different email
address to the one you're trying to unsubscribe. Sort out who you are
and the world might start to make sense.
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
hi all,
this is the first time i try out the mailing list. i hope to get help from
here. thank you.
i hope this email can reach the mail group as i use bluecolour.sz to sign on
the news group but using bluecolour to do all the emailing.
i am facing a problem when i study exec() php function:
i tried the example 1 on http://cn.php.net/manual/en/function.exec.php
<?php
// outputs the username that owns the running php/httpd process
// (on a system with the "whoami" executable in the path)
echo exec('whoami');
?>
this is alright for me.
when i added a line to the script
<?php
// outputs the username that owns the running php/httpd process
// (on a system with the "whoami" executable in the path)
echo exec('whoami');
echo exec('/program/ipkg-0.99.163/bin/ipkg-cl --version');
[echo exec('ifconfig');]
?>
the output from the browser is the same and not the expecting version of the
ipkg-cl.
then i tried to echo exec('ifconfig'); the output is the same also.
below is the output of server error log.
root [ /srv/www/test ]# !tail
tail /program/httpd-2.2.9/logs/error_log
[Mon Nov 03 11:25:14 2008] [error] [client 10.104.9.220] ipkg version
0.99.163
-------------------------
ipkg-cl is executable. is chmod 777.
root [ /srv/www/test ]# file /program/ipkg-0.99.163/bin/ipkg-cl
/program/ipkg-0.99.163/bin/ipkg-cl: ELF 32-bit LSB executable, Intel 80386,
version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared
libs), not stripped
i have tried to read more on the php net and have a few different trials. i
do not have more idea now, i hope i can get someone help from here.
thank you.
regards,-keo
--- End Message ---
--- Begin Message ---
i try to use the system() function, i found the the last line of the
ifconfig is actually nothing.
but i still cannot execute the ipkg-cl program. any idea?
thank you.
regards,-keo
On Mon, Nov 3, 2008 at 11:31 AM, cheesiong <[EMAIL PROTECTED]> wrote:
> hi all,
> this is the first time i try out the mailing list. i hope to get help from
> here. thank you.
>
> i am facing a problem when i study exec() php function:
> i tried the example 1 on http://cn.php.net/manual/en/function.exec.php
> <?php
> // outputs the username that owns the running php/httpd process
> // (on a system with the "whoami" executable in the path)
> echo exec('whoami');
> ?>
>
> this is alright for me.
>
> when i added a line to the script
> <?php
> // outputs the username that owns the running php/httpd process
> // (on a system with the "whoami" executable in the path)
> echo exec('whoami');
> echo exec('/program/ipkg-0.99.163/bin/ipkg-cl --version');
> [echo exec('ifconfig');]
> ?>
>
> the output from the browser is the same and not the expecting version of
> the ipkg-cl.
> then i tried to echo exec('ifconfig'); the output is the same also.
>
> below is the output of server error log.
> root [ /srv/www/test ]# !tail
> tail /program/httpd-2.2.9/logs/error_log
>
> [Mon Nov 03 11:25:14 2008] [error] [client 10.104.9.220] ipkg version
> 0.99.163
>
> -------------------------
> ipkg-cl is executable. is chmod 777.
> root [ /srv/www/test ]# file /program/ipkg-0.99.163/bin/ipkg-cl
> /program/ipkg-0.99.163/bin/ipkg-cl: ELF 32-bit LSB executable, Intel 80386,
> version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared
> libs), not stripped
>
>
> i have tried to read more on the php net and have a few different trials. i
> do not have more idea now, i hope i can get someone help from here.
> thank you.
>
> regards,-keo
>
>
>
>
--- End Message ---
--- Begin Message ---
the output from the browser is the same and not the expecting version of the
ipkg-cl.
then i tried to echo exec('ifconfig'); the output is the same also.
You need to do this:
$output = array();
exec('/program/....', $output);
for it to put the results of running the command into the $output array.
Then you can print it:
print_r($output);
This is in the manual: http://au.php.net/manual/en/function.exec.php
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
hi Chris,
thank you.
it is not working as well.
i copy the ipkg-cl into /usr/bin
do i need to set anything in the httpd.conf on the <Directory> directive?
i am running apache-2.2.9.
this is code copy from you suggestion:
<?php
$output = array();
exec('ipkg-cl --version', $output);
print_r($output);
?>
output from browser:
Array ( )
output from prompt if i execute on the linux system:
root [ /srv/www/test ]# ipkg-cl --version
ipkg version 0.99.163
server error log:
root [ /srv/www/test ]# tail /program/httpd-2.2.9/logs/error_log
regards,-keo
[Mon Nov 03 12:50:00 2008] [error] [client 10.104.9.220] ipkg version
0.99.163
On Mon, Nov 3, 2008 at 12:33 PM, Chris <[EMAIL PROTECTED]> wrote:
>
> the output from the browser is the same and not the expecting version of
>> the
>> ipkg-cl.
>> then i tried to echo exec('ifconfig'); the output is the same also.
>>
>
> You need to do this:
>
> $output = array();
> exec('/program/....', $output);
>
> for it to put the results of running the command into the $output array.
>
> Then you can print it:
>
> print_r($output);
>
>
> This is in the manual: http://au.php.net/manual/en/function.exec.php
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
--- End Message ---
--- Begin Message ---
cheesiong wrote:
hi Chris,
thank you.
it is not working as well.
i copy the ipkg-cl into /usr/bin
add
error_reporting(E_ALL);
and
ini_set('display_errors', true);
to the top of your script.
any errors/warnings/whatever show up?
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
hi Chris,
i change the script to:
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
$output = array();
exec('ipkg-cl --version', $output);
print_r($output);
?>
the output from browser:
array()
other stuff remain the same. can i conclude php program is not a problem
here?
i will try to use other server to see if it is server inheritance.
and will try to increase errorlog level to see what is the problem.
regards,-keo
On Mon, Nov 3, 2008 at 1:03 PM, Chris <[EMAIL PROTECTED]> wrote:
> cheesiong wrote:
>
>> hi Chris,
>> thank you.
>> it is not working as well.
>> i copy the ipkg-cl into /usr/bin
>>
>
> add
>
> error_reporting(E_ALL);
>
> and
>
> ini_set('display_errors', true);
>
> to the top of your script.
>
> any errors/warnings/whatever show up?
>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
--- End Message ---
--- Begin Message ---
cheesiong wrote:
hi Chris,
i change the script to:
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
$output = array();
exec('ipkg-cl --version', $output);
print_r($output);
?>
the output from browser:
array()
other stuff remain the same. can i conclude php program is not a problem
here?
It could be a path problem still even though you put it in /usr/bin/
try a full path (recommended anyway):
exec('/usr/bin/ipkg-cl --version', $output);
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
hi Chris,
thank you. i change the path and change the httpd.conf LogLevel to debug
then restart apache.
but nothing is change from the output or the error log.
basically it is still not working.
this is weird, isn't it. the apache is run with Daemon, but i already change
the chmod to 777. should not be a problem.
regards,-keo
On Mon, Nov 3, 2008 at 1:19 PM, Chris <[EMAIL PROTECTED]> wrote:
> cheesiong wrote:
>
>> hi Chris,
>> i change the script to:
>> <?php
>> error_reporting(E_ALL);
>> ini_set('display_errors', true);
>> $output = array();
>> exec('ipkg-cl --version', $output);
>>
>> print_r($output);
>> ?>
>>
>> the output from browser:
>> array()
>>
>> other stuff remain the same. can i conclude php program is not a problem
>> here?
>>
>
> It could be a path problem still even though you put it in /usr/bin/
>
> try a full path (recommended anyway):
>
> exec('/usr/bin/ipkg-cl --version', $output);
>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
--- End Message ---
--- Begin Message ---
cheesiong wrote:
hi Chris,
thank you. i change the path and change the httpd.conf LogLevel to
debug then restart apache.
but nothing is change from the output or the error log.
basically it is still not working.
this is weird, isn't it. the apache is run with Daemon, but i already
change the chmod to 777. should not be a problem.
Log in as root then su to your apache user and run it from the command
line. What happens?
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
hi Chris,
my linux system is LFS that i build from scratch.
i cant su to daemon.
below is my /etc/passwd:
root [ /srv/www/test ]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
sshd:x:50:50:sshd PrivSep:/var/lib/sshd:/bin/false
daemon:x:6:6:daemon:/dev/null:/bin/false
i try to run the same thing in other platform:
it come out a more meaningful msg. i will trace from there.
any hint from you?
[EMAIL PROTECTED] test]#tail /opt/logs/error_log
[Mon Jun 23 12:06:24 2008] [error] [client 169.254.0.20] sh: , referer:
http://169.254.0.101/test/
[Mon Jun 23 12:06:24 2008] [error] [client 169.254.0.20]
/opt/ipkg-0.99.163/bin/ipkg-cl: Permission denied, referer:
http://169.254.0.101/test/
[Mon Jun 23 12:06:24 2008] [error] [client 169.254.0.20] , referer:
http://169.254.0.101/test/
regards,-keo
On Mon, Nov 3, 2008 at 1:45 PM, Chris <[EMAIL PROTECTED]> wrote:
> cheesiong wrote:
>
>> hi Chris,
>> thank you. i change the path and change the httpd.conf LogLevel to debug
>> then restart apache.
>> but nothing is change from the output or the error log.
>> basically it is still not working.
>>
>> this is weird, isn't it. the apache is run with Daemon, but i already
>> change the chmod to 777. should not be a problem.
>>
>
> Log in as root then su to your apache user and run it from the command
> line. What happens?
>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
--- End Message ---
--- Begin Message ---
cheesiong wrote:
hi Chris,
my linux system is LFS that i build from scratch.
i cant su to daemon.
below is my /etc/passwd:
root [ /srv/www/test ]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
sshd:x:50:50:sshd PrivSep:/var/lib/sshd:/bin/false
daemon:x:6:6:daemon:/dev/null:/bin/false
Change it, su, change it back. Looking at apache logs won't tell you
much if you don't try something.
Are you running selinux?
<http://169.254.0.20>] /opt/ipkg-0.99.163/bin/ipkg-cl: Permission
denied, referer: http://169.254.0.101/test/
That one's pretty easy.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
hi Chris,
i did try,
below is the continouos output from prompt when i do su.
root [ /srv/www/test ]# su daemon
root [ /srv/www/test ]#
i didnt manage to switch user.
i will create an user... so that i can switch to it.
i created a user call lfs into group lfs.
able to execute ipkg-cl and /program/..../ipkg-ck --version.
then i change the httpd.conf to start apache with lfs and execute the php
script to exec ipkg-cl --version.
basically it is not working.
root [ /srv/www/test ]# groupadd lfs
root [ /srv/www/test ]# useradd -s /bin/bash -g lfs -m -k /dev/null lfs
root [ /srv/www/test ]# passwd lfs
Changing password for lfs
Enter the new password (minimum of 5, maximum of 127 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Bad password: too short.
Warning: weak password (enter it again to use it anyway).
New password:
Re-enter new password:
Password changed.
root [ /srv/www/test ]# su lfs
bash-3.2$ ipkg-cl --version
ipkg version 0.99.163
bash-3.2$ /program/ipkg-0.99.163/bin/ipkg-cl --version
ipkg version 0.99.163
bash-3.2$
lfs 13615 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
lfs 13616 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
lfs 13617 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
lfs 13618 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
lfs 13619 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
so not the user right problem, am i right ?
regards,-keo
On Mon, Nov 3, 2008 at 1:59 PM, Chris <[EMAIL PROTECTED]> wrote:
> cheesiong wrote:
>
>> hi Chris,
>> my linux system is LFS that i build from scratch.
>> i cant su to daemon.
>>
>> below is my /etc/passwd:
>> root [ /srv/www/test ]# cat /etc/passwd
>> root:x:0:0:root:/root:/bin/bash
>> nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
>> sshd:x:50:50:sshd PrivSep:/var/lib/sshd:/bin/false
>> daemon:x:6:6:daemon:/dev/null:/bin/false
>>
>
> Change it, su, change it back. Looking at apache logs won't tell you much
> if you don't try something.
>
> Are you running selinux?
>
> <http://169.254.0.20>] /opt/ipkg-0.99.163/bin/ipkg-cl: Permission denied,
>> referer: http://169.254.0.101/test/
>>
>
> That one's pretty easy.
>
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
--- End Message ---
--- Begin Message ---
hi Chris,
i found out that when execute ipkg, the return is before the header.
root [ /srv/www/test ]# /program/php-5.2.6/bin/php-cgi ipkg.php
ipkg version 0.99.163
X-Powered-By: PHP/5.2.6
Content-type: text/html
Array
(
)
which is different than the whoami program.
root [ /srv/www/test ]# /program/php-5.2.6/bin/php-cgi whoami.php
X-Powered-By: PHP/5.2.6
Content-type: text/html
the result of execwhoami is
root
can you see the different?
regards,-keo
On Mon, Nov 3, 2008 at 2:12 PM, cheesiong <[EMAIL PROTECTED]> wrote:
> hi Chris,
> i did try,
> below is the continouos output from prompt when i do su.
>
> root [ /srv/www/test ]# su daemon
> root [ /srv/www/test ]#
>
> i didnt manage to switch user.
> i will create an user... so that i can switch to it.
>
> i created a user call lfs into group lfs.
> able to execute ipkg-cl and /program/..../ipkg-ck --version.
>
> then i change the httpd.conf to start apache with lfs and execute the php
> script to exec ipkg-cl --version.
> basically it is not working.
>
> root [ /srv/www/test ]# groupadd lfs
> root [ /srv/www/test ]# useradd -s /bin/bash -g lfs -m -k /dev/null lfs
> root [ /srv/www/test ]# passwd lfs
> Changing password for lfs
> Enter the new password (minimum of 5, maximum of 127 characters)
> Please use a combination of upper and lower case letters and numbers.
> New password:
> Bad password: too short.
> Warning: weak password (enter it again to use it anyway).
> New password:
> Re-enter new password:
> Password changed.
> root [ /srv/www/test ]# su lfs
> bash-3.2$ ipkg-cl --version
> ipkg version 0.99.163
> bash-3.2$ /program/ipkg-0.99.163/bin/ipkg-cl --version
> ipkg version 0.99.163
> bash-3.2$
>
> lfs 13615 0.0 0.3 3684 1344 ? S 14:06 0:00
> /program/httpd-2.2.9/bin/
> lfs 13616 0.0 0.3 3684 1344 ? S 14:06 0:00
> /program/httpd-2.2.9/bin/
> lfs 13617 0.0 0.3 3684 1344 ? S 14:06 0:00
> /program/httpd-2.2.9/bin/
> lfs 13618 0.0 0.3 3684 1344 ? S 14:06 0:00
> /program/httpd-2.2.9/bin/
> lfs 13619 0.0 0.3 3684 1344 ? S 14:06 0:00
> /program/httpd-2.2.9/bin/
>
>
> so not the user right problem, am i right ?
>
> regards,-keo
>
>
> On Mon, Nov 3, 2008 at 1:59 PM, Chris <[EMAIL PROTECTED]> wrote:
>
>> cheesiong wrote:
>>
>>> hi Chris,
>>> my linux system is LFS that i build from scratch.
>>> i cant su to daemon.
>>>
>>> below is my /etc/passwd:
>>> root [ /srv/www/test ]# cat /etc/passwd
>>> root:x:0:0:root:/root:/bin/bash
>>> nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
>>> sshd:x:50:50:sshd PrivSep:/var/lib/sshd:/bin/false
>>> daemon:x:6:6:daemon:/dev/null:/bin/false
>>>
>>
>> Change it, su, change it back. Looking at apache logs won't tell you much
>> if you don't try something.
>>
>> Are you running selinux?
>>
>> <http://169.254.0.20>] /opt/ipkg-0.99.163/bin/ipkg-cl: Permission
>>> denied, referer: http://169.254.0.101/test/
>>>
>>
>> That one's pretty easy.
>>
>>
>> --
>> Postgresql & php tutorials
>> http://www.designmagick.com/
>>
>>
>
--- End Message ---
--- Begin Message ---
On Mon, 2008-11-03 at 15:21 +0800, cheesiong wrote:
> hi Chris,
> i found out that when execute ipkg, the return is before the header.
>
> root [ /srv/www/test ]# /program/php-5.2.6/bin/php-cgi ipkg.php
> ipkg version 0.99.163
> X-Powered-By: PHP/5.2.6
> Content-type: text/html
>
> Array
> (
> )
>
>
> which is different than the whoami program.
> root [ /srv/www/test ]# /program/php-5.2.6/bin/php-cgi whoami.php
> X-Powered-By: PHP/5.2.6
> Content-type: text/html
>
> the result of execwhoami is
> root
>
>
> can you see the different?
>
> regards,-keo
>
>
> On Mon, Nov 3, 2008 at 2:12 PM, cheesiong <[EMAIL PROTECTED]> wrote:
>
> > hi Chris,
> > i did try,
> > below is the continouos output from prompt when i do su.
> >
> > root [ /srv/www/test ]# su daemon
> > root [ /srv/www/test ]#
> >
> > i didnt manage to switch user.
> > i will create an user... so that i can switch to it.
> >
> > i created a user call lfs into group lfs.
> > able to execute ipkg-cl and /program/..../ipkg-ck --version.
> >
> > then i change the httpd.conf to start apache with lfs and execute the php
> > script to exec ipkg-cl --version.
> > basically it is not working.
> >
> > root [ /srv/www/test ]# groupadd lfs
> > root [ /srv/www/test ]# useradd -s /bin/bash -g lfs -m -k /dev/null lfs
> > root [ /srv/www/test ]# passwd lfs
> > Changing password for lfs
> > Enter the new password (minimum of 5, maximum of 127 characters)
> > Please use a combination of upper and lower case letters and numbers.
> > New password:
> > Bad password: too short.
> > Warning: weak password (enter it again to use it anyway).
> > New password:
> > Re-enter new password:
> > Password changed.
> > root [ /srv/www/test ]# su lfs
> > bash-3.2$ ipkg-cl --version
> > ipkg version 0.99.163
> > bash-3.2$ /program/ipkg-0.99.163/bin/ipkg-cl --version
> > ipkg version 0.99.163
> > bash-3.2$
> >
> > lfs 13615 0.0 0.3 3684 1344 ? S 14:06 0:00
> > /program/httpd-2.2.9/bin/
> > lfs 13616 0.0 0.3 3684 1344 ? S 14:06 0:00
> > /program/httpd-2.2.9/bin/
> > lfs 13617 0.0 0.3 3684 1344 ? S 14:06 0:00
> > /program/httpd-2.2.9/bin/
> > lfs 13618 0.0 0.3 3684 1344 ? S 14:06 0:00
> > /program/httpd-2.2.9/bin/
> > lfs 13619 0.0 0.3 3684 1344 ? S 14:06 0:00
> > /program/httpd-2.2.9/bin/
> >
> >
> > so not the user right problem, am i right ?
> >
> > regards,-keo
> >
> >
> > On Mon, Nov 3, 2008 at 1:59 PM, Chris <[EMAIL PROTECTED]> wrote:
> >
> >> cheesiong wrote:
> >>
> >>> hi Chris,
> >>> my linux system is LFS that i build from scratch.
> >>> i cant su to daemon.
> >>>
> >>> below is my /etc/passwd:
> >>> root [ /srv/www/test ]# cat /etc/passwd
> >>> root:x:0:0:root:/root:/bin/bash
> >>> nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
> >>> sshd:x:50:50:sshd PrivSep:/var/lib/sshd:/bin/false
> >>> daemon:x:6:6:daemon:/dev/null:/bin/false
> >>>
> >>
> >> Change it, su, change it back. Looking at apache logs won't tell you much
> >> if you don't try something.
> >>
> >> Are you running selinux?
> >>
> >> <http://169.254.0.20>] /opt/ipkg-0.99.163/bin/ipkg-cl: Permission
> >>> denied, referer: http://169.254.0.101/test/
> >>>
> >>
> >> That one's pretty easy.
> >>
> >>
> >> --
> >> Postgresql & php tutorials
> >> http://www.designmagick.com/
> >>
> >>
> >
What about making an exec call, but piping the results of that call to a
text file. That way, it will be in a file that is easily accessed from
other parts of your site. I'm not sure which is more expensive, a call
to ifconfig, or a file read.
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
hi ash,
i tried you suggestion, with
<?php exec('ipkg-cl --version >lalala.txt');?>
the lalala.txt was created but the file is empty.
anymore suggestion?
thank you.
regards,-keo
On Mon, Nov 3, 2008 at 3:29 PM, Ashley Sheridan <[EMAIL PROTECTED]>wrote:
> On Mon, 2008-11-03 at 15:21 +0800, cheesiong wrote:
> > hi Chris,
> > i found out that when execute ipkg, the return is before the header.
> >
> > root [ /srv/www/test ]# /program/php-5.2.6/bin/php-cgi ipkg.php
> > ipkg version 0.99.163
> > X-Powered-By: PHP/5.2.6
> > Content-type: text/html
> >
> > Array
> > (
> > )
> >
> >
> > which is different than the whoami program.
> > root [ /srv/www/test ]# /program/php-5.2.6/bin/php-cgi whoami.php
> > X-Powered-By: PHP/5.2.6
> > Content-type: text/html
> >
> > the result of execwhoami is
> > root
> >
> >
> > can you see the different?
> >
> > regards,-keo
> >
> >
> > On Mon, Nov 3, 2008 at 2:12 PM, cheesiong <[EMAIL PROTECTED]>
> wrote:
> >
> > > hi Chris,
> > > i did try,
> > > below is the continouos output from prompt when i do su.
> > >
> > > root [ /srv/www/test ]# su daemon
> > > root [ /srv/www/test ]#
> > >
> > > i didnt manage to switch user.
> > > i will create an user... so that i can switch to it.
> > >
> > > i created a user call lfs into group lfs.
> > > able to execute ipkg-cl and /program/..../ipkg-ck --version.
> > >
> > > then i change the httpd.conf to start apache with lfs and execute the
> php
> > > script to exec ipkg-cl --version.
> > > basically it is not working.
> > >
> > > root [ /srv/www/test ]# groupadd lfs
> > > root [ /srv/www/test ]# useradd -s /bin/bash -g lfs -m -k /dev/null lfs
> > > root [ /srv/www/test ]# passwd lfs
> > > Changing password for lfs
> > > Enter the new password (minimum of 5, maximum of 127 characters)
> > > Please use a combination of upper and lower case letters and numbers.
> > > New password:
> > > Bad password: too short.
> > > Warning: weak password (enter it again to use it anyway).
> > > New password:
> > > Re-enter new password:
> > > Password changed.
> > > root [ /srv/www/test ]# su lfs
> > > bash-3.2$ ipkg-cl --version
> > > ipkg version 0.99.163
> > > bash-3.2$ /program/ipkg-0.99.163/bin/ipkg-cl --version
> > > ipkg version 0.99.163
> > > bash-3.2$
> > >
> > > lfs 13615 0.0 0.3 3684 1344 ? S 14:06 0:00
> > > /program/httpd-2.2.9/bin/
> > > lfs 13616 0.0 0.3 3684 1344 ? S 14:06 0:00
> > > /program/httpd-2.2.9/bin/
> > > lfs 13617 0.0 0.3 3684 1344 ? S 14:06 0:00
> > > /program/httpd-2.2.9/bin/
> > > lfs 13618 0.0 0.3 3684 1344 ? S 14:06 0:00
> > > /program/httpd-2.2.9/bin/
> > > lfs 13619 0.0 0.3 3684 1344 ? S 14:06 0:00
> > > /program/httpd-2.2.9/bin/
> > >
> > >
> > > so not the user right problem, am i right ?
> > >
> > > regards,-keo
> > >
> > >
> > > On Mon, Nov 3, 2008 at 1:59 PM, Chris <[EMAIL PROTECTED]> wrote:
> > >
> > >> cheesiong wrote:
> > >>
> > >>> hi Chris,
> > >>> my linux system is LFS that i build from scratch.
> > >>> i cant su to daemon.
> > >>>
> > >>> below is my /etc/passwd:
> > >>> root [ /srv/www/test ]# cat /etc/passwd
> > >>> root:x:0:0:root:/root:/bin/bash
> > >>> nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
> > >>> sshd:x:50:50:sshd PrivSep:/var/lib/sshd:/bin/false
> > >>> daemon:x:6:6:daemon:/dev/null:/bin/false
> > >>>
> > >>
> > >> Change it, su, change it back. Looking at apache logs won't tell you
> much
> > >> if you don't try something.
> > >>
> > >> Are you running selinux?
> > >>
> > >> <http://169.254.0.20>] /opt/ipkg-0.99.163/bin/ipkg-cl: Permission
> > >>> denied, referer: http://169.254.0.101/test/
> > >>>
> > >>
> > >> That one's pretty easy.
> > >>
> > >>
> > >> --
> > >> Postgresql & php tutorials
> > >> http://www.designmagick.com/
> > >>
> > >>
> > >
> What about making an exec call, but piping the results of that call to a
> text file. That way, it will be in a file that is easily accessed from
> other parts of your site. I'm not sure which is more expensive, a call
> to ifconfig, or a file read.
>
>
> Ash
> www.ashleysheridan.co.uk
>
>
--- End Message ---
--- Begin Message ---
Hi,
I'm not a Linux guru, so maybe my question is stupid, but are you sure
the command prints its output to the *standard* output?
Z
cheesiong wrote:
hi ash,
i tried you suggestion, with
<?php exec('ipkg-cl --version >lalala.txt');?>
the lalala.txt was created but the file is empty.
anymore suggestion?
thank you.
regards,-keo
On Mon, Nov 3, 2008 at 3:29 PM, Ashley Sheridan <[EMAIL PROTECTED]>wrote:
On Mon, 2008-11-03 at 15:21 +0800, cheesiong wrote:
hi Chris,
i found out that when execute ipkg, the return is before the header.
root [ /srv/www/test ]# /program/php-5.2.6/bin/php-cgi ipkg.php
ipkg version 0.99.163
X-Powered-By: PHP/5.2.6
Content-type: text/html
Array
(
)
which is different than the whoami program.
root [ /srv/www/test ]# /program/php-5.2.6/bin/php-cgi whoami.php
X-Powered-By: PHP/5.2.6
Content-type: text/html
the result of execwhoami is
root
can you see the different?
regards,-keo
On Mon, Nov 3, 2008 at 2:12 PM, cheesiong <[EMAIL PROTECTED]>
wrote:
hi Chris,
i did try,
below is the continouos output from prompt when i do su.
root [ /srv/www/test ]# su daemon
root [ /srv/www/test ]#
i didnt manage to switch user.
i will create an user... so that i can switch to it.
i created a user call lfs into group lfs.
able to execute ipkg-cl and /program/..../ipkg-ck --version.
then i change the httpd.conf to start apache with lfs and execute the
php
script to exec ipkg-cl --version.
basically it is not working.
root [ /srv/www/test ]# groupadd lfs
root [ /srv/www/test ]# useradd -s /bin/bash -g lfs -m -k /dev/null lfs
root [ /srv/www/test ]# passwd lfs
Changing password for lfs
Enter the new password (minimum of 5, maximum of 127 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Bad password: too short.
Warning: weak password (enter it again to use it anyway).
New password:
Re-enter new password:
Password changed.
root [ /srv/www/test ]# su lfs
bash-3.2$ ipkg-cl --version
ipkg version 0.99.163
bash-3.2$ /program/ipkg-0.99.163/bin/ipkg-cl --version
ipkg version 0.99.163
bash-3.2$
lfs 13615 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
lfs 13616 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
lfs 13617 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
lfs 13618 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
lfs 13619 0.0 0.3 3684 1344 ? S 14:06 0:00
/program/httpd-2.2.9/bin/
so not the user right problem, am i right ?
regards,-keo
On Mon, Nov 3, 2008 at 1:59 PM, Chris <[EMAIL PROTECTED]> wrote:
cheesiong wrote:
hi Chris,
my linux system is LFS that i build from scratch.
i cant su to daemon.
below is my /etc/passwd:
root [ /srv/www/test ]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
nobody:x:99:99:Unprivileged User:/dev/null:/bin/false
sshd:x:50:50:sshd PrivSep:/var/lib/sshd:/bin/false
daemon:x:6:6:daemon:/dev/null:/bin/false
Change it, su, change it back. Looking at apache logs won't tell you
much
if you don't try something.
Are you running selinux?
<http://169.254.0.20>] /opt/ipkg-0.99.163/bin/ipkg-cl: Permission
denied, referer: http://169.254.0.101/test/
That one's pretty easy.
--
Postgresql & php tutorials
http://www.designmagick.com/
What about making an exec call, but piping the results of that call to a
text file. That way, it will be in a file that is easily accessed from
other parts of your site. I'm not sure which is more expensive, a call
to ifconfig, or a file read.
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
On 3 Nov 2008, at 08:06, cheesiong wrote:
i tried you suggestion, with
<?php exec('ipkg-cl --version >lalala.txt');?>
the lalala.txt was created but the file is empty.
anymore suggestion?
Try...
<?php exec('ipkg-cl --version 2>&1');?>
It's not uncommon for CLI utilities to output their banner on stderr
so it doesn't get included when the output is piped elsewhere.
-Stut
--
http://stut.net/
--- End Message ---
--- Begin Message ---
Gautier Di Folco a écrit :
I am a French student, so I do not speak english very well, I am sorry...
We(re a lot in this case :p
For a few weeks I want to write my own extension for PHP in C++ language...
Do it in C, not C++. And compile in C, not C++. C and C++ are
slightly different. If you want a plain explanation, write me in private
(en plus on pourra parler en français, et non dans un horrible globish).
But I do not find any trivial things, all the exemples did not have any
paramaters...
Do you know where I can find concrete things to do function or class/objects for PHP in C++ ?
C++ interface for writing PHP extension doesn't exists, it is C only.
And the best source of documentation for that is the PHP source code.
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
--- End Message ---
--- Begin Message ---
Ok thank you to Stut, Nathan Nobbe and Luppus Michaelis for your help, I take
notes, I learn and I come back :)
_________________________________________________________________
Téléphonez gratuitement à tous vos proches avec Windows Live Messenger !
Téléchargez-le maintenant !
http://www.windowslive.fr/messenger/1.asp
--- End Message ---
--- Begin Message ---
>> OMG Pwnies!
>>
> Fixed that for you.
In my best Manuel voice (kinda topical)... Keh??
--
Richard Heyes
HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated November 1st)
--- End Message ---
--- Begin Message ---
Afan Pasalic napsal(a):
hi.
I'm sorry for posting this more javascript then php question, but it's
somehow php related.
here is the issue: very often people close the window/tab without
logging out. I need solution how to "recognize" when [x] is clicked (or
File >> Close) and kill the session before the window/tab is closed.
few years ago, before firefox and tabs, I solved this by javascript and
onClose() as a part of body tag. now, it doesn't work anymore.
any suggestion/opinion/experience?
thanks
afan
You might wanna check this out: http://cz2.php.net/ignore_user_abort
--- End Message ---