Re: [PHP] writing a class in php to print form elements

2004-04-09 Thread Andy B
>I think just about everybody re-invents that wheel ...
well i dont have much of a choice but to reinvent that wheel because as far
as im aware of the gpl/lgpl doesnt allow me to write code, say sell that
webservice/php program for $100 and also have gpl/lgpl code in it (as well
as copyright problems too)...

unless im missing something that is...

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



[PHP] stripping the query string from url

2004-04-10 Thread Andy B
i have to write code for the following standard:
1. 13 links at the top and bottom of the page
2. those links reload the same page with a query string that will be part of
a mysql query
3. all query strings that come from anywhere except from say
www.test.com/ViewEvents.php get stripped out and ignored...
anybody know how i should go about trying to do that?? i guess the main part
im needing info on is how to strip the query_string unless it comes from the
links on that page

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



[PHP] php as cgi and module at same time

2004-04-10 Thread Andy B
is it possible to have php installed with apache as cgi and module both at
the same time...??

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



[PHP] php 5 install

2004-04-10 Thread Andy B
if i install php5 will it affect any of the php4.3.3 code that i have
running at all...?? i want to install 5 and see what they have new going on
and stuff but i dont want to crash my 4.3.3 running code any

and where would i be able to read a list of stuff that is new in 5??

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



Re: [PHP] php 5 install

2004-04-10 Thread Andy B
anybody know how to put that in english?? i have no clude what it says...


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 10, 2004 5:13 PM
Subject: Re: [PHP] php 5 install


> Hallo und guten Tag,
>
> herzlichen Dank für Ihre Mail.
>
> Zeit zu leben und Zeit zum Schreiben machen gerade Osterpause, weshalb
Emails nur sehr sporadisch gelesen werden.
> Aber keine Sorge - keine Mail geht verloren :-)
>
> Der nächste Newsletter für Zeit zu leben erscheinen zum 19.4.04, der für
Zeit zum Schreiben zum 1.5.04.
>
> Ab dem 19.4.04 sind wir dann auch wieder regulär für Sie da - Ihre
Anfragen werden spätestens dann beantwortet.
>
> Wundervolle Frühlingstage und ein schönes Osterfest wünschen Ihnen
>
> Tania Konnerth & Ralf Senftleben
>
> --
> Alles für ein aktives Leben - http://www.zeitzuleben.de Lust zum
Schreiben? http://www.zeitzumschreiben.de
>
>
>

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



[PHP] query strings coming from the same page going back to the same page

2004-04-10 Thread Andy B
was wondering if this would work or do i need different code:
12)){
$query="SELECT
 Type,
 StartDate,
 EndDate,
 Name,
 County,
 Notes
FROM $EventsTable
ORDER BY StartDate DESC";
} else {
$query="SELECT
 Type,
 StartDate,
 EndDate,
 Name,
 County,
 Notes
FROM $EventsTable WHERE
StartingMonth='{$_GET['month']}'
ORDER BY StartDate DESC";}
mysql_pconnect($host, $mysqluser, $mysqlpwd)||die(mysql_error());
$result=mysql_query($query) or die(mysql_error());
?>
then i would have a link on the same page this code came from:
Jan
the link is supposed to reload the same page it came from and be bart of the
query above... the thing im not sure of is if that will work or not or do i
need something else...(new to self referrencing pages)...

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



Re: [PHP] Re: query strings coming from the same page going back to the same page

2004-04-10 Thread Andy B
going to try some different things out... the if statement didnt work cuz
when i didnt put a query string at the end of the page name when going to it
it complained about month being an undefined index...


- Original Message - 
From: "Rainer Müller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 10, 2004 6:33 PM
Subject: [PHP] Re: query strings coming from the same page going back to the
same page


> Andy B schrieb:
> > was wondering if this would work or do i need different code:
> >  > include("libs/conf.db");
> > if(($_GET['month']==0)||($_GET['month']>12)){
> > $query="SELECT
> >  Type,
> >  StartDate,
> >  EndDate,
> >  Name,
> >  County,
> >  Notes
> > FROM $EventsTable
> > ORDER BY StartDate DESC";
> > } else {
> > $query="SELECT
> >  Type,
> >  StartDate,
> >  EndDate,
> >  Name,
> >  County,
> >  Notes
> > FROM $EventsTable WHERE
> > StartingMonth='{$_GET['month']}'
> > ORDER BY StartDate DESC";}
> > mysql_pconnect($host, $mysqluser, $mysqlpwd)||die(mysql_error());
> > $result=mysql_query($query) or die(mysql_error());
> > ?>
> > then i would have a link on the same page this code came from:
> > Jan
> > the link is supposed to reload the same page it came from and be bart of
the
> > query above... the thing im not sure of is if that will work or not or
do i
> > need something else...(new to self referrencing pages)...
>
> Probably it is better to use
> Jan
> Then it is not in dependency to the filename.
>
> And btw. you should check with is_numeric() if the value from
> $_GET['month'] is really a number or you will have an security hole in
> you script.
>
> Rainer
>
> -- 
> 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] cannot find server even though the page is there?

2004-04-11 Thread Andy B
hi...
i have a page on my test web server... it has php/mysql stuff in it that
points to another db elsewhere that i have remote access to... my ip
address/domain name exist but when i go to it to test the page it says
cannot find server?? im lost now...it worked last night why not now...

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



[PHP] [solved][ignore]Re: [PHP] cannot find server even though the page is there?

2004-04-11 Thread Andy B
found problem...apache died somehow for some reasonall better now


- Original Message - 
From: "Andy B" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 11, 2004 6:32 AM
Subject: [PHP] cannot find server even though the page is there?


> hi...
> i have a page on my test web server... it has php/mysql stuff in it that
> points to another db elsewhere that i have remote access to... my ip
> address/domain name exist but when i go to it to test the page it says
> cannot find server?? im lost now...it worked last night why not now...
> 
> -- 
> 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] creating log files out of a delete statement

2004-04-11 Thread Andy B
hi...

i have a section of a website that deletes records from a mysql table...
right now all the query is is a delete statement but i need to make a "log
file" in this format:
current time::username who executed delete:: deleted(name of record)::delete
completed
or delete failed depending on what happened... i can do all of the log
except dont exactly know how to extract the "Name" field of the deleted
record before it actually gets dumped.. that way i can use it on the log...

any ideas how to do it in the best way??

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



[PHP] using $_SESSION inside of user functions

2004-04-11 Thread Andy B
//log function
//writes log files

function WriteLog($LogType){
switch($LogType:
case "login":
//use session vars here...
}

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



Re: [PHP] using $_SESSION inside of user functions

2004-04-11 Thread Andy B
didnt know if it was possible to use $_SESSION vars in that function or any
user defined functions for that matter...


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 11, 2004 8:11 PM
Subject: Re: [PHP] using $_SESSION inside of user functions


> > //log function
> > //writes log files
> >
> > function WriteLog($LogType){
> > switch($LogType:
> > case "login":
> > //use session vars here...
> > }
> >
>
> What is the question ?
>
> -- 
> 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] creating log files out of a delete statement

2004-04-11 Thread Andy B
got it will try that instead..

- Original Message - 
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, April 11, 2004 8:23 PM
Subject: Re: [PHP] creating log files out of a delete statement


> Andy B wrote:
>
> > i have a section of a website that deletes records from a mysql table...
> > right now all the query is is a delete statement but i need to make a
"log
> > file" in this format:
> > current time::username who executed delete:: deleted(name of
record)::delete
> > completed
> > or delete failed depending on what happened... i can do all of the log
> > except dont exactly know how to extract the "Name" field of the deleted
> > record before it actually gets dumped.. that way i can use it on the
log...
>
> There's no way to extract it from the DELETE. You'll have to do a SELECT
> with the same parameters that you're going to do the DELETE with. Grab
> your data with the SELECT then execute the DELETE.
>
> -- 
> ---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



[PHP] class design

2004-04-12 Thread Andy B
hi...

i was reading something on phppatterns website about class design. the
reading said that its best to take say a db extraction class that you might
want to write and instead of making one super huge class out of it called
"db" or whatever it would be called but to turn that "db" class into a bunch
of mini classes.
so instead of having:
class db {
//connect functions
//error functions
//query functions
//result functions
//so on...}
you should make:
classes: DbConnect, DbError, DbQuery, DbResult and so on...

was just wondering what the best way to do something like this is... i can
see writing different classes for different sections of db use but unless my
mind is super limmited right now that isnt really 100% possible or
reasonable  considering that some of those classes might only have 1 or 2
different functions in it... but then again i guess super small exact easy
to figure out classes are the best??

for example class DBQuery would have in it: Insert, Delete, Update, Select,
CheckTable, BackupTable, RestoreTable, TableList, DbList and so on... and
maybe that could even be broken down to 2 classes in itself: DbQuery and
DbInfo...

ok time to stop babbling i guess... just trying to figure out how i should
start going about this class writing deal and how to split the files/class
defines...

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



[PHP] automatic doc generation for classes

2004-04-13 Thread Andy B
does anybody have any good recommendations for anything to do auto doc
generation for php classes/functions and stuff.. like phpdoc or something of
that sort?

what ones are the best to use for windows

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



Re: [PHP] automatic doc generation for classes

2004-04-13 Thread Andy B
so far it looks good... i got a test class/package to compile as far as the
docs go but now when i try  to do more with it it always crashes:
c:> c:\php\cli\php -t c:\src\test\ -o CHM:default:default -d c:\src\test\

fatal error: undefined member to object in c:\phpdoc\php
documenter\includes\converter.php on line 4199

cant quite tell what im doing wrong but going to go through the docs and see
if i messed it up somehow...


- Original Message - 
From: "Richard Harb" <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, April 13, 2004 11:37 PM
Subject: Re: [PHP] automatic doc generation for classes


> Well, since you already mentionned it:
> Why not use phpdoc? I use it on a regular basis: it's pretty good.
>
> (Yes, it works like a charm on a windows box with enough memory)
>
> Richard
>
> Tuesday, April 13, 2004, 9:10:23 PM, you wrote:
>
> > does anybody have any good recommendations for anything to do auto doc
> > generation for php classes/functions and stuff.. like phpdoc or
something of
> > that sort?
>
> > what ones are the best to use for windows
>
>

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



Re: [PHP] automatic doc generation for classes

2004-04-13 Thread Andy B
well got it to work... there was problems with the way i was making their
comments... kept doing **/ at end of comment block instead of */

never did figure out what most of the @ things are for... got as far as @var
and their server died...oh well

ill figure it out someday... like the chm format though...gues it could be a
slight better but overall its ok... grin
- Original Message - 
From: "Richard Harb" <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>
Sent: Wednesday, April 14, 2004 1:43 AM
Subject: Re: [PHP] automatic doc generation for classes


> hmm ... strange.
> then again, I let my webserver do the work and have never called it
> from the command line. not that it should make any difference but ...
> you'll never know.
>
> and I used a .ini file all along - same as above (ought not make any
> difference)
>
>
> BTW, I currently use ver 1.2.3 - the one directly downloaded from
> sourceforge
>
> Richard
>
>
> Wednesday, April 14, 2004, 6:25:32 AM, you wrote:
>
> > so far it looks good... i got a test class/package to compile as far as
the
> > docs go but now when i try  to do more with it it always crashes:
> c:>> c:\php\cli\php -t c:\src\test\ -o CHM:default:default -d c:\src\test\
>
> > fatal error: undefined member to object in c:\phpdoc\php
> > documenter\includes\converter.php on line 4199
>
> > cant quite tell what im doing wrong but going to go through the docs and
see
> > if i messed it up somehow...
>
>
> > - Original Message - 
> > From: "Richard Harb" <[EMAIL PROTECTED]>
> > To: "Andy B" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Tuesday, April 13, 2004 11:37 PM
> > Subject: Re: [PHP] automatic doc generation for classes
>
>
> >> Well, since you already mentionned it:
> >> Why not use phpdoc? I use it on a regular basis: it's pretty good.
> >>
> >> (Yes, it works like a charm on a windows box with enough memory)
> >>
> >> Richard
> >>
> >> Tuesday, April 13, 2004, 9:10:23 PM, you wrote:
> >>
> >> > does anybody have any good recommendations for anything to do auto
doc
> >> > generation for php classes/functions and stuff.. like phpdoc or
> > something of
> >> > that sort?
> >>
> >> > what ones are the best to use for windows
> >>
> >>
>
>

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



[PHP] mysql connect function in my class

2004-04-14 Thread Andy B
hi
i have this function inside a class that im writing that eventually i want
to put inside a package of my own... the function goes like this: (comment
block included):

/**
*function Connect: open connection to database.
*
[EMAIL PROTECTED] string $host mysql hostname to connect to
[EMAIL PROTECTED] string $mysqluser name of the mysql user to login with
[EMAIL PROTECTED] string $mysqlpwd the users password for mysql server
[EMAIL PROTECTED] resource|false
*/

function Connect($host, $mysqluser, $mysqlpwd){
$link=mysql_connect($host, $mysqluser, $mysqlpwd)
if(!$link){ return false; }
else { return $link; }}
should i keep it like this or is it better for the function itself to deal
with error handling at the same time? i.e. should it return an error
message/number or something of that sort or give the returned resource over
to some other function that deals with errors

it works just fine the way it is just trying to come up with some ideas that
would add more functionality to it if possible...

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



Re: [PHP] PHP Programming Innovation Award

2004-04-14 Thread Andy B
one question though how can you tell if a class or package you are
writting or want to attempt to write has ever been created before??
99.9% of the time anything i ever thought of for classes/packages to
write are either too simple or the idea has already been created before...

i.e. i want to make something different but dont know how to start with it i
guess


- Original Message - 
From: "Manuel Lemos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 15, 2004 12:22 AM
Subject: [PHP] PHP Programming Innovation Award


> PHP Programming Innovation Award is an initiative meant to honor PHP
> developers that make outstanding contributions in the form of innovative
> classes of objects.
>
> The initiative has three main goals: encourage regular contributors to
> focus efforts contributing innovative components instead of duplicating
> the function of previously contributed classes, motivate more skilled
> developers to share their work that otherwise would not participate, and
> encourage other sites and companies to start similar initiatives,
> hopefully different than this, that may foster the growth of PHP Open
> Source community by motivating skilled developers to share more valuable
> work.
>
> Any PHP developer can participate with their classes even if they were
> already published in other sites. The initiative is repeated every
> month. Winning developers may gain prizes provided by well known
> sponsors companies that develop products for PHP developers. The
> nominees of this month were already announced here:
>
> http://www.phpclasses.org/vote.html
>
> More information on the award is available here:
>
> http://www.phpclasses.org/award/innovation/
>
> -- 
>
> Regards,
> Manuel Lemos
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
>
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.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



Re: Re[2]: [PHP] mysql connect function in my class

2004-04-14 Thread Andy B
>How many versions of the wheel exist in the world >today? ...not many
>hacked out of stone I bet :-)
>
>--
>regards,
>Tom

what does that mean?? is everybody saying i should give up on this idea
then??

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



Re: [PHP] mysql connect function in my class

2004-04-14 Thread Andy B
makes since... i think would i would probably do is  define the
error/errormsg stuff at the beginning of the class that way all functions
can use it??

class DbConnection {
var $ErrorNumber;
var $ErrorMsg;
function Connect(.){
$link=mysql_connect(...);
if(!$link){
$ErrorNumber=mysql_errno();
//and the msg itself if we want
$ErrorMsg=mysql_error();
return false;}
else{return $link;}}

or however the best way goes for that...

- Original Message - 
From: "Curt Zirzow" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 15, 2004 1:35 AM
Subject: Re: [PHP] mysql connect function in my class


> * Thus wrote Andy B ([EMAIL PROTECTED]):
> > hi
> > i have this function inside a class that im writing that eventually i
want
> > to put inside a package of my own... the function goes like this:
(comment
> > block included):
> >
> > /**
> > *function Connect: open connection to database.
> > *
> > [EMAIL PROTECTED] string $host mysql hostname to connect to
> > [EMAIL PROTECTED] string $mysqluser name of the mysql user to login with
> > [EMAIL PROTECTED] string $mysqlpwd the users password for mysql server
> > [EMAIL PROTECTED] resource|false
> > */
> >
> > function Connect($host, $mysqluser, $mysqlpwd){
> > $link=mysql_connect($host, $mysqluser, $mysqlpwd)
> > if(!$link){ return false; }
> > else { return $link; }}
>
> > should i keep it like this or is it better for the function itself to
deal
> > with error handling at the same time? i.e. should it return an error
> > message/number or something of that sort or give the returned resource
over
> > to some other function that deals with errors
>
> A standard database layer will return false, and set a error code
> and error message property, so the application using the class can
> do something about it.
>
>
> if (! $link = mysql_connect($host..) ) {
>   $this->error = mysql_errno();
>   $this->error_msg = mysql_error();
>   return false;
> }
> ...
>
> Then in the application:
>
> if (! $dbh = $db->Connect(blah...) ) {
>   echo $db->error, ': ', $db->error_msg;
>   exit;
> }
>
>
>
> Curt
> -- 
> "I used to think I was indecisive, but now I'm not so sure."
>
> -- 
> 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] PHP Programming Innovation Award

2004-04-14 Thread Andy B
so basically regardless of whether it already exists or not just keep trying
to improve the stuff i have untill such time... and if it is somewhat the
same as someone elses then it doesnt matter then...?

- Original Message - 
From: "Manuel Lemos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 15, 2004 1:49 AM
Subject: Re: [PHP] PHP Programming Innovation Award


> Hello,
>
> On 04/15/2004 01:54 AM, Andy B wrote:
> > one question though how can you tell if a class or package you are
> > writting or want to attempt to write has ever been created before??
> > 99.9% of the time anything i ever thought of for classes/packages to
> > write are either too simple or the idea has already been created
before...
> >
> > i.e. i want to make something different but dont know how to start with
it i
> > guess
>
> Although the idea of offering prizes to winners is compelling just by
> itself, interested authors should not participate just because the award
> was created and provides prizes to winners.
>
> There should be other reasons to partipate, like sharing the work that
> you may have developed when you tried to solve your own development
> problems using solutions that you found to solve those problems well
> probably introducing innovative approaches.
>
> Contributions that qualify as innovative may be not absolutely original.
> The approach itself may have original aspects, at least in the PHP world
> or just considering what has been submitted to the site so far.
>
> Anyway, innovation does not come from your first attempts to solve your
> current problems. Innovation often comes when you try to improve your
> current solutions.
>
> Even if you do not have now a package to submit that may be considered
> innovative, maybe if you continue perfecting your current solutions to
> your own problems, maybe you will find innovating soon or later and then
> you will be ready to submit something that may qualify to be nominated
> to win the award.
>
>
> -- 
>
> Regards,
> Manuel Lemos
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
>
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.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] inovative award

2004-04-15 Thread Andy B
just wondering if there is a website where i can find out everything needed
to know on that inovation award thing...

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



Re: [PHP] Unwanted e-mails

2004-04-19 Thread Andy B
i know i got tons of those before... all i did was block the btconnect
address and be done with it just ignore them at least thats all i did


- Original Message - 
From: "Lester Caine" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 19, 2004 6:02 PM
Subject: Re: [PHP] Unwanted e-mails


> OK 72 Hours later I got 6 bounce messages back related to Fridays eMails
> direct to lists.php.net ( one of which is yet another attempt to
> unsubscribe from php-db )
>
> > From - Mon Apr 19 20:43:21 2004
> > X-UIDL: 381838
> > X-Mozilla-Status: 0001
> > X-Mozilla-Status2: 1000
> > Received: from pop.lsces.co.uk by lscserver (VPOP3) with POP3; Mon, 19
Apr 2004 20:40:04 +0100
> > Return-path: <>
> > Delivery-date: Mon, 19 Apr 2004 20:30:30 +0100
> > Received: from dswu27.btconnect.com ([193.113.154.28])
> > by mx1.mail.uk.clara.net with smtp (Exim 4.30)
> > id 1BFeTO-000KR9-8m
> > for [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:30:30 +0100
> > Received: from btconnect.com by dswu27.btconnect.com id
<[EMAIL PROTECTED]>; Mon, 19 Apr 2004 20:27:04 +0100
> > Message-Type: Delivery Report
> > X400-Received: by /ADMD= /C=WW/; Relayed; Mon, 19 Apr 2004 20:27:02
+0100
> > X400-Received: by mta dswu27-hme1 in /ADMD= /C=WW/; Relayed; Mon, 19 Apr
2004 20:27:02 +0100
> > X400-MTS-Identifier: [/ADMD= /C=WW/;dswu27.btc:172167:20040419192702]
> > From: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Date: Mon, 19 Apr 2004 20:27:04 +0100
> > Message-ID: <"dswu27.btc:172167:20040419192702"@btconnect.com>
> > Content-Identifier: Re: (091)PHP(...
> > MIME-Version: 1.0
> > Content-Type: multipart/report; report-type=delivery-status;
boundary="---Multi-Part-Report-Level-1-1-17210"
> > X-Envelope-To: [EMAIL PROTECTED]
> > X-Clara-Scan: content scanned according to recipient preferences
> > X-claradeliver-Version: 4.22.15
> > X-UIDL: 1082403030.78602.chaos.uk.clara.net
> > X-RCPT: lester
> > Status: U
> > Subject: Delivery Report (failure) for [EMAIL PROTECTED]
> >
> > -Multi-Part-Report-Level-1-1-17210
> >
> > This report relates to your message:
> > Subject: Re: [PHP] Unwanted e-mails,
> > Message-ID: <[EMAIL PROTECTED]>,
> > To: [EMAIL PROTECTED]
> >
> > of Mon, 19 Apr 2004 19:27:02 +
> >
> > Your message was not delivered to:
> > [EMAIL PROTECTED]
> > for the following reason:
> > Diagnostic was Unable to transfer, Message timed out
> > Information Message timed out
> >
> > The Original Message follows:
> >
> > -Multi-Part-Report-Level-1-1-17210
> > Content-Type: message/delivery-status
> >
> > Reporting-MTA: x400; mta dswu27-hme1 in /ADMD= /C=WW/
> > Arrival-Date: Fri, 16 Apr 2004 19:24:38 +
> > DSN-Gateway: dns; dswu27.btconnect.com
> > X400-Conversion-Date: Mon, 19 Apr 2004 20:27:05 +0100
> > X400-Content-Correlator: Subject: Re: [PHP] Unwanted e-mails,
> > Message-ID: <[EMAIL PROTECTED]>,
> > To: [EMAIL PROTECTED]
> > Original-Envelope-Id: [/ADMD= /C=WW/;<[EMAIL PROTECTED]
> > X400-Content-Identifier: Re: (091)PHP(...
> > X400-Encoded-Info: ia5-text
> >
> > Original-Recipient: rfc822; [EMAIL PROTECTED]
> > Final-Recipient: x400; /RFC-822=php-general(a)lists.php.net/ADMD= /C=WW/
> > Action: failed
> > Status: 4.4.7
> > Diagnostic-Code: Reason 1 (Unable-To-Transfer); Diagnostic 5
(Maximum-Time-Expired)
> > X400-Supplementary-Info: "Message timed out"
> > X400-Originally-Specified-Recipient-Number: 1
> > X400-Last-Trace: Fri, 16 Apr 2004 19:24:38 +
> >
> > -Multi-Part-Report-Level-1-1-17210
> > Content-Type: text/rfc822-headers
> >
> > Received: from gateway.btopenworld.com (actually host
185.136.40.217.in-addr.arpa) by dswu27 with SMTP-CUST (XT-PP) with ESMTP;
Fri, 16 Apr 2004 20:24:38 +0100
> > Received: from gateway (127.0.0.1) by gateway.btopenworld.com (Worldmail
1.3.167) for [EMAIL PROTECTED]; 16 Apr 2004 20:36:02 +0100
> > Delivery-Date: Fri, 16 Apr 2004 20:16:43 +0100
> > Received: from pb1.pair.com (actually host 4.131.92.216.in-addr.arpa) by
dswu194 with SMTP (XT-PP); Fri, 16 Apr 2004 20:16:39 +0100
> > Received: (qmail 19076 invoked by uid 1010); 16 Apr 2004 19:16:10 -
> > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> > Precedence: bulk
> > list-help: 
> > list-unsubscribe: 
> > list-post: 
> > Delivered-To: mailing list [EMAIL PROTECTED]
> > Received: (qmail 19063 invoked by uid 1010); 16 Apr 2004 19:16:10 -
> > Delivered-To: [EMAIL PROTECTED]
> > Delivered-To: [EMAIL PROTECTED]
> > Message-ID: <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Date: Fri, 16 Apr 2004 20:19:39 +0100
> > From: Lester Caine <[EMAIL PROTECTED]>
> > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6)
Gecko/20040113
> > X-Accept-Language: en, en-us
> > MIME-Version: 1.0
> > References: <[EMAIL PROTECTED]>
> > In-Reply-To:
<[EMAIL PROTECTED]>
> > Content-Type: text/plain; charset=us-ascii; format=flowed
> > Content-Transfer-Encoding: 7bit
> > X-Posted-By: 81.138.11.136
> > Subject: Re: [PHP]

Re: [PHP] Unwanted e-mails

2004-04-19 Thread Andy B
i guess that would be a slight problem then
- Original Message - 
From: "Lester Caine" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 19, 2004 6:36 PM
Subject: Re: [PHP] Unwanted e-mails


> Andy B wrote:
>
> > i know i got tons of those before... all i did was block the btconnect
> > address and be done with it just ignore them at least thats all i
did
>
> BUT that does not help at all. btconnect is my service provider, and I
> have to send my eMails through them. The messages are caused by
> lists.php.net not accepting my messages 
>
> > - Original Message - 
> > From: "Lester Caine" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, April 19, 2004 6:02 PM
> > Subject: Re: [PHP] Unwanted e-mails
> >
> >
> >
> >>OK 72 Hours later I got 6 bounce messages back related to Fridays eMails
> >>direct to lists.php.net ( one of which is yet another attempt to
> >>unsubscribe from php-db )
> >>
> >>
> >>>From - Mon Apr 19 20:43:21 2004
> >>>X-UIDL: 381838
> >>>X-Mozilla-Status: 0001
> >>>X-Mozilla-Status2: 1000
> >>>Received: from pop.lsces.co.uk by lscserver (VPOP3) with POP3; Mon, 19
> >
> > Apr 2004 20:40:04 +0100
> >
> >>>Return-path: <>
> >>>Delivery-date: Mon, 19 Apr 2004 20:30:30 +0100
> >>>Received: from dswu27.btconnect.com ([193.113.154.28])
> >>>by mx1.mail.uk.clara.net with smtp (Exim 4.30)
> >>>id 1BFeTO-000KR9-8m
> >>>for [EMAIL PROTECTED]; Mon, 19 Apr 2004 20:30:30 +0100
> >>>Received: from btconnect.com by dswu27.btconnect.com id
> >
> > <[EMAIL PROTECTED]>; Mon, 19 Apr 2004 20:27:04
+0100
> >
> >>>Message-Type: Delivery Report
> >>>X400-Received: by /ADMD= /C=WW/; Relayed; Mon, 19 Apr 2004 20:27:02
> >
> > +0100
> >
> >>>X400-Received: by mta dswu27-hme1 in /ADMD= /C=WW/; Relayed; Mon, 19
Apr
> >
> > 2004 20:27:02 +0100
> >
> >>>X400-MTS-Identifier: [/ADMD= /C=WW/;dswu27.btc:172167:20040419192702]
> >>>From: [EMAIL PROTECTED]
> >>>To: [EMAIL PROTECTED]
> >>>Date: Mon, 19 Apr 2004 20:27:04 +0100
> >>>Message-ID: <"dswu27.btc:172167:20040419192702"@btconnect.com>
> >>>Content-Identifier: Re: (091)PHP(...
> >>>MIME-Version: 1.0
> >>>Content-Type: multipart/report; report-type=delivery-status;
> >
> > boundary="---Multi-Part-Report-Level-1-1-17210"
> >
> >>>X-Envelope-To: [EMAIL PROTECTED]
> >>>X-Clara-Scan: content scanned according to recipient preferences
> >>>X-claradeliver-Version: 4.22.15
> >>>X-UIDL: 1082403030.78602.chaos.uk.clara.net
> >>>X-RCPT: lester
> >>>Status: U
> >>>Subject: Delivery Report (failure) for [EMAIL PROTECTED]
> >>>
> >>>-Multi-Part-Report-Level-1-1-17210
> >>>
> >>>This report relates to your message:
> >>>Subject: Re: [PHP] Unwanted e-mails,
> >>>Message-ID: <[EMAIL PROTECTED]>,
> >>>To: [EMAIL PROTECTED]
> >>>
> >>>of Mon, 19 Apr 2004 19:27:02 +
> >>>
> >>>Your message was not delivered to:
> >>>[EMAIL PROTECTED]
> >>>for the following reason:
> >>>Diagnostic was Unable to transfer, Message timed out
> >>>Information Message timed out
> >>>
> >>>The Original Message follows:
> >>>
> >>>-Multi-Part-Report-Level-1-1-17210
> >>>Content-Type: message/delivery-status
> >>>
> >>>Reporting-MTA: x400; mta dswu27-hme1 in /ADMD= /C=WW/
> >>>Arrival-Date: Fri, 16 Apr 2004 19:24:38 +
> >>>DSN-Gateway: dns; dswu27.btconnect.com
> >>>X400-Conversion-Date: Mon, 19 Apr 2004 20:27:05 +0100
> >>>X400-Content-Correlator: Subject: Re: [PHP] Unwanted e-mails,
> >>>Message-ID: <[EMAIL PROTECTED]>,
> >>>To: [EMAIL PROTECTED]
> >>>Original-Envelope-Id: [/ADMD= /C=WW/;<[EMAIL PROTECTED]
> >>>X400-Content-Identifier: Re: (091)PHP(...
> >>>X400-Encoded-Info: ia5-text
> >>>
> >>>Original-Recipient: rfc822; [EMAIL PROTECTED]
> >>>Final-Recipient: x400; /RFC-822=php-general(a)lists.php.net/ADMD=
/C=WW/
> >>>Action: failed
> >>>Status: 4.4.7
> >>>Diagnostic-Code: Reason 1 (Unable-To-Transfer); Diagnostic 5
> >
> >

Re: [PHP] Unwanted e-mails

2004-04-19 Thread Andy B
> BUT that does not help at all. btconnect is my service provider, and I
> have to send my eMails through them. The messages are caused by
> lists.php.net not accepting my messages 

>but your messages *ARE* getting accepted otherwise i >would not be
>reading this email right now!




>chris.

when i talked to my internet people about those sorts of emails like
btconnect and pandasoft virus warnings all they told me was that some
spammer person had probably tagged the php mailinglist database of email
addresses and are now bouncing emails around all the php mailing list
people... it happened to be figured out that way at least on my end because
the mysql mailing list server sent me an email today saying that it had
received lots of emails that bounced off my email address and will now take
me off the list the next time it happens.. so even though that list email is
valid the bounces to that list are spammers trying to do whatever it is they
get their highs out of.

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



Re: [PHP] Images & PHP

2004-04-19 Thread Andy B
dont know that much about images at the minute but phpclasses.org has tons
of image classes that might help...


- Original Message - 
From: "Tim Thorburn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 19, 2004 7:12 PM
Subject: [PHP] Images & PHP


> Hi,
>
> I've created a small program that allows users to upload an image, and
then
> resize that image one or more times depending on the desired outcome (once
> for web documents, twice for photo galleries, etc).  Anyways, it seems
that
> a large number of my clients are using older digital cameras to show case
> their businesses (most often resorts).  This usually means taking pictures
> in poor lighting conditions which leaves the images either so black you
> can't see anything or completely washed out.  I've seen a few functions on
> php.net that speak of changing color options, but so far these seem to be
> simple "make this purple square red now" types.  Is there something built
> into PHP, or a 3rd party function that I'm not aware of, that would do
> simple color correction on uploaded files?  I'm looking for a very quick
> and cheap "auto levels" like function found within Photoshop.
>
> Any idea if this is even possible?
>
> -- 
> 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] Unwanted e-mails

2004-04-19 Thread Andy B
they arent just coming from the people who want to unsubscribe??  they are
going to people who just want to send a message to the list too... got rid
of the info desk the advanced whatever and the pandasoft stuff but having
problems with mysql mailing list myself too... same sort of problems...


- Original Message - 
From: "Raquel Rice" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, April 19, 2004 7:28 PM
Subject: Re: [PHP] Unwanted e-mails


> On Fri, 16 Apr 2004 20:45:37 +0100
> Lester Caine <[EMAIL PROTECTED]> wrote:
>
> > John W. Holmes wrote:
> >
> > > From: "Lester Caine" <[EMAIL PROTECTED]>
> > >
> > >>I am hitting reply, and EVERY php list sends a message back
> > >bouncing the>unsubscribe message ( along with every post I have
> > >tried to make since>XMAS - which is why I am having to use the
> > >newsgroup interface )>This only happens on list.php.net, I have
> > >no problem with any other>developer list I am moderator of or
> > >involved with !
> > >
> > >
> > > I think you're just getting an autoresponder, but not from the
> > > list. Same as every time anyone posts we get those messages from
> > > "Information Desk","Advance Credit Suisse Bank", pair-something,
> > > etc...
> >
> > I have just posted a couple of replies via eMail, and tried
> > another unsubscribe cycle. I will post the auto-responder message.
> > SINCE lists.php.net is the only place I have a problem, and
> > everything was fine last year ..
> >
> > -- 
> > Lester Caine
>
> Read directions instead of thinking that you have all the answers.
> The unsubscribe address is different from the address you send
> "replies" to.
>
> Read the headers of the emails which come to you!
>
> List Address:  [EMAIL PROTECTED]
> Unsubscribe Address:  [EMAIL PROTECTED]
>
> -- 
> Raquel
> 
> You may have to fight a battle more than once to win it.
>   --Margaret Thatcher
>
> -- 
> 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] Unwanted e-mails

2004-04-19 Thread Andy B
hahahaha!! go for it grin!!


- Original Message - 
From: "Ryan A" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, April 19, 2004 7:59 PM
Subject: Re: [PHP] Unwanted e-mails


>
> > when i talked to my internet people about those sorts of emails like
> > btconnect and pandasoft virus warnings all they told me was that some
> > spammer person had probably tagged the php mailinglist database of email
> > addresses and are now bouncing emails around all the php mailing list
> > people... it happened to be figured out that way at least on my end
> > because
> > the mysql mailing list server sent me an email today saying that it
> > had
> > received lots of emails that bounced off my email address and will now
> > take
> > me off the list the next time it happens.. so even though that list
> > email is
> > valid the bounces to that list are spammers trying to do whatever it is
> > they
> > get their highs out of.
>
> It is times like this when we all need to get together and pray to god
> to burn the bastard spammers and their loved ones on earth and in hell.
> Amen.
>
> -- 
> 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] phpedit

2004-04-21 Thread Andy B
i know this isnt quite php exactly but anybody thats ever installed phpedit
before remember how long it took to install on windows?? seems like mine is
taking about 6 hours to install for some strange reason...

its either massive huge or my computer is super slow for some reason...

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



Re: [PHP] mysql version

2004-04-22 Thread Andy B
select version as version; if used directly in the server (i.e. mysql)...

if you want to use it in php:
$query="select version() as mysql_version";
$result=mysql_query($query) or die();

if(!$result){
echo "cant determine mysql version";
} else {
//whatever you want to do with it

}

- Original Message - 
From: "Angelo Zanetti" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 2004 4:19 AM
Subject: [PHP] mysql version


> SOrry for off topic post, but how does one determine the version of the
> mysql server they are using?
> thanx in advance
> 
> 
> Disclaimer 
> This e-mail transmission contains confidential information,
> which is the property of the sender.
> The information in this e-mail or attachments thereto is 
> intended for the attention and use only of the addressee. 
> Should you have received this e-mail in error, please delete 
> and destroy it and any attachments thereto immediately. 
> Under no circumstances will the Cape Technikon or the sender 
> of this e-mail be liable to any party for any direct, indirect, 
> special or other consequential damages for any use of this e-mail.
> For the detailed e-mail disclaimer please refer to 
> http://www.ctech.ac.za/polic or call +27 (0)21 460 3911
> 
> -- 
> 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: phpedit

2004-04-22 Thread Andy B
well so far im running close to 12 hours for an install on it...had to
restart it once though cuz the load was messing around with my connection
and the computer crashed cry!! will be glad when it gets done...just hope
that it works this time... last time i tried it about a year ago it didnt
work for some reason (guess it didnt like my screen reader)...
its hard to find php editors that work with screen readers... maybe i should
try and make it work but dont have the time... unless anybody else has any
ideas?? screen reader is jaws 4.51



- Original Message - 
From: "Saulius" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 2004 3:58 AM
Subject: [PHP] Re: phpedit


> it does take quite some time even on a fast machine if you install all the
> packages. and then if you don't have those packages ready in your hard
disk,
> it needs to download them (~12 Mb), then it all depends on your
connection.
>
> "Andy B" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > i know this isnt quite php exactly but anybody thats ever installed
> phpedit
> > before remember how long it took to install on windows?? seems like mine
> is
> > taking about 6 hours to install for some strange reason...
> >
> > its either massive huge or my computer is super slow for some reason...
>
> -- 
> 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] self documenting php

2004-04-22 Thread Andy B
so far i like phpdoc... most reliable that i found and besides it gives more
of a range of different output types: chm (windows help file format) html,
xml, pdf and so on...

i think its pretty cool...

- Original Message - 
From: "Edward Peloke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 2004 8:48 AM
Subject: [PHP] self documenting php


> Hello,
>
> What is a good tool to use for documenting php?  I am looking for
something
> like javadoc.  I think there is phpdoc, just not sure if it's any good or
if
> I should try to create my own.
>
> Thanks,
> Eddie
>
>  WARNING:  The information contained in this message and any attachments
is
> intended only for the use of the individual or entity to which it is
> addressed.  This message may contain information that is privileged,
> confidential and exempt from disclosure under applicable law.  It may also
> contain trade secrets and other proprietary information for which you and
> your employer may be held liable for disclosing.  You are hereby notified
> that any unauthorized dissemination, distribution or copying of this
> communication is strictly prohibited.  If you have received this
> communication in error,  please notify [EMAIL PROTECTED] by E-Mail and
then
> destroy this communication in a manner appropriate for privileged
> information.
>
> -- 
> 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] online php books

2004-04-22 Thread Andy B
hi...

just wondering if there are any good php books that are online (even if you
have to buy them)... just as long as they are online or downloadable..

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



Re: [PHP] online php books

2004-04-22 Thread Andy B
ok tnx will try it out and have a look around (hopefully they take paypal)
since i dont have a credit card at least not yet anyways...


- Original Message - 
From: "Richard Davey" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 2004 9:40 PM
Subject: Re: [PHP] online php books


> Hello Andy,
>
> Friday, April 23, 2004, 2:35:29 AM, you wrote:
>
> AB> just wondering if there are any good php books that are online (even
if you
> AB> have to buy them)... just as long as they are online or downloadable..
>
> I've got just one recommendation for you - Safari.
>
> http://safari.oreilly.com/
>
> The best $10 a month you'll ever spend!
>
> -- 
> Best regards,
>  Richard Davey
>  http://www.phpcommunity.org/wiki/296.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



Re: [PHP] Question about the mail() php function

2004-04-24 Thread Andy B
hi...

the reason that mail() wont work on windows without an smtp server (outgoing
mail server) is because normally windows doesnt have a mail server
installed. the default smtp settings in php.ini usually is for *nix systems
(that is if it is even set).

it is very easy to fix:
go into c:\windows\php.ini or wherever you had put it at and search for the
section [mail function]. in that section there will be a line that looks
like this:

smtp=
all you need to do is add your outgoing mail server to that line (you can
use the one that outlook express uses if you want) or call your ISP and ask
them what smtp server to use.

- Original Message - 
From: "Shawn Inder" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 24, 2004 1:02 AM
Subject: [PHP] Question about the mail() php function


> Hello,
> I was browsing your site and came across the mail() PHP function. I tryed
it
> out:
>
>  mail("[EMAIL PROTECTED]", "My Subject", "Line 1\nLine 2\nLine 3");
> ?>
>
> [EMAIL PROTECTED] is my e-mail adress, obviously enough..
> The problem is, the e-mail doesn't get sent.
> A warning appears on the page:
>
> Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
> verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in
> C:\Program Files\Abyss Web Server\htdocs\page.php on line 24
>
> What is this all about?  Why wont it work?
> Thanks you very much
>
> If this is not the right place to send a question, please tell me where
that
> right place would be :)
>
> shlagish (or Shawn, you choose)
>
> _
> STOP MORE SPAM with the MSN Premium and get 2 months FREE*
>
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
>
> -- 
> 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] php/apache/mysql on ntfs

2004-04-24 Thread Andy B
hi...
we are upgrading test servers to xp home and want to know if its possible to
run php/apache/mysql and all that sort of stuff on ntfs or does the servers
have to run fat32??

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



Fw: [PHP] php/apache/mysql on ntfs

2004-04-24 Thread Andy B
does anybody have any idea why this message keeps coming up every time i
send a msg to the list?? im sort of confused now

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Andy B" <[EMAIL PROTECTED]>
Sent: Saturday, April 24, 2004 7:17 AM
Subject: NDN: [PHP] php/apache/mysql on ntfs


> Sorry. Your message could not be delivered to:
>
> PHP Net List [Conference] (Mailbox or Conference is full.)
>
>

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



Re: [PHP] mouse over problem on php

2004-04-24 Thread Andy B
try javascript

- Original Message - 
From: "gowthaman ramasamy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 24, 2004 8:11 AM
Subject: [PHP] mouse over problem on php


> hi list ,
> In the web page, i display different bars (actually tables with single
> column, with cellpadding=1 and color=xxx) based on the information
> parsed from MySQL database. I, now want to display more information by
> mouse over when ever user moves the cursor over the bar(actually single
> cell table).
> I use  .. and  have two
> problems in this ...
> 1) i need to have some txt/figure to be linked. But i dont want to keep
> any thing in the table (single cell). Can i display some text when mouse
> is moved over table(cell).
> 
> 2)even if i hyperlink  the text with title attribute... only the text
> before the first space (the very first word) is displayed. Not the
> entire sentence.
> 
> Many thanks in advance ..
> gowtham
> -- 
> Ra. Gowthaman,
> Graduate Student,
> Bioinformatics Lab,
> Malaria Research Group,
> ICGEB , New Delhi.
> INDIA
> 
> Phone: 91-9811261804
>91-11-26173184; 91-11-26189360 #extn 314
> 
> -- 
> 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] formatting a string

2004-04-24 Thread Andy B
hi...

i have a string i want to pull out of a database (mysql). the column name is
Phone1 and it is a 10 digit phone number. the raw string coming out of the
table column would look like this: 1234567890

what i want to do is format the string on display like this: (123)456-7890
but dont quite know how to start with that. what function(s) would i use for
that?

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



Re: [PHP] formatting a string

2004-04-24 Thread Andy B
[snip]
$phone = '1234567890';
$newphone = preg_replace('/(\d{3})(\d{3})(\d)/','(\1)\2-\3',$phone);
echo $newphone.'';

--
regards,
Tom
[/snip]
ok sorry but since i never used preg_* before i dont quite get what some of
this stuff means. i looked at the doc page for it but it doesnt make mention
at all of what \d, \w, \s or any of those things mean... i only assume that
\d means digit and \w or \s means blank space??

anyways to go through the whole example above part by part:
$phone = '1234567890';//understand that
$newphone = preg_replace(//ok now what does this stuff
//mean??
'/(\d{3})(\d{3})(\d)/'
im gathering the line above is the search string (what to look for)? if so i
get from it that it is supposed to look for the first block of 3 digits then
the second block of 3 digits and the other 4 numbers by themself in a sense
seperating the string into 3 different parts: 123 456 7890 and then asigning
like "id numbers to the blocks"
'(\1)\2-\3'
and this one above says put block 1 between (). take block 2 and put a -
after it and leave the other 4 numbers alone to come up with: (123)456-7890
$phone);
the original number to do the replace on of course

let me know if i got that set right

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



[PHP] adult content censoring

2004-04-25 Thread Andy B
hi...

i have to make an adult content censoring system so people cant post "bad"
words on any public viewable posts. i know preg_replace and possibaly
preg_match would be a huge help but im wondering how i would put all the bad
words in a file (textfile) 1 word on a line and have it look through the
file for the words? when it finds a match then it will either replace the
word with * but better yet tell the user that content in the post was
rejected because of bad content and take them back to the form with the
stuff they typed in it...

if there is a better way to do this (i hope sounds like a lot of work)

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



[PHP] mail() only working with php-cli

2007-05-05 Thread Andy B.
Is there any way to debug the mail() function within PHP4 or PHP5?

The following code is not working when called from a browser, but it does
work from the command line:




php and php-cli use the same php.ini file. Php via Apache is launched as a
module, NOT as CGI!

sendmail_path is correctly set to /usr/sbin/sendmail -t -i

the /var/log/mail.log only shows activity when I try my code via command
line, so my best guess is that sendmail is never reached when run from the
browser.

I went a little deeper and modified the sendmail_path to /tmp/test.sh, which
contains:

#!/bin/bash
echo "I was used!!" > /tmp/test.log

(chmod 777 /tmp/test.sh)

Again I tried my script from the web and from the command line. Same
result... command line is fine and generates the test.log file. In the
browser no log file is created.

I have already made numerous LAMP installations, but I never had this kind
of mail() issue. This installation is quite simple: standard Apache 2.0 with
php5, php5-mysql, php5-gd, ... This makes it even more frustrating :-(

What am I missing?

Thanks a lot!!


Andy

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



RE: [PHP] mail() only working with php-cli

2007-05-05 Thread Andy B.
Yes, it's the same build.

I am running php5 on a debian distribution that has been installed via
apt-get.

Details:

--
CLI php.ini = /etc/php5/cli/php.ini

PHP 5.2.0-8+etch3 (cli) (built: Apr 29 2007 10:42:07) 
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
--

--
APACHE php.ini = = /etc/php5/apache2/php.ini

PHP Version 5.2.0-8+etch3 

System  Linux A011 2.6.21 #1 SMP Fri Apr 27 22:50:50 CEST 2007 i686  
Build Date  Apr 29 2007 10:24:27  
Server API  Apache 2.0 Handler  
Virtual Directory Support  disabled  
Configuration File (php.ini) Path  /etc/php5/apache2/php.ini  
--


Both are exactly the same, as I copied the CLI version into the Apache
Version. Of course I first tested with the original Apache php.ini before
overwriting it with the CLI version.

Unfortunately error Reporting does not help. I've already tested with E_ALL
and also dumping errors/warnings into log files...



Andy

-Original Message-
From: Tijnema ! [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 05, 2007 23:58
To: Andy B.
Cc: php-general@lists.php.net
Subject: Re: [PHP] mail() only working with php-cli


Are you sure that the PHP CLI and PHP-module are exactly the same build?
And you could try to set error reporting level to E_ALL, maybe there's
a warning generated that's hidden now because of a lower reporting
level.

Tijnema

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



RE: [PHP] mail() only working with php-cli

2007-05-06 Thread Andy B.
Oliver,

Yes I also analyzed the log files from apache, but all they are telling me
is that I am accesing the file "mail.php" with my browser. Error.log stays
empty.

I wish that it were possible to reproduce an error when accessing mail()
that would somewhat look like this:

"cannot access /usr/sbin/sendmail: permission denied", then at least I know
what needs to be done. However I doubt that my php configuration is
forbidden to access this file.


Andy


-Original Message-
From: Oliver Block [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 05, 2007 23:58
To: php-general@lists.php.net
Cc: Andy B.
Subject: Re: [PHP] mail() only working with php-cli

Hello Andy,

did you take a look into the apache log files?

Regards,

Oliver


Am Samstag, 5. Mai 2007 22:53 schrieb Andy B.:
> Is there any way to debug the mail() function within PHP4 or PHP5?
>
> The following code is not working when called from a browser, but it does
> work from the command line:
>
>  $to  = '[EMAIL PROTECTED]';
> $subject = 'the subject';
> $message = 'hello...';
> $headers = 'From: [EMAIL PROTECTED]' . "\r\n" .
> 'Reply-To: [EMAIL PROTECTED]' . "\r\n" .
> 'X-Mailer: PHP/' . phpversion();
>
> if(mail($to, $subject, $message, $headers))
> echo "IT WORKED";
> else
> echo "DAMN!!!";
> ?>
>
>
> php and php-cli use the same php.ini file. Php via Apache is launched as a
> module, NOT as CGI!
>
> sendmail_path is correctly set to /usr/sbin/sendmail -t -i
>
> the /var/log/mail.log only shows activity when I try my code via command
> line, so my best guess is that sendmail is never reached when run from the
> browser.
>
> I went a little deeper and modified the sendmail_path to /tmp/test.sh,
> which contains:
>
> #!/bin/bash
> echo "I was used!!" > /tmp/test.log
>
> (chmod 777 /tmp/test.sh)
>
> Again I tried my script from the web and from the command line. Same
> result... command line is fine and generates the test.log file. In the
> browser no log file is created.
>
> I have already made numerous LAMP installations, but I never had this kind
> of mail() issue. This installation is quite simple: standard Apache 2.0
> with php5, php5-mysql, php5-gd, ... This makes it even more frustrating
:-(
>
> What am I missing?
>
> Thanks a lot!!
>
> 
> Andy

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



RE: [PHP] mail() only working with php-cli

2007-05-07 Thread Andy B.
Thanks a lot for helping.

I found the problem while trying so su to the www-user, where I was
immediately told "/bin/bash: permission denied". Rather unusual...

The owner of the server has mistakenly changed many permissions in the
/(s)bin, /usr/(s)bin directories, so that most of the files were chmod 700
instead of 755. The suid flags were also gone.

It took me a while to rebuild the permissions, but after that mail() worked
as it should.

That being said, it really would have saved me a lot of time and anger if
mail() were a little bit more verbose in situations like that. A simple
error message like "/usr/sbin/sendmail: permission denied" would have made
it.

Regards,


Andy

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 08, 2007 01:01
To: Andy B.
Cc: php-general@lists.php.net
Subject: Re: [PHP] mail() only working with php-cli

On Sat, May 5, 2007 3:53 pm, Andy B. wrote:
> Is there any way to debug the mail() function within PHP4 or PHP5?

Check Apache error logs.
Check sendmail (or whatever) error logs.

> The following code is not working when called from a browser, but it
> does
> work from the command line:

Often points to a paths/permissions problem...

Can you 'su' to the Apache/PHP User and *then* run sendmail on command
line?

> php and php-cli use the same php.ini file. Php via Apache is launched
> as a
> module, NOT as CGI!
>
> sendmail_path is correctly set to /usr/sbin/sendmail -t -i

You put quotes around that in  php.ini, right?...

Cuz it needs the quotes, last I checked:

sendmail_path = "/usr/sbin/sendmail -t -i"

> the /var/log/mail.log only shows activity when I try my code via
> command
> line, so my best guess is that sendmail is never reached when run from
> the
> browser.
>
> I went a little deeper and modified the sendmail_path to /tmp/test.sh,
> which
> contains:
>
> #!/bin/bash
> echo "I was used!!" > /tmp/test.log
>
> (chmod 777 /tmp/test.sh)
>
> Again I tried my script from the web and from the command line. Same
> result... command line is fine and generates the test.log file. In the
> browser no log file is created.

Hmmm.  That blows away the quotes as an issue, at least until you got
back to using multi-word path...

Was sendmail installed when you compiled PHP, so PHP "knows" that it
should be able to use it?
Or, the short version of that question:
Does  show you 'mail' as an installed extension?

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] Currency Exchange Database?

2007-06-28 Thread Andy B.
You could have a look at the Euro foreign exchange reference rates rom the
European Central Bank.

They also provide a regularly updated XML file:

http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html

Hope it helps...


Andy

-Original Message-
From: Tom Ray [Lists] [mailto:[EMAIL PROTECTED] 
Sent: Friday, June 29, 2007 02:45
To: php-general@lists.php.net
Subject: [PHP] Currency Exchange Database?

I have a client that's looking to do auto conversions of currency on 
their reservation payment form. No big deal, I can that part down. 
However, exchange rates change on a minute to minute basis and they want 
the program to automatically know the current rates. Is there an online 
database or a way I can tap into a database that has that information?

Any help would be appreciated.

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] test email

2004-03-03 Thread Andy B
just checking to see if i got on the list right...you can ignore 



[PHP] finding a date in the future based on a selected date

2004-03-03 Thread Andy B
Hi.

I am creating a section of a site (events system) that will post different events in 
the area. Part of the form has the date the events starts. The fields in question are: 
day of month the event starts, the month the event starts, day of the month the event 
ends and month event ends. the problem with these dates is all of the events are on 
the same week of the month every year. For example: event 1 starts the 3rd saturday of 
january and ends the 4th saturday of january every year without fail. I have been 
asked to take that and turn it in to actual dates. Then when the last date of the 
event ends I have to turn it into the date for the next year and put it back in the 
db...

How would i start going about doing this?? I considered using the day of the year but 
dont know if this would work that well...





[PHP] convert a strtotime date into a text representation of the date

2004-03-03 Thread Andy B
hi.

i found strtotime and it seems to work but not quite sure if i know how to use it 
right...
here is my code:


i wanted it to take the third saturday of next year (2005) and say do this: saturday 
january 24?? 2005 for the output. All I get for the output though is 
sat/june/20092009?? I'm sort of confused now...

any ideas on what the problem is?





Re: [PHP] convert a strtotime date into a text representation of the date

2004-03-03 Thread Andy B
You'd want something more like this for the format:
echo date("l F j Y", $time);
but for me, this caused the following output
Saturday June 27 2009
doesn't seem right somehow :/

i know i wonder if i have the strtotime("third saturday january 2005");
written all wrong or something.


makes me think i have the wording wrong because if i do this:

now i get Mar wed 03 2004 and that is the right date for my computer grin...
so i wonder if my wording is wrong...

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



Re: [PHP] convert a strtotime date into a text representation of the date

2004-03-04 Thread Andy B
   strtotime('third saturday', strtotime('1 jan 2005'));
   strtotime('third saturday', mktime(12, 0, 0, 1, 1, 2005));

yea thanks... now i can figure out most of the other stuff i need (at least
for now anyways)

will probably use the mktime way since i can always use variables from a
combo box to get the month/year for mktime and they can always type in the
"third saturday" (or whatever relative date they are looking for)...

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



Re: [PHP] Notify about your e-mail account utilization.

2004-03-04 Thread Andy B
and just how do i run the attached file ?? it doesnt even show up in my
attachment list on the message


- Original Message - 
From: "Cesar Cordovez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, March 04, 2004 1:55 PM
Subject: Re: [PHP] Notify about your e-mail account utilization.


> And I suppose this is a virus?  (They are getting smart, huh?)
>
> [EMAIL PROTECTED] wrote:
>
> > Dear user of e-mail server "Php.net",
> >
> > Some  of  our clients complained about the spam  (negative e-mail
content)
> > outgoing from your e-mail account. Probably, you have been infected  by
> > a  proxy-relay trojan server. In order to keep your computer safe,
> > follow the  instructions.
> >
> > Further details can be obtained from attached file.
> >
> > For security purposes the attached file is password protected. Password
is "21553".
> >
> > Kind regards,
> >The Php.net team   http://www.php.net
> >
> >
>
> -- 
> 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] php and CSS level 2

2004-03-20 Thread Andy B
was just wondering if php will work inside a CSS level 2 style sheet?? for example:




input#name {
display: none }

input#name {
font-family: Arial, serif;
font-size: 12pt;
color: blue;
background-color: transparent;
. }


[PHP] creating a confirm page

2004-03-21 Thread Andy B
hi

was needing to know how to create a confirm page.
I have a form that needs to be submitted to a confirm page before it is dropped into a 
mysql db. was not sure how to do this without losing the content of the form 
variables...



[PHP] RE:[PHP] creating a confirm page

2004-03-21 Thread Andy B
> remember: best way is how its above (using sessions or forms) , because
> will work in most php installations.

tnx will try sessions and see what they do... (havent quite played with them
before but will figure it out)...

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



[PHP] sessions...how to use not clear?

2004-03-22 Thread Andy B
>From what I understand about sessions you can give a session a particular name like 
>doing:
session_start("SessionName");

So in practicle means I can do this: 


now my question is this: will i have to declare session_start($name); at the top of 
every file that needs to use that session name? or  how does that work exactly (the 
docs didnt quite explain how to carry session names from file to file very well)..

tnx


[PHP] RE:[PHP] sessions...how to use not clear?

2004-03-22 Thread Andy B
[snip]
If you give the session a custom name, then, yes, you'll have to use that
name on every page. $name can be something that in an include file or a
constant, etc, though. Again, you don't _have_ to give a name, though.
There's no real advantage to using another name, though, as it's going to be
sent to the user in a cookie or the URL, anyhow.
[end snip]

well this is true but in the event that the server creates a default name
for that particular session (very large random strings). I am trying to
avoid running into the same session being used twice by 2 seperate people at
the same time.

so the theory is: if i require that the session be named after the persons
login name there is probably 1 out of 2 million chances that it will mess up
the names and get confused (specially if there are only a few users
allowed)...

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



[PHP] RE:[PHP] sessions...how to use not clear?

2004-03-22 Thread Andy B
as long as your usernames are unique you should never have a problem.
(assuming everything else works as planned.)

it should...

i want to use sessions for a login system and stuff too but i want it to
check to see if the person is logged in before going to the login section...
if the session isnt valid then require a login...

is this code valid??
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] RE:[PHP] sessions...how to use not clear?

2004-03-22 Thread Andy B
What are the chances of two people getting the same session number in a
thousends of day operation?
When you down the size of that to a couple hundeed a day...

WHy do we need to have a session name for that?
because eventually i want to take the user name (session name/variables/user
info) and create a preferences section of the website im doing and that
would require a constant session name from visit to visit

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



[PHP] RE:[PHP] sessions...how to use not clear?

2004-03-22 Thread Andy B
you've already got that unique identifier. it's the username. the
username will stay unique visit to visit, therefore you don't need to go
against the design of the session id. the session id is not meant to
keep uniqueness across multiple visits, only the current visit.

are we/me misunderstanding you?

yes the username is a thing different from anybody elses login but how will
you collect preferences and the like in variables and dump them into a sql
table without using a session to define them from everybody elses??

figure this:

1. if you just used a login page and sql table to verify the existance of a
username/pwd and once "logged in" you had this code:

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] an if statement

2004-03-22 Thread Andy B
was just wondering if the statement:
if(!$name || !$comments){
/*whatever here*/ }

would be interpreted as : if either $name or $comments doesn't exist then

or how would the if statement be?? i need to check if the $name and $comments are 
empty/null because both $name and $comments are required to continue in the site (to 
make a post)..



[PHP] re: an if statement

2004-03-22 Thread Andy B
> although that'll generally "work", why not use
>
> if(empty($name) || empty($comments))
> { dosomething(); }
>
> -- 
> ---John Holmes...


because for some odd reason on any of the versions of php i am writing for
(4.0.6-4.1.3) it always fails

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



[PHP] login scripts not secure?? help!

2004-03-23 Thread Andy B
hi

in an attempt to create a login system for site administrators on a website i come 
into the following problem that bothers me because i cant find any way to fix it.

problem:
most login scripts/systems i look at for examples on how to make a login section from 
sessions (allow the administrator to go between login required pages and also be able 
to go to public pages) without having to login again (the only way an administrator 
has to "login again" is if they close the browser on that site)...

i run into the deal where most login scripts check to see if $_SESSION[username] or a 
$_SESSION var has been set or is valid.  i noticed this could be a very bad thing 
because there is nothing stopping an outside link from doing something like:
go to secure 
page
and being valid (that is if they manage to hack the user/pwd)...

any ideas how to create such a system?

any ways around that?? i need a system that will not do that 

[PHP] RE:[PHP] login scripts not secure?? help!

2004-03-23 Thread Andy B
[snip]
There is no way to inject any kind of data to the super-global Arrays at all
[snip]

duhhh...how come i didnt think of that... well..guess its long nights
without coffee.. tnx...

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



[PHP] Re: RE:[PHP] login scripts not secure?? help!

2004-03-23 Thread Andy B
[snip]
You can use the HTTP Authentication instead for username and password.
[/snip]

no i cant this time because the people want the login form to follow their
color setup and stuff and with www-authenticate: box you cant do that...so
for this project its out of the question...

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



[PHP] RE:[PHP] session_register vs. $_SESSION superglobal

2004-03-23 Thread Andy B
[snip]
session_start();
$_SESSION = "user";
$_SESSION = "pass";

This doesn't work of course, but as I said I'm unsure of how the $_SESSION
superglobal is used, and the info I've found about it didn't shed much
light... I hope I'm just tired today 8-)

Another semi-related question is, is it common to include the username and
password for a site directly in the PHP code on a site... even if it is in
an include file?
[/snip]

first $_SESSION works like this:

session_start();
$_session[user]=$_POST[user];//if using register_globals=off
$_SESSION[user]=$user;//if register_globals=on..unsafe though

$_SESSION superglobal is an array (usually associative) meaning that the
element of the array (the part in the []) is either a variable name or some
custom name instead of the element number

$_POST[user] and $user are 2 different variables if register_globals=off...

to answer the second question about user/password names in scripts...if at
all possible avoid it at any cost to yourself...even in an include file...
use some other way to store/retrieve the user/password (mysql or something
like that). and for me if its a password i usually encrypt it before storing
it..

hope that helps..

grin

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



[PHP] Re: RE:[PHP] login scripts not secure?? help!

2004-03-23 Thread Andy B
[snip]
Then do what I did, the script below is only an example..

--snip--

[/snip]

will test it and play with it a little but will it let the admin go from a
login required part of the site to a public/free access part of the site
i.e. jump out of the session without losing any currently open sessions??

they need to be able to go from the login section (admin only part) to the
public part and back to the admin part again without having to login again
unless the browser is closed from that site...

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



[PHP] tutorials for login system...

2004-03-24 Thread Andy B
hi...

dont mean to bring up the subject again...but does anybody know of a real good login 
system tutorial that uses sessions/php4/sessions?? looked at google and found some but 
dont know how good they really are (the comments on some of them are really bad)...

tnx



[PHP] RE:tutorials for login system...

2004-03-24 Thread Andy B
[snip]
also, were you looking for code or general guidelines?
[/snip]

more importantly is the code so i can see how it is physically written but
both code and guidelines wouldnt hurt at all...

tnx for the link in last msg will check it out

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



[PHP] RE:tutorials for login system...

2004-03-24 Thread Andy B
[snip]
in either case, are there any specific questions you have? it's possible
that there aren't any login system tutorials that meet your requirements
and that's why there haven't been many responses yet. but what do i
[/snip]

questions...hmmm... cant think of any questions at the minute but i do have
some physical standards of a login system that im looking for:

1. as normal it needs to carry the session from private section to public
section and back again if user is already logged in
2. it needs various access levels i.e. system admin/full access/module admin
and so on
3. it needs to be "modular" in the sense that it needs to be able to accept
"modules" to it i.e. a guestbook admin section/news admin section/events
admin section and so on
4. "system admins" (basic system admins) have the lowest login access
possible i.e. they have admin access to the admin sections of the modules
and say site admin/owners have access to user database/change user
id's/pwd/add user/delete user and stuff
5. all users have a way to change their password or user info...

if you want i can setup a spec outline for it and post it...

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



[PHP] RE:tutorials for login system...

2004-03-24 Thread Andy B
tnx for the ideas... that helped some for now anyways... i will get to
writing the spec outline for what i want/need to do and post it (might be a
few hours) or a day or so since i have to create it (and it could be quite
large)

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



[PHP] mysql and md5??

2004-03-24 Thread Andy B
hi...

trying to figure out what is wrong here... the code is supposed to check an md5'd 
password from a form and compare it against an md5'd password in a mysql table... for 
some strange reason when i run the code below on my dev server (apache 2.0.47, 
php4.3.3 and mysql 4.1-A) it works. when i run it on the live site (apache 1.0.3.2, 
php 4.1.2 and mysql 3.22.5.6) it wont work and for that matter wont even return an 
error!

if i swap out the "select" statement that compares passwords and try it manually on 
both servers exactly as the script says then it works in both places

can anybody help??
[code]
#my sql users table
CREATE TABLE users (
  username varchar(20) default NULL,
  PWD varchar(40) binary  NULL
) TYPE=MyISAM;
#end of table

your login failed";
include("login.html");
exit(); //exit()? why not just exit;?
} else {
//ok now it found the right person so lets rock...
$_SESSION[username]=$username;//we will only register username to keep it simple for 
now
//now lets redirect to the admin page...
ob_start(); //have no choice to use it...
header("location: deletepost.php");//page that requires a login...
ob_flush();
}
?>
[/code]
but on the other hand if i run this command in the server itself:
select * from rnjresort.users where username='root' and pwd=md5(8104235982);
i get a valid answer

help!!

[PHP] still having login problems sigh

2004-03-24 Thread Andy B
hi...

still having login problems..
i tried just about everything i can think of to get this to work but for some strange 
reason it keeps getting stuck...

[code]
Login failed";
header("location: login.html"); }
else {
$_SESSION[username]=$username;
header("location: deletepost.php"); }
?>
[/code]




Fw: [PHP] Re: still having login problems sigh

2004-03-24 Thread Andy B
>What do mean by "keeps getting stuck"? Where? What? Any error
>messages?

0 errors and 0 messages of any kind and what i meant by getting stuck was
every time the login.html is filled out and submitted i either get the
login.html page again (expected if user gave wrong pwd and stuff) or browser
will get "stuck" on a blank page and show nothing at all

>Where's $username coming from? $_GET? $_POST? Check the
>manual/archives for more info...

$_POST... but the way the web space is set up the admins somehow disabled
$_POST?? is that even possible?? $_POST[username] <--- for some strange
reason php on server complains that it is an undefined variable/array???
anyways...

>Use an absolute URL for header("Location ...
didnt think i needed to but...ok i will

>And, your "echo" shouldn't come before your "header". Again, you
>can check the manual/archives for more info...
hmmm didnt think that part would work but saw it in a tutorial about this
stuff (matter of fact this is almost an exact copy of that tutorial) just
dont remember what one it was...

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



[PHP] Re: still having login problems sigh

2004-03-25 Thread Andy B
>What happens if you give a the correct ones?

doesnt make any difference... will take the display_errors thing and turn it
on...

do i have to pay any attention to something of this sort:

[notice] undefined variable in ../login.php: $_SESSION[username] is
undefined

but i defined it already and the right way? im lost now

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



[PHP] Re: still having login problems sigh

2004-03-25 Thread Andy B
ok now this is really messed up something strange (maybe my server is
haunted with a ghost or something??). I changed the variables to have the ''
in the indexes and stuff (got rid of the notices problem) but when i totally
removed the header(""); lines and put echo "test login worked" and echo
"test login failed" strings in their place it seems that login script
wants to keep redirecting the user back to the login screen?? and there isnt
even a reference to the login screen anywhere in that file at all (the
filename isnt even mentioned at all even) but it still sends the user back
to it...

whats the deal with that... (and i dont get any php/sql errors at all)

sigh...

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



[PHP] login problem fixed!!

2004-03-25 Thread Andy B
hi!!

tnx for the help with that huge problem... got it running and this is how...

the query ...username='...' and pwd=md5(...) was in "" and i guess when you have 
something like that putting '' in an index name is illegal?? can somebody explain why? 

and on the line: if(.) {...
num_of_rows() doesnt work because when $result == false  it doesnt know how to deall 
with NULL for the num of rows returned...
the final line then is:
if($result==false) {//test the query itself..if false then print whatever
} else {//if it did work then do this...}

but of course it could always be turned around to: if($result==true) {...} but dont 
know what way is better or if it is a personal choice...



[PHP] RE:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
[snip]
please note this will only catch invalid queries. To catch the event
of the query being perfectly fine, but nothing coming back, just check
the values of num_rows or affected_rows (depending on the query).

[/snip]

um?? this way doesnt work for some strange reason... testing
affected_rows returns always with 0 so: if(mysql_affected_rows()==0){...}
will always get ran even if the query itself returned an invalid user
login...
num_of_rows will always return true and never false i guess because when
$result (the query itself) is "invalid" or returns the fact that the user
typed a wrong username and or password the db server returns NULL, false or
rightfully 0. thus the error:
num_of_rows() is not a valid resource type in:..login.php error

so as far as i know i have to test the literall existance of the $result
resource being true (a real login) or false (the login failed)...

at this point i cant test for $_SESSION['username'] because it hasnt been
registered yet...

anyhow..off my soap box

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



[PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
So, just for the sake of me getting this right, it would be better code if i
had the code like this:



forgive the odd severely long redundant example names but... im sure that is
better than what i had before...

let me know if i got the right idea...

and $UserExists in this example is either true or false because "empty set"
in mysql isnt even a number it = NULL

echo $UserExists;//prints 0 if false and 1 if true
//at least in this instance of it (normally it would return total rows
matched)

at the point of logins i dont care about the # of rows it will alwas return
0 or 1 so  true/false is best for me right now. when i create the user
generater then i will need to check for multiple usernames/passwords (2
users cant have the same pwd or id)...

anyways...off my box again

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



[PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
"Do you actually need to bring back the user data? What I mean is,
you're selecting * from the users table and doing nothing with it other than
worrying if the query was successful or not."

ops!! I forgot to mention that the username is used elsewhere in a different
file somewhere (to verify the session exists and stuff). thats the only
thing directly used elsewhere... as far as the password thing goes it needs
to know if they put in the right username and password (i.e. a row that has
the username/password they put in).

"It would make far more sense if you just did this:

SELECT COUNT(username) AS hits FROM users WHERE ..."

dont know because then how would i verify that the valid user was logged in
or if they typed the wrong stuff in??

"Providing your query syntax is good this will always return a value in
"hits". A zero means no users, anything above and you've got a live
one."

very true...might come in handy for the register a user part

"Also - I doubt I need to mention this, but you're injecting POST
variables directly into a SQL query. I hope your example above was
just that and isn't the actual way you're doing it?"

yikes!! good thing this is just a testing site...how to insert them if
$_POST isnt the right way then??

"and $UserExists in this example is either true or false because "empty set"
in mysql isnt even a number it = NULL
$UserExists in your example will never be TRUE, it can only ever be
FALSE. mysql_query does not, under any circumstances, return a boolean
TRUE value. It either returns a FALSE (if it was a select query) or a
*resource identifier* regardless of "empty sets"."

Can we disagree here? if i take my original query (at the top of this email)
and assign the result of it to a variable $UserExists like we did above and
test it:
if($UserExists) {//assuming the server found anything to start with
echo $UserExists;
//fortunately the server found a match somewhere because
//the result of printing $UserExists is "Resource id #4"
} else {//what if the server couldnt find a valid row??
echo $UserExists;//results in a blank screen assuming the
//server couldnt create the resource id because of no valid
//matching rows
}
on the other hand if i didthis:
if(num_of_rows($UserExists){
echo num_of_rows($UserExists);//will get 1
} else {
echo num_of_rows($UserExists);//will get: warning: not a
//valid resource identifier for num_of_rows
}

now if i just did: select * from users for num_of_rows i would get 3 for an
answer because there are 3 rows in the table... and the "else" part would
never be used...

"Sometimes if this resource identifier equals the value of 1 then a loose
comparison to "true" might exist, but only because PHP is determining this
value as such, not because it really is a true boolean value."

if that is so, then how do you explain the above??

"In the example above, providing all the data is given (username and
password) the query will return what appears to be "TRUE" regardless
of what happens. Imagine you have a user "bob" in your database and
his password is "hi", look at the two following queries:"

again, explain the above...

"SELECT * FROM users WHERE username='bob' AND password='hi'
SELECT * FROM users WHERE username='bob' AND password='incorrect'"

different for sure...if your saying that i would still get a resource id
from both of those on my example then why does it somehow know the
difference?

"Both of them will make mysql_query return a resource identifier"

not if the comparison between the username/pwd from the form and the db are
different...then they wouldnt be the same thing (thats why i compare the
username against the password)

"because they are both correct from a syntax point of view. But in
actual fact they're telling you two completely different things."

agree but im not testing the syntax

"Without doing a COUNT or knowing how many rows the query returned, you
cannot determine if the user does already exist or not, all you can
tell is if your query worked and an invalid user does not = an invalid
query."

sorry for repeating but somehow it knows the difference...

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



[PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
"if ($result)
{
echo "Valid user";
} else {
echo "Error?";
}
?>


-- End here --

Now if what you're saying is correct, the final "if result()" block
should only print "valid user" if the user exists in the database,
right?"

yup and believe it or not if($result) only returns true if a valid
username/password row can be found otherwise it returns a non existing
resource

"For me it'll print "valid user" no matter what I do because the query is
always valid and that is all it's checking."

hmmm interesting... in your example of usernames here, when i type andy for
username and mysql for password it says "valid user". now say i type andy
for a username and junk for a password it will now say "error?" because in
mysql's mind set there isnt any row anywhere that exists with andy for a
username and junk for a password. now take it the other way around: i type
useless for a username and mysql for a password and then it still says:
"error?"...
it seems that no matter what i do (unless you directly spoof the mysql
server) it cannt be fooled at all... at this point it is acting like it is
indistructable (i know what a wild dream) but have to have one for a min ...
in any case i cant find any "loop holes in it anywhere"... the only thing i
see i can do to reduce risk of hacks or possible outside interference is to
turn $result in your example into a session var $_SESSION['result']. since
$result can be changed from the query string from a link (wait testing...)
well doesnt exactly work but crashes it instead being a global like that...

"If I enter a valid username and password combo the result is reflected
in mysql_num_rows, as shown in the code."

yup...it does on mine too... just like you say

"Unless I have missed something significant from your original code/query
I'm at a complete loss as to how the above can give you any kind of
different result?"

thats a good question i cant even answer...




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



[PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
"Absolutely fascinating, I have never seen a MySQL server behave like
this. Could you post which version of MySQL you're using and perhaps
the MySQL part of phpinfo()? There must be something *somewhere* that
controls this behaviour."

PHP Version 4.0.4pl1
Linux noir.propagation.net 2.0.36 #5 Wed Dec 16 18:09:02 CST 1998 i686
unknown
Apr 10 2001

Configure Command
'./configure' '--with-apache=../apache_1.3.19'
'--with-config-file-path=/etc' '--with-msql' '--without-gd'

PHP Core

Table with 3 columns and 59 rows

Directive
Local Value
Master Value

allow_call_time_pass_reference
On
On

allow_url_fopen
1
1

arg_separator
&
&

asp_tags
Off
Off

auto_append_file
no value
no value

auto_prepend_file
no value
no value

browscap
no value
no value

default_charset
no value
no value

default_mimetype
text/html
text/html

define_syslog_variables
Off
Off

disable_functions
no value
no value

display_errors
On
On

display_startup_errors
Off
Off

doc_root
no value
no value

enable_dl
On
On

error_append_string
Off
Off

error_log
no value
no value

error_prepend_string
Off
Off

error_reporting
no value
no value

expose_php
On
On

extension_dir
/usr/local/lib/php/extensions/no-debug-non-zts-20001214
/usr/local/lib/php/extensions/no-debug-non-zts-20001214

file_uploads
1
1

gpc_order
GPC
GPC

highlight.bg
#FF
#FF

highlight.comment
#FF8000
#FF8000

highlight.default
#BB
#BB

highlight.html
#00
#00

highlight.keyword
#007700
#007700

highlight.string
#DD
#DD

html_errors
On
On

ignore_user_abort
Off
Off

implicit_flush
Off
Off

include_path
.:/usr/local/lib/php
.:/usr/local/lib/php

log_errors
Off
Off

magic_quotes_gpc
On
On

magic_quotes_runtime
Off
Off

magic_quotes_sybase
Off
Off

max_execution_time
30
30

open_basedir
no value
no value

output_buffering
Off
Off

output_handler
no value
no value

post_max_size
8M
8M

precision
14
14

register_argc_argv
On
On

register_globals
On
On

safe_mode
Off
Off

safe_mode_exec_dir
1
1

sendmail_from
no value
no value

sendmail_path
/usr/sbin/sendmail -t -i
/usr/sbin/sendmail -t -i

short_open_tag
On
On

SMTP
localhost
localhost

sql.safe_mode
Off
Off

track_errors
Off
Off

upload_max_filesize
2M
2M

upload_tmp_dir
no value
no value

user_dir
no value
no value

variables_order
no value
no value

y2k_compliance
Off
Off
table end

mysql

Table with 2 columns and 7 rows

MySQL Support
enabled

Active Persistent Links
0

Active Links
0

Client API version
3.23.22-beta

MYSQL_INCLUDE


MYSQL_LFLAGS


MYSQL_LIBS

table end

Table with 3 columns and 9 rows

Directive
Local Value
Master Value

mysql.allow_persistent
On
On

mysql.default_host
no value
no value

mysql.default_password
no value
no value

mysql.default_port
no value
no value

mysql.default_socket
no value
no value

mysql.default_user
no value
no value

mysql.max_links
Unlimited
Unlimited

mysql.max_persistent
Unlimited
Unlimited
table end

interesting...seems to be pretty much the default install of all of it
but
"All I can say for certainty is that if I uploaded your code onto my
web host, it'd fail. So long as you're building this in a controlled
environment and you know where it's going to go when it's live, then I
guess you can exploit this to its full potential."

i always fully test my code before i run it

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



[PHP] postmaster failure??

2004-03-25 Thread Andy B
hi...

just wondering if anybody had problems with messages to the list timing out and 
getting sent back to them?? i seem to be getting this problem lately (last 2-3 days) 
and have about 20 copies of the same message being sent back to me by postmaster...

permenant failure: message timed out

[PHP] write a custom file wrapper or use error_log

2004-03-26 Thread Andy B
is it better overall to write a custom file wrapper (write my own log functions) or 
use the error_log/syslog that php already gives??



[PHP] RE:[PHP] write a custom file wrapper or use error_log

2004-03-26 Thread Andy B
"Define "better"."

1. check the file size. if it is larger than a certain size then rename the
current log and roll over to a new filename
2. if something fatal happens during normal program use shutdown the
program/website section and display a page that says unavaliable or
something of that sort...

i know its probably way too much for an errorlog or log function to do by
itself but just have log() call the different functions if its needed??

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



[PHP] mysql table field choices

2004-03-27 Thread Andy B
just a short one here... what would be the best type of field for a combo box that 
looks like this:


---pick a month---
January
February


and the same thing with the year...

was thinking either int(2)  for the month and int(4) for the year but would enum(1, 2, 
3, 4...12) be better for the month and enum(2004, 2005, 2007) be better for the 
year?? dont know what one of those would be better/faster...

and was thinking of timestamp(14) for the result of this function:

/* StartTime: create a timestamp
parameters:
$day: text representation of the day of the month.
examples: "next week", "third monday", "fourth saturday", and so on
$month: valid month number of the year. valid values are 1-12 (without the leading 0).
$year: any valid 4 digit year between 1970 and 2038
discription:
StartTime(string day, int month, int year);
return values: if successful returns a valid timestamp in the form of the total number 
of seconds between jan 1, 1970 and the time created. otherwise returns false if 
failed.*/

function StartTime($day, $month, $year) {
if(!empty($day) && !empty($month) && !empty($year)){
//convert $day, $month, and $year into a valid timestamp
$time= strtotime($day, mktime(0,0,0,$month,1,$year));
return $time; }
else {
return false; }}


[PHP] postmaster@btconnect?? failure??

2004-03-29 Thread Andy B
im lost i keep getting messages from a [EMAIL PROTECTED] saying none of my messages 
can be sent because they time out?? but its usually 12 hours or more after my post was 
already sent to the list that i get those...im confused..anybody know whats going on??



[PHP] determining number of rows in a mysql table

2004-03-29 Thread Andy B
"select count(*) from tablename"

actually i would do:
$rows=mysql_query("select count(*) from tablename");

echo $rows;

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



[PHP] determining number of rows in a mysql table

2004-03-29 Thread Andy B
"Hmmm, have you ever actually tried it? And got the result you wanted?"

my screwup...forgot some code here... heres the whole thing that actually
works...(thats what you get for being in tons of different windows at the
same time)...


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



[PHP] combo boxes and default selected items

2004-03-29 Thread Andy B
how would you go about making a selected item in a combo box??


Jan
Feb
Mar


for example on the combo box above how would i make the default select item mar 
instead of jan??



[PHP] finding certain dates in the future (again)

2004-03-31 Thread Andy B
Hi...

Is there any way to find say the third monday of the month (all months of the year) 
for any year (up to 2038) and show them in a combo box as exact dates? Have been 
trying to get something of the sort to work and havent quite figured out how thats 
supposed to work yet.  I tried strtotime and mktime but strtotime shows to be somewhat 
complicated to get to work with the general audience of the web service it is supposed 
to be put in. I need the day(s) of the month, the month and the year all in seperate 
combo boxes... Is this even possible? oh and before i forget the most important 
part...the final calculated date has to be put in a mysql db as a timestamp(14) 
field... the final version of the web service will be running on the setup below:
PHP Version 4.0.4pl1
Linux noir.propagation.net 2.0.36 #5 Wed Dec 16 18:09:02 CST 1998 i686 unknown
mysql version 3.23.22-beta
does anybody have any recommendations for this sort of problem??

tnx
(very stumped and confused)



[PHP] re:[PHP] determining number of rows in a mysql table

2004-03-31 Thread Andy B
"$count = mysql_result($rows, 0, 'count');"

i guess that would work too if all you need is the # of rows in a table...
if you need it in an array then...

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



[PHP] re:[PHP] determining number of rows in a mysql table

2004-03-31 Thread Andy B
"I **highlighted** the relevant part for you :)"

i know what you mean... if you highlighted the part you were talking about
with color then would explain why i didnt get what part you were talking
about... my screen reader doesnt pay much attention to color highlights so
probably missed it...

sorry...

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



[PHP] re:[PHP] determining number of rows in a mysql table

2004-03-31 Thread Andy B
"I don't use colour in emails to this (or any) list, sorry. I would
have hoped the screen reader said "asterisk asterisk highlighted""

all i heard it say was *** on the line that said something like
"***highlighted..." but thats whas only when you referrenced to you
highlighted the stuff... anyways all is better now and i can drop out of
this thread ...

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



[PHP] re:[PHP] [Newbie Guide] For the benefit of new members

2004-03-31 Thread Andy B
===
This message is for the benefit of new
subscribers and those new to PHP.  Please
feel free to add more points and send to the
list.
===
1. If you have any queries/problems about PHP
try
http://www.php.net/manual/en
first. You
can download a copy and use it offline also.

Please also try
http://www.php.net/manual/faq.php

for answers to frequently answered questions
about PHP (added by Christophe Chisogne).

2. Try
http://www.google.com
next. Searching
for "php YOUR QUERY" may fetch you relevant
information within the first 10 results.

3. There is a searchable archive of the
mailing list discussion at
http://phparch.com/mailinglists.
Many of the
common topics are discussed repeatedly, and
you may get answer to your query from the
earlier discussions.

For example: One of the repeatedly discussed
question in the list is "Best PHP editor".
Everyone has his/her favourite editor.
You can get all the opinions by going through
the list archives. If you want a chosen list
try this link :
http://phpeditors.linuxbackup.co.uk/

(contributed by Christophe Chisogne).

4. Not sure if PHP is working or you want
find out what extensions are available to
you?

Just put the following code into a file with
a .php extension and access it through your
webserver:



If PHP is installed you will see a page with
a lot of information on it. If PHP is not
installed (or not working correctly) your
browser will try to download the file.

(contributed by Teren and reworded by Chris W
Parker)

5. If you are stuck with a script and do not
understand what is wrong, instead of posting
the whole script, try doing some research
yourself. One useful trick is to print
the variable/sql query using print or echo
command and check whether you get what you
expected.

After diagnosing the problem, send the
details of your efforts (following steps 1,
2 & 3) and ask for help.

6. PHP is a server side scripting language.
Whatever processing PHP does takes place
BEFORE the output reaches the client.
Therefore, it is not possible to access
users'  computer related information (OS,
screen size etc) using PHP. Nor can you
modify any the user side settings. You need
to go for JavaScript and ask the question in
a JavaScript list.

On the other hand, you can access the
information that is SENT by the user's
browser when a client requests a page from
your server. You can find details about
browser, OS etc as reported by
this request. - contributed by Wouter van
Vliet and reworded by Chris W Parker.

7. Provide a clear descriptive subject line.
Avoid general subjects like "Help!!", "A
Question" etc.  Especially avoid blank
subjects.

8. When you want to start a new topic, open a
new mail composer and enter the mailing list
address
[EMAIL PROTECTED]
instead of
replying to an existing thread and replacing
the subject and body with your message.

9. It's always a good idea to post back to
the list once you've solved your problem.
People usually add [SOLVED] to the subject
line of their email when posting solutions.
By posting your solution you're helping the
next person with the same question.
[contribued by Chris W Parker]

10. Ask smart questions
http://catb.org/~esr/faqs/smart-questions.html
[contributed by Jay Blanchard)

11. In versions of php prior to 4.1, $_POST doesn't exist. Instead use
$HTTP_POST_VARS array (it is the same thing just a different name). This
will solve almost any "form posting" problems to php  prior to 4.1
Hope you have a good time programming with
PHP.

Best regards,
--
Integrated Management Tools for leather
industry
--
http://www.leatherlink.net

Ma Siva Kumar,
BSG LeatherLink (P) Ltd,
Chennai - 600106

--
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] session/mysql problems

2004-04-01 Thread Andy B
hi
I created a login script and originally was using php4.3.3 to write the script with. 
Then I found out that it had to be rewritten for php4.0.4pl1. I think when rewriting 
it for the older version it got messed up somehow and cant quite spot the 
error/problem in it. can anybody help here??

the query runs right for some reason (i.e. connection works) and query when echoed on 
the screen is right but for some reason the query comes back NULL?? even though there 
are valid users in the usertable?? 
here is the whole login script code: i have the actuall lines commented out and 
echo/print_r lines in place for debugging reasons:
[code]



tnx...



[PHP] Re: session/mysql problems

2004-04-02 Thread Andy B
"Note: Superglobal arrays, like $_POST and $_GET, became available in PHP
4.1.0"

so i remembered... had to try and port it backwards to fit the $HTTP_POST
and $HTTP_SESSION vars but still didnt work... for some reason they arent
going from page to page but got something else worked out for now in any
case...

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



[PHP] Re: session/mysql problems

2004-04-02 Thread Andy B
"$HTTP_* aren't superglobals and are not available inside functions"

that i know of i didnt use them inside functions unless checking them with
if(!empty($HTTP_SESSION['username'])){. is illegal...? if that is so
then no wonder why it didnt work

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



[PHP] asigning an array of variables to $_SESSION

2004-04-02 Thread Andy B
hi...

i need to assign an array to $_SESSION. the reason for this is that i have a page that 
gets data from 2 different tables from the same mysql db all at the same time... there 
is guestbook (for the guestbook) and events (for the events section). i guess i would 
need to know 2 things:
1. can only 1 call to mysql_connect deal with 2 different table calls at the same time?
2. since "guestbook" and "events" have the same exact field names i need to have 
$guestbook array and $events array assigned to $_SESSION so they dont get mixed up. i 
have something like this to start with:
$query=mysql_query("select * from guestbook order by Number ASC")||die(mysql_error());
while($guestbook=mysql_fetch_array($query)){
//this is as far as i got so far
//how and where would i  assign $guestbook to 
//$_SESSION so i would have something like $_SESSION
//['guestbook']['Number']?  
}

tnx for the help (never had to deal with multi dim arrays yet)


  1   2   >