[PHP] Running system commands

2003-09-23 Thread Nitin
Hi all, 

I was wondering, if anyone can help me with running system commands from within php. 
Actually I have a script which deletes users from my database (which is of course 
MySQL), now I want to delete those users from system level also, as they are 
authenticated users of my OS also.

Now, the problem is, that I'm running my MySQL server and web server on different 
machines. I can do whatever on remote DB server but how to run a system command on 
another machine. I know, it's possible to run system commands on local server by 
system(), but what about remote server?

Any help will be highly appreciated.

Thanx in advance
Nitin

Re: [PHP] Running system commands

2003-09-24 Thread Nitin
Thanks for your help, I'v configured ssh, though it's running fine, I'm not
able to connect to my server, it says-

connect: connection to  on port 22 refused.

i think this is due to, some firewall. I'll check it out.
in the mean time can you clearify what are verbatim commands!!!

Thnaks for your help anyway
Nitin

- Original Message - 
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: "Mike Migurski" <[EMAIL PROTECTED]>
Cc: "Nitin" <[EMAIL PROTECTED]>; "PHP-General"
<[EMAIL PROTECTED]>
Sent: Wednesday, September 24, 2003 2:16 AM
Subject: Re: [PHP] Running system commands


> On Tue, 2003-09-23 at 16:34, Mike Migurski wrote:
> > >I was wondering, if anyone can help me with running system commands
from
> > >within php. Actually I have a script which deletes users from my
database
> > >(which is of course MySQL), now I want to delete those users from
system
> > >level also, as they are authenticated users of my OS also.
> > >
> > >Now, the problem is, that I'm running my MySQL server and web server on
> > >different machines. I can do whatever on remote DB server but how to
run
> > >a system command on another machine. I know, it's possible to run
system
> > >commands on local server by system(), but what about remote server?
> >
> > This is partially dependent on the user your php scripts are running as.
> > One approach might be to use SSH to talk to the remote machine, and set
up
> > a limited-privilege account there. You can run a copy of ssh-agent[1] as
> > the apache user, which stores an open copy of a private SSH key in
memory,
> > add the public half of that key to the remote machine's authorized_keys
> > file[2], and use SSH to access that machine.
>
> Alternatively you could have a simple little PHP daemon on the webserver
> and it could check a table in the remote DB every minute or so for
> verbatim commands to execute. Depends really on whether these commands
> need to occur real time or not.
>
> Cheers,
> Rob.
> -- 
> ..
> | InterJinn Application Framework - http://www.interjinn.com |
> ::
> | An application and templating framework for PHP. Boasting  |
> | a powerful, scalable system for accessing system services  |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for   |
> | creating re-usable components quickly and easily.  |
> `'
>

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



Re: [PHP] Running system commands

2003-09-25 Thread Nitin
It was filtering, but now I've opened the port to listen to my machine,
which is running my web server (where all php scripts qre running). So,
that's not a problem now. I've checked it (SSH) on the terminal, it's
working fine with root as well as other users. Now, problem is, for other
users it asks for password, which i dont want to surpass.

Your idea of running encrypted tunnel to use telnet services is good, but i
cann't use it, cause i've blocked that port, and i dont want to open it.

Second thing is, yes I'm using system() for command from php and it's not
showing any result. May be you r right that, it's just sitting waiting for
password. If, you've any idea to deal with it, please let me know.

Anyway, thanks a lot for your time and great help.
Nitin


- Original Message - 
From: "Evan Nemerson" <[EMAIL PROTECTED]>
To: "Nitin" <[EMAIL PROTECTED]>
Sent: Thursday, September 25, 2003 4:38 PM
Subject: Re: [PHP] Running system commands


> If it's filtering port 22, you're not going to be able to access the
server
> from any client, unless you can bypass the firewall.
>
> Only the server needs to be run as root. The client should _never_ be run
as
> root.
>
> I don't know how to pass the password as an argument (and honestly hope
there
> isn't one). Furthermore, the client will probably open the terminal to
accept
> input instead of relying on stdin, so I doubt you can send the password
via
> stdin.
>
> What I think you'll probably end up doing is creating an encrypted tunnel
via
> SSH to a telnet server. Search for how to use port forwarding with
whatever
> ssh software you're using, and learn the interface.
>
> Run the same command from a shell as you're running from PHP. Is there any
> output? What method for execution are you using (backtick, exec, system,
> passthru, etc)? It's also entirely possible that ssh is siting there
waiting
> for a password you can't input because it's not a true terminal.
>
>
>
>
> On Thursday 25 September 2003 03:20 am, you wrote:
> > Yeah, I did it with ipchains, it was blocking that particular port,
that's
> > fine.
> > But how do I do all this functioning from within PHP. I mean, if I want
to
> > use ssh not with root, what should I do?
> > Explain it if you can. How'll I give my password and do other
functionning?
> > and one more thing, it doesn't show any output on executing ssh from
within
> > php, now how do i know that it's working or not?
> >
> > I'm really thankful to you, for all your help.
> >
> > Nitin
> >
> > - Original Message -
> > From: "Evan Nemerson" <[EMAIL PROTECTED]>
> > To: "Nitin" <[EMAIL PROTECTED]>
> > Sent: Thursday, September 25, 2003 11:38 AM
> > Subject: Re: [PHP] Running system commands
> >
> > > ipchains -L will show your firewall.
> > > if that doesn't work, you might want to try iptables -L... ipchains is
> > > obsolete.
> > > What does netstat -lp show for port 22/ssh?
> > > What does a portscan show?
> > >
> > > On Wednesday 24 September 2003 11:03 pm, you wrote:
> > > > No problem starting it. When I connect with ssh, it says:
> > > >
> > > > Connect: connection to hostname on port 22 refused.
> > > >
> > > > And, same problem with root as well as others.
> > > > Do you have any idea, where does ipchains store all the rules
Accepting
> >
> > and
> >
> > > > Rejecting packets?
> > > >
> > > > Thanks for the help.
> > > > Nitin
> > > >
> > > >
> > > > - Original Message -
> > > > From: "Evan Nemerson" <[EMAIL PROTECTED]>
> > > > To: "Nitin" <[EMAIL PROTECTED]>
> > > > Sent: Thursday, September 25, 2003 4:45 AM
> > > > Subject: Re: [PHP] Running system commands
> > > >
> > > > > What exactly is the problem? What does the sshd say when you try
to
> >
> > start
> >
> > > > > it? Are you running as root (which you must be for it to run on
port
> >
> > 22,
> >
> > > > > which is default)?
> > > > >
> > > > > On Wednesday 24 September 2003 04:51 am, you wrote:
> > > > > > Thanks for the help, I'v configured ssh, but there seems to be
some
> > > > > > problem with particular port. Thanx anyway
> > > > > >
> > > > > > Nitin
> > > &g

Re: [PHP] str_pad

2003-09-26 Thread Nitin
of course, you can specify the optional argument STR_PAD_LEFT like:

$dbranch = str_pad($line->dbranch_no, 6, '', STR_PAD_LEFT);

Enjoy,
Nitin


- Original Message - 
From: "Chris Grigor" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Friday, September 26, 2003 4:49 PM
Subject: [PHP] str_pad


This should be quite an easy task for some...

say for example $line->dbranch has a value of 3
I know that 3 spaces will be added on to the end of $dbranch


$dbranch = str_pad($line->dbranch_no, 6);

so the value of $dbranch should look like "3 "

Is there anyway to right justify the 3 using str_pad .. example still put
the 3 spaces in but at the beginning???
so it looks like " 3"


Chris

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



Re: [PHP] str_pad

2003-09-26 Thread Nitin
It gives

dbranch_no field in
$line array

"$line->dbranch_no" replaces the value of 'dbranch_no' field stored in
'$line' array.

Enjoy
Nitin

- Original Message - 
From: "Jeff McKeon" <[EMAIL PROTECTED]>
To: "Nitin" <[EMAIL PROTECTED]>; "Chris Grigor"
<[EMAIL PROTECTED]>; "php" <[EMAIL PROTECTED]>
Sent: Friday, September 26, 2003 8:30 PM
Subject: RE: [PHP] str_pad


> Just learning PHP and figuring out all the syntax and stuff.  Anyway I
> had a question about the code example in this post...
>
> What does the "->" do in:
>
> $dbranch = str_pad($line->dbranch_no, 6, '', STR_PAD_LEFT);
>
> Is dbranch_no a "class" I don't know about?
>
> Thanks,
>
> Jeff
>
>
> > -Original Message-
> > From: Nitin [mailto:[EMAIL PROTECTED]
> > Sent: Friday, September 26, 2003 8:05 AM
> > To: Chris Grigor; php
> > Subject: Re: [PHP] str_pad
> >
> >
> > of course, you can specify the optional argument STR_PAD_LEFT like:
> >
> > $dbranch = str_pad($line->dbranch_no, 6, '', STR_PAD_LEFT);
> >
> > Enjoy,
> > Nitin
> >
> >
> > - Original Message - 
> > From: "Chris Grigor" <[EMAIL PROTECTED]>
> > To: "php" <[EMAIL PROTECTED]>
> > Sent: Friday, September 26, 2003 4:49 PM
> > Subject: [PHP] str_pad
> >
> >
> > This should be quite an easy task for some...
> >
> > say for example $line->dbranch has a value of 3
> > I know that 3 spaces will be added on to the end of $dbranch
> >
> >
> > $dbranch = str_pad($line->dbranch_no, 6);
> >
> > so the value of $dbranch should look like "3 "
> >
> > Is there anyway to right justify the 3 using str_pad ..
> > example still put the 3 spaces in but at the beginning???
> > so it looks like " 3"
> >
> >
> > Chris
> >
> > -- 
> > 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] Submit button

2003-09-28 Thread Nitin
You can always use:



Try it and enjoy
Nitin

Re: [PHP] Submit button

2003-09-29 Thread Nitin
Never mind, but could you state the reason?

Nitin


- Original Message - 
From: "Chris Shiflett" <[EMAIL PROTECTED]>
To: "Nitin" <[EMAIL PROTECTED]>; "Karina S" <[EMAIL PROTECTED]>
Cc: "PHP-General" <[EMAIL PROTECTED]>
Sent: Monday, September 29, 2003 3:34 AM
Subject: Re: [PHP] Submit button


> --- Nitin <[EMAIL PROTECTED]> wrote:
> > 
> 
> This is a great example of what not to do.
> 
> Use  
> Chris
> 

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



Re: [PHP] Changing users in php script

2003-10-03 Thread Nitin
You can use 'sudoers' for the purpose, that way you'll be able to give just
that permission to the user of your choice. then you can connect as that
user through 'exec' or 'system' and can execute that comand.

For more information check out:
http://www.courtesan.com/sudo/intro.html

Enjoy
Nitin


- Original Message - 
From: "esctoday.com | Wouter van Vliet" <[EMAIL PROTECTED]>
To: "'John Nichel'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, October 03, 2003 4:58 AM
Subject: RE: [PHP] Changing users in php script


> I don't have much experience in it myself but I've seen it working ..
Where
> you should be looking is not really PHP but more the Apache "suexec"
> wrapper/module. You can then specify a user and group in your VirtualHost
> section.
>
> Wouter
>
> -Original Message-
> From: John Nichel [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 02, 2003 3:09 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Changing users in php script
>
> I know php runs under the same user/group as the webserver for web based
> applications, but is there a way to change to another user?  All the
> recent talk about exec got me thinking that I could set something up to
> automatically create user mailboxes under qmail + vmailmgr.  I normall
> do this via the command line by running 'vadduser' while I'm su'ed to
> the owner of the virtual host.  So basically, to do this via php, I
> would need to su to the owner of the vhost inside of the script, run the
> command, and exit out of the su.  Can this be done?
>
> -- 
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.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] How to read remote files

2003-10-03 Thread Nitin
Hi all,

I'm having a problem, hope to get some suggestios on the same.
Here it goes:

I've an application where I need to read an html file stored on user's pc through my 
PHP script and send an email to specified addresses. 

Problem is how to read a file on user's pc as I cann't allow them to upload any file 
to my server. My script will also detect any pictures attached and embed those to the 
message. 

Any suggestions are most welcome. Thanx in advance.

Nitin

Re: [PHP] How to read remote files

2003-10-03 Thread Nitin
it's not about user's security, cauz, of course, user'll have to specify the
page.

- Original Message - 
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Nitin" <[EMAIL PROTECTED]>
Cc: "PHP-General" <[EMAIL PROTECTED]>
Sent: Friday, October 03, 2003 4:33 PM
Subject: Re: [PHP] How to read remote files


> Nitin wrote:
>
> > I'm having a problem, hope to get some suggestios on the same.
> > Here it goes:
> >
> > I've an application where I need to read an html file stored on user's
pc through my PHP script and send an email to specified addresses.
> >
> > Problem is how to read a file on user's pc as I cann't allow them to
upload any file to my server. My script will also detect any pictures
attached and embed those to the message.
>
> Ummm... NO. You can't just read a file on a user's computer. There is
> such a thing as security for most of us. :)
>
> The user needs to upload it, ftp it, or run their own server to give you
> access to it.
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com
>
>
>
>

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



Re: [PHP] How to read remote files

2003-10-03 Thread Nitin
yea, it's on my network only
the only thing is server is on linux n behind the firewall, while clients r
on windows n linux too
please let me know, if that's possible, as i'll of course know the path as
uer will have to specify it to read the file

n thanks to all of u for ur support
Nitin

- Original Message - 
From: "Jay Blanchard" <[EMAIL PROTECTED]>
To: "Burhan Khalid" <[EMAIL PROTECTED]>; "Nitin"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, October 03, 2003 5:43 PM
Subject: RE: [PHP] How to read remote files


> [snip]
> Nitin wrote:
>
> > it's not about user's security, cauz, of course, user'll have to
> specify the
> > page.
> >
>
> Nitin, what you want is a form uploader script. If you have fantasies
> about being able to read a file on a user's computer just because they
> tell you the location ... time to wake up.
> [/snip]
>
> Agreed, with one minor point.
>
> If the users are on a network this would be possible, you would just
> need to know the path to the file in question. There are several
> hot-button issues with this, but we have found seveal ways to work and
> play nicely together.
>
> -- 
> 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] ps command in php

2003-10-06 Thread Nitin
your question has already been answered:

use:

echo " $ps ";
It should definitely help

Nitin

- Original Message - 
From: "Michael P. Carel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 06, 2003 12:51 PM
Subject: Re: [PHP] ps command in php


> I'm doing like this:
>  $ps = (passthru("ps -ef));
>
> echo $ps;
>
> my output is something like this:
> UID PID PPID C STIME TTY TIME CMD root 1 0 0 Sep19 ? 00:00:04 init [3]
root
> 2 1 0 Sep19 ? 00:00:00 [kflushd] root 3 1 0 Sep19 ? 00:00:09 [kupdate]
root
> 4 1 0 Sep19 ? 00:00:00 [kpiod] root 5 1 0 Sep19 ? 00:00:04 [kswapd] root 6
1
> 0 Sep19 ? 00:00:00 [mdrecoveryd] bin 404 1 0 Sep19 ? 00:00:00 [portmap]
root
> 429 1 0 Sep19 ? 00:03:33 syslogd -m 0 root 438 1 0 Sep19 ? 00:00:01 klogd
> nobody 452 1 0 Sep19 ? 00:00:00 identd -e -o nobody 454 452 0 Sep19 ?
> 00:00:00 identd -e -o nobody 457 454 0 Sep19 ? 00:00:00 identd -e -o
nobody
> 458 454 0 Sep19 ? 00:00:00 identd -e -o nobody 459 454 0 Sep19 ? 00:00:00
> identd -e -o daemon 470 1 0 Sep19 ? 00:00:00 /usr/sbin/atd root 484 1 0
> Sep19 ? 00:00:01 crond root 502 1 0 Sep19 ? 00:00:00 inetd root 539 1 0
>
> What  i want is to format it just like what  it seen in the console:
>
> UIDPID  PPID  C STIME TTY  TIME CMD
> root 1 0  0 Sep19 ?00:00:04 init [3]
> root 2 1  0 Sep19 ?00:00:00 [kflushd]
> root 3 1  0 Sep19 ?00:00:09 [kupdate]
> root 4 1  0 Sep19 ?00:00:00 [kpiod]
> root 5 1  0 Sep19 ?00:00:04 [kswapd]
>
> any idea?
>
>
>
>
> > >I'm trying to have the output of the "ps -ef" command in Linux to my
> > >browser. Can anyone help how to properly have the output in proper
> > >format. I've used the passthru() function but the output is scrambled.
> >
> > What do you mean by 'scrambled'? The following works for me:
> > echo '', `ps -ef`, '';
> >
> > -
> > michal migurski- contact info and pgp key:
> > sf/cahttp://mike.teczno.com/contact.html
>
> -- 
> 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] How to upload files

2003-10-06 Thread Nitin
Hi all,

I'm looking for a method to enable my users to upload thier html files and embedded 
pictures to my server. I think it should be something very easy, but as I'm doing it 
for the first time, I thought it would be better to seek help from the experienced 
one. So any idea, how can I do it easly and safely and what are the precautions I 
should take to check the files for valid HTML and pic files, so that they cann't 
upload any thing destructive. Any help or suggestions will be highly appreciated.

Thanks in advance
Nitin

Re: [PHP] killing server process online

2003-10-08 Thread Nitin
for that u need to connect to your server as the owner of that server
process or 'root'. to do this you may want to look at the idea of sudo. but
remember, it's only as secure as you make it. you need to know, what exactly
are you doing with sudo.

Enjoy
Nitin

- Original Message - 
From: "Michael P. Carel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 08, 2003 10:13 AM
Subject: Re: [PHP] killing server process online


> yes i'm running this in a web server, is there any thing  i can for this.
I
> want to kill a server process in a web browser.
>
>
> > I'm guessing you're attempting to run this from the web server (hence
> > the  tags). Probably the web server doesn't own the process your
> > attempting to kill.
> >
> > Cheers,
> > Rob.
> >
> > On Tue, 2003-10-07 at 23:09, Michael P. Carel wrote:
> > > Hi to all,
> > >
> > > I'm trying to create a script that will kill a server process via PID,
> but
> > > as i run the script it doesnt kill the process . And  yet I want to
add
> some
> > > error mesage.
> > >
> > > Here's my sample script:
> > >  <?
> > > function killprocess($id){
> > >  system('kill'. escapeshellarg($id), $killret);
> > > if ($killret=="0"){
> > >//echo success message
> > >?><SCRIPT>alert("Process Killed") > >   }elseif ($killret != "0"){
> > >//echo error message
> > > ?>alert("Kill Error: <?  echo $this->kp;  ?>") > >   }
> > >  }
> > > ?>
> > > Is there something wrong with it? Please help and thanks in advance.
> > >
> > >
> > >
> > > mike
> > >
> > > -- 
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > -- 
> > ..
> > | InterJinn Application Framework - http://www.interjinn.com |
> > ::
> > | An application and templating framework for PHP. Boasting  |
> > | a powerful, scalable system for accessing system services  |
> > | such as forms, properties, sessions, and caches. InterJinn |
> > | also provides an extremely flexible architecture for   |
> > | creating re-usable components quickly and easily.  |
> > `'
>
> -- 
> 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] Max no of recipients in To field of mail function

2003-10-15 Thread Nitin
why cant you use loop for that?

Nitin

- Original Message - 
From: "Binay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2003 4:27 PM
Subject: [PHP] Max no of recipients in To field of mail function


Hi all!

i need to email out newsletter to say 1000 recipients. I want to know what
is the maximum number of recipients i can specify in the 'To' field of mail
function? Is there any restrictions on To field as in the number of
charcters or something??

If you know a better way of sending the large number of mails (1000 or more)
please let me know.

Thanks in advance

Binay

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



Re: [PHP] Max no of recipients in To field of mail function

2003-10-15 Thread Nitin

- Original Message - 
From: "Nitin" <[EMAIL PROTECTED]>
To: "Binay" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2003 4:38 PM
Subject: Re: [PHP] Max no of recipients in To field of mail function


> why cant you use loop for that?
>

That will even allow you to bypass spam filters
> Nitin
>
> - Original Message - 
> From: "Binay" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 15, 2003 4:27 PM
> Subject: [PHP] Max no of recipients in To field of mail function
>
>
> Hi all!
>
> i need to email out newsletter to say 1000 recipients. I want to know what
> is the maximum number of recipients i can specify in the 'To' field of
mail
> function? Is there any restrictions on To field as in the number of
> charcters or something??
>
> If you know a better way of sending the large number of mails (1000 or
more)
> please let me know.
>
> Thanks in advance
>
> Binay
>
> -- 
> 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] Max no of recipients in To field of mail function

2003-10-15 Thread Nitin
It'll definitely put some load on your server, but then it's the best way
and loops are made for these purposes. Though, if all your e-mail receivers
dont mind seeing their name in a long list or they allow spam mails into
their mail boxes, you can use these names directly into to field.

Nitin

- Original Message - 
From: "Binay" <[EMAIL PROTECTED]>
To: "Nitin" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2003 4:42 PM
Subject: Re: [PHP] Max no of recipients in To field of mail function


> Hi Nitin
> Thanks for replying so fast
>
> Don't you think that using loop for each recipient will put lot of
> load/overhead on the server compare to putting all recepients in To field?
>
> Binay
>
> - Original Message -
> From: "Nitin" <[EMAIL PROTECTED]>
> To: "Binay" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, October 15, 2003 4:41 PM
> Subject: Re: [PHP] Max no of recipients in To field of mail function
>
>
> >
> > - Original Message -
> > From: "Nitin" <[EMAIL PROTECTED]>
> > To: "Binay" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Wednesday, October 15, 2003 4:38 PM
> > Subject: Re: [PHP] Max no of recipients in To field of mail function
> >
> >
> > > why cant you use loop for that?
> > >
> >
> > That will even allow you to bypass spam filters
> > > Nitin
> > >
> > > - Original Message -
> > > From: "Binay" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, October 15, 2003 4:27 PM
> > > Subject: [PHP] Max no of recipients in To field of mail function
> > >
> > >
> > > Hi all!
> > >
> > > i need to email out newsletter to say 1000 recipients. I want to know
> what
> > > is the maximum number of recipients i can specify in the 'To' field of
> > mail
> > > function? Is there any restrictions on To field as in the number of
> > > charcters or something??
> > >
> > > If you know a better way of sending the large number of mails (1000 or
> > more)
> > > please let me know.
> > >
> > > Thanks in advance
> > >
> > > Binay
> > >
> > > --
> > > 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] Max no of recipients in To field of mail function

2003-10-15 Thread Nitin
none

- Original Message - 
From: "Binay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2003 4:17 PM
Subject: [PHP] Max no of recipients in To field of mail function


Hi all!

i need to email out newsletter to say 1000 recipients. I want to know what
is the maximum number of recipients i can specify in the 'To' field of mail
function? Is there any restrictions on To field as in the number of
charcters or something??

If you know a better way of sending the large number of mails (1000 or more)
please let me know.

Thanks in advance

Binay

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



Re: [PHP] Help with file upload

2003-10-16 Thread Nitin

- Original Message - 
From: "Bunmi Akinmboni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 16, 2003 1:33 PM
Subject: [PHP] Help with file upload


> This is the new code:
>  if (is_uploaded_file($_FILES['ufile1']['tmp_name'])) {
>  copy($_FILES['ufile1']['tmp_name'], ".");

i guess, actual problem is something like::

>  copy($_FILES['ufile1']['tmp_name'], ".");

while it should be

>  copy($_FILES['ufile1']['tmp_name'], "./");

hope it helps


> echo "$ufile1_name ";
> echo "DONE";
> echo " ";
> print_r($_FILES);
> } else {
>  echo "Possible file upload attack. Filename: " .
> $_FILES['ufile1']['name'];
> echo " ";
> print_r($_FILES);
> }
> ?>
>
> Bunmi
>
> Bunmi Akinmboni wrote:
>
> > Thanks John,
> > I had done it before and still tried it again now. This is what I get:
> >
> > Warning: copy(.): failed to open stream: Is a directory in
> > /home/ayserve/public_html/fu/fuprocess.php on line 6
> > ayservenet.jpg DONE Array ( [ufile1] => Array ( [name] => ayservenet.jpg
> > [type] => image/pjpeg [tmp_name] => /tmp/php1tARiu [error] => 0 [size]
> > => 3030 ) )
> >
> > Bunmi
> >
> > John W. Holmes wrote:
> >
> >> Bunmi Akinmboni wrote:
> >>
> >>> Pls Help.
> >>> I have done a lot of reading prior to this yet I just can't seem make
> >>> it work. I wrote an upload program as seen below but the response I
> >>> got was:
> >>>
> >>> Possible file upload attack. Filename: ayservenet.jpg Array (
> >>> [ufile1] => Array ( [name] => ayservenet.jpg [type] => image/pjpeg
> >>> [tmp_name] => /tmp/phpIMEhdh [error] => 0 [size] => 3030 ) )
> >>
> >>
> >> [snip]
> >>
> >>> if (is_uploaded_file($_FILES['ufile1']['name'])) {
> >>> copy($_FILES['ufile1']['name'], ".");
> >>> echo "$ufile1_name ";
> >>> echo "DONE";
> >>> echo " ";
> >>> print_r($_FILES);
> >>> } else {
> >>> echo "Possible file upload attack. Filename: " .
> >>> $_FILES['ufile1']['name'];
> >>> echo " ";
> >>> print_r($_FILES);
> >>> }
> >>> ?>
> >>
> >>
> >>
> >> You should pass $_FILES['ufile1']['tmp_name'] to is_uploaded_file().
> >>
>
>
> -- 
> 'Bunmi Akinmboni
> 5, Aibu Street, Off Bode Thomas Street,
> P.O. Box 6235, Surulere, Lagos, NIGERIA.
> Tel: (234) 1-813-3335
> Fax: (234) 1-583-2585 (Nigeria Only)
> Fax: 1 (309) 285-2383 (International)
> Email: [EMAIL PROTECTED]
> Web site: http://www.budelak.com
>http://www.ayserve.net
>
> Web Design, Web Hosting, Domain Registration, ICT Consultancy,
> Networking, Internet, eCommerce, System Integrator
> ===
>
> -- 
> 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] Passing values dynamically

2003-10-17 Thread Nitin
i guess, it would be better to use loops, if i understand your problem, the
way it is.

Nitin
- Original Message - 
From: "Rashini Jayasinghe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 17, 2003 3:12 PM
Subject: [PHP] Passing values dynamically


> Hi,
>
> I am getting a one column table as a result for a select statement. Now I
> want to pass obtained values dynamically to invoke another query in a new
> page. I tried to pass the values with sessions. But every time I get the
> last value of the previous result.
> Any suggestions as how I could pass the value that I click on the current
> page ? (One of the row values in the one column table I got as the
previous
> result)
>
> Thank You.
>
> Rashini
>
>
>
> -- 
> 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] How can i print out the files in a directory?

2003-10-17 Thread Nitin
you can use simply

exec("ls -l 2>&1;", $output)   : if on linux OR
exec("dir  2>&1;", $output)    : if on windows

Enjoy
Nitin

- Original Message - 
From: "Craig Lonsbury" <[EMAIL PROTECTED]>
To: "Bas" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, October 17, 2003 8:40 PM
Subject: RE: [PHP] How can i print out the files in a directory?


> This has been working for me...
> just pass the function the path to the directory you
> want the listing for.
> 
> function getDirFiles($dirPath){ 
>if ($handle = opendir($dirPath))  {
>   while (false !== ($file = readdir($handle))) {
>if ($file != "." && $file != "..") {
>   $filesArr[] = trim($file);
>} 
>   }   
> closedir($handle);
>}  
>return $filesArr; 
> } 
> 
> hth,
> Craig
> 
> -Original Message-
> From: Bas [mailto:[EMAIL PROTECTED]
> Sent: October 17, 2003 6:42 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How can i print out the files in a directory?
> 
> 
> How can i print out all of the files in a directory?
> 
> I want some output as this:
> 
> index.php
> login.php
> image1.gif
> image2.jpg
> 
> 
> 
> -- 
> 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] Menu populated based on previous menu

2003-10-28 Thread Nitin
I've solved same kind of problems with the help of HTML frames, if you are
interested, drop me a mail, or if you find better option, please let me
know.

Nitin


- Original Message - 
From: "Robb Kerr" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 28, 2003 9:15 PM
Subject: [PHP] Menu populated based on previous menu


> Searched all the sites I could find for this problem to no avail. I have
> two dropdown menus in a form. The first menu contains a list of
> MANUFACTURERS obtained from a database. The second contains a list of
> MODELS also obtained from the database. I want the second menu to be
> populated based upon the selection in the first. In other words, once a
> visitor has selected a MANUFACTURER they'll be presented with a list of
> MODELS that are available from the selected MANUFACTURER.
>
> I know how to do the queries, but don't know how to initiate the query and
> rebuild the second menu when the first selection is made without adding a
> SUBMIT button and loading a second page.
>
> Anyone know how to accomplish this? Thanx in advance.
> -- 
> Robb Kerr
> Digital IGUANA
> Helping Digital Artists Achieve their Dreams
> http://www.digitaliguana.com
> http://www.cancerreallysucks.org
>
> -- 
> 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] the function of the "@" symbol?

2003-11-04 Thread Nitin
it basically means, shutup please.

- Original Message - 
From: "Leevy, Joffrey L" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, November 04, 2003 1:12 PM
Subject: [PHP] the function of the "@" symbol?


> Hi all: 
> 
> I have been searching through several books to find out what the "@" 
> character represents. 
> 
> An example used in code: 
> 
> if (@$first == "no"). 
> 
> Could anyone please explain the function of "@" in the code? 
> 
> Thanks 
> 
> -- 
> 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] BRU Help

2003-11-08 Thread Nitin
Hi all,

I'm sorry, I know this is not the list, to ask this question, but I couldn't find the 
right one.

I'm having trouble with BRU. I'm running it for quite a time but it has started 
throwing errors. Main problem is, though there's plenty of free space on my tape 
media, it says,

Insert vol 2 and press enter
Insert vol 3 and press enter
...

Dont know, what to do. I googled on it, but no specific answer. If you have a solution 
or direct me to some helpful info, I'll be very gratefull. It's really important, so 
sorry again for querying at wrong place.

Regards
Nitin

[PHP] Calling PHP functions from within javascript

2003-11-12 Thread Nitin
Hi all,

can anybody tell me how to call PHP functions from within javascript, as I want my PHP 
function to be interactive. I need to call the function written in the same page, with 
the values selected by the user

Thanx in advance

Nitin


Re: [PHP] Calling PHP functions from within javascript

2003-11-13 Thread Nitin
First thing is, it's possible, i've done it in the past myself, it's just
not working due to some reason. Second, functioning cann't be achieved with
javascript, cauz it's DB related.

anyway thanx for ur reply
Nitin

- Original Message - 
From: "Jake McHenry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 13, 2003 12:16 PM
Subject: RE: [PHP] Calling PHP functions from within javascript


> > -Original Message-
> > From: Nitin [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, November 13, 2003 1:35 AM
> > To: PHP-General
> > Subject: [PHP] Calling PHP functions from within javascript
> >
> >
> > Hi all,
> >
> > can anybody tell me how to call PHP functions from within
> > javascript, as I want my PHP function to be interactive. I
> > need to call the function written in the same page, with the
> > values selected by the user
> >
> > Thanx in advance
> >
> > Nitin
> >
>
> Someone correct me if I'm wrong, but this isn't possible unless you
> have your javascript continuously refreshing the page, and changing
> the url, or posting data. PHP is server side, so the only way for php
> script to be executed is when the page loads. It might be more
> productive if you create the functions you want executed in javascript
> instead of php.
>
>
>
> Thanks,
>
> Jake McHenry
> Nittany Travel MIS Coordinator
> http://www.nittanytravel.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] how to retrieve data from a web page

2003-11-27 Thread Nitin
hi all,

I've a situation, where i want to supply some data to my script, which is dynamic and 
is available on a web page. How can i fetch that particular data from a page, if 
there's a way...

Thanx in advance.

Nitin

Re: [PHP] how to retrieve data from a web page [solved]

2003-11-27 Thread Nitin
Thanx all
problem is solved now.

Thank you very much for ur help
Nitin

- Original Message - 
From: "Sophie Mattoug" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 27, 2003 7:04 PM
Subject: Re: [PHP] how to retrieve data from a web page


> See these pages www.php.net/fopen and www.php.net/file
> good luck!
>
> Nitin wrote:
>
> >hi all,
> >
> >I've a situation, where i want to supply some data to my script, which is
dynamic and is available on a web page. How can i fetch that particular data
from a page, if there's a way...
> >
> >Thanx in advance.
> >
> >Nitin
> >
> >
>
> -- 
> 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] Generate automatic list of dates

2003-12-02 Thread Nitin

- Original Message - 
From: "Tommi Virtanen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 02, 2003 2:27 PM
Subject: [PHP] Generate automatic list of dates


> Hi!
> 
> $first_date = 2003-12-01
> $end_date = 2004-01-15
> 
> 
> while ( $first_date <= $end_date) {
> 
> $sql = "INSERT INTO time_table (id, date, person_id) VALUES 
> (35,$first_date,0)";
> $result = mysql_query($sql, $conn);
> 
> [next date] WHAT CODE TO HERE

 $str = explode("-", "$first_date");
 $tst = mktime (0, 0, 0, $str[1], $str[2] +1, $str[0]);
 $first_date = strftime ("%G-%m-%d", $tst);

should do.

> 
> }
> 
> eg.
> 
> first insert row is 35, 2003-12-01,0
> next should be 35,2003-12-02,0 etc
> ...
> and last 35,2004-01-15,0
> 
> -- 
> 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] Generate automatic list of dates

2003-12-02 Thread Nitin

- Original Message - 
From: "Nitin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Tommi Virtanen" <[EMAIL PROTECTED]>
Sent: Tuesday, December 02, 2003 3:12 PM
Subject: Re: [PHP] Generate automatic list of dates


> 
> - Original Message - 
> From: "Tommi Virtanen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, December 02, 2003 2:27 PM
> Subject: [PHP] Generate automatic list of dates
> 
> 
> > Hi!
> > 
> > $first_date = 2003-12-01
> > $end_date = 2004-01-15
> > 
> > 
> > while ( $first_date <= $end_date) {
> > 
> > $sql = "INSERT INTO time_table (id, date, person_id) VALUES 
> > (35,$first_date,0)";
> > $result = mysql_query($sql, $conn);
> > 
> > [next date] WHAT CODE TO HERE
> 
>  $str = explode("-", "$first_date");
>  $tst = mktime (0, 0, 0, $str[1], $str[2] +1, $str[0]);
>  $first_date = strftime ("%G-%m-%d", $tst);

use 
$first_date = strftime ("%Y-%m-%d", $tst);
instead...


> 
> should do.
> 
> > 
> > }
> > 
> > eg.
> > 
> > first insert row is 35, 2003-12-01,0
> > next should be 35,2003-12-02,0 etc
> > ...
> > and last 35,2004-01-15,0
> > 
> > -- 
> > 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] goto label

2003-12-08 Thread Nitin
Hi all,

I was wondering, if there's any way to achieve 'goto "label":' using PHP

Thanx for ur time

Nitin

[PHP] developing website in hindi language

2003-12-08 Thread Nitin
Hi all,

Can anybody plz help me, setting up mysql and php, so that I can save and show the 
data in Hindi language.

I'm using PHP 4.2.x and mysql 4.0.14 on RedHat Linux 7.3

Thanx in advance
Nitin

[PHP] form variables

2003-12-19 Thread Nitin
hi all,

i've an application, where i'm receiving variables from an html form and process them 
in the script. depending on the values, i may want to get some extra information from 
user through another form. now, problem is how can i keep the vaiables received from 
the first form, without passing them as query string to the next script or specifying 
as hidden form fields.

i'll really appreciate a quick help. thanx in advance
Nitin

Re: [PHP] form variables

2003-12-19 Thread Nitin
thanx for a quick reply and i'm sorry for it was so dumb qu

nitin
- Original Message - 
From: "Robert Cummings" <[EMAIL PROTECTED]>
To: "Nitin" <[EMAIL PROTECTED]>
Cc: "PHP-General" <[EMAIL PROTECTED]>
Sent: Saturday, December 20, 2003 11:59 AM
Subject: Re: [PHP] form variables


> On Sat, 2003-12-20 at 01:29, Nitin wrote:
> > hi all,
> >
> > i've an application, where i'm receiving variables from an html form and
process them in the script. depending on the values, i may want to get some
extra information from user through another form. now, problem is how can i
keep the vaiables received from the first form, without passing them as
query string to the next script or specifying as hidden form fields.
> >
> > i'll really appreciate a quick help. thanx in advance
>
> Sessions.
>
> Cheers,
> Rob.
> -- 
> ..
> | InterJinn Application Framework - http://www.interjinn.com |
> ::
> | An application and templating framework for PHP. Boasting  |
> | a powerful, scalable system for accessing system services  |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for   |
> | creating re-usable components quickly and easily.  |
> `'
>
> -- 
> 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] sessions problem

2003-12-20 Thread Nitin
hi all,

i'm just starting to use sessions.
i've a problem, 

i started session and assigned variables to $HTTP_SESSION_VARS
i can very well see these vars in my next script, but i need to get back to first 
script for some working, and strangely i dont find these vars there.

any help or suggestions

Nitin

[PHP] generating graphs

2004-06-05 Thread Nitin
Hi all,

Please help me in this. How can I generate bar charts etc with PHP?

Thanks in advance


Re: [PHP] generating graphs

2004-06-05 Thread Nitin
thanks for the help, but my PHP ver is 4.0.6...
Any other suggestions??

- Original Message - 
From: "Ryszard Hapka" <[EMAIL PROTECTED]>
To: "Nitin" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Saturday, June 05, 2004 6:11 PM
Subject: Re: [PHP] generating graphs


> Nitin wrote:
> 
> >Hi all,
> >
> >Please help me in this. How can I generate bar charts etc with PHP?
> >
> >Thanks in advance
> >
> >  
> >
> http://www.aditus.nu/jpgraph/

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



Re: [PHP] generating graphs

2004-06-06 Thread Nitin
At last I've decided to upgrade it.
Could you please tell me, which version is best candidate yet to upgrade to?
And the procedure to upgrade with tar..

Thanks in advance


"Thomas Seifert" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sat, 5 Jun 2004 19:31:34 +0530 [EMAIL PROTECTED] (Nitin) wrote:
>
> > thanks for the help, but my PHP ver is 4.0.6...
> > Any other suggestions??
> >
>
> hmm, upgrade? :)
>
> really, its worth it!
>
>
> thomas
>
> -- 
> 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] problem with crypt

2004-07-05 Thread Nitin
Hi all,

I'm using PHP function crypt() to encrypt the password while updating the password for 
user's email accounts.
It was running fine on PHP 4.0.6, but since I updated to PHP 4.1.2, it's giving me 
problems. No errors, nothing, password is updated but to unknown value. 

Is this some kind of bug of crypt() function or what else it could be? Scripts are 
same.

Please help as soon as possible.
Thanks in advance

Re: [PHP] problem with crypt

2004-07-05 Thread Nitin
unknown value means, i cannot validate the user again. Password value is
unrecognized, or maybe something randomly generated.


- Original Message - 
From: "zareef ahmed" <[EMAIL PROTECTED]>
To: "Nitin" <[EMAIL PROTECTED]>; "PHP List"
<[EMAIL PROTECTED]>
Sent: Monday, July 05, 2004 1:25 PM
Subject: Re: [PHP] problem with crypt


> --- Nitin <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I'm using PHP function crypt() to encrypt the
> > password while updating the password for user's
> > email accounts.
> > It was running fine on PHP 4.0.6, but since I
> > updated to PHP 4.1.2, it's giving me problems. No
> > errors, nothing, password is updated but to unknown
> > value.
>
> what do you mean by unknown value.
> is it string "unknown value"??? or something else you
> can not recognise.
> It should not be a problem as long as you are able to
> validate it.
>
> zareef ahmed
>
> >
> > Is this some kind of bug of crypt() function or what
> > else it could be? Scripts are same.
> >
> > Please help as soon as possible.
> > Thanks in advance
>
>
> =
> Zareef Ahmed :: A PHP Developer in Delhi(India).
> Homepage :: http://www.zasaifi.com
>
>
>
> __
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
>
> -- 
> 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] INSERT into mysql from dynamic drop down

2004-01-07 Thread Nitin Mehta

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 07, 2004 12:07 PM
Subject: [PHP] INSERT into mysql from dynamic drop down


>
> Hi all,
>
>Right now i would like to INSERT the values from a dynamic drop
down
> menu into mysql database but encountered some problem here. Values in the
drop
> down menu are retrieved from DB as follows:
>
> 
>
> 
> 
>
> $sql = mysql_query("SELECT DISTINCT tutor_name FROM tutor");
> while ($row = mysql_fetch_array($sql))
> {
>  print "" .$row["tutor_name"]. "";

change it to:
print "" .$row["tutor_name"].
"";

hope that helps

>  }
> $result = $db->query($sql);
>
> ?>
> 
>
> 
>
> --
-
>
> echo $_POST["tutor_name"];
>
> INSERT statement:
>
> $sql = "INSERT INTO class (class_code, tutor_name, edu_level,
timetable_day,
> timetable_time)
> VALUES
>
('$class_code','$tutor_name','$edu_level','$timetable_day','$timetable_time'
)";
>
> --
-
>
> I am trying to POST the values and then INSERT into DB but was not able to
do
> so(all other values eg. class_code, edu_level etc...was able to be
> INSERTED into DB but not "tutor_name". So, how do i insert values into DB
from
> a dynamic drop down and where have i gone wrong???Hope to get some help
real
> soon.=)
>
> All help are greatly appreciated. Thanks in advance.
>
>
> Regards,
> Irin.
>
> -- 
> 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] Very Simple one for u all :-)

2004-01-15 Thread Nitin Mehta
i dont c any shortcomings in the syntax, may b i'm sleepy myself
but isn't it working...


- Original Message - 
From: "Dave Carrera" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 12:53 PM
Subject: [PHP] Very Simple one for u all :-)


> Hi List,
>
> My brain needs a kick start this morning and I ask you this basic
question.
>
> How do I do a if statement asking if 1st var = a value OR 2nd var = value
>
> I have tried this
>
> If(($var == val) || ($var2 == val2)){
>
> Blah blah
> }
>
> I think this is a if var == val AND var2 == val2 then onwards but I need
OR,
> so one or the other.
>
> Sorry this is so basic but not had enough coffee to sort this out yet,
looks
> like a bad day for me ahead :-)
>
> Thank you in advance for any help.
>
> Dave C
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004
>
>
> -- 
> 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] securing php pages

2009-11-20 Thread nitin reddy
Hi I am a new user of PHP..in my project i have put login forms and i am
able to login successful but the pages after the login can be accessed
directly by typing the address so if any one can help in this matter.


Thank you,

-- 
Nitin


[PHP] Creating users and generating privileges for users

2009-11-20 Thread nitin reddy
Hey can one help me in creating different users using mysql for php and
assigning different privileges for them ..any sample code available?
-- 
PASULA NITIN REDDY
Graduate Student in Computer Science Department
University of Minnesota,Twin Cities
Minneapolis.


[PHP] Urgent Requirement - PHP Senior Developer / Seasoned Trainer

2013-07-15 Thread Nitin Sathawane
Dear All,

AIT Learning (American Institute of Technology) is passionate about
imparting hands on training (2 months boot camp) on PHP. We are expanding
and looking for brilliant and self driven PHP developers / trainers who are
passionate about teaching as us and have hunger to make an impact.

Compensation - 50-75 % increment on your current pay stub plus bonus. Our
philosophy is to reward deserving employees.

Role - Based on your experience and interview panel feedback you will be
hired as Principal Trainer or Associate Trainer.

Responsibilities -  In short - need to ensure that candidates who are
enrolled for training can develop website of their own after the training
is complete. We will be placing them with our Clients on Day 1.

If interested, please contact Sach at 240 672 7654 or reply back to this
email.

Regards
Nitin


[PHP] su idn't working from within php

2004-01-27 Thread Nitin Mehta
hi all

i was trying to execute some commands as an authorized user from within my php script 
with

exec ("su  -c \"sudo \" 2>&1;", $output);

but it gives me 

standard in must be a tty

how can i make it work? it runs perfectly at command prompt

I even tried to ssh, but the problem is where should i copy the rsa-key generated with 
keygen, as the scripts are run as apache/http user..

Plz help me out of this

Thanx in advance
Nitin

Re: [PHP] su idn't working from within php

2004-01-27 Thread Nitin Mehta
but how would i store keys for apache?

- Original Message - 
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
To: "Nitin Mehta" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, January 27, 2004 4:03 PM
Subject: Re: [PHP] su idn't working from within php


> Why do you need su? Set up sudo for apache user.
>
> Nitin Mehta wrote:
> > hi all
> >
> > i was trying to execute some commands as an authorized user from within
my php script with
> >
> > exec ("su  -c \"sudo \" 2>&1;", $output);
> >
> > but it gives me
> >
> > standard in must be a tty
> >
> > how can i make it work? it runs perfectly at command prompt
> >
> > I even tried to ssh, but the problem is where should i copy the rsa-key
generated with keygen, as the scripts are run as apache/http user..
> >
> > Plz help me out of this
> >
> > Thanx in advance
> > Nitin
>
> -- 
> 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] Error

2004-02-20 Thread Nitin Mehta
May be the cause is, that you've specified some include file with
include('somefile');

but the file doesn't exist in /usr/share/php dir, which is the default path
for include (.inc) files to be saved.

Hope that helps
Nitin

- Original Message - 
From: "John Nichel" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Saturday, February 21, 2004 10:54 AM
Subject: Re: [PHP] Error


> Please don't reply directly to me (or other members of the list) unless
> asked to do so.  When you reply off-list, the messages do not get
> archived, and will not be searchable to those who may encounter the same
> problem.  Also, please don't post HTML formatted / multi-part messages.
>   Plain text is better for everyone.
>
> Tim Trimble wrote:
> 
> > This is the page I want to open, it is the admin program for php.  Right
> > now it is set to
> > low security "config"
> > http://web.dsde.net/phpadmin/index.php
>
> It does us no good to see the output of this.  We need to see the code
> which is causing the error.  Post the code contained within 'index.php'
>
> > The directory it's in is under the apache doc directory
> > '/var/www/html/phpadmin/index.php'
>
> What are the permissions on the directory and the file?  Can your
> webserver (which is probably running as nobody/nobody) read both the
> directory and the file?
>
> -- 
> By-Tor.com
> It's all about the Rush
> http://www.by-tor.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



Re: [PHP] HELP PLEASE!

2004-02-20 Thread Nitin Mehta
look at the html code, this is no problem related to php, but the HTML.

Hope that helps
Nitin

- Original Message - 
From: "3mip1s4la/Nath/Pisanty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 21, 2004 7:24 AM
Subject: [PHP] HELP PLEASE!


> this is my first post, so please bear with me.
> 
> I'm developing a Mayan Oracle based on PHP and MySQL. the program and
> database work perfectly, and do all I want them to. however, the thing
> has a graphical interface that I built using Macromedia Fireworks and
> Dreamweaver, with some images chaning along with other things, and
> this is the part that's faulty.
> 
> the program checks whether a form has been filled. if not, it displays
> the form. if it has, it then validates, and on a false shows the form
> again. on a true, it does lots of processing and MySQL checking, and
> then shows the output page.
> 
> both form pages along with the output page are included as different
> files to facilitate graphical edition. all the snippets of actual
> human language are included in another external file, to facilitate
> addition of languages.
> 
> the form pages are both one page, form.php, which distinguishes
> between first and second filling in case of invalid data. the output
> page is called canvas.php, and right now I have canvas.php as
> completely static, and canvas2.php with all the coding needed to
> display properly. the main program, 01.php, does not send the client
> any code in itself (just the included files in their entirety, alone).
> 
> THE PROBLEM: when I load the canvas.php page independently in
> Firefox/Mozilla/Netscape and Explorer it displays perfectly. the
> problem comes when I load this file through 01.php, and then it gets
> rumbled up. I've seen this on most computers with
> Firefox/Mozilla/netscape, and not on Explorer. what the hell? any hel
> would be welcome. 
> 
> I have http://200.39.201.43/hideout/project/final/01.php pointing to
> the static canvas.php and
> http://200.39.201.43/hideout/project/final/02.php pointing to the
> dynamic canvas2.php
> 
> if you can sort this out I'll be eternally grateful. I'll post the
> programs on request - they're quite large for mailing.
> 
> thanks in advance,
> 
> 3mip1s4la
> 
> The Official Dream Theater Site - http://www.dreamtheater.net/
> ___
> Get your own Web-based E-mail Service at http://www.zzn.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] Please dont request for receipts

2004-02-23 Thread Nitin Mehta
Dear All,

I hereby request you all; please dont attach the request for receipts when submitting 
any queries or solutions to the list.

It's hell of a task, to send or deny these requests, for someone like me, who's 
subscribed to a number of lists like this one and many others.

Regards
Nitin

Re: [PHP] I have a problem In Mail Function

2004-03-15 Thread Nitin Mehta
this is the safest method, according to me at least.

second thing is: yahoo will tackle it as a spam if it has many recepients in
to or cc or bcc

Hope it helps

Nitin

- Original Message - 
From: "Ali Ashrafzadeh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 15, 2004 7:07 PM
Subject: [PHP] I have a problem In Mail Function


Hi
In a web application I need to send mail for each members whith a different
content . mail message must be in HTML Format and 1256 code page
I call mail() functoin in a simple loop to send multiple mail message with
differrent content.

now I want know that is any body know better method to do it ??

but I have bigest problem when I send message to yahoo mail server ,yahoo
rout my message to bulk mail and I cant solve this problem please tell me if
you have know solution.

my send mail is come below:
function send_mail($to,$subject,$message){

  $headers  = "MIME-Version: 1.0\r\n";
  $headers .= "Content-type: text/html; charset=windows-1256\r\n";

  $headers .= "From: Me <[EMAIL PROTECTED]>\r\n";
  $headers .= "Return-path: Me <[EMAIL PROTECTED]>\r\n";
  $headers .= "Reply-To: Me <[EMAIL PROTECTED]>\r\n";
//  $headers .= "Bcc: $to \r\n";

  if (mail($to, $subject, $message, $headers))
print("$to Send Ok!");
  else
print("$to Send Problem!");
}

thanks

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



Re: [PHP] help with storing multiple values in session variables.

2004-03-15 Thread Nitin Mehta
Arer you using session_destroy(), where your script ends...

if it's not the case, try using cookies to destroy sessio after a period of
time.

Hope that helps..
Nitin

- Original Message - 
From: "Vimala S.P." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 15, 2004 5:25 PM
Subject: [PHP] help with storing multiple values in session variables.


>
> Hi,
>
> I have php configured to use sessions. I have a web-database
> application and have the following problem with sessions
>
>
> I fetch values from database and these values get passed
> across forms either with POST for submit opion OR GET with href.  Now i
> have problem passing unicode strings with href and GET. Embedding unicode
> values with get does not work out. I cannot use POST method here since  i
> navigate  with href. So i tried assiging the value to a SESSION variable.
> For the first time the application works, but if i refresh and try with a
> different href link, always the first assigned value only gets passed?
> What do i do to change the value of session variable in the same session?
>
> I cannot use global variables since, i have register globals off?
>
> Is there any way of passing unicode strings properly with href and get?
>
> I'm almost in completion where this problem croped? Any idea how to solve.
>
> -vimala/.
>
> -- 
> 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] how to reset PHP_AUTH vars

2004-04-03 Thread Nitin Mehta
Hello all,

I'm facing this problem and tried many solutions with no success. How do I reset the 
value of PHP_AUTH_USER and PW. 

I've tried session_destroy(), but as I'm not starting any session at all, it's not 
worth.

I've tried using random value to include in header.

Now what should I do? 

Thanx in adv for any suggestion/help
Nitin

Re: [PHP] how to reset PHP_AUTH vars

2004-04-03 Thread Nitin Mehta
Hello,

Thanks for your reply. but what I'm looking for is, yes logoff the user, but
not making him/her click some link. I've this page and I want it to ask for
username & password whenever a user comes/comes back. Any suggestions?

Thanks anyway
Nitin

- Original Message - 
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
To: "Nitin Mehta" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Saturday, April 03, 2004 3:54 PM
Subject: Re: [PHP] how to reset PHP_AUTH vars


> Nitin Mehta wrote:
> > Hello all,
> >
> > I'm facing this problem and tried many solutions with no success. How do
I reset the value of PHP_AUTH_USER and PW.
> >
> > I've tried session_destroy(), but as I'm not starting any session at
all, it's not worth.
> >
> > I've tried using random value to include in header.
> >
> > Now what should I do?
> >
> > Thanx in adv for any suggestion/help
> > Nitin
>
> Are you trying to logoff a user using http autheniation? Provide a
> logoff link in this form:
>
> http://nonexistentuser:[EMAIL PROTECTED]">Logoff
>
> This sets the login credentials in the browser to nonexisting user, so
> your code will return 401 response and the browser will ask the user for
> username and password again.
>
> I'm not sure if this method works in IE with the latest security patch
> installed. These should ignore username and password in links.
>

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



Re: [PHP] how to reset PHP_AUTH vars

2004-04-04 Thread Nitin Mehta
but it's not happening.

- Original Message - 
From: "Burhan Khalid" <[EMAIL PROTECTED]>
To: "Nitin Mehta" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, April 04, 2004 1:58 PM
Subject: Re: [PHP] how to reset PHP_AUTH vars


> Nitin Mehta wrote:
> > Hello,
> >
> > Thanks for your reply. but what I'm looking for is, yes logoff the user,
but
> > not making him/her click some link. I've this page and I want it to ask
for
> > username & password whenever a user comes/comes back. Any suggestions?
>
> I believe this is the default behavior, unless the user saves the
> credentials locally.
>

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