thanks for all . Mr.Anas thank u for your nice solution. can the PHP-CLI help me in this case ?? coz it seems cool .. i'll try it and if it work i'll post the script here :-) Thanks again
On Jan 13, 2008 9:49 AM, Anas K. Al-Far <[EMAIL PROTECTED]> wrote: > > You can do it like this, > Make your PHP script store the new user name in XML file, text file or > DB in stead of create it directly. > Then, make another PHP script to read your store (XML, Text or DB) and > use <exec() function> in this script. > Now, you should think that <Its the same solution>! This is true, for a > moment! > Actually, when you run a ".php" file on your browser, the apache will > use one of the following users to execute your ".php" file <"www-data", > "apache", "web" or "nobody" user>. > And as you have been told, those users have no root privileges. > While, If you make another ".php" file and make it executable through > command line, you can assign which use to execute this file <including > root user> which is going to save your life. > You can execute this file in the command line by adding this file to the > cron tab. > If you have your Linux machine, try to look for "crontab" command, but > If you have a reseller account or a virtual host, you should find a > "cron job" tool. > Good luck. > Anas K. Al-Far > > > Al-Faisal El-Dajani wrote: > > Hey Saeed, > > > > The user that apache is running as is defined in your httpd.conf or > > apache2.conf file. This file is located in /etc/apache2. > > > > Usually the user is called www-data, apache, or web. This user does > > not have root privileges, and should NOT have root privileges. > > > > On Jan 10, 2008 7:08 PM, Saeed Al Mullah <[EMAIL PROTECTED] > > > <mailto:[EMAIL PROTECTED]>> wrote: > > > > > > Hi all , and Kol 3am wa antom bekhair , and happy new year . > > i have a couple of questions about PHP and linux . > > i want to add users ( linux users ) by web application (PHP) > > i know that i can run linux command by calling ( exec() function ). > > as we know to add user in Linux u must be a root or by using sudo > > command ....right ha ? > > my question is ... the PHP and apache which user are running as ? > > do i have the same privileges of root user ? > > i hope u can understand me . > > > > -- > > Saeed Mullah uthman > > Mob: +966 56 7849842 > > > > > > > > > > > > -- Saeed Mullah uthman PHP developer President of P.A club :-) ask me about it Mob: +966 56 7849842 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Jordan PHP Users Group" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/JoPHP http://Jolug.org/ -~----------~----~----~----~------~----~------~--~---
