Re: [PHP] imap mail() problems

2003-04-04 Thread Jason Wong
On Saturday 05 April 2003 05:58, Alec Wallis wrote:
> Thanks for the suggestions, I have tried them all but with no joy.  Still
> exactly the same problem.  Pretty sure its not my SMTP server as using
> Outlook it works fines.  Any other ideas as would prefer not to have to use
> the mail() function multiple times.

Could you post a short, self-contained example that doesn't work?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Computer programmers never die, they just get lost in the processing.
*/


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



Re: [PHP] PHP Email Attachment problem

2003-04-04 Thread Jason Wong
On Saturday 05 April 2003 00:41, Michael Arena wrote:
> After reading the file_upload section on PHP.net i got the following script
> working on the  server..it sends an attachment from a form now but it's
> just of size 0 and always a txt file. I know it must be some little thing
> wrong then this will work, maybe you can eye it for me and let me know if
> you think i should change anything..

Michael, I referred you to the upload example in the manual (which you say you 
got working) so that you will have a solid working foundation to build upon. 
In the example, the code to check whether a file has been uploaded is:

  if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {

So why are you using this:

>  if ($fileatt != "")
>  {





> $uploaddir = '/home/sites/webserver.agraservices.net/web/mike/';
> echo "it found the attachment";
>move_uploaded_file($_FILES['fileatt']['tmp_name'], uploaddir .
> $_FILES['fileatt']['name']);
>}

As has been pointed out you're missing the $ in uploaddir.

>  // Obtain file upload vars
>$fileatt  = "/home/sites/webserver.agraservices.net/web/mike/";   //
> Location of file on server
>$fileatt_type = $_FILES['fileatt']['type'];// Type of file being sent
>$fileatt_name = $_FILES['fileatt']['name'];// Name of file
>
>  $headers = "From: $from";
>
>  if (file_exists($fileatt))
> {
>// Read the file to be attached ('rb' = read binary)
>$file = fopen($fileatt,'rb');
>$data = fread($file,filesize($fileatt));
>fclose($file);

$fileatt is pointing to a directory. You need to define it as:

$fileatt = 
"/home/sites/webserver.agraservices.net/web/mike/{$_FILES['fileatt']['name']}";

Note the braces {}. Read the language reference of the manual (not sure where 
exactly it is so can't be more specific) to see why they're needed and how 
they work.

Not sure whether there are any more errors in your code, but correct the above 
first and see where that gets you.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Hailing frequencies open, Captain.
*/


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



Re: [PHP] Fast Templates error in PHP 4.3.1 ?

2003-04-04 Thread Travel Jadoo
PHP 4.3.1 apparently doesn't allow anymore assigning of the same
function name twice which FastTemplates still does around line 630 with
function "clear_assign" for a perl module alias.

So Fast Template users beware!

Alfred

On Fri, 2003-04-04 at 19:17, Travel Jadoo wrote:
> We upgraded the server to PHP 4.3.1 but now my Fast Templates include
> file doesn't work. 
> 
> Odd thing is that a test as follows doesn't generate a response as if
> the file cannot be read.
> 
> ft.inc:
>  echo 'test';
> 
> class etc
> 
> ?>
> 
> Anyone got any ideas?
> 
> Alfred
> 
> -- 
> www.traveljadoo.com   -We add magic to your travel
-- 
www.traveljadoo.com   -We add magic to your travel

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



Re: [PHP] HTTP or HTTPS

2003-04-04 Thread Alexander Weber
Unfortunally is not set. It's like the variable does not exist, because when
I extract the varaible $_SERVER with foreach I don't get HTTPS as key, only
SERVER_PROTOCOL.

I'm using PHP 4.3.1 as Apache2 Module on Win2k SP3.
register_globals OFF
safe:mode OFF

stunnel 4.04 on x86-pc-mingw32-gnu WIN32 with OpenSSL 0.9.7 31 Dec 2002

If you need more info:

ICQ 46858764.

Thanx

Alex

"John W. Holmes" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> > anybody knows how to find out the connection type (http or httpS)?
> Tried
> > out
> > $HTTP_SERVER_VARS.
>
> $_SERVER['HTTPS'] will be set if it's over HTTPS.
>
> ---John W. Holmes...
>
> PHP Architect - A monthly magazine for PHP Professionals. Get your copy
> today. http://www.phparch.com/
>
>



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



Re: [PHP] Cookies not being read - begging php 4 chapter 8 pg 283

2003-04-04 Thread Jason Wong
On Saturday 05 April 2003 01:13, Paul Kraus wrote:
> Ok I fixed this by adding this line to the top of my script.
>
> $font=$HTTP_COOKIE_VARS['font'];
> Then everything worked great.
> I tried to access them like this
> $HTTP_COOKIE_VARS[font['type']] but this would not work.
>
> Is my syntax wrong are must you always set the http_cookie to a variable
> if it's an array?

The syntax for accessing items in multi-dimensional arrays is:

  $HTTP_COOKIE_VARS['font']['type']

> This book does not mention HTTP_COOKIE_VARS at all.
> Nor did it mention $_POST or $_GET.
>
> Am I doing something wrong with my script do I need to change something?
>
> Is there a new way to do $HTTP_COOKIE_VARS like there is for POST and
> GET?

$_COOKIE

THe book is out of date. RTFM for the latest info, also read the 
changelog/history to see what has changed since the version of PHP mentioned 
in your book was released.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
The human mind ordinarily operates at only ten percent of its capacity
-- the rest is overhead for the operating system.
*/


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



Re: [PHP] Running scripts in non-php file

2003-04-04 Thread Rasmus Lerdorf
That should be all you need.  Make sure that something isn't re-assigning
those extensions later on in your conf file.  Perhaps you changed the
wrong addtype?  Liek a commented out one?

-Rasmus

On Fri, 4 Apr 2003, Tom Tsongas wrote:

> Hi folks.
>
> This will probably sound like a stupid question, but I will ask it
> anyway: how can I get the PHP interpreter to execute scripts in files
> that don't have the .php extension? i.e. if I want to embed php code
> into a .html or .xml file that gets run.
>
> I thought all I had to do was add the extension to the AddType
> application in the apache configuration file so it looked like this:
>
> AddType application/x-httpd-php .php .html .xml
>
> I tried it but the code isn't being executed. (And yes, I did restart
> apache)
> Am I missing something?
>
> Tom
>
>
> --
> 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] Bug ?

2003-04-04 Thread Ciprian Trofin
I tried something like this:

";
echo $arrayB[0];
?>


The output is:
1
1

I think it should be:
1
5



Systems tested:
Windows 98 / PHP 4.2.2
Windows 2000 SP3 / PHP 4.1.1


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



RE: [PHP] Re: Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Rasmus Lerdorf
You are getting completely mixed up.  Simplifying your example:

function foo() { echo "foo"; }

$a = "".foo()."";

Will you agree that this is bogus code?  foo() is not going to return
anything, so the resulting value of $a is going to be "".
Correct?  But while that assignment is happening the foo() function echoes
something, so you will see "foo" in the output, but it has nothing to do
with what ends up in $a.  Nothing changes when you change the code to be:

function foo() { echo "foo"; }

echo "".foo()."";

The parser is going to build a string to be echoed since you used the
string concatenation operator (dot).  While building that string one of
the components happen to output something, so that something will get
output.  Then the string that was built will be output.  So what you see
is:

foo

Perhaps it is clearer if we make the function return something:

function foo() { echo "foo"; return "bar"; }

echo "".foo()."";

What do you think the output will be here?  We build a string out of the
components, but while building, foo() happens to echo "foo", then we
finish constructing the string and output the final string.  So the result
is:

   foobar

As someone else pointed out, if you use commas here, things change a bit:

function foo() { echo "foo"; }

echo "",foo(),"";

The comma syntax for echo is basically a shortcut for executing echo
multiple times.  The above is equivalent to writing:

echo "";
echo foo();
echo "";

In this case things will be output in the correct order as we are no
concatenating a bunch of parts to make a single string before echoing it
in this case.

-Rasmus

On Fri, 4 Apr 2003, Daevid Vincent wrote:

> Mmm. I'm still not following and not completely convinced.
>
> Changing "echo alarmLightYMD();" to simply "alarmLightYMD();" in the bottom
> function doesn't print anything in the table cell at all (for the first test
> case).
>
> While your idea at first makes sense and does seem like a newbie mistake
> (and you are correct, I do have nested "echo" statements come to think of
> it). What I don't get is why it's not consistent. "Expanding" the relevant
> lines, it should be like this:
>
> echo "".(echo "")."";
>
> Which fails, and the other line would be (which works):
>
> "); ?>
>
> In my book, they're both double echoing the output if you will... Are you
> with me on that?
>
> So again, why does the second one work and the first one doesn't?
>
> > -Original Message-
> > From: Philip Hallstrom [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 04, 2003 5:20 PM
> > To: Daevid Vincent
> > Cc: [EMAIL PROTECTED]
> > Subject: [PHP] Re: Found a bug in 4.2.3 re:  and echo vs. 
> >
> >
> > It's a coding error... at least I think so.
> >
> > change alarmLightMySQL just return the results not "echo"
> > them... echoing
> > them doesn't make much sense inside another echo statement...
> >
> > On Fri, 4 Apr 2003, Daevid Vincent wrote:
> >
> > > Here, try this bullshit...
> > >
> > > I can't upgrade to a more recent version as I'm not in
> > control of the
> > > server, but I've tried it with both 4.1.2 and 4.2.3 on
> > linux with a RH
> > > install. Can anyone confirm or dispute this bug exists in
> > later versions?
> > >
> > > How does a parsing error like this go un-noticed for so long?
> > >
> > > Obviously I took out all the interesting stuff in the page
> > and so that can't
> > > be blamed. This is about as bare skeleton test case as you can get.
> > >
> > > *sigh*
> > >
> > > snip
> > >
> > >  > >   function alarmLightYMD()
> > >   {
> > >   return "";
> > >   }
> > >
> > >   function alarmLightMySQL()
> > >   {
> > >   echo alarmLightYMD();
> > >   }
> > > ?>
> > > 
> > > 
> > >   FUCKED UP PHP Bug #1234170238741023
> > > 
> > >
> > > 
> > > PHP Version 4.1.2
> > > PHP Version 4.2.3
> > > 
> > > Why the FUCK doesn't this work
> > > 
> > > 
> > >  > > for ($i = 0; $i < 10; $i++ ) {
> > >echo "";
> > >   echo "".alarmLightMySQL()."";
> > >   echo "this fails!";
> > >echo "";
> > > }
> > > ?>
> > > 
> > >
> > > 
> > >
> > > YET THIS DOES!
> > > 
> > > 
> > > 
> > >
> > >   
> > >   this works
> > >
> > > 
> > > 
> > > 
> > > 
> > >
> > > snip
> > >
> > >
> > >
> > > "Ezekiel 25:17. The path of the righteous man is beset on
> > all sides by the
> > > inequities of the selfish and the tyranny of evil men.
> > Blessed is he who in
> > > the name of charity and goodwill shepherds the weak through
> > the valley of
> > > darkness, for he is TRULY his brother's keeper and the
> > finder of lost
> > > children. And I will strike down upon thee with GREAT vengeance and
> > > FU-U-U-URIOUS anger, those who attempt to poison, and
> > destroy my brothers!
> > > And you will KNOW my name is the Lord, when I lay my
> > vengeance upon thee!"
> > >
> > >
> > > --
>

Re: [PHP] Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Pablo
On 04/04/2003 11:20 PM, Leif K-Brooks ([EMAIL PROTECTED]) wrote:

> Of course you can concatenate a string with a function!  It works
> perfectly for me.

So both tables in the output look the same? Not for me under PHP 4.3.0:

(1)

this fails!

(2)



this works


If I change '.' to ',' in this line:

echo "".alarmLightMySQL()."";

I get the expected result:

this fails!

It appears that - in this case, at least - one cannot concatenate a string
with a function. I never meant to imply that this made sense.

Pablo


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



Re: [PHP] Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Leif K-Brooks
Of course you can concatenate a string with a function!  It works 
perfectly for me.

Pablo wrote:

On 04/04/2003 7:06 PM, Daevid Vincent ([EMAIL PROTECTED]) wrote:

 

Here, try this bullshit...
   

Try this. Change this line:

echo "".alarmLightMySQL()."";

to this, and you will get the expected result:

echo "",alarmLightMySQL(),"";

It appears that one cannot concatenate a string with a function.

Pablo

 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.



Re: [PHP] Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Pablo
On 04/04/2003 7:06 PM, Daevid Vincent ([EMAIL PROTECTED]) wrote:

> Here, try this bullshit...

Try this. Change this line:

echo "".alarmLightMySQL()."";

to this, and you will get the expected result:

echo "",alarmLightMySQL(),"";

It appears that one cannot concatenate a string with a function.

Pablo


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



Re: [PHP] Re: Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Leif K-Brooks
Neither works.  You're doing something like this in your other code:

function foo(){
 echo "foo";
}
echo foo();
The foo() doesn't return the (non-existant) value from echo, it simply 
echo()s and returns nothing, and there's nothing wrong with echo()ing 
nothing.  It would fail if you were using

function foo(){
 return echo "foo";
}
echo foo();
Daevid Vincent wrote:

Mmm. I'm still not following and not completely convinced.

Changing "echo alarmLightYMD();" to simply "alarmLightYMD();" in the bottom
function doesn't print anything in the table cell at all (for the first test
case).
While your idea at first makes sense and does seem like a newbie mistake
(and you are correct, I do have nested "echo" statements come to think of
it). What I don't get is why it's not consistent. "Expanding" the relevant
lines, it should be like this:
echo "".(echo "")."";

Which fails, and the other line would be (which works):

"); ?>

In my book, they're both double echoing the output if you will... Are you
with me on that?
So again, why does the second one work and the first one doesn't?

 

-Original Message-
From: Philip Hallstrom [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 5:20 PM
To: Daevid Vincent
Cc: [EMAIL PROTECTED]
Subject: [PHP] Re: Found a bug in 4.2.3 re:  and echo vs. 

It's a coding error... at least I think so.

change alarmLightMySQL just return the results not "echo" 
them... echoing
them doesn't make much sense inside another echo statement...

On Fri, 4 Apr 2003, Daevid Vincent wrote:

   

Here, try this bullshit...

I can't upgrade to a more recent version as I'm not in 
 

control of the
   

server, but I've tried it with both 4.1.2 and 4.2.3 on 
 

linux with a RH
   

install. Can anyone confirm or dispute this bug exists in 
 

later versions?
   

How does a parsing error like this go un-noticed for so long?

Obviously I took out all the interesting stuff in the page 
 

and so that can't
   

be blamed. This is about as bare skeleton test case as you can get.

*sigh*

snip

";
}
function alarmLightMySQL()
{
echo alarmLightYMD();
}
?>


FUCKED UP PHP Bug #1234170238741023


PHP Version 4.1.2
PHP Version 4.2.3

Why the FUCK doesn't this work


";
echo "".alarmLightMySQL()."";
echo "this fails!";
 echo "";
}
?>



YET THIS DOES!



 

this works
 




snip



"Ezekiel 25:17. The path of the righteous man is beset on 
 

all sides by the
   

inequities of the selfish and the tyranny of evil men. 
 

Blessed is he who in
   

the name of charity and goodwill shepherds the weak through 
 

the valley of
   

darkness, for he is TRULY his brother's keeper and the 
 

finder of lost
   

children. And I will strike down upon thee with GREAT vengeance and
FU-U-U-URIOUS anger, those who attempt to poison, and 
 

destroy my brothers!
   

And you will KNOW my name is the Lord, when I lay my 
 

vengeance upon thee!"
   

--
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
   



 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.



Re[2]: [PHP] Apache SetHandler

2003-04-04 Thread Tom Rogers
Hi,

Saturday, April 5, 2003, 6:29:50 AM, you wrote:
Z> Hi !

Z> what i want is to write something in PHP which does authentication
Z> (not basic auth but my own DB driven stuff) and after that something
Z> apache resumes normal operation so that whatever is served afterwards
Z> does not need to know anything of the auth process.

You would probably be better off using an apache module for this.
Something like Mod Auth MySQL It would be easy to make the module
set a few enviroment variables if you need to pass info to php.

-- 
regards,
Tom


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



RE: [PHP] Re: Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Daevid Vincent
Mmm. I'm still not following and not completely convinced.

Changing "echo alarmLightYMD();" to simply "alarmLightYMD();" in the bottom
function doesn't print anything in the table cell at all (for the first test
case).

While your idea at first makes sense and does seem like a newbie mistake
(and you are correct, I do have nested "echo" statements come to think of
it). What I don't get is why it's not consistent. "Expanding" the relevant
lines, it should be like this:

echo "".(echo "")."";

Which fails, and the other line would be (which works):

"); ?>

In my book, they're both double echoing the output if you will... Are you
with me on that?

So again, why does the second one work and the first one doesn't?

> -Original Message-
> From: Philip Hallstrom [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 04, 2003 5:20 PM
> To: Daevid Vincent
> Cc: [EMAIL PROTECTED]
> Subject: [PHP] Re: Found a bug in 4.2.3 re:  and echo vs. 
> 
> 
> It's a coding error... at least I think so.
> 
> change alarmLightMySQL just return the results not "echo" 
> them... echoing
> them doesn't make much sense inside another echo statement...
> 
> On Fri, 4 Apr 2003, Daevid Vincent wrote:
> 
> > Here, try this bullshit...
> >
> > I can't upgrade to a more recent version as I'm not in 
> control of the
> > server, but I've tried it with both 4.1.2 and 4.2.3 on 
> linux with a RH
> > install. Can anyone confirm or dispute this bug exists in 
> later versions?
> >
> > How does a parsing error like this go un-noticed for so long?
> >
> > Obviously I took out all the interesting stuff in the page 
> and so that can't
> > be blamed. This is about as bare skeleton test case as you can get.
> >
> > *sigh*
> >
> > snip
> >
> >  > function alarmLightYMD()
> > {
> > return "";
> > }
> >
> > function alarmLightMySQL()
> > {
> > echo alarmLightYMD();
> > }
> > ?>
> > 
> > 
> > FUCKED UP PHP Bug #1234170238741023
> > 
> >
> > 
> > PHP Version 4.1.2
> > PHP Version 4.2.3
> > 
> > Why the FUCK doesn't this work
> > 
> > 
> >  > for ($i = 0; $i < 10; $i++ ) {
> >  echo "";
> > echo "".alarmLightMySQL()."";
> > echo "this fails!";
> >  echo "";
> > }
> > ?>
> > 
> >
> > 
> >
> > YET THIS DOES!
> > 
> > 
> > 
> >  
> > 
> > this works
> >  
> > 
> > 
> > 
> > 
> >
> > snip
> >
> >
> >
> > "Ezekiel 25:17. The path of the righteous man is beset on 
> all sides by the
> > inequities of the selfish and the tyranny of evil men. 
> Blessed is he who in
> > the name of charity and goodwill shepherds the weak through 
> the valley of
> > darkness, for he is TRULY his brother's keeper and the 
> finder of lost
> > children. And I will strike down upon thee with GREAT vengeance and
> > FU-U-U-URIOUS anger, those who attempt to poison, and 
> destroy my brothers!
> > And you will KNOW my name is the Lord, when I lay my 
> vengeance upon thee!"
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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



RE: [PHP] custom error handling + fopen

2003-04-04 Thread Rasmus Lerdorf
I am not sure if you are asking me a question or not here.  But no, like I
said, when you set a custom error handler, that error handler is going to
get called for all catchable errors.

-Rasmus

On Sat, 5 Apr 2003, Dan Rossi wrote:

> apolgies sorry i removed a check for E_WARNING
>
> // case E_WARNING:
>   case E_USER_WARNING:
>   $this->_throw($code);
>   break;
>
> sorry basically i can trigger a E_USER_WARNING and catch that only in my
> callback function
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 05, 2003 2:11 PM
> To: Dan Rossi
> Cc: Php-General
> Subject: Re: [PHP] custom error handling + fopen
>
>
> You can't really separate them.  In your error handler you can check what
> type of error it was and treat them differently.
>
> On Sat, 5 Apr 2003, Dan Rossi wrote:
>
> > hi guys i have a custom error handler setup within a class , i can trigger
> > it with trigger_error , also i am sending my ustom triggers to
> > E_USER_WARNING , althogh even having fopen supressed @fopen i am still
> > getting errors returned to the same area as my current codes , how can i
> > seperate my custom codes from the php ones ,
> >
> > i am getting this fopen(http://electroteque.dyndns.org:1023/krafterk)
> > [function.fopen]: failed to create stream: HTTP request failed! HTTP/1.1
> 404
> > Not Found
> >
> > and i have the check
> > if (!$this->handle = @fopen($src_name,$attr)) {
> >
> > } else {
> > throw errror here
> > }
> >
> > still not happening
> >
> >
> > --
> > 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] Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Rasmus Lerdorf
I don't see a parse error, but the order of things is not going to be what
you want because it is going to run the function and thus do the echo
inside alarmLightYMD() before it does the outermost echo.  If it had done
anything else it would really have been a bug.

-Rasmus

On Fri, 4 Apr 2003, Daevid Vincent wrote:

> Here, try this bullshit...
>
> I can't upgrade to a more recent version as I'm not in control of the
> server, but I've tried it with both 4.1.2 and 4.2.3 on linux with a RH
> install. Can anyone confirm or dispute this bug exists in later versions?
>
> How does a parsing error like this go un-noticed for so long?
>
> Obviously I took out all the interesting stuff in the page and so that can't
> be blamed. This is about as bare skeleton test case as you can get.
>
> *sigh*
>
> snip
>
>function alarmLightYMD()
>   {
>   return "";
>   }
>
>   function alarmLightMySQL()
>   {
>   echo alarmLightYMD();
>   }
> ?>
> 
> 
>   FUCKED UP PHP Bug #1234170238741023
> 
>
> 
> PHP Version 4.1.2
> PHP Version 4.2.3
> 
> Why the FUCK doesn't this work
> 
> 
>  for ($i = 0; $i < 10; $i++ ) {
>echo "";
>   echo "".alarmLightMySQL()."";
>   echo "this fails!";
>echo "";
> }
> ?>
> 
>
> 
>
> YET THIS DOES!
> 
> 
> 
>
>   
>   this works
>
> 
> 
> 
> 
>
> snip
>
>
>
> "Ezekiel 25:17. The path of the righteous man is beset on all sides by the
> inequities of the selfish and the tyranny of evil men. Blessed is he who in
> the name of charity and goodwill shepherds the weak through the valley of
> darkness, for he is TRULY his brother's keeper and the finder of lost
> children. And I will strike down upon thee with GREAT vengeance and
> FU-U-U-URIOUS anger, those who attempt to poison, and destroy my brothers!
> And you will KNOW my name is the Lord, when I lay my vengeance upon thee!"
>
>
> --
> 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] custom error handling + fopen

2003-04-04 Thread Dan Rossi
apolgies sorry i removed a check for E_WARNING

// case E_WARNING:
  case E_USER_WARNING:
$this->_throw($code);
  break;

sorry basically i can trigger a E_USER_WARNING and catch that only in my
callback function

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 05, 2003 2:11 PM
To: Dan Rossi
Cc: Php-General
Subject: Re: [PHP] custom error handling + fopen


You can't really separate them.  In your error handler you can check what
type of error it was and treat them differently.

On Sat, 5 Apr 2003, Dan Rossi wrote:

> hi guys i have a custom error handler setup within a class , i can trigger
> it with trigger_error , also i am sending my ustom triggers to
> E_USER_WARNING , althogh even having fopen supressed @fopen i am still
> getting errors returned to the same area as my current codes , how can i
> seperate my custom codes from the php ones ,
>
> i am getting this fopen(http://electroteque.dyndns.org:1023/krafterk)
> [function.fopen]: failed to create stream: HTTP request failed! HTTP/1.1
404
> Not Found
>
> and i have the check
> if (!$this->handle = @fopen($src_name,$attr)) {
>
> } else {
> throw errror here
> }
>
> still not happening
>
>
> --
> 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] custom error handling + fopen

2003-04-04 Thread Rasmus Lerdorf
You can't really separate them.  In your error handler you can check what
type of error it was and treat them differently.

On Sat, 5 Apr 2003, Dan Rossi wrote:

> hi guys i have a custom error handler setup within a class , i can trigger
> it with trigger_error , also i am sending my ustom triggers to
> E_USER_WARNING , althogh even having fopen supressed @fopen i am still
> getting errors returned to the same area as my current codes , how can i
> seperate my custom codes from the php ones ,
>
> i am getting this fopen(http://electroteque.dyndns.org:1023/krafterk)
> [function.fopen]: failed to create stream: HTTP request failed! HTTP/1.1 404
> Not Found
>
> and i have the check
> if (!$this->handle = @fopen($src_name,$attr)) {
>
> } else {
> throw errror here
> }
>
> still not happening
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

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



[PHP] Please ignore -Re: php.ini file not being updated with install

2003-04-04 Thread Tracy

Found the problem so please ignore this post.
I was confused with compiling as DSO vs not.
Thanks so much Mark!  It was that simple and
caused all by my own confusion.

Tracy wrote:

> Hello Everyone,
> I updated php recently in order to add the --with-ldap part.
> so my config.nice file now looks like:

> './configure' 
> '--with-apache=../apache_1.3.27' 
> '--with-mysql=/usr' 
> '--with-oci8=/opt/oracle/product/9.2.0' 
> '--enable-sigchild' 
> '--with-ldap' 
> "$@"

> To update php, I ran "make clean" then the above ./configure line
> and then:
> make 
> make install

> Now it looks like my command line php executable has been updated and is
> able to connect to ldap.
> However if I check out my phpinfo() from the web, it does not show the 
> new "Build Date".  It still shows all the information from the last time I
> complied php and still cannot connect to ldap.

> Could anyone please help??
> Thanks,
> Tracy



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



Re: [PHP] php.ini file not being updated with install

2003-04-04 Thread Tracy
Mark Douglas wrote:

> If you are using php as a DSO, you need to restart your webserver to load
> the new install.

> Mark

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 9:25 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] php.ini file not being updated with install


> Hello Everyone,
> I updated php recently in order to add the --with-ldap part.
> so my config.nice file now looks like:

> './configure' 
> '--with-apache=../apache_1.3.27' 
> '--with-mysql=/usr' 
> '--with-oci8=/opt/oracle/product/9.2.0' 
> '--enable-sigchild' 
> '--with-ldap' 
> "$@"

> To update php, I ran "make clean" then the above ./configure line
> and then:
> make 
> make install

> Now it looks like my command line php executable has been updated and is
> able to connect to ldap.
> However if I check out my phpinfo() from the web, it does not show the 
> new "Build Date".  It still shows all the information from the last time I
> complied php and still cannot connect to ldap.

> Could anyone please help??
> Thanks,
> Tracy

Actually I restarted my webserver serveral times and even tried rebooting 
for the changes to take affect but nothing.. 
Thanks though.  I really appreicate your help.
Tracy




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



RE: [PHP] php.ini file not being updated with install

2003-04-04 Thread Mark Douglas
If you are using php as a DSO, you need to restart your webserver to load
the new install.

Mark

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 9:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php.ini file not being updated with install


Hello Everyone,
I updated php recently in order to add the --with-ldap part.
so my config.nice file now looks like:

'./configure' \
'--with-apache=../apache_1.3.27' \
'--with-mysql=/usr' \
'--with-oci8=/opt/oracle/product/9.2.0' \
'--enable-sigchild' \
'--with-ldap' \
"$@"

To update php, I ran "make clean" then the above ./configure line
and then:
make 
make install

Now it looks like my command line php executable has been updated and is
able to connect to ldap.
However if I check out my phpinfo() from the web, it does not show the 
new "Build Date".  It still shows all the information from the last time I
complied php and still cannot connect to ldap.

Could anyone please help??
Thanks,
Tracy


-- 
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.ini file not being updated with install

2003-04-04 Thread tracy
Hello Everyone,
I updated php recently in order to add the --with-ldap part.
so my config.nice file now looks like:

'./configure' \
'--with-apache=../apache_1.3.27' \
'--with-mysql=/usr' \
'--with-oci8=/opt/oracle/product/9.2.0' \
'--enable-sigchild' \
'--with-ldap' \
"$@"

To update php, I ran "make clean" then the above ./configure line
and then:
make 
make install

Now it looks like my command line php executable has been updated and is
able to connect to ldap.
However if I check out my phpinfo() from the web, it does not show the 
new "Build Date".  It still shows all the information from the last time I
complied php and still cannot connect to ldap.

Could anyone please help??
Thanks,
Tracy


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



Re: [PHP] how do I strip out data from a url?

2003-04-04 Thread Leif K-Brooks
//Beware, untested!
preg_match('|.*([0-9]{10}).*|',$_SERVER['HTTP_REFERER'],$matches);
$number = $matches[1];
Damon wrote:

Hi,

   I have a realatively easy problem that I need help on.  I want to 
take a 10-digit number out of a referring url and put it in a variable.

Eg. www.jimmy.com/mypage/xyz0123456789xyz/index.php

I just need the 10-digit number from this string.

Thanks!
Damon


--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


[PHP] custom error handling + fopen

2003-04-04 Thread Dan Rossi
hi guys i have a custom error handler setup within a class , i can trigger
it with trigger_error , also i am sending my ustom triggers to
E_USER_WARNING , althogh even having fopen supressed @fopen i am still
getting errors returned to the same area as my current codes , how can i
seperate my custom codes from the php ones ,

i am getting this fopen(http://electroteque.dyndns.org:1023/krafterk)
[function.fopen]: failed to create stream: HTTP request failed! HTTP/1.1 404
Not Found

and i have the check
if (!$this->handle = @fopen($src_name,$attr)) {

} else {
throw errror here
}

still not happening


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



[PHP] how do I strip out data from a url?

2003-04-04 Thread Damon
Hi,

   I have a realatively easy problem that I need help on.  I want to 
take a 10-digit number out of a referring url and put it in a variable.

Eg. www.jimmy.com/mypage/xyz0123456789xyz/index.php

I just need the 10-digit number from this string.

Thanks!
Damon


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


Re: [PHP] chill out

2003-04-04 Thread -{ Rene Brehmer }-
That's called a welcome message and is standard on nearly all email lists
... although I truly can't remember getting any when I sub'ed to this one
in november.

The standard for most lists is that you get a message telling you what the
list is for, what is allowed, what is not, and how and where to get info
on whatever common OT posts that eventually pop up ...

So I'd agree to this ...

Rene

On Fri, 4 Apr 2003 14:21:24 +0500, Haseeb Iqbal wrote about "Re: [PHP]
chill out" what the universal translator turned into this:

>hi all,
>just like to add something here, (which i recmended before)
>there should be a automated way to email all the new users about what php
>is, that explain them that php is server side and it can't do client side,
>just a plain email will do this will certinaly minimize the no of off topic
>posts,what you people think? i think it will help
>
>Friendship is always a sweet responsibility, never an opportunity.
>HaSeEb IqBaL.

-- 
Rene Brehmer

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

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



Re: [PHP] chill out

2003-04-04 Thread -{ Rene Brehmer }-
On Thu, 03 Apr 2003 02:20:01 -0500, Tim Thorburn wrote about "Re: [PHP]
chill out" what the universal translator turned into this:

>In general, I've had great luck with this list - it just seems the majority 
>of puter ppl don't have super ppl skills ;)

That is more like an oximoron (sp?) ... comp ppl are generally secluded
characters sitting alone in front of the computer, coding away for hours
after hours straight, fueled only by coke/coffee/pizza, and not really
commincating much with "real" people ... only the few that pop up in
either electronic form on whatever medium one's hooked into ...

You don't learn much in the area of ppl skills that way ... I know ... I
started coding when I was 8 ... that's 19 years ago ... Until a few years
ago I literally knew noone in the real world...

But whatever your disposition is ... the best way to fit into a list is to
sub, keep quiet and read for a few days, and then try to fit into the
rhythm of the list ... the ones that sub and post within 5 minutes are
usually the ones that get the most disrespectful feedback ... because they
simply haven't gotten the vibe of the list yet... and I speek from
experience ... I've been subed to over 100 lists in the past 5 years, and
all lists have had this very problem ... some are nice, some aren't ...
some needs to learn how to ask a question, some needs to learn how to
answer without biting the OP's head of...

Rene

-- 
Rene Brehmer

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

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



Re: [PHP] chill out

2003-04-04 Thread -{ Rene Brehmer }-
On Thu, 3 Apr 2003 13:14:39 +1000, <[EMAIL PROTECTED]> wrote about
"[PHP] chill out" what the universal translator turned into this:

>We subscribe to a few email lists on various languages. 
>
>This list would have to be the worst for anyone learning 
>- the amount of sarcasm and flaming that goes on is huge.

I totally don't see what you mean. I've learned more from this list in the
past 6 months than any other mail group I've ever been sub'ed to in the
past 5 years, nomatter what the topic have been.

I haven't seen any flaming at all, but agree that sometimes the sarcasm
step a bit out.

When people ask questions they could've very easily answered themselves by
looking into the manual, then you can sure expect the responses to be a
bit on the annoyed side ... especially when 10 people ask the same
question in different threads, instead of checking the threads for the
past 2-3 days ... I've also seen that happen alot more often here, than
anywhere else...

There's only a few lists left I'm still subscribed to. All the ones I've
dropped have been too filled with people answering questions on things
they don't really know well enough to answer. This list is positively
different ... there are more willing and insightful answers here than
there's actual questions ... and sometimes when the answers do get a bit
spightful, it's usually because the asker didn't word his/her question in
a manner where it's easy to understand what's being asked...

>Just try and remember - everyone has to learn, 
>if you feel a question is off topic or stupid - ignore it,
>theres no need to make the poster feel like an idiot.

If the topic is off-topic, the poster must be made aware of it ... just
ignoring them often leads to frustration and reposting ... It's better to
point them to where they can obtain the answer, than just pretend they
don't exist ... that also helps keep the noise to a minimum.

Rene

-- 
Rene Brehmer

This message was written on 100% recycled spam.

Come see! My brand new site is now online!
http://www.metalbunny.net

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



Re: [PHP] Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Leif K-Brooks
Works fine for me, php 4.2.1.

Daevid Vincent wrote:

Here, try this bullshit...

I can't upgrade to a more recent version as I'm not in control of the
server, but I've tried it with both 4.1.2 and 4.2.3 on linux with a RH
install. Can anyone confirm or dispute this bug exists in later versions?
How does a parsing error like this go un-noticed for so long?

Obviously I took out all the interesting stuff in the page and so that can't
be blamed. This is about as bare skeleton test case as you can get.
*sigh*

snip

";
}

function alarmLightMySQL()
{
echo alarmLightYMD();
}
?>


FUCKED UP PHP Bug #1234170238741023


PHP Version 4.1.2
PHP Version 4.2.3

Why the FUCK doesn't this work


";
		echo "".alarmLightMySQL()."";
		echo "this fails!";
	 echo "";
} 
?>




YET THIS DOES!



 

this works
 




snip



"Ezekiel 25:17. The path of the righteous man is beset on all sides by the
inequities of the selfish and the tyranny of evil men. Blessed is he who in
the name of charity and goodwill shepherds the weak through the valley of
darkness, for he is TRULY his brother's keeper and the finder of lost
children. And I will strike down upon thee with GREAT vengeance and
FU-U-U-URIOUS anger, those who attempt to poison, and destroy my brothers!
And you will KNOW my name is the Lord, when I lay my vengeance upon thee!" 

 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


[PHP] Re: Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Philip Hallstrom
It's a coding error... at least I think so.

change alarmLightMySQL just return the results not "echo" them... echoing
them doesn't make much sense inside another echo statement...

On Fri, 4 Apr 2003, Daevid Vincent wrote:

> Here, try this bullshit...
>
> I can't upgrade to a more recent version as I'm not in control of the
> server, but I've tried it with both 4.1.2 and 4.2.3 on linux with a RH
> install. Can anyone confirm or dispute this bug exists in later versions?
>
> How does a parsing error like this go un-noticed for so long?
>
> Obviously I took out all the interesting stuff in the page and so that can't
> be blamed. This is about as bare skeleton test case as you can get.
>
> *sigh*
>
> snip
>
>function alarmLightYMD()
>   {
>   return "";
>   }
>
>   function alarmLightMySQL()
>   {
>   echo alarmLightYMD();
>   }
> ?>
> 
> 
>   FUCKED UP PHP Bug #1234170238741023
> 
>
> 
> PHP Version 4.1.2
> PHP Version 4.2.3
> 
> Why the FUCK doesn't this work
> 
> 
>  for ($i = 0; $i < 10; $i++ ) {
>echo "";
>   echo "".alarmLightMySQL()."";
>   echo "this fails!";
>echo "";
> }
> ?>
> 
>
> 
>
> YET THIS DOES!
> 
> 
> 
>
>   
>   this works
>
> 
> 
> 
> 
>
> snip
>
>
>
> "Ezekiel 25:17. The path of the righteous man is beset on all sides by the
> inequities of the selfish and the tyranny of evil men. Blessed is he who in
> the name of charity and goodwill shepherds the weak through the valley of
> darkness, for he is TRULY his brother's keeper and the finder of lost
> children. And I will strike down upon thee with GREAT vengeance and
> FU-U-U-URIOUS anger, those who attempt to poison, and destroy my brothers!
> And you will KNOW my name is the Lord, when I lay my vengeance upon thee!"
>
>
> --
> 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] Found a bug in 4.2.3 re: and echo vs.

2003-04-04 Thread Daevid Vincent
Here, try this bullshit...

I can't upgrade to a more recent version as I'm not in control of the
server, but I've tried it with both 4.1.2 and 4.2.3 on linux with a RH
install. Can anyone confirm or dispute this bug exists in later versions?

How does a parsing error like this go un-noticed for so long?

Obviously I took out all the interesting stuff in the page and so that can't
be blamed. This is about as bare skeleton test case as you can get.

*sigh*

snip

";
}

function alarmLightMySQL()
{
echo alarmLightYMD();
}
?>


FUCKED UP PHP Bug #1234170238741023



PHP Version 4.1.2
PHP Version 4.2.3

Why the FUCK doesn't this work


";
echo "".alarmLightMySQL()."";
echo "this fails!";
 echo "";
} 
?>




YET THIS DOES!



 

this works
 





snip



"Ezekiel 25:17. The path of the righteous man is beset on all sides by the
inequities of the selfish and the tyranny of evil men. Blessed is he who in
the name of charity and goodwill shepherds the weak through the valley of
darkness, for he is TRULY his brother's keeper and the finder of lost
children. And I will strike down upon thee with GREAT vengeance and
FU-U-U-URIOUS anger, those who attempt to poison, and destroy my brothers!
And you will KNOW my name is the Lord, when I lay my vengeance upon thee!" 


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



[PHP] headers and apache

2003-04-04 Thread Sunfire
hi

having a little problem with apache and its "customizable error messages"

i have a basic authentication system here:
##in file called deletepost.php i have:##

html for error web page here...
#end#

now in apache httpd.conf file i was told to do this:

ErrorDocument 401 /errors/unauthorized.php
#end#

after i do all of this i still cant get anything to show up on the web page if someone 
puts in the wrong username/pwd and i want to change the error message for cancle on 
the login form to a header error message... 

the only problem i can see with this is that the actuall working web server might not 
be able to use my custom error messages and stuff.. but does anybody know how to fix 
my problem here?

tnx for help if can give...



Re: [PHP] Webtrends

2003-04-04 Thread Barry Gould
Check out Analog and Webalizer.
RedHat includes Webalizer... it seems to work fine.
Barry Gould

At 03:49 PM 4/4/2003, you wrote:
I know this is sort of off topic but I was wondering it any one knew if
there was a GNU version of Webtrends or perhaps a GNU equivalent, maybe in
php to use on an Apache Linux Red Hat server?
Thanks


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


Re: [PHP] Webtrends

2003-04-04 Thread Ashley M. Kirchner
Vernon wrote:

I know this is sort of off topic but I was wondering it any one knew if
there was a GNU version of Webtrends or perhaps a GNU equivalent, maybe in
php to use on an Apache Linux Red Hat server?
   While not exactly like webtrends, you might want to look at 
webalizer (http://www.mrunix.net/webalizer/).

--
W | I haven't lost my mind; it's backed up on tape somewhere.
 +
 Ashley M. Kirchner    .   303.442.6410 x130
 IT Director / SysAdmin / WebSmith . 800.441.3873 x130
 Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
 http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



smime.p7s
Description: S/MIME Cryptographic Signature


[PHP] Webtrends

2003-04-04 Thread Vernon
I know this is sort of off topic but I was wondering it any one knew if
there was a GNU version of Webtrends or perhaps a GNU equivalent, maybe in
php to use on an Apache Linux Red Hat server?

Thanks



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



Re: [PHP] Session Variables and Posting

2003-04-04 Thread Leif K-Brooks
http://www.php.net/manual/en/security.registerglobals.php

Van Andel, Robbert wrote:

Is there a way that I can prevent session variables getting values from
query strings.  I want them to receive values only from posted forms.
Robbert van Andel 

 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


Re: [PHP] mysql_num_rows

2003-04-04 Thread Kevin Stone
Uh. no that can't be right becuase  mysql_query() returns a pointer not an
array.  The variable does contain a string refering to the pointer ID but
that's about all the information you're going to disseminate from print_r();
--
Kevin

- Original Message -
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: "Mike Tuller" <[EMAIL PROTECTED]>; "J J" <[EMAIL PROTECTED]>
Cc: "php mailing list list" <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 4:18 PM
Subject: Re: [PHP] mysql_num_rows


> Someone helped me out with this to see exactly what the query is
> returning...
>
> echo " the Query: "; print_r ($select_result); echo "";
>
> This should show you exactly what the result is getting...
>
> /T
>
> on 4/4/03 4:49 PM, Mike Tuller at [EMAIL PROTECTED] wrote:
>
> > I can't believe I forgot that. time to go home for the week.
> >
> > thanks.
> >
> > On Friday, April 4, 2003, at 04:28 PM, J J wrote:
> >
> >> oh and your SQL statement is wrong:
> >>
> >> SELECT * FROM table WHERE  you are missing the
> >> FROM...
> >>
> >>
> >>
> >> --- Mike Tuller <[EMAIL PROTECTED]> wrote:
> >>> I can't get mysql_num_rows to work for some reason.
> >>> Here is a snippet
> >>> of what I have
> >>>
> >>>
> >>> $department_name = $_POST['department_name'];
> >>>
> >>> $select_query = "SELECT * WHERE department_name =
> >>> '$department_name'";
> >>> $select_result = mysql_query($select_query,
> >>> $db_connect);
> >>> $select_total_rows = mysql_num_rows($select_result);
> >>>
> >>> if ($select_total_rows<1)
> >>> {
> >>> $insert_query = " insert into departments
> >>> (department_name)
> >>> values
> >>> ('$department_name')";
> >>>
> >>> mysql_query($insert_query, $db_connect) or die
> >>> (mysql_error());
> >>>
> >>>
> >>> I am getting back an error mysql_num_rows():
> >>> supplied argument is not a
> >>> valid MySQL result resource. I have looked over it
> >>> again and again, and
> >>> can't see what is wrong. Can anyone else see where
> >>> the problem might be?
> >>>
> >>> Mike
> >>>
> >>>
> >>> --
> >>> PHP General Mailing List (http://www.php.net/)
> >>> To unsubscribe, visit: http://www.php.net/unsub.php
> >>>
> >>
> >>
> >> __
> >> Do you Yahoo!?
> >> Yahoo! Tax Center - File online, calculators, forms, and more
> >> http://tax.yahoo.com
> >>
> >
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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



Re: [PHP] Session Variables and Posting

2003-04-04 Thread Kevin Stone

- Original Message -
From: "Van Andel, Robbert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 4:00 PM
Subject: [PHP] Session Variables and Posting


> Is there a way that I can prevent session variables getting values from
> query strings.  I want them to receive values only from posted forms.
>
>
> Robbert van Andel


You should be accessing the $_GET, $_POST and $_SESSION arrays directly
rather than relying on request vars to be parsed automatically.  This will
allow you to be much more discriminatory in your code.

Read up on Predefined Variables in the manual..
http://www.php.net/manual/en/reserved.variables.php

HTH,
Kevin



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



Re: [PHP] mysql_num_rows

2003-04-04 Thread [EMAIL PROTECTED]
Someone helped me out with this to see exactly what the query is
returning...

echo " the Query: "; print_r ($select_result); echo "";

This should show you exactly what the result is getting...

/T

on 4/4/03 4:49 PM, Mike Tuller at [EMAIL PROTECTED] wrote:

> I can't believe I forgot that. time to go home for the week.
> 
> thanks.
> 
> On Friday, April 4, 2003, at 04:28 PM, J J wrote:
> 
>> oh and your SQL statement is wrong:
>> 
>> SELECT * FROM table WHERE  you are missing the
>> FROM...
>> 
>> 
>> 
>> --- Mike Tuller <[EMAIL PROTECTED]> wrote:
>>> I can't get mysql_num_rows to work for some reason.
>>> Here is a snippet
>>> of what I have
>>> 
>>> 
>>> $department_name = $_POST['department_name'];
>>> 
>>> $select_query = "SELECT * WHERE department_name =
>>> '$department_name'";
>>> $select_result = mysql_query($select_query,
>>> $db_connect);
>>> $select_total_rows = mysql_num_rows($select_result);
>>> 
>>> if ($select_total_rows<1)
>>> {
>>> $insert_query = " insert into departments
>>> (department_name)
>>> values
>>> ('$department_name')";
>>> 
>>> mysql_query($insert_query, $db_connect) or die
>>> (mysql_error());
>>> 
>>> 
>>> I am getting back an error mysql_num_rows():
>>> supplied argument is not a
>>> valid MySQL result resource. I have looked over it
>>> again and again, and
>>> can't see what is wrong. Can anyone else see where
>>> the problem might be?
>>> 
>>> Mike
>>> 
>>> 
>>> -- 
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>> 
>> 
>> 
>> __
>> Do you Yahoo!?
>> Yahoo! Tax Center - File online, calculators, forms, and more
>> http://tax.yahoo.com
>> 
> 






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



[PHP] Session Variables and Posting

2003-04-04 Thread Van Andel, Robbert
Is there a way that I can prevent session variables getting values from
query strings.  I want them to receive values only from posted forms.


Robbert van Andel 

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



Re: [PHP] PHP Email Attachment problem

2003-04-04 Thread Burhan Khalid
Michael Arena wrote:
When I put change the line you suggested to "
Line25 $fileatt  =
"/home/sites/webserver.agraservices.net/web/mike/$_POST['fileatt']";
$fileatt_type = $_FILES['fileatt']['type'];// Type of
file being sent
$fileatt_name = $_FILES['fileatt']['name'];// Name of
file
"
"/home ... ".$_POST['fileatt'];

[ snip ]

--
Burhan Khalid
phplist[at]meidomus[dot]com


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


Re: [PHP] mysql_num_rows

2003-04-04 Thread Mike Tuller
I can't believe I forgot that. time to go home for the week.

thanks.

On Friday, April 4, 2003, at 04:28 PM, J J wrote:

oh and your SQL statement is wrong:

SELECT * FROM table WHERE  you are missing the
FROM...


--- Mike Tuller <[EMAIL PROTECTED]> wrote:
I can't get mysql_num_rows to work for some reason.
Here is a snippet
of what I have
$department_name = $_POST['department_name'];

$select_query = "SELECT * WHERE department_name =
'$department_name'";
$select_result = mysql_query($select_query,
$db_connect);
$select_total_rows = mysql_num_rows($select_result);
if ($select_total_rows<1)
{
$insert_query = " insert into departments
(department_name)
   
 values

('$department_name')";
   
 
mysql_query($insert_query, $db_connect) or die
(mysql_error());
I am getting back an error mysql_num_rows():
supplied argument is not a
valid MySQL result resource. I have looked over it
again and again, and
can't see what is wrong. Can anyone else see where
the problem might be?
Mike

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


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com


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


Re: [PHP] Win95 - PHP - Apache - MySQL

2003-04-04 Thread Burhan Khalid
Chris Hayes wrote:
At 00:56 5-4-2003, you wrote:

Hello people, greet for all

 I tried to install these:

Win95 as operating system
 PHP as parser
 Apache as Web server
 Mysql as DB server
I tried to configure these platforms, and when I write
http://localhost
 , it doesn't work, I think the problem is the web server, but I don't
 understand because I install all the applications mentioned as a package
 that bring nusphere. Does Win95 have problem with this tecnologies?
well at least win98 could handle it. have a close look at the 
installation instructions of Apache, maybe it needs something extra, but 
then again, maybe you forgot to edit your hostfile, or maybe you forgot 
to start apache? Give is some more to chew on!
fwiw, I have a tutorial that shows you how to setup Apache and PHP on 
Windows, and how to setup mySQL for windows.

http://www.meidomus.com

--
Burhan Khalid
phplist[at]meidomus[dot]com


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


[PHP] Sorry for my mistake

2003-04-04 Thread Mario Soto
I want to say sorry for the messages I sended. I didn't checked off the read 
verification for my messages when posting to the list. It is now deactivated. Now the 
attachemente file on the UTF-8 message didn't reach to you.

Any one who wants the list can get directrly thru the www.w3c.org or request this 
information directly on my mail ([EMAIL PROTECTED]), and I will sendit.

I don't add the files into the mesage because are 7kb compressed at 23% ratio.

Mario Soto
[EMAIL PROTECTED]
-.-.-.-


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



RE: [PHP] mysql_num_rows

2003-04-04 Thread John W. Holmes
> $department_name = $_POST['department_name'];
> 
> $select_query = "SELECT * WHERE department_name = '$department_name'";
> $select_result = mysql_query($select_query, $db_connect);
> $select_total_rows = mysql_num_rows($select_result);
> 
> if ($select_total_rows<1)
> {
>   $insert_query = " insert into departments (department_name)
>
values
> 
>   ('$department_name')";
> 
>   mysql_query($insert_query, $db_connect) or die (mysql_error());
> 
> 
> I am getting back an error mysql_num_rows(): supplied argument is not
a
> valid MySQL result resource. I have looked over it again and again,
and
> can't see what is wrong. Can anyone else see where the problem might
be?

That means your query failed, generally. Check for mysql_error() after
you run your query to see what went wrong. For example in your SQL,
you're missing the "FROM table" portion of your query... oops!

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



RE: [PHP] Questions

2003-04-04 Thread John W. Holmes
> Began with one question, but some how I figure it out some stuff that
I
> will need, and before I forget to ask, better I'll do, and are from
> different topics related to the php. No more than one message is sent,
> because the traffic on the list. Hope that in some time I get the
responde
> of my questions.
> 
> 1) Does somebody know were to find a free server that supports php to
make
> some tests before using my own server? For the security I can't put
and
> delete or replace the same file more than 5 time on the same day (for
the
> corrections, add new stuff and so), then I wanted to have one server
in
> that I can send, delete or replace the same file more than 5 times at
the
> same day.

I don't know of any off hand, but I know they exist. A search on google
will turn up some. Why not just set up a development server on your own
machine, though? Apache and PHP are free and simple to set up (depending
upon your OS), so you can test everything before you even upload it. 
 
> 2) Does somebody know how to get the error string, in the case of one
> occurs, and change the language of the string that the program sends
and
> translate into spanish (my own language) by example, or change the
> explanation of the error?

Take a look at the set_error_handler() function.
www.php.net/set_error_handler You can trap the errors with that and then
apply any translation you need. Gettext may be of some use here, but
I've never used it. www.php.net/get_text

> 3) It must be a way to known the prefered language to show a page (eg.
ES,
> ES-GT, DE, etc.), but I don't know wich one is in php. Can somebody
help
> me?

This one is tricky because you're relying on something from the client
side. You don't know if it's correct or not. The best option is to just
offer them a simple drop down to choose their language and then remember
it for them (with a cookie) after that point. 

> 4) Does somebody know about the md5 encryption algorithm? (I want to
know
> some stuff to implement passwords on a php programs usign JavaScript
as
> support with html). Any idea?

MD5() creates a 32 character hash of a string. There is no way to get
the original string or password back. You must use md5() on the password
that the user supplies and compare that to the md5() values you have
stored. There is an md5() implementation within JavaScript that I've
heard about. 

> By the way I joined the list the 2nd day of march (about the 22 GMT),
and
> I can't chech in older messages if one of my questions were answered
> before.

Welcome to the list. There is an archive that you can search. 

http://marc.theaimsgroup.com/?l=php-general

---John Holmes...



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



Re: [PHP] mysql_num_rows

2003-04-04 Thread J J
oh and your SQL statement is wrong:

SELECT * FROM table WHERE  you are missing the
FROM...



--- Mike Tuller <[EMAIL PROTECTED]> wrote:
> I can't get mysql_num_rows to work for some reason.
> Here is a snippet 
> of what I have
> 
> 
> $department_name = $_POST['department_name'];
> 
> $select_query = "SELECT * WHERE department_name =
> '$department_name'";
> $select_result = mysql_query($select_query,
> $db_connect);
> $select_total_rows = mysql_num_rows($select_result);
> 
> if ($select_total_rows<1)
> {
>   $insert_query = " insert into departments
> (department_name)
>  
>  values
>  
>  ('$department_name')";
>  
>  
>   mysql_query($insert_query, $db_connect) or die
> (mysql_error());
> 
> 
> I am getting back an error mysql_num_rows():
> supplied argument is not a 
> valid MySQL result resource. I have looked over it
> again and again, and 
> can't see what is wrong. Can anyone else see where
> the problem might be?
> 
> Mike
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

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



[PHP] Running scripts in non-php file

2003-04-04 Thread Tom Tsongas
Hi folks.

This will probably sound like a stupid question, but I will ask it 
anyway: how can I get the PHP interpreter to execute scripts in files 
that don't have the .php extension? i.e. if I want to embed php code 
into a .html or .xml file that gets run.

I thought all I had to do was add the extension to the AddType 
application in the apache configuration file so it looked like this:

AddType application/x-httpd-php .php .html .xml

I tried it but the code isn't being executed. (And yes, I did restart 
apache)
Am I missing something?

Tom

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


Re: [PHP] mysql_num_rows

2003-04-04 Thread J J
Try:
($select_total_rows == 0)   

instead.


That and maybe echo $select_total_rows; to see what
it's returning.



--- Mike Tuller <[EMAIL PROTECTED]> wrote:
> I can't get mysql_num_rows to work for some reason.
> Here is a snippet 
> of what I have
> 
> 
> $department_name = $_POST['department_name'];
> 
> $select_query = "SELECT * WHERE department_name =
> '$department_name'";
> $select_result = mysql_query($select_query,
> $db_connect);
> $select_total_rows = mysql_num_rows($select_result);
> 
> if ($select_total_rows<1)
> {
>   $insert_query = " insert into departments
> (department_name)
>  
>  values
>  
>  ('$department_name')";
>  
>  
>   mysql_query($insert_query, $db_connect) or die
> (mysql_error());
> 

__
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

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



[PHP] mysql_num_rows

2003-04-04 Thread Mike Tuller
I can't get mysql_num_rows to work for some reason. Here is a snippet 
of what I have

$department_name = $_POST['department_name'];

$select_query = "SELECT * WHERE department_name = '$department_name'";
$select_result = mysql_query($select_query, $db_connect);
$select_total_rows = mysql_num_rows($select_result);
if ($select_total_rows<1)
{
$insert_query = " insert into departments (department_name)
   
 values

('$department_name')";
   
 
mysql_query($insert_query, $db_connect) or die (mysql_error());
I am getting back an error mysql_num_rows(): supplied argument is not a 
valid MySQL result resource. I have looked over it again and again, and 
can't see what is wrong. Can anyone else see where the problem might be?

Mike

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


RE: [PHP] native vs. phplib sessions

2003-04-04 Thread John W. Holmes
> How many people are using native vs. phplib sessions, vs. their
> own/homegrown
> sessions?
> 
> The archives show a LOT of problems with native sessions.

I've never had any problems with the native PHP session implementation
(except for that buggy 4.2.?? version). It can be adapted to use
databases or any other method. I think all of the problems you read
about are from people trying to do things the hard way or just not
understanding how sessions work. 

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



RE: [PHP] Opinion on a method....

2003-04-04 Thread John W. Holmes
> Reason I'm not using an include is simple.  The file does not contain
any
> variables, it just has a line of text that is & delimited.  I guess I
was
> just looking at the include() method as insecure.  I can see how it
> wouldn't
> be now.

Why not create your .ini file in the same format as php.ini and use
parse_ini_file() to read it. This will allow you to put in comments and
name the variables so that when someone else sees this file or tries to
edit your program, they'll know what the heck this file is.

;Host
host = localhost
;User
user = john
;Password
password = mypass

Then in PHP:

$var = parse_ini_file("/path/to/filename.ini");
echo $var['host'];
echo $var['user'];
echo $var['password'];
etc...

www.php.net/parse_ini_file

Letting a native PHP function handle reading and loading the file into
variables will be faster than a homegrown method from within PHP.

---John Holmes...



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



RE: [PHP] window size...

2003-04-04 Thread Matt Giddings
DT,

  PHP is a server side scripting language, it does not have the ability
to manipulate client side objects.  You're pretty much stuck with
javascript or vbscript and possible a few others.

Matt

> -Original Message-
> From: Deependra b. Tandukar [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 4:45 AM
> To: Justin French; Diana Castillo; [EMAIL PROTECTED]
> Subject: [PHP] window size...
> 
> Hi,
> 
> Is there anyway to define a fixed window size using PHP as we do with
> JavaScript?
> 
> Regards,
> DT
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.467 / Virus Database: 266 - Release Date: 4/1/2003
 


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



Re: [PHP] imap mail() problems

2003-04-04 Thread Alec Wallis
Thanks for the suggestions, I have tried them all but with no joy.  Still
exactly the same problem.  Pretty sure its not my SMTP server as using
Outlook it works fines.  Any other ideas as would prefer not to have to use
the mail() function multiple times.

Alec

- Original Message -
From: "Mario Soto" <[EMAIL PROTECTED]>
To: "Alec Wallis" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 6:04 PM
Subject: Re: [PHP] imap mail() problems


Try first to take off the \r char on the string. It worked very good for me
using only the \n to send more headers. Other is to put the address into
angle bracets (<[EMAIL PROTECTED]>) and in this way you can use a name on the
server (read some rfc's, it will be helpful if you're using email often in
php programs; begin reading the 822). Other is try to send one message at
the time. Remember that you can une more than once the mail() function on
the program. Other, chech if your SMTP server allow to send CC and BCC
messages. Some ones for security reasons don't let you to do that. Other add
the CC address to $strSubject separated with a semi colon and still use the
CC extra header.

Greetings, and my best wishes.

Mario Soto
[EMAIL PROTECTED]
-.-.-.-

- Original Message -
From: Alec Wallis
To: [EMAIL PROTECTED]
Sent: Thursday, April 03, 2003 11:54 AM
Subject: [PHP] imap mail() problems


Hi

I am experiencing problems with the mail functions, in that I can not send
emails to multiple addresses in the to field, or send Cc's.  The multiple
addresses show up in the email when it arrives to the first email address,
but the other copies never arrive.

The code I use is:

mail($strTo, $strSubject, $strBody, $header);

with the optional header fields being:

$header = "Cc: [EMAIL PROTECTED]";

Any ideas welcome

Cheers

Alec






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



Re: [PHP] imap mail() problems

2003-04-04 Thread Jason Wong
On Saturday 05 April 2003 01:04, Mario Soto wrote:

> Try first to take off the \r char on the string. It worked very good for me
> using only the \n to send more headers. 

Headers *should* be delimited by "\r\n" ...

> Other is to put the address into
> angle bracets (<[EMAIL PROTECTED]>) and in this way you can use a name on
> the server (read some rfc's, it will be helpful if you're using email often
> in php programs; begin reading the 822). 

... just like it says in RFC 822 !

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
QOTD:
"There may be no excuse for laziness, but I'm sure looking."
*/


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



[PHP] showing idle time with time() function

2003-04-04 Thread NeXaS
How to show IDLE TIME which format would be 00:00
(minutes:seconds) ? My PHP script sets time ( with function
"time()" )to one of the mysql cell of the current user, when new page
is requested.



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



Re: [PHP] Win95 - PHP - Apache - MySQL

2003-04-04 Thread Chris Hayes
At 00:56 5-4-2003, you wrote:
Hello people, greet for all

 I tried to install these:

Win95 as operating system
 PHP as parser
 Apache as Web server
 Mysql as DB server
I tried to configure these platforms, and when I write
http://localhost
 , it doesn't work, I think the problem is the web server, but I don't
 understand because I install all the applications mentioned as a package
 that bring nusphere. Does Win95 have problem with this tecnologies?
well at least win98 could handle it. have a close look at the installation 
instructions of Apache, maybe it needs something extra, but then again, 
maybe you forgot to edit your hostfile, or maybe you forgot to start 
apache? Give is some more to chew on!



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


Re: [PHP] native vs. phplib sessions

2003-04-04 Thread Jimmy Brake
homegrown 


make a rand value for the cookie -- stick that rand value in a db with
the actual user account info ... then we pull the real account info
using the random value from their cookie -- simple, efficient and pretty
dang secure -- also the system is load balance friendly

On Fri, 2003-04-04 at 12:26, Dennis Gearon wrote:
> How many people are using native vs. phplib sessions, vs. their own/homegrown 
> sessions?
> 
> The archives show a LOT of problems with native sessions.
-- 
Jimmy Brake <[EMAIL PROTECTED]>


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



RE: [PHP] dynamic IF statement

2003-04-04 Thread Jennifer Goodie
HTTP_GET_VARS["id"] is probably empty so this won't work, stick a $ in front
of it.

> -Original Message-
> From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 12:38 PM
> To: Tim Haskins
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] dynamic IF statement
>
>
> If I understand you right, you want:
>
> if (HTTP_GET_VARS["id"] == $row_rsProducts['prID']){
> ...do stuff...
> }
>
>
> Tim Haskins wrote:
>
> >How does one create a statement that basically says:
> >
> > $row_rsProducts['prID']; ?>"  )
> >{ ?>
> >
> >Basically, I want to say, "show if url value is equal to this database
> >record's ID value - The last part is what I can't seem to get to
> work- any
> >ideas???


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



Re: [PHP] Quick Sessions ?

2003-04-04 Thread Ernest E Vogelsinger
At 22:38 04.04.2003, Anthony said:
[snip]
>nope, same host I actually call the file by sending this :
>header("Location: ../index.htm");
>and I loose the session.
[snip] 

You've disabled cookies, either in your browser, or in php.ini completely
(for sessions, that is). Make your redirection like this:

header('Location: ../index.htm' . (SID ? '?' . SID : null));

I assume that your setup has "htm" files parsed by PHP. Otherwise - where
should the session data go to if you're redirecting to plain html?


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



[PHP] Replacing Unicode characters

2003-04-04 Thread Jeff Bearer
I'm working on an application where I need to replace some Unicode
characters with a PHP shell script.

The problem I'm having is matching multibyte characters.

One character in particular is Unicode 2014 an m-dash '—'

To get the decimal code to identify the character I've tried two
methods, one was with a little script like this:



I took the multiple decimal codes returned and tried a replacement like:

echo str_replace(chr(226).chr(128).chr(148),"-hyphen",$data);

But that didn't match it I figured my method of finding the decimal
value wasn't correct.

Next I thought if I UTF-8 encoded the character and took the ord() and
used that decimal to compare against a utf-encoded version of my string.
but when I tried getting the ord() of all the characters I wanted to
watch for it always gave me the same decimal, 195. So that idea wasn't
going to work either.

I'm out of ideas, any input would be appriciated. Thanks.


-- 
Jeff Bearer, RHCE
Webmaster, PittsburghLIVE.com


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



Re: [PHP] dynamic IF statement

2003-04-04 Thread Leif K-Brooks
If I understand you right, you want:

if (HTTP_GET_VARS["id"] == $row_rsProducts['prID']){
...do stuff...
}
Tim Haskins wrote:

How does one create a statement that basically says:

"  )
{ ?>
Basically, I want to say, "show if url value is equal to this database
record's ID value - The last part is what I can't seem to get to work- any
ideas???
Thanks!

--
Tim Haskins




 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


RE: [PHP] Quick Sessions ?

2003-04-04 Thread Jennifer Goodie
You want it to be / so they are readable by the entire site.  From your
syptoms a bad path seemed to be the problem, but it looks like it is
something else.

> -Original Message-
> From: Anthony [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 12:37 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Quick Sessions ?
>
>
> Thanks for the response.  I think I might just not totaly understand this
> switch. This is right out of my php.ini file:
>
> ; The path for which the cookie is valid.
> session.cookie_path = /
>
> I tried deleting the / and got no change in behavior. It seems to me that
> what I need is something like
> session.cookie_path = /, ../
> but that doesn't work.  Any other ideas?
>
> - Anthony
>
> "Jennifer Goodie" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Your cookie path is "" not "/" so your cookie is only readble by the
> > directory it was set in.  Check your session.cookie_path
> >
> > http://www.php.net/manual/en/ref.session.php
> >
> > > -Original Message-
> > > From: Anthony [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, April 04, 2003 12:03 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Quick Sessions ?
> > >
> > >
> > > I have an issue.  For some reason I can't pass session data to
> > > pages within
> > > different folders.  What I have is a page in like
> > > mydomain.com/something/somepage.php  This page creates session
> information
> > > and holds it correctly.  The app collects user data and then
> > > eventualy sends
> > > a location header to ../index.html <- in this file there is php that
> check
> > > to see if the session data is there and. no longer
> there!!!  So what
> > > gives?  Can I not pass session info from pages in folders?  I'm
> > > not changing
> > > the domain, so I shouldn't loose the cookie I'm lost   Please
> help
> > > me out :)
> > >
> > > - Anthony
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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



Re: [PHP] Quick Sessions ?

2003-04-04 Thread Anthony
nope, same host I actually call the file by sending this :
header("Location: ../index.htm");
and I loose the session.

- Anthony

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 22:18 04.04.2003, Anthony said:
> [snip]
> >yes, it parses PHP in html files.  The php code works.  I just loose the
> >session data when going from files in different folders.
> [snip]
>
> Different folders, or different hostnames?
>
> PHP's ability to automatically add the SID to href's, as well as cookies,
> are limited to the same hostname.
>
> Example:
>
> www.myhost.com => /html/myhost/www/
> www.myotherhost.com => /html/myhost/www/
>
> These two couldn't share the same session, even if they reference the same
> physical directory.
>
>
> --
>>O Ernest E. Vogelsinger
>(\)ICQ #13394035
> ^ http://www.vogelsinger.at/
>
>



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



Re: [PHP] Quick Sessions ?

2003-04-04 Thread Anthony
Thanks for the response.  I think I might just not totaly understand this
switch. This is right out of my php.ini file:

; The path for which the cookie is valid.
session.cookie_path = /

I tried deleting the / and got no change in behavior. It seems to me that
what I need is something like
session.cookie_path = /, ../
but that doesn't work.  Any other ideas?

- Anthony

"Jennifer Goodie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Your cookie path is "" not "/" so your cookie is only readble by the
> directory it was set in.  Check your session.cookie_path
>
> http://www.php.net/manual/en/ref.session.php
>
> > -Original Message-
> > From: Anthony [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 04, 2003 12:03 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Quick Sessions ?
> >
> >
> > I have an issue.  For some reason I can't pass session data to
> > pages within
> > different folders.  What I have is a page in like
> > mydomain.com/something/somepage.php  This page creates session
information
> > and holds it correctly.  The app collects user data and then
> > eventualy sends
> > a location header to ../index.html <- in this file there is php that
check
> > to see if the session data is there and. no longer there!!!  So what
> > gives?  Can I not pass session info from pages in folders?  I'm
> > not changing
> > the domain, so I shouldn't loose the cookie I'm lost   Please
help
> > me out :)
> >
> > - Anthony
> >
> >
> >
> > --
> > 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] Opinion on a method....

2003-04-04 Thread Dan Joseph
Hi,

Thanks to everyone for the input.

Reason I'm not using an include is simple.  The file does not contain any
variables, it just has a line of text that is & delimited.  I guess I was
just looking at the include() method as insecure.  I can see how it wouldn't
be now.

Thanks to everyone!

-Dan Joseph

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 3:08 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Hi Dan,

> the ini file looks like: hostip&user&password&databasename
> after I import it, I split it up, and assign each to a variable
> name. I also have it outside the doc root, and it gives a
> generic error msg for every error in the system.

Should do it - it's a bit of a long-winded route, though.

As Kevin said, why not just use include()? It'll be a lot easier and just as
safe :-)

Cheers
Jon


--
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] Includes confusion

2003-04-04 Thread Ernest E Vogelsinger
At 22:24 04.04.2003, Mike Tuller said:
[snip]
>fine except inside functions. So if I have the following:
>
>include "/Library/WebServer/includes/database_connection.inc";
>
>function list_search_results()
>{
>   // my code that lists search results
>}
>
>The functions returns an error, but if I do this:
>
>
>function list_search_results()
>{
>   include "/Library/WebServer/includes/database_connection.inc";
>   // my code that lists search results
>}
>
>Everything works fine. Shouldn't the function be able to use the 
>include file when it is declared outside the function?
[snip] 

This depends on the contents of your library. If you have it included
within the function, all variables and data structures created within the
included file are within the function's scope. If included outside, they're
on a global scope - you would need to use either the $GLOBAL superglobal
array, or to declare them being global within the function that uses them.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] dynamic IF statement

2003-04-04 Thread Steve Keller
At 4/4/2003 11:50 AM, Tim Haskins wrote:

> How does one create a statement that basically says:
>
> "  )
> { ?>
You make a string with your dynamic statement and then EVAL it.

http://www.php.net/manual/en/function.eval.php
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Includes confusion

2003-04-04 Thread Jennifer Goodie
PHP parses includes inline, so whatever the scope is where the file is
included, is the scope of the variables that the include contains.  You can
declare the variables global in your fuction and it will use what was
included, that would be the quick fix, you could also switch your include to
use DEFINE instead of just instantiating variables. Constants have global
scope.

> -Original Message-
> From: Mike Tuller [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 12:25 PM
> To: php mailing list list
> Subject: [PHP] Includes confusion
>
>
> I can't figure this out. I have a line where I include a file
>
> include "/Library/WebServer/includes/database_connection.inc";
>
> I want to have this declared in one location, so that I don't have to
> change multiple lines if I ever move the application, everything works
> fine except inside functions. So if I have the following:
>
> include "/Library/WebServer/includes/database_connection.inc";
>
> function list_search_results()
> {
>   // my code that lists search results
> }
>
> The functions returns an error, but if I do this:
>
>
> function list_search_results()
> {
>   include "/Library/WebServer/includes/database_connection.inc";
>   // my code that lists search results
> }
>
> Everything works fine. Shouldn't the function be able to use the
> include file when it is declared outside the function?
>
> Mike
>
>
> --
> 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] Apache SetHandler

2003-04-04 Thread Zoff
Hi !

what i want is to write something in PHP which does authentication
(not basic auth but my own DB driven stuff) and after that something
apache resumes normal operation so that whatever is served afterwards
does not need to know anything of the auth process.
e.g.:
--> apache --> PHP-script --> apache --> static.html
or:
--> apache --> PHP-script --> apache --> PHP.php
or:
--> apache --> PHP-script --> apache --> perl.pl
or:
--> apache --> PHP-script --> apache --> acrobat.pdf
and all POST or GET data if there should be passed along for forms to work,
or uploads.
so is that possible ?

	Zoff.

Jason Wong wrote:
On Thursday 03 April 2003 22:38, Zoff wrote:


that's not what I want.
I want something where all the POST and GET data gets passed thru
transparently. and where I can serve static and dynamic pages as well.
mod_perl can do this.


In that case I really have no idea what you want. Could you give further 
details on what you're trying to do?



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


[PHP] native vs. phplib sessions

2003-04-04 Thread Dennis Gearon
How many people are using native vs. phplib sessions, vs. their own/homegrown 
sessions?

The archives show a LOT of problems with native sessions.

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


[PHP] Includes confusion

2003-04-04 Thread Mike Tuller
I can't figure this out. I have a line where I include a file

include "/Library/WebServer/includes/database_connection.inc";

I want to have this declared in one location, so that I don't have to 
change multiple lines if I ever move the application, everything works 
fine except inside functions. So if I have the following:

include "/Library/WebServer/includes/database_connection.inc";

function list_search_results()
{
// my code that lists search results
}
The functions returns an error, but if I do this:

function list_search_results()
{
include "/Library/WebServer/includes/database_connection.inc";
// my code that lists search results
}
Everything works fine. Shouldn't the function be able to use the 
include file when it is declared outside the function?

Mike

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


Re: [PHP] Quick Sessions ?

2003-04-04 Thread Ernest E Vogelsinger
At 22:18 04.04.2003, Anthony said:
[snip]
>yes, it parses PHP in html files.  The php code works.  I just loose the
>session data when going from files in different folders.
[snip] 

Different folders, or different hostnames?

PHP's ability to automatically add the SID to href's, as well as cookies,
are limited to the same hostname.

Example:

www.myhost.com => /html/myhost/www/
www.myotherhost.com => /html/myhost/www/

These two couldn't share the same session, even if they reference the same
physical directory.


-- 
   >O Ernest E. Vogelsinger
   (\)ICQ #13394035
^ http://www.vogelsinger.at/



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



Re: [PHP] Quick Sessions ?

2003-04-04 Thread Anthony
yes, it parses PHP in html files.  The php code works.  I just loose the
session data when going from files in different folders.

- Anthony


"Mark Douglas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Let's ask the dumb questions first:
>
> Is your webserver parsing .html files for PHP?
>
> -Original Message-
> From: Anthony [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 3:03 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Quick Sessions ?
>
>
> I have an issue.  For some reason I can't pass session data to pages
within
> different folders.  What I have is a page in like
> mydomain.com/something/somepage.php  This page creates session information
> and holds it correctly.  The app collects user data and then eventualy
sends
> a location header to ../index.html <- in this file there is php that check
> to see if the session data is there and. no longer there!!!  So what
> gives?  Can I not pass session info from pages in folders?  I'm not
changing
> the domain, so I shouldn't loose the cookie I'm lost   Please help
> me out :)
>
> - Anthony
>
>
>
> --
> 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] Opinion on a method....

2003-04-04 Thread Jon Haworth
Hi Dan,

> the ini file looks like: hostip&user&password&databasename
> after I import it, I split it up, and assign each to a variable
> name. I also have it outside the doc root, and it gives a
> generic error msg for every error in the system.

Should do it - it's a bit of a long-winded route, though.

As Kevin said, why not just use include()? It'll be a lot easier and just as
safe :-)

Cheers
Jon


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



RE: [PHP] Quick Sessions ?

2003-04-04 Thread Jennifer Goodie
Your cookie path is "" not "/" so your cookie is only readble by the
directory it was set in.  Check your session.cookie_path

http://www.php.net/manual/en/ref.session.php

> -Original Message-
> From: Anthony [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 12:03 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Quick Sessions ?
>
>
> I have an issue.  For some reason I can't pass session data to
> pages within
> different folders.  What I have is a page in like
> mydomain.com/something/somepage.php  This page creates session information
> and holds it correctly.  The app collects user data and then
> eventualy sends
> a location header to ../index.html <- in this file there is php that check
> to see if the session data is there and. no longer there!!!  So what
> gives?  Can I not pass session info from pages in folders?  I'm
> not changing
> the domain, so I shouldn't loose the cookie I'm lost   Please help
> me out :)
>
> - Anthony
>
>
>
> --
> 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] Quick Sessions ?

2003-04-04 Thread Mark Douglas
Let's ask the dumb questions first:

Is your webserver parsing .html files for PHP?

-Original Message-
From: Anthony [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 3:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Quick Sessions ?


I have an issue.  For some reason I can't pass session data to pages within
different folders.  What I have is a page in like
mydomain.com/something/somepage.php  This page creates session information
and holds it correctly.  The app collects user data and then eventualy sends
a location header to ../index.html <- in this file there is php that check
to see if the session data is there and. no longer there!!!  So what
gives?  Can I not pass session info from pages in folders?  I'm not changing
the domain, so I shouldn't loose the cookie I'm lost   Please help
me out :)

- Anthony



-- 
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] Quick Sessions ?

2003-04-04 Thread Anthony
I have an issue.  For some reason I can't pass session data to pages within
different folders.  What I have is a page in like
mydomain.com/something/somepage.php  This page creates session information
and holds it correctly.  The app collects user data and then eventualy sends
a location header to ../index.html <- in this file there is php that check
to see if the session data is there and. no longer there!!!  So what
gives?  Can I not pass session info from pages in folders?  I'm not changing
the domain, so I shouldn't loose the cookie I'm lost   Please help
me out :)

- Anthony



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



Re: [PHP] Re: *Umlauts/UTF-8

2003-04-04 Thread John Nichel
Dude, disable requesting for a receipt when your email is read.

Mario Soto wrote:
This function will help me to other suff that I wanted to do. Thank you.

That is the main reason of the mailing lists, learn of others, in this case, from others in a lot of different countries around the world on an specific topic.

Cheers

Mario Soto
[EMAIL PROTECTED]
-.-.-.-
- Original Message - 
From: nospam 
To: 'Alexey Lysenkov' 
Cc: 'Php-General 
Sent: Thursday, April 03, 2003 5:05 AM
Subject: RE: [PHP] Re: *Umlauts/UTF-8

Hi Alexey

I can't tell about Cyrillic, but for "Umlauts" :
When you write the Text-Files, you can try to encode them
an entities. I stole the following function somewhere :
function encodemymail($txt) {
 for ($i = 0; $i < strlen($txt); $i++) {
  $ent .= "&#" . ord(substr($txt, $i, 1)) . ";";
 }
 return($ent);
}
echo encodemymail('ä ü ö [  ]');
i use it for a different purpose, but it may help..

Grüße
Sebastian
 




-Original Message-
From: Alexey Lysenkov [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 03, 2003 12:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: *Umlauts/UTF-8

Please, anybody? I'm really stuck with this. Please, help, if 
you know 
the solution.

-Alex

--
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] Win95 - PHP - Apache - MySQL

2003-04-04 Thread Orlando Pozo
Hello people, greet for all

 I tried to install these:

Win95 as operating system
 PHP as parser
 Apache as Web server
 Mysql as DB server

I tried to configure these platforms, and when I write
http://localhost
 , it doesn't work, I think the problem is the web server, but I don't
 understand because I install all the applications mentioned as a package
 that bring nusphere. Does Win95 have problem with this tecnologies?




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



[PHP] dynamic IF statement

2003-04-04 Thread Tim Haskins
How does one create a statement that basically says:

"  )
{ ?>

Basically, I want to say, "show if url value is equal to this database
record's ID value - The last part is what I can't seem to get to work- any
ideas???

Thanks!

--
Tim Haskins






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



[PHP] Win95 - PHP - Apache - MySQL

2003-04-04 Thread Orlando Pozo
Hello people, greet for all

I tried to install these:

Win95 as operating system
PHP as parser
Apache as Web server
Mysql as DB server

I tried to configure these platforms, and when I write http://localhost
, it doesn't work, I think the problem is the web server, but I don't
understand because I install all the applications mentioned as a package
that bring nusphere. Does Win95 have problem with this tecnologies?



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



Re: [PHP] PHP Another time "a"round

2003-04-04 Thread CPT John W. Holmes
> I'm getting close to what I want...I currently have this code which loops 
> through all of the next 24 hours:
> 
> 
>  for($i = 0; $i <= 24; $i++):
>  $futhour = strtotime("+$i hour");
>  echo ''. date('g 
> a',$futhour).'';
> endfor;
> ?>
> 
> 
> is there a way to include the minutes of the hour in the above code, BUT 
> have the minutes rounded to the nearest 1/2 hour?
> 
> e.g.:
> 12:00
> 12:30
> 1:00
> 1:30

This works. I'm sure there are other ways:


'. date('g:i 
a',$futhour).'';
endfor;
?>


---John Holmes...

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



Re: [PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not working

2003-04-04 Thread Barry Gould
At 11:20 AM 4/4/2003, CPT John W. Holmes wrote:
How much traffic does this site get? Is it possible that the garbage
collection is just never triggered? What if you up the garbage collection
probability in your php.ini file to 100% (to trigger it with each session
start)? Do the files get removed then?
AHA!
That's it!
I thought the default was 1%, which should have been enough as I had 
several hundred session files there, but it was at 1/1000 or 0.1%

Thank you,
Barry
I'm sure this isn't the problem, but
the OS must be able to track the last "access" time of the file in order for
garbage collection to work. I'm sure RedHat does that, but I'm just bringing
it up.
Can you write a simple PHP script to try and delete one of these files? Just
a one liner using ulink() would work. You could then see if PHP, running as
Apache, has any issues accessing these files.
---John Holmes...

- Original Message -
From: "Barry Gould" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 2:10 PM
Subject: [PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not
working
> Any other ideas on this?
> Should I submit it to the bug system?
>
> Thanks,
> Barry
>
> >Date: Thu, 03 Apr 2003 13:25:16 -0800
> >
> >Hi,
> >
> >I'm having a problem where session files are not expiring or getting
deleted.
> >
> >I'm running RedHat 7.3 (which normally expires sessions fine).
> >I removed the RedHat PHP packages (rpm -e), and compiled and installed
PHP
> >4.3.1 from source.
> >
> >  './configure' '--with-mysql' '--with-gd' '--with-zlib-dir=/usr/lib'
> > '--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc'
> >
> >I'm using the php.ini-recommended, with ONLY the following changes:
> >display_errors = On
> >session.save_path = /tmp/php
> >session.auto_start = 1
> >session.entropy_length = 16
> >session.entropy_file = /dev/urandom
> >
> >Following some documentation I found somewhere on php.net, I have the
> >permissions on /tmp/php equal to 310:
> > >ls -l /tmp
> >d-wx--x---2 apache   apache  17408 Apr  3 11:14 php
> >
> >There are hundreds of files in there; many are over 1 week old.
> >
> >I've just tried changing the permissions to 770 (drwxrwx---) and
> >restarting apache; it doesn't seem to be making any difference.
> >
> >apache is
> >apache-1.3.27-2
> >from RedHat's RPM
> >
> >Any ideas would be appreciated.
> >
> >Thank you,
> >Barry Gould
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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


Re: [PHP] PHP Email Attachment problem

2003-04-04 Thread Michael Arena
When I put change the line you suggested to "
Line25 $fileatt  =
"/home/sites/webserver.agraservices.net/web/mike/$_POST['fileatt']";
$fileatt_type = $_FILES['fileatt']['type'];// Type of
file being sent
$fileatt_name = $_FILES['fileatt']['name'];// Name of
file
"

I get the following error:
"Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in /home/sites/home/web/upload.php on line 25"

???


- Original Message -
From: "Burhan Khalid" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "Michael Arena" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 1:21 PM
Subject: Re: [PHP] PHP Email Attachment problem


> Michael Arena wrote:
> > did that...still sends only a file called ".txt" size zero   ?
>
> try replacing $fileatt with $_POST['fileatt']
>
>
>
> --
> Burhan Khalid
> phplist[at]meidomus[dot]com
>
>



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



Re: [PHP] Opinion on a method....

2003-04-04 Thread Kevin Stone

- Original Message -
From: "Jon Haworth" <[EMAIL PROTECTED]>
To: "Dan Joseph" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 12:19 PM
Subject: RE: [PHP] Opinion on a method


> Hi Dan,
>
> > I would like to get some opinions here on a method I'm doing
> > to grab connect information for a mysql connection. Currently
> > I am doing:
> >   $pinfo = fopen ("/director1/directory2/filename.ini","r");
>
> Does this filename.ini contain the code to connect to your database? If
so,
> I usually do two things with this file:
>
> 1. put it outside the document root, so users can't browse to it
> 2. put any code that might output something (an error message, for
example)
> inside a function, so even if it is run, nothing will happen - you need to
> include() it and then call the function yourself.
>
> If it's just connection information, with no code (I'm a bit confused by
the
> .ini extension :-) then just make sure it's somewhere outside your
document
> root.
>
> > Is XML a solution?
>
> I don't think XML is inherently any more secure than plain text - it's all
> down to how you store and transmit the data.
>
> Cheers
> Jon

I will add in this case that include() is going to be no less secure than
fopen(), plus it's going to be a whole hell of a lot easier.

- Kevin



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



RE: [PHP] Opinion on a method....

2003-04-04 Thread Bryan Lipscy
In a php file I can just include the connection information and reduce
the overhead that comes with fopen.  Still gives me one central spot for
changing connection information as necessary.

There is always more than one way to do it.
-Bryan

-Original Message-
From: Dan Joseph [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 11:18 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Ahh, good thought.  I also have it outside the web site
directory tree.

-Dan Joseph

-Original Message-
From: Bryan Lipscy [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 2:14 PM
To: 'Dan Joseph'; [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Put the connect info into a php file (i.e. connect.php).  
If it is ever directly accessed by the client the PHP engine will render
a blank page. If your ini file is ever accessed by the client it will
render the contents of the ini file.

Wonder if removing rwx would adversly affect includes to this php
file..

-Original Message-
From: Dan Joseph [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 11:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Opinion on a method


Hi,

I would like to get some opinions here on a method I'm doing to grab
connect information for a mysql connection.

Currently I am doing: $pinfo = fopen
("/director1/directory2/filename.ini",
"r");

I'm looking for a more secure method of doing this.  Is XML a solution?
Is there something else?  Are you doing something similar?

All opinions greatly appreciated...

-Dan Joseph


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


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

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


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



RE: [PHP] Opinion on a method....

2003-04-04 Thread Dan Joseph
Hi Jon,

the ini file looks like:

hostip&user&password&databasename

after I import it, I split it up, and assign each to a variable name.

I also have it outside the doc root, and it gives a generic error msg for
every error in the system (db related, or not).

Should this do it?

-Dan Joseph

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 2:20 PM
To: Dan Joseph; [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Hi Dan,

> I would like to get some opinions here on a method I'm doing
> to grab connect information for a mysql connection. Currently
> I am doing:
>   $pinfo = fopen ("/director1/directory2/filename.ini","r");

Does this filename.ini contain the code to connect to your database? If so,
I usually do two things with this file:

1. put it outside the document root, so users can't browse to it
2. put any code that might output something (an error message, for example)
inside a function, so even if it is run, nothing will happen - you need to
include() it and then call the function yourself.

If it's just connection information, with no code (I'm a bit confused by the
.ini extension :-) then just make sure it's somewhere outside your document
root.

> Is XML a solution?

I don't think XML is inherently any more secure than plain text - it's all
down to how you store and transmit the data.

Cheers
Jon



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



Re: [PHP] Opinion on a method....

2003-04-04 Thread CPT John W. Holmes
> I would like to get some opinions here on a method I'm doing to grab
connect
> information for a mysql connection.
>
> Currently I am doing: $pinfo = fopen
("/director1/directory2/filename.ini",
> "r");
>
> I'm looking for a more secure method of doing this.  Is XML a solution?
Is
> there something else?  Are you doing something similar?

So long as filename.ini is outside of your web root, you are fine. You could
also just have a plain PHP file outside of your web root and use the
include() function to get the variables...

include.php:



index.php (or any other script)


etc You can instead put the connection function within the include.php
file, too.

---John Holmes...


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



RE: [PHP] Opinion on a method....

2003-04-04 Thread Jon Haworth
Hi Dan,

> I would like to get some opinions here on a method I'm doing
> to grab connect information for a mysql connection. Currently
> I am doing:
>   $pinfo = fopen ("/director1/directory2/filename.ini","r");

Does this filename.ini contain the code to connect to your database? If so,
I usually do two things with this file:

1. put it outside the document root, so users can't browse to it
2. put any code that might output something (an error message, for example)
inside a function, so even if it is run, nothing will happen - you need to
include() it and then call the function yourself.

If it's just connection information, with no code (I'm a bit confused by the
.ini extension :-) then just make sure it's somewhere outside your document
root.

> Is XML a solution?

I don't think XML is inherently any more secure than plain text - it's all
down to how you store and transmit the data.

Cheers
Jon



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



RE: [PHP] Opinion on a method....

2003-04-04 Thread Dan Joseph
Ahh, good thought.  I also have it outside the web site directory tree.

-Dan Joseph

-Original Message-
From: Bryan Lipscy [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 2:14 PM
To: 'Dan Joseph'; [EMAIL PROTECTED]
Subject: RE: [PHP] Opinion on a method


Put the connect info into a php file (i.e. connect.php).  
If it is ever directly accessed by the client the PHP engine will render
a blank page.
If your ini file is ever accessed by the client it will render the
contents of the ini file.

Wonder if removing rwx would adversly affect includes to this php
file..

-Original Message-
From: Dan Joseph [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 11:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Opinion on a method


Hi,

I would like to get some opinions here on a method I'm doing to grab
connect information for a mysql connection.

Currently I am doing: $pinfo = fopen
("/director1/directory2/filename.ini",
"r");

I'm looking for a more secure method of doing this.  Is XML a solution?
Is there something else?  Are you doing something similar?

All opinions greatly appreciated...

-Dan Joseph


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


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

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



RE: [PHP] PHP magazines / websites?

2003-04-04 Thread Boaz Yahav
http://www.weberdev.com is one of the veteran sites and is definitely a
premier PHP developer website.

Also check out :

http://www.phpclasses.org
http://www.codewalkers.com

berber



-Original Message-
From: John M. Calvert [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 9:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP magazines / websites?


Hi, I'm wondering what PHP-focused or PHP-aware print magazines are out
there (as opposed to on-line). So far I'm aware of www.phparch.com, but
I've not picked up a copy yet.

Also, what are considered the premier PHP developer websites?

Thanks

John M. Calvert, M.Sc., MCSD

1310521 Ontario Inc.
49 Belmont Ave.
Ottawa ON K1S 0V2
(613) 730-9851
http://members.rogers.com/john-m-calvert/

-- 
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:[PHP] 4.3.1 sessions not expiring / garbage collection not working

2003-04-04 Thread CPT John W. Holmes
How much traffic does this site get? Is it possible that the garbage
collection is just never triggered? What if you up the garbage collection
probability in your php.ini file to 100% (to trigger it with each session
start)? Do the files get removed then? I'm sure this isn't the problem, but
the OS must be able to track the last "access" time of the file in order for
garbage collection to work. I'm sure RedHat does that, but I'm just bringing
it up.

Can you write a simple PHP script to try and delete one of these files? Just
a one liner using ulink() would work. You could then see if PHP, running as
Apache, has any issues accessing these files.

---John Holmes...

- Original Message -
From: "Barry Gould" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 2:10 PM
Subject: [PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not
working


> Any other ideas on this?
> Should I submit it to the bug system?
>
> Thanks,
> Barry
>
> >Date: Thu, 03 Apr 2003 13:25:16 -0800
> >
> >Hi,
> >
> >I'm having a problem where session files are not expiring or getting
deleted.
> >
> >I'm running RedHat 7.3 (which normally expires sessions fine).
> >I removed the RedHat PHP packages (rpm -e), and compiled and installed
PHP
> >4.3.1 from source.
> >
> >  './configure' '--with-mysql' '--with-gd' '--with-zlib-dir=/usr/lib'
> > '--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc'
> >
> >I'm using the php.ini-recommended, with ONLY the following changes:
> >display_errors = On
> >session.save_path = /tmp/php
> >session.auto_start = 1
> >session.entropy_length = 16
> >session.entropy_file = /dev/urandom
> >
> >Following some documentation I found somewhere on php.net, I have the
> >permissions on /tmp/php equal to 310:
> > >ls -l /tmp
> >d-wx--x---2 apache   apache  17408 Apr  3 11:14 php
> >
> >There are hundreds of files in there; many are over 1 week old.
> >
> >I've just tried changing the permissions to 770 (drwxrwx---) and
> >restarting apache; it doesn't seem to be making any difference.
> >
> >apache is
> >apache-1.3.27-2
> >from RedHat's RPM
> >
> >Any ideas would be appreciated.
> >
> >Thank you,
> >Barry Gould
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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



Re: [PHP] Individual member pages

2003-04-04 Thread Andrew
That should get me started thank you Miles

Andrew

"Miles Thompson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Relatively easy-ish. . But you'll have to study PHP a bit more.
>
> This is a situation where sessions work really well - read up on them in
> the manual. Authenticate the user by means of a login page, which
> establishes the session. Then put something like the following at the top
> of each page.
>
>  session_register( "origin" );
> $origin=$PHP_SELF;
> if( $HTTP_SERVER_VARS[ "PHP_AUTH_USER" ] !="lancelot" &&
$HTTP_SERVER_VARS[
> "PHP_AUTH_PW" ] !="grail" ) { if( !session_is_registered( "member_id" ) )
{
> header("Location: user_logon2.php\n"); } }
>
> All the above was one long strinb in the source, at the very top of the
> page, ahead of EVERYTHING else. You can ignore the bit about "lancelot"
and
> "grail", that was built-in so that htdig could index the pages. The key
bit
> is this:
>
> if( !session_is_registered( "member_id" )  // note the " ! " which negates
> the test
>
> If the user is not authenticated, i.e. the member_id does not exist, the
> user is redirected to the user_logn2.php, otherwise the rerest of the page
> loads.
>
> Why is this one line at the very top of each member page? Because the
> header() is function is called and there can be no output at all before
> that function.
>
> How you authenticate is up to you, but there's a good start, if I remember
> correctly, at http://www.thickbook.com, or Devshed, Webmonkey, etc. There
> are a couple of good articles/tutorials on session at those sites as well.
>
> HTH - Miles Thompson
>
>
> At 11:16 AM 4/4/2003 +0100, Andrew wrote:
> >How could I have individual pages for each member who registers?
> >(ie) Pages only that member can see.
> >
> >Would this be easy(ish) to do or should I study PHP a little more first?
> >
> >Andrew
> >
> >
> >
> >--
> >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] Opinion on a method....

2003-04-04 Thread Bryan Lipscy
Put the connect info into a php file (i.e. connect.php).  
If it is ever directly accessed by the client the PHP engine will render
a blank page.
If your ini file is ever accessed by the client it will render the
contents of the ini file.

Wonder if removing rwx would adversly affect includes to this php
file..

-Original Message-
From: Dan Joseph [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 04, 2003 11:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Opinion on a method


Hi,

I would like to get some opinions here on a method I'm doing to grab
connect information for a mysql connection.

Currently I am doing: $pinfo = fopen
("/director1/directory2/filename.ini",
"r");

I'm looking for a more secure method of doing this.  Is XML a solution?
Is there something else?  Are you doing something similar?

All opinions greatly appreciated...

-Dan Joseph


-- 
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] re:[PHP] 4.3.1 sessions not expiring / garbage collection not working

2003-04-04 Thread Barry Gould
Any other ideas on this?
Should I submit it to the bug system?
Thanks,
Barry
Date: Thu, 03 Apr 2003 13:25:16 -0800

Hi,

I'm having a problem where session files are not expiring or getting deleted.

I'm running RedHat 7.3 (which normally expires sessions fine).
I removed the RedHat PHP packages (rpm -e), and compiled and installed PHP 
4.3.1 from source.

 './configure' '--with-mysql' '--with-gd' '--with-zlib-dir=/usr/lib' 
'--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc'

I'm using the php.ini-recommended, with ONLY the following changes:
display_errors = On
session.save_path = /tmp/php
session.auto_start = 1
session.entropy_length = 16
session.entropy_file = /dev/urandom
Following some documentation I found somewhere on php.net, I have the 
permissions on /tmp/php equal to 310:
>ls -l /tmp
d-wx--x---2 apache   apache  17408 Apr  3 11:14 php

There are hundreds of files in there; many are over 1 week old.

I've just tried changing the permissions to 770 (drwxrwx---) and 
restarting apache; it doesn't seem to be making any difference.

apache is
apache-1.3.27-2
from RedHat's RPM
Any ideas would be appreciated.

Thank you,
Barry Gould
--
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] Opinion on a method....

2003-04-04 Thread Dan Joseph
Hi,

I would like to get some opinions here on a method I'm doing to grab connect
information for a mysql connection.

Currently I am doing: $pinfo = fopen ("/director1/directory2/filename.ini",
"r");

I'm looking for a more secure method of doing this.  Is XML a solution?  Is
there something else?  Are you doing something similar?

All opinions greatly appreciated...

-Dan Joseph


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



Re[2]: [PHP] REPLY NEEDED

2003-04-04 Thread Timo Boettcher
Hi David,

Nachricht vom Freitag, 4. April 2003, 14:52:14:

> On Friday 04 April 2003 03:56 am, Timo Boettcher wrote:
>> Hi,
>>
>> Message of Friday, 4th April 2003, 12:28:44:

>> Apart from this being as Off-topic as I have ever seen, I think we
>> should help him:
>> So that he doesn't have to spend his valuable funds and time for
>> coping with spam, we should all get his address out of the lists of
>> those spammers... (you know, "klick here if you don't want to receive
>> this newsletter anymore"). That way, he can perhaps get a grip on his
>> situation himself.

> Clicking on those links does not help the situation, it only verifies to the
> spammer that the E-mail address was indeed valid and they've found the
> prefect person to spam.

I waas thinking about the pages where you can enter a mail address to
get out of these mailing list. We should perhaps help our friend
PATRICK KOFI out of some of these lists.



 Timo


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



[PHP] PHP magazines / websites?

2003-04-04 Thread John M. Calvert
Hi, I'm wondering what PHP-focused or PHP-aware print magazines are out
there (as opposed to on-line). So far I'm aware of www.phparch.com, but I've
not picked up a copy yet.

Also, what are considered the premier PHP developer websites?

Thanks

John M. Calvert, M.Sc., MCSD

1310521 Ontario Inc.
49 Belmont Ave.
Ottawa ON K1S 0V2
(613) 730-9851
http://members.rogers.com/john-m-calvert/

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



Re: [PHP] newbie help, pressing the submit button returns nothing(solved)

2003-04-04 Thread David McGlone
On Friday 04 April 2003 01:15 pm, you wrote:
> > > >> >Welcome !
> >
> > Thank you all for helping me, I have finally figured out why the name
> > wasn't displaying. from the line above, "$applicant" should have been
> > "applicant".
>
> Are you sure you're using PHP?
I guess so, here's what worked:

everybody was telling me this, but I failed to notice that what everyone said 
was to use $_POST['applicant']

but I was using $_POST['$applicant'] I wasn't paying attention to the "$" 




Welcome
!



What I would like to use is: echo ("Welcome " . applicant . "!");
But it doesn't work, so I guess I'll worry about learning what works first.

-- 
David M.
Edification Web Solutions
http://www.edificationweb.com

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



  1   2   3   >