RE: [PHP] Root Commands

2003-02-19 Thread CodersNightMare

I have looked into this once before, and If I remember correctly, there is 
a way but PHP has to be compiled as CGI and not as a module. Then you would 
be able to use suEXEC to force it to run as a user other than what the web 
server is running.

Try Qmail as your mail server, this has a lot of nice little programs that 
allows just what your looking for..Qmailadmin.


Hope this helps.



At 11:40 PM 2/20/2003 +1100, you wrote:
setuid is a UNIX command.

try 'man setuid' on a *nix box..

LW



-Original Message-
From: Patrick Armour [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 20 February 2003 11:36 AM
To: Jason Sheets
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Root Commands


Great idea.  However, that opens up a whole other can of worms that I'm not
really prepared to dive into yet.

I searched php.net for the setuid function, but didn't find anything.  Is
this a php function?  Do you know where any documentation on it is?

Thanks again
Patrick

- Original Message -
From: "Jason Sheets" <[EMAIL PROTECTED]>
To: "Patrick Armour" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, February 19, 2003 6:27 PM
Subject: Re: [PHP] Root Commands


> Most ways require a program
> a with root access to execute (setuid root) this is very insecure.
>
> I would look at enabling your email program to get the account
> information from a database like mysql or postgres, that way you need
> just insert a record into the database.
>
> Jason
> On Wed, 2003-02-19 at 16:37, Patrick Armour wrote:
> > I am trying to use a form (password protected of course) that will allow
an administrator to add POP accounts to a linux box.  The problem that I
seem to have is that the form is trying to give the commands as user
'nobody' and they need to be given by either root or a superuser.
> >
> > Is there any way to accomplish this?  If somebody were to point me in
the direction of a tutorial on this subject I would really appreciate it.
> >
> > Sincerely,
> > Patrick Armour
> > www.greatplainsinternet.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 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] List folder contents with links?

2003-02-20 Thread CodersNightMare

You can also take a look at:

http://www.php.net/manual/en/function.opendir.php

Hope this helps.

At 11:54 AM 2/20/2003 -0500, you wrote:

on 2/20/03 11:49 AM, David Otton at [EMAIL PROTECTED] wrote:

>> Is it possible to display the contents of a given folder, list them , and
>> make them links?
>
> http://www.php.net/manual/en/function.readdir.php

Thanks :-)



--
Mike Yrabedra
President

 323, Inc.
 Home of The MacDock and The MacSurfshop
 [http://macdock.com] : [http://macsurfshop.com]
 VOICE: 770.382.1195
 iChat/AIM: ichatmacdock
___
"Whatever you do, work at it with all your heart,
as working for the Lord, not for men."
~Colossians 3:23 <{{{><
--



--
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] Can't run PHP cli script from Cron

2003-02-28 Thread CodersNightMare
I am sure you have tried this, but,
Do you call the full path to php for cron.
something like:

40 * * * * /usr/local/bin/php -q /home/user/phpcliscript

Hope this helps.

At 10:10 AM 2/28/2003 -0800, you wrote:
The path is

#!/usr/local/bin/php -q

But like I said, that can't be the problem because when I run it from
the command line, it runs fine.  The only problem I am having is that it
won't run from cron.  That is why I think it is an issue with the cron
environment.  All other types of scripts like bash scripts run fine from
cron.  I am surprised no one else has come across this problem before.
Please help me!

 Justin Michael Couto[EMAIL PROTECTED]
Director of Operations  805.781.0420
Somnio World Web Solutions  http://www.somnioworld.com
-Original Message-
From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 9:44 AM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Can't run PHP cli script from Cron
Shouldn't it be
#!/usr/local/bin/php
Or was it just a typo here?

- Original Message -
From: "Justin Michael Couto" <[EMAIL PROTECTED]>
To: "'Ernest E Vogelsinger'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, February 28, 2003 12:09 PM
Subject: RE: [PHP] Can't run PHP cli script from Cron
> I can run it from the shell prompt perfectly fine.  I just won't run
> from cron.
>
> I do have the statement:
>
> #!/usr/local/php
>
> In the beginning of my script.  Like I said it works perfect when I
run
> it by hand from the shell prompt.  I think the reason it is not
running
> has to do with the cron environment, but I am not ssure what it is.
>
> Justin Michael Couto[EMAIL PROTECTED]
> Director of Operations  805.781.0420
> Somnio World Web Solutions  http://www.somnioworld.com
>
>
> -Original Message-
> From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 28, 2003 12:55 AM
> To: Justin Michael Couto
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Can't run PHP cli script from Cron
>
> At 05:30 28.02.2003, Justin Michael Couto said:
> [snip]
> >Here is my crontab entry:
> >
> >* * * * * /path/to/file/file_name.php
> >
> >I also have
> >
> >* * * * * /path/to/file/bash_test_script
> [snip]
>
> Did you try to run the php file interactively, from the shell prompt?
>
> You need at last this statement on top of your PHP files:
> #!/usr/local/php
>
>
> --
>>O Ernest E. Vogelsinger
>(\)ICQ #13394035
> ^ http://www.vogelsinger.at/
>
>
>
> --
> 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] Non systems-wide auto_prepend_file

2003-03-16 Thread CodersNightMare
php_value auto_prepend_file /home/www/www.virtual.com/php/prepend.php

php_value auto_append_file /home/www/www.virtual.com/php/append.php

OR:

php_admin_value auto_prepend_file your_file_name.php
php_admin_value auto_append_file your_file_name.php
I think that one or the other should work in the .htaccess file and in a 
virtualhost.

Most of the time, I see this kind of listing in a .htaccess file and not a 
virtualhost as most of the time, the customers for the Webhost I work for 
do not have access to the virtualhost entry.

Hope this helps.

At 10:36 AM 3/17/2003 +1100, you wrote:
Is there any way anyone can think of to set up
auto_prepend_file/auto_append_file so that they only affect one virtual
domain on an Apache webserver (not system wide)?
Cheers,
Brad
--
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