Re: [PHP] Re: mail() problems

2002-07-31 Thread dan radom

mailq's empty.  i'll try a real address and see if i get a bounce notice.

* Manuel Lemos ([EMAIL PROTECTED]) wrote:
> Hello,
> 
> On 07/31/2002 11:55 PM, Dan Radom wrote:
> >nope.  all that did was prodice the following warning... Jul 31 20:53:47 
> >mars sendmail[20790]: g712rkA20790: Authentication-Warning: 
> >mars.radom.org: nobody set sender to [EMAIL PROTECTED] using -f
> 
> Are you sure the message is not stuck in the mail queue for some reason? 
> Did you do mailq to see if it is still there?
> 
> If it isn't and it bounced it should have gone to that $email address. 
> If you set to [EMAIL PROTECTED], you will not see the bounced message and will 
> probably miss the reason why it bounced.
> 
> 
> 
> 
> 
> >* Manuel Lemos ([EMAIL PROTECTED]) wrote:
> >
> >>Hello,
> >>
> >>On 07/31/2002 10:47 PM, Dan Radom wrote:
> >>
> >>>I'm having provblems with the following script...
> >>>
> >>>mail("[EMAIL PROTECTED]", "www form submission", $message, "From: $email");
> >>>
> >>>...the variables are being POSTed from a form, which does make it to 
> >>>sendmail.  sendmail logs the following...
> >>>
> >>>Jul 31 19:32:47 mars sendmail[20605]: g711Wlu20605: from=nobody, 
> >>>size=81, class=0, nrcpts=0, 
> >>>msgid=<[EMAIL PROTECTED]>, relay=nobody@localhost
> >>>
> >>>
> >>>the nrcpts=0 is obviously a concern here.  This sendmail does handle 
> >>>mail for a few domains and does accept mail for localhost.  Any ideas 
> >>>where I've gone wrong?  All this was wokring with php 4.2.1 until a hard 
> >>>drive died.  I rebuild the machine and installed php 4.2.2 and this is 
> >>>where I'm at.  I'm using the same sendmail configuration.
> >>
> >>Try setting mail() 5th argument to "-f$email".
> 
> 
> -- 
> 
> Regards,
> Manuel Lemos
> 
> 
> -- 
> 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] Re: mail() problems

2002-07-31 Thread dan radom

nope.  all that did was prodice the following warning... Jul 31 20:53:47 mars 
sendmail[20790]: g712rkA20790: Authentication-Warning: mars.radom.org: nobody set 
sender to [EMAIL PROTECTED] using -f

dan

* Manuel Lemos ([EMAIL PROTECTED]) wrote:
> Hello,
> 
> On 07/31/2002 10:47 PM, Dan Radom wrote:
> >I'm having provblems with the following script...
> >
> >mail("[EMAIL PROTECTED]", "www form submission", $message, "From: $email");
> >
> >...the variables are being POSTed from a form, which does make it to 
> >sendmail.  sendmail logs the following...
> >
> >Jul 31 19:32:47 mars sendmail[20605]: g711Wlu20605: from=nobody, size=81, 
> >class=0, nrcpts=0, msgid=<[EMAIL PROTECTED]>, 
> >relay=nobody@localhost
> >
> >
> >the nrcpts=0 is obviously a concern here.  This sendmail does handle mail 
> >for a few domains and does accept mail for localhost.  Any ideas where 
> >I've gone wrong?  All this was wokring with php 4.2.1 until a hard drive 
> >died.  I rebuild the machine and installed php 4.2.2 and this is where I'm 
> >at.  I'm using the same sendmail configuration.
> 
> Try setting mail() 5th argument to "-f$email".
> 
> 
> -- 
> 
> Regards,
> Manuel Lemos
> 
> 
> -- 
> 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] mail() problems

2002-07-31 Thread dan radom

I'm having provblems with the following script...

mail("[EMAIL PROTECTED]", "www form submission", $message, "From: $email");

...the variables are being POSTed from a form, which does make it to sendmail.  
sendmail logs the following...

Jul 31 19:32:47 mars sendmail[20605]: g711Wlu20605: from=nobody, size=81, class=0, 
nrcpts=0, msgid=<[EMAIL PROTECTED]>, relay=nobody@localhost


the nrcpts=0 is obviously a concern here.  This sendmail does handle mail for a few 
domains and does accept mail for localhost.  Any ideas where I've gone wrong?  All 
this was wokring with php 4.2.1 until a hard drive died.  I rebuild the machine and 
installed php 4.2.2 and this is where I'm at.  I'm using the same sendmail 
configuration.

dan

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




Re: [PHP] eregi problems

2002-07-04 Thread dan radom

My main cnocern at this point is that the eregi is being totally ignored.  I just want 
to make sure the email address is in a valid format, not that it is a valid email 
address.  I'll look at validEmailFormat as well, but I don't understand why it's not 
even being examined.

dan


* Justin French ([EMAIL PROTECTED]) wrote:
> Dan,
> 
> I'll give you a little piece of advise that was given to me a little while
> back on this list:
> 
> Go to http://www.killersoft.com/ and grab a copy of the validateEmailFormat
> program.
> 
> 
> PHP4 translation of Jeffrey E.F. Friedl's definitive Email Regex Program
> from O'Reilly's Mastering Regular Expressions.  This function is used to
> confirm if an e-mail address adheres to the RFC 822 specification for
> internet email addresses.
> 
> 
> Rather than trying re-invent the wheel, why not use something that conforms
> closely to specs, and is widely accepted by many development groups.
> 
> 
> All you'll have to do is something like (function names and filenames may
> not be right):
> 
>  include('inc/validEmailFormat.inc');
> if(!validEmailFormat($emp_email))
> {
> echo "please enter a valid email address";
> }
> ?>
> 
> 
> Side topic:  of course, you aren't checking for a valid email address at
> all, your checking to see if the email address LOOKS valid.  You're not
> checking to see if the address is attached to an email box, or furthermore
> if there's anyone at the other end to open/read your email... you're just
> validating the appearance of the address to fall within RFC 822 specs.
> 
> Subsequently [EMAIL PROTECTED] and [EMAIL PROTECTED]
> will both return valid.
> 
> 
> The only way to ensure an email address is truely valid is to send an email
> to it, and have them respond... indicating that the address is linked to an
> email box and furthermore, someone opened the email, read it, and responded.
> 
> Even then, this could be done by a robot I guess.
> 
> 
> Justin French
> 
> Creative Director
> http://Indent.com.au
> 
> 
> 
> 
> 
> on 05/07/02 12:23 AM, dan radom ([EMAIL PROTECTED]) wrote:
> 
> > I've got a form that's posted to a php page where I'm attempting to validate a
> > field contains a valid email address.  The eregi below seems to be totally
> > ignored...
> > 
> > if (eregi("^[a-z0-9\._-]+@[a-z0-9\._-]+$", $emp_email)) {
> > echo "please enter a valid email address";
> > exit;
> > }
> > 
> > 
> > $emp_email is being posted to the form.  Any ideas why this is being ignored?
> > 
> > dan
> 
> 
> -- 
> 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] eregi problems

2002-07-04 Thread dan radom

I've got a form that's posted to a php page where I'm attempting to validate a field 
contains a valid email address.  The eregi below seems to be totally ignored...

  if (eregi("^[a-z0-9\._-]+@[a-z0-9\._-]+$", $emp_email)) {
  echo "please enter a valid email address";
  exit;
  }


$emp_email is being posted to the form.  Any ideas why this is being ignored?

dan

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




Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread dan radom

i got everything working tonihgt.  the problem seems to be that i was running this 
from an apache vhost, and not the real server.  why would that matter?  how can i fix 
that?

dan

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




Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread dan radom

I am my ISP.  I'm running PHP 4.2.1 and Apache 1.3.24.  session configurables in 
php.ini are as follows...

mars:~/apache/htdocs/test.radom.org$ grep session /usr/local/lib/php.ini
session.save_handler = files
; variable in order to use PHP's session functions.
session.save_path = /foo
session.use_cookies = 0
; Name of the session (used as cookie name).
session.name = PHPSESSID
; Initialize session on request startup.
session.auto_start = 1
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
; on every session initialization.
session.gc_probability = 1
session.gc_maxlifetime = 1440
; HTTP_REFERER has to contain this substring for the session to be
session.referer_check =
session.entropy_length = 0
; Specified here to create the session id.
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1


Apache runs as "nobody" and the permissions on session.save_handler are "drwxrwxrwx
2 nobody   2048 Jun  6 16:31 foo/"

I also have "register_globals = On" set in php.ini.  This should be working!

$@%%!@  

dan

* Shane Wright ([EMAIL PROTECTED]) wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi
> 
> On Thursday 06 June 2002 7:55 pm, dan radom wrote:
> > the last bgcolor example was cut and pasted from oreilly's session tracking
> > examples.  it should work.
> 
> IIRC, some things depend on your PHP version and ini file (register_globals, 
> track_vars and maybe others).  its worth trying those definately.  The manual 
> also says that $_SESSION is only available after 4.1.0 - if you're using an 
> older version try $HTTP_SESSION_VARS.
> 
> >  that file write error concerns me.  i think
> > something larger is going on here.
> 
> Definately - if all else fails it could be worth upgrading PHP (if your ISP 
> won't let you, maybe they've seen the problem before?).
> 
> Ah!  What user is your web server running as?  Try creating a new user, 
> running the web server as that user (group as well come to think of it), and 
> trying the permissions with that).  I'm not sure why this should make a 
> difference but it rings bells for some reason (can't remember enough offhand 
> about UNIX users/permissions).
> 
> Cheers
> 
> - -- 
> Shane
> www.shanewright.co.uk
> Public Key: http://www.shanewright.co.uk/files/public_key.asc
> 
> > * Chris Knipe ([EMAIL PROTECTED]) wrote:
> > > Have you tried using $_SESSION['bgcolor'] = "bleh"
> > >
> > > It might work... who knows...
> > >
> > > - Original Message -
> > > From: "dan radom" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, June 06, 2002 8:36 PM
> > > Subject: Re: [PHP] am i just a session tracking idiot?
> > >
> > > > what's weird is that if i set session.save_handler = mm, i obviously
> > > > don't
> > >
> > > get the file error, but it still won't work.
> > >
> > > > here's another example of what i've tried...
> > > >
> > > > mars:~/apache/htdocs/test.radom.org$ cat test.php
> > > >  > > > // create a new session
> > > > session_start();
> > > >
> > > > // register a session-variable
> > > > session_register("bgcolor");
> > > >
> > > > // Assign a value to the session-variable
> > > > $bgcolor = "#8080ff";
> > > > ?>
> > > > 
> > > > 
> > > > Session Example #1
> > > > 
> > > >
> > > >  > >
> > > vlink="#00" alink="#00">
> > >
> > > > Welcome to a session-enabled page! The background color on the next
> > > > page
> > >
> > > will be set to a stylish blue.
> > >
> > > > Go to another session-enabled page.
> > > > 
> > > > 
> > > >
> > > > and
> > > >
> > > > mars:~/apache/htdocs/test.radom.org$ cat test2.php
> > > >  > > > // Resume session created in Listing 1-2
> > > > session_start();
> > > > ?>
> > > > 
> > > > 
> > > > Session Example #1
> > > > 
> > > >
> > > >  > >
> > > vlink="#606060" alink="#808000">
> > >
> > > >  > > > // Ret

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread dan radom

the last bgcolor example was cut and pasted from oreilly's session tracking examples.  
it should work.  that file write error concerns me.  i think something larger is going 
on here.

* Chris Knipe ([EMAIL PROTECTED]) wrote:
> Have you tried using $_SESSION['bgcolor'] = "bleh"
> 
> It might work... who knows...
> 
> ----- Original Message -
> From: "dan radom" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 06, 2002 8:36 PM
> Subject: Re: [PHP] am i just a session tracking idiot?
> 
> 
> > what's weird is that if i set session.save_handler = mm, i obviously don't
> get the file error, but it still won't work.
> >
> > here's another example of what i've tried...
> >
> > mars:~/apache/htdocs/test.radom.org$ cat test.php
> >  > // create a new session
> > session_start();
> >
> > // register a session-variable
> > session_register("bgcolor");
> >
> > // Assign a value to the session-variable
> > $bgcolor = "#8080ff";
> > ?>
> > 
> > 
> > Session Example #1
> > 
> >
> >  vlink="#00" alink="#00">
> >
> > Welcome to a session-enabled page! The background color on the next page
> will be set to a stylish blue.
> > Go to another session-enabled page.
> > 
> > 
> >
> > and
> >
> > mars:~/apache/htdocs/test.radom.org$ cat test2.php
> >  > // Resume session created in Listing 1-2
> > session_start();
> > ?>
> > 
> > 
> > Session Example #1
> > 
> >
> >  vlink="#606060" alink="#808000">
> >
> >  > // Retrieve SID from cookie.
> > print "Your SID is $PHPSESSID ";
> >
> > // Display the value of the $bgcolor variable.
> > print "The persistent background color is: $bgcolor.";
> > ?>
> >
> >
> > argggh!
> >
> >
> > * dan radom ([EMAIL PROTECTED]) wrote:
> > > I've just tried that.  /foo is owned by nobody and is mode 777.  there's
> 135M available on that partition.
> > >
> > > * Shane Wright ([EMAIL PROTECTED]) wrote:
> > > > -BEGIN PGP SIGNED MESSAGE-
> > > > Hash: SHA1
> > > >
> > > > Hi
> > > >
> > > > This may sound silly - but is there enough free disk space on whatever
> > > > partition /tmp is mounted on?
> > > >
> > > > Alternatively, as a workaround, you could create a new directory and
> give the
> > > > web server user permission to write to it and tell PHP to save
> sessions
> > > > there.  (this is actually better from a security standpoint as well;
> less
> > > > chance of session hijacking).
> > > >
> > > > Cheers
> > > >
> > > > - --
> > > > Shane
> > > > www.shanewright.co.uk
> > > > Public Key: http://www.shanewright.co.uk/files/public_key.asc
> > > >
> > > >
> > > > On Thursday 06 June 2002 6:31 pm, dan radom wrote:
> > > > > I can't seem to get session tracking to work to save my life.  The
> end
> > > > > result I'm after is to store the value of the single column returned
> from
> > > > > this query .. SELECT user_id from users WHERE user_name =
> '$user_name' AND
> > > > > user_password = '$user_password' .. for use throughout the site.
> The
> > > > > current error I'm getting is "Warning: Failed to write session data
> > > > > (files). Please verify that the current setting of session.save_path
> is
> > > > > correct (/tmp) in Unknown on line 0" which is very strange, as
> > > > > session.save_path is set to /tmp, and tmp is "drwxrwxrwt2 root
> > > > > root".  The code is listed below.  Any suggestions are greatly
> appreciated.
> > > > >
> > > > > dan
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >  > > > >
> > > > > //  if ($user_name) {
> > > > > // class 'new uid' { var $row->user_id; };
> > > > > // start_session();
> > > > > // $abqSession = new abqnl;
> > > > > // $abqSession->user_id = $uid;
> > > > > // session_register("abqSession");
> > > > > // }
> > > > &

Re: [PHP] am i just a session tracking idiot?

2002-06-06 Thread dan radom

what's weird is that if i set session.save_handler = mm, i obviously don't get the 
file error, but it still won't work.

here's another example of what i've tried...

mars:~/apache/htdocs/test.radom.org$ cat test.php 



Session Example #1




Welcome to a session-enabled page! The background color on the next page will be set 
to a stylish blue.
Go to another session-enabled page.



and 

mars:~/apache/htdocs/test.radom.org$ cat test2.php 



Session Example #1




";

// Display the value of the $bgcolor variable.
print "The persistent background color is: $bgcolor.";
?>


argggh!


* dan radom ([EMAIL PROTECTED]) wrote:
> I've just tried that.  /foo is owned by nobody and is mode 777.  there's 135M 
>available on that partition.
> 
> * Shane Wright ([EMAIL PROTECTED]) wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> > 
> > Hi 
> > 
> > This may sound silly - but is there enough free disk space on whatever 
> > partition /tmp is mounted on?  
> > 
> > Alternatively, as a workaround, you could create a new directory and give the 
> > web server user permission to write to it and tell PHP to save sessions 
> > there.  (this is actually better from a security standpoint as well; less 
> > chance of session hijacking).
> > 
> > Cheers
> > 
> > - -- 
> > Shane
> > www.shanewright.co.uk
> > Public Key: http://www.shanewright.co.uk/files/public_key.asc
> > 
> > 
> > On Thursday 06 June 2002 6:31 pm, dan radom wrote:
> > > I can't seem to get session tracking to work to save my life.  The end
> > > result I'm after is to store the value of the single column returned from
> > > this query .. SELECT user_id from users WHERE user_name = '$user_name' AND
> > > user_password = '$user_password' .. for use throughout the site.  The
> > > current error I'm getting is "Warning: Failed to write session data
> > > (files). Please verify that the current setting of session.save_path is
> > > correct (/tmp) in Unknown on line 0" which is very strange, as
> > > session.save_path is set to /tmp, and tmp is "drwxrwxrwt2 root
> > > root".  The code is listed below.  Any suggestions are greatly appreciated.
> > >
> > > dan
> > >
> > >
> > >
> > >
> > >  > >
> > > //  if ($user_name) {
> > > //class 'new uid' { var $row->user_id; };
> > > //start_session();
> > > //$abqSession = new abqnl;
> > > //$abqSession->user_id = $uid;
> > > //session_register("abqSession");
> > > // }
> > >
> > > if ($user_name) {
> > > session_id($_GET['user_id']);
> > > session_start();
> > > $foo="$row->user_id";
> > > $_SESSION["uid"] = $foo;
> > > echo "$foo";
> > > }
> > >
> > >
> > >   include '/storage/apache/htdocs/test.radom.org/.siteconf.php';
> > >
> > >   echo "";
> > >
> > >   if (!$user_name) {
> > >
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "";
> > >
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "user name";
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "";
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "password";
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "";
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "";
> > >   echo "";
> > >   echo "";
> > >   echo "";
> > >
> > >   echo "";
> > >
> > >   echo "";
> > >   echo "";
> > >
> > >   echo "";
> > >
> > >   exit;
> > >
> > >   } else
> > >
> > >   $result = pg_exec ($database, "SELECT user_id from users WHERE user_name
> > > = '$user_name' AND user_password = '$user_password'");
> > >
> > >   if (!$result) {
> > > echo "query died\n";
> > > exit;
> > >   }
> > >
> > >   if (pg_num_rows($result) == 0) {
> > >   echo "you have entered an invalid user name and password
> > > combination.  please try again.  new users may create an account from the
> > > sign up link above."; exit;
> > > }
> > >
> > >
> > >   for ($i = pg_num_rows($result) - 1; $i >= 0; $i--) {
> > >   if(!($row = pg_fetch_object($result)))
> > > continue;
> > >   }
> > >
> > >   echo "your user_id is ";
> > >
> > >   pg_close($database);
> > >
> > > ?>
> > > 
> > > 
> > 
> > - -- 
> > Shane
> > www.shanewright.co.uk
> > Public Key: http://www.shanewright.co.uk/files/public_key.asc
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.0.6 (GNU/Linux)
> > Comment: For info see http://www.gnupg.org
> > 
> > iD8DBQE8/6S75DXg6dCMBrQRAjhVAKCcAb1x2/rWZFqtDBKQTCYb4OCmdACgmax8
> > eav61ozpEGIbHXzIYU7zt5A=
> > =EIC2
> > -END PGP SIGNATURE-
> > 
> > 
> > -- 
> > 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] am i just a session tracking idiot?

2002-06-06 Thread dan radom

I've just tried that.  /foo is owned by nobody and is mode 777.  there's 135M 
available on that partition.

* Shane Wright ([EMAIL PROTECTED]) wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hi 
> 
> This may sound silly - but is there enough free disk space on whatever 
> partition /tmp is mounted on?  
> 
> Alternatively, as a workaround, you could create a new directory and give the 
> web server user permission to write to it and tell PHP to save sessions 
> there.  (this is actually better from a security standpoint as well; less 
> chance of session hijacking).
> 
> Cheers
> 
> - -- 
> Shane
> www.shanewright.co.uk
> Public Key: http://www.shanewright.co.uk/files/public_key.asc
> 
> 
> On Thursday 06 June 2002 6:31 pm, dan radom wrote:
> > I can't seem to get session tracking to work to save my life.  The end
> > result I'm after is to store the value of the single column returned from
> > this query .. SELECT user_id from users WHERE user_name = '$user_name' AND
> > user_password = '$user_password' .. for use throughout the site.  The
> > current error I'm getting is "Warning: Failed to write session data
> > (files). Please verify that the current setting of session.save_path is
> > correct (/tmp) in Unknown on line 0" which is very strange, as
> > session.save_path is set to /tmp, and tmp is "drwxrwxrwt2 root
> > root".  The code is listed below.  Any suggestions are greatly appreciated.
> >
> > dan
> >
> >
> >
> >
> >  >
> > //  if ($user_name) {
> > //  class 'new uid' { var $row->user_id; };
> > //  start_session();
> > //  $abqSession = new abqnl;
> > //  $abqSession->user_id = $uid;
> > //  session_register("abqSession");
> > // }
> >
> > if ($user_name) {
> > session_id($_GET['user_id']);
> > session_start();
> > $foo="$row->user_id";
> > $_SESSION["uid"] = $foo;
> > echo "$foo";
> > }
> >
> >
> >   include '/storage/apache/htdocs/test.radom.org/.siteconf.php';
> >
> >   echo "";
> >
> >   if (!$user_name) {
> >
> >   echo "";
> >
> >   echo "";
> >   echo "";
> >
> >   echo "";
> >
> >   echo "";
> >   echo "user name";
> >   echo "";
> >
> >   echo "";
> >   echo "";
> >   echo "";
> >
> >   echo "";
> >   echo "";
> >
> >   echo "";
> >   echo "password";
> >   echo "";
> >
> >   echo "";
> >   echo "";
> >   echo "";
> >
> >   echo "";
> >   echo "";
> >
> >   echo "";
> >   echo "";
> >
> >   echo "";
> >   echo "";
> >   echo "";
> >   echo "";
> >   echo "";
> >
> >   echo "";
> >
> >   echo "";
> >   echo "";
> >
> >   echo "";
> >
> >   exit;
> >
> >   } else
> >
> >   $result = pg_exec ($database, "SELECT user_id from users WHERE user_name
> > = '$user_name' AND user_password = '$user_password'");
> >
> >   if (!$result) {
> > echo "query died\n";
> > exit;
> >   }
> >
> >   if (pg_num_rows($result) == 0) {
> >   echo "you have entered an invalid user name and password
> > combination.  please try again.  new users may create an account from the
> > sign up link above."; exit;
> > }
> >
> >
> >   for ($i = pg_num_rows($result) - 1; $i >= 0; $i--) {
> >   if(!($row = pg_fetch_object($result)))
> > continue;
> >   }
> >
> >   echo "your user_id is ";
> >
> >   pg_close($database);
> >
> > ?>
> > 
> > 
> 
> - -- 
> Shane
> www.shanewright.co.uk
> Public Key: http://www.shanewright.co.uk/files/public_key.asc
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE8/6S75DXg6dCMBrQRAjhVAKCcAb1x2/rWZFqtDBKQTCYb4OCmdACgmax8
> eav61ozpEGIbHXzIYU7zt5A=
> =EIC2
> -END PGP SIGNATURE-
> 
> 
> -- 
> 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] am i just a session tracking idiot?

2002-06-06 Thread dan radom

I can't seem to get session tracking to work to save my life.  The end result I'm 
after is to store the value of the single column returned from this query .. SELECT 
user_id from users WHERE user_name = '$user_name' AND user_password = '$user_password' 
.. for use throughout the site.  The current error I'm getting is "Warning: Failed to 
write session data (files). Please verify that the current setting of 
session.save_path is correct (/tmp) in Unknown on line 0" which is very strange, as 
session.save_path is set to /tmp, and tmp is "drwxrwxrwt2 root root".  The 
code is listed below.  Any suggestions are greatly appreciated.

dan




user_id; };
//  start_session();
//  $abqSession = new abqnl;
//  $abqSession->user_id = $uid;
//  session_register("abqSession");
// }

if ($user_name) {
session_id($_GET['user_id']);
session_start();
$foo="$row->user_id";
$_SESSION["uid"] = $foo;
echo "$foo";
}


  include '/storage/apache/htdocs/test.radom.org/.siteconf.php';

  echo "";

  if (!$user_name) {

  echo "";

  echo "";
  echo "";

  echo "";

  echo "";
  echo "user name";
  echo "";

  echo "";
  echo "";
  echo "";

  echo "";
  echo "";

  echo "";
  echo "password";
  echo "";

  echo "";
  echo "";
  echo "";

  echo "";
  echo "";

  echo "";
  echo "";

  echo "";
  echo "";
  echo "";
  echo "";
  echo "";

  echo "";

  echo "";
  echo "";

  echo "";

  exit;

  } else

  $result = pg_exec ($database, "SELECT user_id from users WHERE user_name = 
'$user_name' AND user_password = '$user_password'");

  if (!$result) {
echo "query died\n";
exit;
  }

  if (pg_num_rows($result) == 0) {
  echo "you have entered an invalid user name and password combination.  
please try again.  new users may create an account from the sign up link 
above.";
exit;
}


  for ($i = pg_num_rows($result) - 1; $i >= 0; $i--) {
  if(!($row = pg_fetch_object($result)))
continue;
  }

  echo "your user_id is ";

  pg_close($database);

?>



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




[PHP] help sorting readdir values

2002-01-28 Thread dan radom

First I must state that I didn't write the code, and I'm not much of a programmer of 
any kind.  I'm hoping someone can tell me how to sort the filenames and file sizes 
returned by readdir and filesize in the below code.  Thanks in advance.

dan


";
while ($file = readdir($handle))
{
if ($file != '.' && $file != '..'  && !ereg("\.php$", $file)) {
print ("\n\n");
print ("".$file."");
print ("\n");
if (is_dir($file))
{
printf ("");
$toto = $GLOBALS["path"];
$GLOBALS["path"] .= $file."/";
chdir ($file);
list_dir(".");
$GLOBALS["path"] = $toto;
chdir ("..");
printf ("");
} else {
printf ("\n");
$size = filesize($file);
if ($size == NULL)
$size = "";
printf (" ".$size." 
 bytes\n");
printf ("\n");
}
   print ("\n");
}
}
echo "";
closedir($handle);
}

$directory = "screenshots";

$GLOBALS["path"] = "http://".$HTTP_HOST."/".$directory."/";;

echo "\n";
list_dir("."); 
echo "";

?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]