RE: [PHP] Getting https-page

2003-01-20 Thread Matthew Walker
Look into the CURL libraries.
http://www.php.net/manual/en/ref.curl.php

They essentially allow you to emulate the behavior of a browser. Where I
work, we use them to make SSL connections to payment processing
gateways.

Matthew

-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 20, 2003 7:47 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Getting https-page

Hello!

You can easily get an webpage with:
 $fp = fopen(http://www.mydomain.com/;, r);
 if ($fp) exit;
 while(!feof($fp))
 { $line .= fgets($fp, 4096);
 }
 fclose($fp);
 print $line;

But this doesn't work with https (SSL). How can I get an https-page?

Martin


-- 
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 (CLI) + CURL + SSL Problem...

2002-06-07 Thread Matthew Walker

I have PHP installed both as a module, and as a CLI. When I use CURL
from inside the module, it works fine for all connections, including
SSL. When I use the CLI, I can't make SSL connections with CURL. It just
returns 'false'. Anyone know why?





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




Re: [PHP] PHP (CLI) + CURL + SSL Problem...

2002-06-07 Thread Matthew Walker

It was definately included. I know this two ways.

1. Non-SSL curl sessions work.
2. I used the exact configure string I used for the module version,
minus the --with-apxs option.

On Fri, 2002-06-07 at 14:30, Mark Heintz PHP Mailing Lists wrote:
 Are you sure curl was included with the CLI installation?  Try running
 this through the CLI to check...
 
 if(extension_loaded('curl')){
   echo 'curl support present';
 } else {
   echo 'curl not found';
 }
 
 mh.
 
 
 On 7 Jun 2002, Matthew Walker wrote:
 
  I have PHP installed both as a module, and as a CLI. When I use CURL
  from inside the module, it works fine for all connections, including
  SSL. When I use the CLI, I can't make SSL connections with CURL. It just
  returns 'false'. Anyone know why?
 
 
 -- 
 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] mysql_num_rows()

2002-06-07 Thread Matthew Walker

It's 1 based. It returns the number of rows. Not the index of the last
row. (Which would be 0 based.)

On Fri, 2002-06-07 at 19:23, William_dw -- Sqlcoders wrote:
 Hiya!,
 Does anyone know whether mysql_num_rows is zero or one based?
 
 that is, if I have 5 records will mysql_num_rows() return 4 or 5?
 
 Thanks in advance!,
 Dw.
 
 (I did check the php.net and MySQL manual for mysql_num_rows,
 php.net dosent say and MySQL only gives a one line description, which is how
 to call mysql_num_rows).
 
 
 -- 
 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 Tag question

2002-05-15 Thread Matthew Walker

I'm writing a coding standards document for our programmers, and I need
to know if the 'echo' shortcut PHP tags are always on, or if we need to
assume they might not be on.

(By echo shortcut, I mean this syntax: ?=$variable?)

Matthew Walker
Senior Software Engineer
ePliant Marketing
 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] I'm doing something wrong....

2002-05-15 Thread Matthew Walker

When you create an array this way, no numeric indexes are assigned.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Robert Rothe [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 15, 2002 2:35 PM
To: [EMAIL PROTECTED]
Subject: [PHP] I'm doing something wrong

I've created an array.  A very simple array that uses strings as keys.

aname['one']=something;
aname['two']=something else;

Isn't there any way to directly access the 'n'th element?  
example: aname[0]?

I've searched the group, but haven't found anything.  Am I missing
something or can't this be done?

TIA,

Rob

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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] SQL Server test tool

2002-05-15 Thread Matthew Walker

Just attempt to connect. If it succeeds, the server is alive.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Scott St. John [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 15, 2002 6:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] SQL Server test tool

Has anyone seen or know if it is possible to use PHP to test if a SQL 
server is alive on port 1433?  I know I could run a query, but was
looking 
for something to actually test on the port.

Thanks,

-Scott


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] help with undefined variables, please

2002-05-14 Thread Matthew Walker

I prefer to use isset(), not empty(). It's more accurate, in that it
knows the difference between a variable that just isn't set, and one
that has an empty value (which may be valid).

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Philip Olson [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 14, 2002 12:04 PM
To: The Gabster
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] help with undefined variables, please

 PHP Notice:  Undefined variable:  action in
 C:\Apache\htdocs\easyletter2\easyletter.php on line 73
 
 Why do I get an undefined variable error for $action, $pw, $disp, 
 $found when they do not have to be declared in the script?

 if ($action==sign){

At this point, $action was not set.  At some point in your 
script you may want to check if $action exists at all and 
if not, assign it to boolean false (just one of a million 
things you can do).  Like, on top of the script:

// Initialize various variables if they are empty
$vars_to_init = array('action','pw','disp','found');

foreach ($vars_to_init as $var) {
if (empty(${$var})) {
${$var} = false;
}
}

That'll check them, and set empty vars to false.  Seems 
kinda weird, it is ;)  Undefined variables are level 
E_NOTICE errors in PHP.  Some people find these a bit 
annoying and turn them off, most prefer to eliminate 
them.  When you said variables don't have to be 
declared in PHP, you are right in that they are just 
E_NOTICE level errors, not Fatal E_ERROR.  By default, 
error_reporting levels do not show E_NOTICE but good 
little programmers attend to them.

A quick and dirty way to magically get rid of them is 
to turn down error_reporting in php.ini or at runtime.
error_reporting is both a PHP directive and a PHP 
function.

There is also '@' available to suppress an error, it 
works on both functions and variables.  See:

http://www.php.net/manual/language.operators.errorcontrol.php

What is done of course depends on the situation and 
the person.

Regards,
Philip Olson







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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




[PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker

We have a shopping cart product we're developing in PHP, and I've
recently come across I dilemma that I need to find a reliable solution
to.

Many of the people who will be shopping on our sites have cookies
disabled, which presents a problem when using sessions. Now, I am aware
of the fact that we could append the SID constant to every URL, but this
will not work for us. None of our sites are dynamic, and updating them
is out of the question (We have over 100 sites). As well, someday we
intend to sell this software, and we don't want to require that people
make their sites fully dynamic to accommodate it.

So, is there any reliable way to emulate sessions without requiring a
cookie, or a variable passed in every URL?

Matthew Walker
Senior Software Engineer
ePliant Marketing
 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker

The sites are not dynamic, but the shopping cart /is/. The problem is,
if people don't have cookies on, when they return to the site to order
more products, they loose the SID that has been appended to the links
inside the cart, and thus loose the contents of their shopping cart.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 14, 2002 5:48 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Sessions Without Cookies or SID Passing...

On Tue, 14 May 2002, Matthew Walker wrote:
 Many of the people who will be shopping on our sites have cookies
 disabled, which presents a problem when using sessions. Now, I am
aware
 of the fact that we could append the SID constant to every URL, but
this
 will not work for us. None of our sites are dynamic, and updating them
 is out of the question (We have over 100 sites). As well, someday we
 intend to sell this software, and we don't want to require that people
 make their sites fully dynamic to accommodate it.

I don't entirely understand. If your site is not dynamic, then what do
you 
need sessions for?

miguel


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker

You're not understanding the problem. This is not an authentication
situation. We are using sessions to track information about what a
customer's OrderID is, and other related information.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 14, 2002 5:42 PM
To: Matthew Walker
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Sessions Without Cookies or SID Passing...

Use standard HTTP authentication over SSL - that's the only other way.

On Tue, 14 May 2002, Matthew Walker wrote:

 We have a shopping cart product we're developing in PHP, and I've
 recently come across I dilemma that I need to find a reliable solution
 to.

 Many of the people who will be shopping on our sites have cookies
 disabled, which presents a problem when using sessions. Now, I am
aware
 of the fact that we could append the SID constant to every URL, but
this
 will not work for us. None of our sites are dynamic, and updating them
 is out of the question (We have over 100 sites). As well, someday we
 intend to sell this software, and we don't want to require that people
 make their sites fully dynamic to accommodate it.

 So, is there any reliable way to emulate sessions without requiring a
 cookie, or a variable passed in every URL?

 Matthew Walker
 Senior Software Engineer
 ePliant Marketing



 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002


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




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker

Could you explain how this could be accomplished, because I'm not
understanding how to do it.

As I understand HTTP Authentication (correct me if I'm wrong), the
user's computer still has to send a 'username/password' pair to perform
the authentication. I can't see how this could be used to maintain
session data.

But maybe my mind is just trapped in a rut. Please enlighten me.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 14, 2002 6:04 PM
To: Matthew Walker
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions Without Cookies or SID Passing...

I am understanding the problem perfectly.  HTTP is stateless.  You want
to
maintain state accross requests.  This is done in 3 different ways.

1. Cookies
2. URL Mangling
3. HTTP Authentication

You said you did not want to do 1 or 2.  That only leaves you with HTTP
Authentication.  HTTP Authentication is really just like a cookie that
can't be disabled when it comes down to it.

-Rasmus

On Tue, 14 May 2002, Matthew Walker wrote:

 You're not understanding the problem. This is not an authentication
 situation. We are using sessions to track information about what a
 customer's OrderID is, and other related information.

 Matthew Walker
 Senior Software Engineer
 ePliant Marketing


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 14, 2002 5:42 PM
 To: Matthew Walker
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Sessions Without Cookies or SID Passing...

 Use standard HTTP authentication over SSL - that's the only other way.

 On Tue, 14 May 2002, Matthew Walker wrote:

  We have a shopping cart product we're developing in PHP, and I've
  recently come across I dilemma that I need to find a reliable
solution
  to.
 
  Many of the people who will be shopping on our sites have cookies
  disabled, which presents a problem when using sessions. Now, I am
 aware
  of the fact that we could append the SID constant to every URL, but
 this
  will not work for us. None of our sites are dynamic, and updating
them
  is out of the question (We have over 100 sites). As well, someday we
  intend to sell this software, and we don't want to require that
people
  make their sites fully dynamic to accommodate it.
 
  So, is there any reliable way to emulate sessions without requiring
a
  cookie, or a variable passed in every URL?
 
  Matthew Walker
  Senior Software Engineer
  ePliant Marketing
 
 
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 



 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002





---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] Sessions Without Cookies or SID Passing...

2002-05-14 Thread Matthew Walker

Blah. That's a really ugly choice, but I suppose we may end up having to
do that.

I'd give my kingdom for always-on cookies. Ah well. I'll look into this
some more once my current project is finished. Thanks for your advice.
(And thanks to everyone else too)

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 14, 2002 6:26 PM
To: Matthew Walker
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Sessions Without Cookies or SID Passing...

 Could you explain how this could be accomplished, because I'm not
 understanding how to do it.

 As I understand HTTP Authentication (correct me if I'm wrong), the
 user's computer still has to send a 'username/password' pair to
perform
 the authentication. I can't see how this could be used to maintain
 session data.

 But maybe my mind is just trapped in a rut. Please enlighten me.

The problem here is not where to store the session data.  That's
obvious.
You store the session data on your server.  The real problem is linking
the session data (ie. the contents of a shopping cart) to a specific
user
so when that same user is surfing through your site, on every request
you
know which cart is his.  And if he goes away and comes back later, you
again can go find his cart and you know what is in it.

Ergo, therefore, if you are able to uniquely identify the user you have
solved your session problem.  HTTP Authentication does this brilliantly.
The only difference between cookies and http auth is that with a cookie
you send the remote user a unique identifier that is then sent back to
you
whenever that specific user visits your site.  Because this happens
automatically and people don't like that, some people turn this off.
With HTTP authentication, instead of doing this automatically you have
the
user create a profile on your site where part of this will include a
unique identifier and a password.  Each time the user visits your site
this information will be sent exactly like a cookie.  Depending on how
users configure their browsers they may have to log in at the beginning
of
a session although these days most browsers have these password managers
that make this login procedure trivial.

-Rasmus



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] PHP 4.2x changes

2002-05-14 Thread Matthew Walker

Actually, it is $PHP_SELF. Try $_SERVER['PHP_SELF']

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Weston Houghton [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, May 14, 2002 6:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP 4.2x changes


All,

I've recently upgraded from 4.1.2 to 4.2.0. And of course my script has
stopped working. I know a lot with the globals has changed, but to be
honest, I am not sure how or why. Can anyone give me an initial lead as
to
what I should look for first?

I know I use the following elements:

$_SERVER[PATH_TRANSLATED]
$PHP_SELF

I can't believe it is $PHP_SELF. What should I be wary of when using PHP
Environment vars like: $_SERVER[PATH_TRANSLATED]

Thanks!
Wes


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] Newbie question to everybody....PHP

2002-05-11 Thread Matthew Walker

1. I have dug deeper into arrays than I care to remember.

2. Absolutely not.

3. See http://www.php.net/sleep and http://www.php.net/usleep

Glad to hear you're converting to PHP! It's an amazing language, and I
don't see it going away any time in the near future. Hope you have fun,
and be sure to ask if you have any more questions. I always try and
answer questions on the list if I have the time, and know the answer.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: r [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, May 11, 2002 7:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Newbie question to everybodyPHP

Greetings people,
Special greetings to all of you who have helped me in the past.

As most of you know i am a newbie, I learned a bit of PHP via webmonkey
and
a few other places, seeing the power of PHP i decided to convert from
Java
servlets and JSP (JSP coz its expensive to host and not many hosting
opportunities) so I baught a book called The PHP black book.
Anyway, now that the background is done heres my questions:

1)How many of you have seriously dug into arrays and has it been
important
in your programming?
1.1)Do you think you could have done the same thing you did with arrays
WITHOUT arrays?
(The reason i ask this is theres a whole chapter dedicated to arrays in
the
book  its pretty frustrating)
Last question:
Is ther any function to make the program sleep for 10 seconds or so?
or
does anybody have a function that does this?

ANY replies good,bad,flames will be welcome.
Cheers,
-Ryan.

/* You cannot get to the top by sitting on your bottom. */





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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] setcookie() in 4.2.0

2002-05-11 Thread Matthew Walker

Yes. Output buffering is good.

Some people will say that you shouldn't use it, but should make sure to
write all your code so that there can't be any output before any headers
need to be sent. I disagree with this. While a good idea in principle,
in practice it is all but impossible to keep going. 

(Or maybe I'm just too lazy to take the tremendous amount of time it
would take to rewrite our code to not send output before headers...)

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Olexandr Vynnychenko [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, May 11, 2002 6:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] setcookie() in 4.2.0

The following code doesn't work properly on PHP 4.1:

?php
echo pBlah, blah/p;
setcookie(kuku, abc);
setcookie(lala, def);
setcookie(zuzu, ghi);
?

Because I wrote echo statement before setcookie. But it works on PHP
4.2. Is it due to output_buffering=4096 directive in php.ini?

-- 
Best regards,
 Olexandr  mailto:[EMAIL PROTECTED]


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] Re: how to send spaces in the url

2002-05-09 Thread Matthew Walker

Might I suggest using PHP's urlencode() to encode the string, and
Javascript's function unescape()?

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 09, 2002 11:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: how to send spaces in the url

LOL!  A standard!?  In Javascript!?  You must be joking.  :-)

Nope. But it's not difficult.  You simply have to access the url string
with
'document.location.href', parse out the values individually and replace
the
space placeholders.  Can't remember what the exact javascript function
would
be.. I think it's 'string.replace' or something like that.  I'm certain
a
quick search.will reveal exactly what you need.
-Kevin

- Original Message -
From: Pushkar Pradhan [EMAIL PROTECTED]
To: Kyle Gibson [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 10:24 AM
Subject: Re: [PHP] Re: how to send spaces in the url


 Thanks to all who responded.
 I think I should have mentioned that I am trying to send these vars.
in
 the url to a javascript pg. thus won't have access to php on the other
 side (i.e. I want to keep it this way for speed).
 So as Kyle suggested to replace the   is the only way? This is fine
but
 isn't there something standard for this?
  What you could do is think of some random sequence of characters,
say
  |-| and use that for a space.
 
  Then, on the receiving script, just remember to use
  str_replace(|-|, ,$HTTP_SERVER_VARS[QUERY_STRING])
 
 
  If you don't have access to the receiving script, then you'll need
to
  use %20.
 
 
  -Kyle
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 -Pushkar S. Pradhan


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] simple array question (Am a Newbie kindly excuse.)

2002-05-09 Thread Matthew Walker

Try this:

?php
$a1[]=ryan1;
$a1[]=ryan1.2;
$a1[]=ryan2;
$a1[]=ryan2.1.1.1.1.1;
$a1[]=ryan3;
$a1[]=ryan3.2;

print(Tesing arrays:br);
for($i=0; $i  count($a1); $i++) {
{
echo($a2[$i]);
if ($i != (count($a1) - 1)) {
echo ,br;
}
}

?


Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: r [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 10, 2002 3:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP] simple array question (Am a Newbie kindly excuse.)

Greetings my PHP people.
Will do things a bit backwork code first and what i want as that seems
the
easiest way to explain

Here is the code:
?php
$a1[]=ryan1;
$a1[]=ryan1.2;
$a1[]=ryan2;
$a1[]=ryan2.1.1.1.1.1;
$a1[]=ryan3;
$a1[]=ryan3.2;
reset($a1);

print(Tesing arrays:br);
while(list($aa1,$aa2) = each ($a1))
{
print($aa2 . ,br);
}

?

Which gives out the output:
Tesing arrays:
ryan1,
ryan1.2,
ryan2,
ryan2.1.1.1.1.1,
ryan3,
ryan3.2,

my question/problem is simply this: how do i stop the last comma from
coming? because originally instead of giving the output to the browser i
want it to feed it to a hidden form field, which i enter into the
database
Yeah yeah yeah, wipe the tears of laugher from your eyes and remember,
you
too were once a newbie. :-o)
This list is great and i know i will get not one answer but many, thank
you
in advance.
-Ryan A.


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] Mass Mail {?!}

2002-04-22 Thread Matthew Walker

I'd recommend this script with a few changes.

?

$Emails = array(Get your list of emails into the array somehow);

for($i=0; $icount($Emails); $i++) {
// send email code
usleep(delay in microseconds);
}

?

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: CDitty [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, April 21, 2002 8:47 PM
To: Liam MacKenzie; PHP
Subject: Re: [PHP] Mass Mail {?!}

How about something like this.

?

$Total_emails = 100;
$i = 1;

if($Total_emails != $i){
// send email code

$i++;
}

?

This should be all you need.  I used something similar to crash my
work's 
email system by accident.  :)  Whoops.

CDitty

At 12:40 PM 4/22/2002 +1000, Liam MacKenzie wrote:
Hey all,
I was just wondering if someone's written a script that will let me
send 
lots of emails to an address, but with a small pause inbetween emails.

And no I'm not using this for spam, I need to test a SMTP server that
I'm 
developing.

Thanks for your help!


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

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




RE: [PHP] Can php support ttf??

2002-04-22 Thread Matthew Walker

Also, non-Unicode TTF fonts will /not/ work with PHP.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Rahul Bhide [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 9:45 PM
To: zhaoxd
Cc: php mailling list
Subject: Re: [PHP] Can php support ttf??

Hi,
You need freetype-1.* library . You can get it at www.freetype.org .
Then compile php --with-ttf=/usr/local assuming you have the library in
/usr/local/lib .

I struggled a lot getting the TTF fonts to work in my env . Now I
conclude that only specific combinations of versions of php/gd/freetype
work well
with each other . I am using

freetype-1.3.1
gd-1.8.4
php-4.0.4pl1

which works well for me .

hope this helps.

~Rahul

zhaoxd wrote:

 hello all:
 :)
 My version of gd is 1.8.4,my php is 4.1.2,which works on apache server
whose version is 1.3.24 and my OS is linux7.2.

 When I compiled gd ,I used some libraries,such as
libpng-1.2.0,zlib-1.1.4,freetype-2.1.0,I want my gd can support ttf
besides png image,is it enough?

 Can php support ttf?I hava just compiled gd in php,but I found it can
not use some functions like ImageTTFtext and ImageTTFBBox,why?

 Is that right that  gd-1.8.4 can't support functions about ttf ,just
as gd cannot support gif?

 Thank you
 zhaoxd


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

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




RE: [PHP] remove last character in a string

2002-04-22 Thread Matthew Walker

Actually, if he uses a negative index in substr(), he doesn't need to
know the length of the string.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]] 
Sent: Monday, April 22, 2002 9:29 PM
To: Craig Westerman; php-general-list
Subject: Re: [PHP] remove last character in a string

First, you'll need to get the length of the str with the str_len()
function.
After you have that, use the substr() function like Rasmus mentioned.

Tyler Longren
Captain Jack Communications
www.captainjack.com
[EMAIL PROTECTED]

- Original Message -
From: Craig Westerman [EMAIL PROTECTED]
To: php-general-list [EMAIL PROTECTED]
Sent: Monday, April 22, 2002 10:26 PM
Subject: [PHP] remove last character in a string


 I have a string that ends in a comma. What is best method to remove
the
 comma?

 Craig 
 [EMAIL PROTECTED]



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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

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




RE: [PHP] SafeExtract() ... extract securily

2002-04-17 Thread Matthew Walker

Sounds really good to be! Now if they would code this into PHP, it would
be perfect. This would solve several security issues.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Amit Arora [mailto:[EMAIL PROTECTED] (nospam)] 
Sent: Wednesday, April 17, 2002 11:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP] SafeExtract() ... extract securily

Hi,

For security reasons ... Global Variables is to be turned off ...
But the global variables was an hassle free way to get the variables
into the global scope.

Here is an alternate to it and do it securily ...

A simple example would be ...

Just use the following function on top of the code ...

SafeExtract( array(
'any' = array( 'name', 'userid' ),
'post' = array( 'password', 'credit_card_number' )
'get' = array( 'url', 'key' ),
'cookie' = array( 'last_visit', 'last_activity' )
);

Above code means ...
Variables 'name' and 'userid' would be made global if present in GET,
POST, 
COOKIE variables

Variables 'password' and 'credit_card_number' would be made global if 
present ONLY in POST vars else would be unset

Variables 'url' and 'key' would be made global if present ONLY in GET
vars 
else would be unset

Variables 'last_visit' and 'last_activity' would be made global if
present 
ONLY in COOKIE vars else would be unset

that is if you try to pass 'password' from GET variables, it would not
be 
made global, and in fact if there is a variable in global scope as 
'password' it would be unset

the function also takes care of striping slashes from the variables ...

Any comments, suggestion or error reports would be helpful ...

Amit Arora
(http://www.digitalamit.com/)

Earn Money by reading short emails ...
http://hits4pay.com/members/index.cgi?digitalamit 

---
---
// Copyright Amit Arora (c) 2002
// Following code is part of phpObjects
// Permission given to use the code as is in whole.
// http://www.digitalamit.com/


// Create variables for PHP3 and pre PHP 4.1
if (isset($HTTP_GET_VARS)) { $_GET =  $HTTP_GET_VARS; }
if (isset($HTTP_POST_VARS)) { $_POST =  $HTTP_POST_VARS; }
if (isset($HTTP_COOKIE_VARS)) { $_COOKIE =  $HTTP_COOKIE_VARS; }

/*
Function SafeExtract()
Safely extract the 
Parameter: array1, array2, ...

*/

function SafeExtract()
{
global $_GET, $_POST, $_COOKIE;
foreach( func_get_args() as $v )
{
if( is_array( $v ) )
while( list( $key, $value ) = each( $v ) )
{
switch ( $key )
{
case 'any':
if ( is_array( $value ) )
foreach ( $value as $e )
{
if ( isset($_COOKIE[$e]) ) $GLOBALS[$e] = 
$_COOKIE[$e];
if ( isset($_POST[$e]) ) $GLOBALS[$e] = 
(get_magic_quotes_gpc() ? stripslashes($_POST[$e]) : $_POST[$e]);
if ( isset($_GET[$e]) ) $GLOBALS[$e] = 
(get_magic_quotes_gpc() ? stripslashes($_GET[$e]): $_GET[$e]);
}
break;

case 'get':
if ( is_array( $value ) )
foreach ( $value as $e )
{
if ( isset($_GET[$e]) )
{
$GLOBALS[$e] = (get_magic_quotes_gpc() ? 
stripslashes($_GET[$e]): $_GET[$e]);
}
else
{
unset( $GLOBALS[$e] );
}
}
break;

case 'post':
if ( is_array( $value ) )
foreach ( $value as $e )
{
if ( isset($_POST[$e]) )
{
$GLOBALS[$e] = (get_magic_quotes_gpc() ? 
stripslashes($_POST[$e]) : $_POST[$e]);
}
else
{
unset( $GLOBALS[$e] );
}
}
break;

case 'cookie':
if ( is_array( $value ) )
foreach ( $value as $e )
{
if ( isset($_COOKIE[$e]) )
{
$GLOBALS[$e] = $_COOKIE[$e];
}
else
{
unset( $GLOBALS[$e] );
}
}
break;

}
}
}
}


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus

RE: [PHP] Checking for TTF in a script

2002-04-16 Thread Matthew Walker

Use this:

if (function_exists(imagettftext)) {
//TTF Exists
} else {
//TTF Doesn't exist
}

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Jackson Miller [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, April 16, 2002 12:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Checking for TTF in a script

I am working on am application that is using the GD library to create
the navigation menu.  I would like to check for TTF support in a script
before I declare the image size.  

The reason for this is so I can create width based on the length of the
string if TTF is enabled and take a guess if TTF is not enabled.  I also
want to center the text, and I can only do this with TTF.

So my question, assuming there is no problems with my premise, how can I
safely check to see if TTF is supported from within a script?

-Jackson


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

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




RE: [PHP] Multiple Threads?

2002-04-15 Thread Matthew Walker

I think what I'm going to end up doing, is using a perl CGI script to do
this part. I /know/ perl can do it easily, and I won't have to hack
together my own threading code.

Thanks for the suggestions though.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Richard Archer [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, April 14, 2002 6:41 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Multiple Threads?

At 9:25 PM -0600 13/4/02, Matthew Walker wrote:

I don't remember the name of the module offhand, but once upon a time,
I
used a perl module that would fork multiple threads so that you could
execute several web queries at the same time. This saved a lot of time,
if, for instance, you had to get information from UPS, FedEx, and the
USPS about shipping rates to display on a page. If you had to query
them
one at a time, the delay would be unacceptable. However, with that perl
module, you could query them all at the same time, making it much
faster.

You could system() or shell_exec() an external program/script which
forked off 3 children to perform the queries. You would then need to
parse the script output for the data you need. system() would require
you to capture the script output via output buffering.

If you want to use a CGI version of PHP as the external program the
functions described at http://www.php.net/manual/en/ref.pcntl.php are
what you need.

This is a very neat idea. I hope I remember this when I need it :)

 ...R.

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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

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




[PHP] RE: Multiple Threads?

2002-04-14 Thread Matthew Walker

Won't work for web connections, because it waits for each connection to
complete before running the next one.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Richard Creech [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, April 14, 2002 1:46 PM
To: [EMAIL PROTECTED]
Cc: Matthew Walker
Subject: Re: Multiple Threads?

Hello All,
IF you are using mySQL database then the php manual indicates you can
run multiple connections. Presumably you could execute several web
queries at the same time, each with its own connection. I haven't tried
such, but the manual suggests it is possible:

http://www.php.net/manual/en/function.mysql-connect.php

If a second call is made to mysql_connect() with the same arguments, no
new link will be established, but instead, the link identifier of the
already opened link will be returned. The new_link parameter modifies
this behavior and makes mysql_connect() always open a new link, even if
mysql_connect() was called before with the same parameters. 
Note: The new_link parameter became available in PHP 4.2.0 
 


Kind Regards,

Richard Creech
[EMAIL PROTECTED]
250.744.3350 Pacific Time Canada
Dreamriver Software Powers the Net
http://www.dreamriver.com

Matthew Walker [EMAIL PROTECTED] wrote:

I don’t remember the name of the module offhand, but once upon a time, I
used a perl module that would fork multiple threads so that you could
execute several web queries at the same time. This saved a lot of time,
if, for instance, you had to get information from UPS, FedEx, and the
USPS about shipping rates to display on a page. If you had to query them
one at a time, the delay would be unacceptable. However, with that perl
module, you could query them all at the same time, making it much
faster.
 
Does anyone know if such a thing exists for PHP?
 
Matthew Walker
Senior Software Engineer
ePliant Marketing
 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

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




[PHP] Multiple Threads?

2002-04-13 Thread Matthew Walker

I don’t remember the name of the module offhand, but once upon a time, I
used a perl module that would fork multiple threads so that you could
execute several web queries at the same time. This saved a lot of time,
if, for instance, you had to get information from UPS, FedEx, and the
USPS about shipping rates to display on a page. If you had to query them
one at a time, the delay would be unacceptable. However, with that perl
module, you could query them all at the same time, making it much
faster.
 
Does anyone know if such a thing exists for PHP?
 
Matthew Walker
Senior Software Engineer
ePliant Marketing
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002
 

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




RE: [PHP] counter for HIGH traffic site

2002-04-08 Thread Matthew Walker

You definitely want to use MySQL for this. Ignore all those people who
recommended text file DBs. They are /SLOW/. MySQL is very very fast. To
show you a small sample of how fast, here's the debug data from one of
my scripts, showing how long the page took to generate, and how many
queries were run. The queries consist of the same kind you would be
using. 


Debug Data
This page was generated in 0.030305027961731 seconds.
9 queries executed.


Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Craig Westerman [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, April 06, 2002 11:58 PM
To: php-general-list
Subject: [PHP] counter for HIGH traffic site

I'm needing counter for site that receives 60 to 80 hits a minute. Many
I
have tried cause excessive server load and need to be deactivated or
they
lose data and return to zero without warning. All tried so far have been
written in Perl.

Anyone here know of a PHP counter that would handle HIGH traffic with
little
added server load? Would using MySQL to store count be of any benifit?

Thanks

Craig 
[EMAIL PROTECTED]

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002
 

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




RE: [PHP] what is the difference between function and language construct?

2002-03-21 Thread Matthew Walker

Because $a=5 is not 'empty'.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: bob [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 5:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] what is the difference between function and language
construct?

why this get wrong?

?php

if (empty($a=5)) {
echo 'ok';
} else {
echo 'bad';
}
?


-- 
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.332 / Virus Database: 186 - Release Date: 3/6/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.332 / Virus Database: 186 - Release Date: 3/6/2002
 

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




RE: [PHP] Re: Phpfx, what is it?

2002-03-20 Thread Matthew Walker

A quick search on google told me this: 

phpfx is a website with the goal of providing free and quality open
source php scripts

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Philip Hallstrom [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, March 20, 2002 7:05 PM
To: Chuck PUP Payne
Cc: PHP General
Subject: [PHP] Re: Phpfx, what is it?

Dont' know about phpfx, but there's www.phorum.org for a bulletin board
system...

On Wed, 20 Mar 2002, Chuck PUP Payne wrote:

 Hi,

 I was sourgeforge.net looking at the PHP stuff, I saw something call
phpfx,
 but it not clear what it is or what it does. Has anyone mess with it?

 Also I am looking for a php program that was written so that you can
do a
 BBS, I wanted to use Ultimate Bulletin Board, but they no longer
support the
 freeware verision, you have to pay almost $500 for it. The verision I
have
 the date is not Y2K, so the dates come out 19100. So I need to replace
the
 BBS, it was written with perl and I like to have something well you
guys
 know.

 One last question for now. Is there a site that explain how to do list
in
 php with colors, I want to add color to my lists, when I do thinks now
there
 are so boring, with just white.

 Thanks a head of time...By the way


  
  | Chuck Payne  |
  | Magi Design and Support  |
  | www.magidesign.com   |
  | [EMAIL PROTECTED]   |
  

 BeOS, Macintosh 68K, Classic, and OS X, Linux Support.
 Web Design you can afford.

 Never be bullied into silence. Never allow yourself to be made a
victim.
 Accept no one's definition of your life; define yourself.- Harvey
Fierstein



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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.332 / Virus Database: 186 - Release Date: 3/6/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.332 / Virus Database: 186 - Release Date: 3/6/2002
 

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




RE: [PHP] Session_start()

2002-03-07 Thread Matthew Walker

You must place session_start() before any other /output/. It can come
after other code, as long as nothing will be output before it.
Alternately, you can turn on output buffering and just not worry about
it.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Team GotFusion [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 07, 2002 7:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Session_start()

Do I have to place a session_start() function at the top of a page
(.php) before the headers?

If I am creating  a login form with PHP_SELF, can I place the
session_start() at any point in the html where the user has been
validated and logged in?  

Thanks, Tami
Team GotFusion

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002
 

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




RE: [PHP] mysql 4 windows

2002-02-24 Thread Matthew Walker

Yes. MySQL is as stable as the box you run it on. ;)

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 24, 2002 10:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] mysql 4 windows

Does anyone know if mysql 4 windows is up to snuff yet?
I'm running  http://www.easyphp.org/
Can it be installed as localhost2?

John


-- 
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.325 / Virus Database: 182 - Release Date: 2/19/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002
 

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




RE: [PHP] PEAR DB class

2002-02-14 Thread Matthew Walker

Sure is legal. I use it all /over/ the place.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Gary [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 14, 2002 2:26 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PEAR DB class

Hi all,
  Before I get started and have to figure out a problem. Is it legal in 
PEAR DB to connect like this
$dbh = DB::connect(mysql://$user:$pass@$host/$dname); where user, 
password, host and database names are coming from an include?

TIA
Gary


-- 
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.323 / Virus Database: 180 - Release Date: 2/8/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002
 

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




RE: [PHP] Parse Error

2002-02-12 Thread Matthew Walker

I'd definitely check Line 19. You probably forgot a ;

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Jason Whitaker [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, February 12, 2002 4:01 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Parse Error

Ok I got this error:

Parse error: parse error, expecting `','' or `';'' in
c:\www\hosted\witakr\index.php on line 20

this is line 20:

print (table border=0 align=center width=100% cellspacing=0
cellpadding=0);

where?
--

Jason Whitaker



-- 
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.323 / Virus Database: 180 - Release Date: 2/8/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002
 

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




RE: [PHP] A MYSQL COUNTER

2002-02-11 Thread Matthew Walker

This is too much for a text file. You should definitely use MySQL for
this.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Georgie Casey [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 11, 2002 3:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] A MYSQL COUNTER

I need a way of tracking what user was logged in when vieweing a
particular
member page, so I'm thinking of having EVERY unique page view of each
member
page added to a MySQL database, which just the ip, time and date, server
name and browser, stuff like that. Is this too much for a MySQL DB???
Should
I just write all the info to a textfile???

TANX

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Ireland's Online Film Production Directory
***



-- 
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.323 / Virus Database: 180 - Release Date: 2/8/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002
 

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




RE: [PHP] Trying to put ips into database

2002-02-08 Thread Matthew Walker

What type of field is 'ip'?

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 08, 2002 9:18 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Trying to put ips into database

I'm trying:
$query = mysql_query(select COUNT(*) as rowexists from ips where ip =
'$REMOTE_ADDR');
$result = mysql_fetch_array($query);
if($result['rowexists'] == false){
mysql_query(INSERT INTO `ips` (`ip`) VALUES ('$REMOTE_ADDR'));
}


But it keeps putting the ip into tthe array, even if it's already there,
and
it only gets the first section of the ip!  What am I doing wrong? 

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002
 

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




RE: [PHP] PHP and Apache authorization: how to logout. Help!

2002-02-01 Thread Matthew Walker

Does anyone have the answer for this question? I need it too...

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Aras Kucinskas [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 31, 2002 10:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP and Apache authorization: how to logout. Help!

My site is in directory which is protected with .htaccess file.
I want to develope a logout function, which can reset Apache
authorization.

What to do?
HTTP header...
unset $PHP_AUTH_USER ...

Any suggestions

Sorry for  my English :)

Aras



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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] PHP and Apache authorization: how to logout. Help!

2002-02-01 Thread Matthew Walker

I've done some investigating on my own. There is no way to do this.
Period.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Matthew Walker 
Sent: Friday, February 01, 2002 3:37 PM
To: Aras Kucinskas; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP and Apache authorization: how to logout. Help!

Does anyone have the answer for this question? I need it too...

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Aras Kucinskas [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 31, 2002 10:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP and Apache authorization: how to logout. Help!

My site is in directory which is protected with .htaccess file.
I want to develope a logout function, which can reset Apache
authorization.

What to do?
HTTP header...
unset $PHP_AUTH_USER ...

Any suggestions

Sorry for  my English :)

Aras



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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] PHP and Apache authorization: how to logout. Help!

2002-02-01 Thread Matthew Walker

The entire browser has to close down to clear the auth data.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Lazor, Ed [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 01, 2002 4:41 PM
To: Matthew Walker; Aras Kucinskas; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP and Apache authorization: how to logout. Help!

Even with a javascript function opening a new window and closing the
old?

-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 3:42 PM
To: Aras Kucinskas; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP and Apache authorization: how to logout. Help!


I've done some investigating on my own. There is no way to do this.
Period.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Matthew Walker 
Sent: Friday, February 01, 2002 3:37 PM
To: Aras Kucinskas; [EMAIL PROTECTED]
Subject: RE: [PHP] PHP and Apache authorization: how to logout. Help!

Does anyone have the answer for this question? I need it too...

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Aras Kucinskas [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 31, 2002 10:39 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP and Apache authorization: how to logout. Help!

My site is in directory which is protected with .htaccess file.
I want to develope a logout function, which can reset Apache
authorization.

What to do?
HTTP header...
unset $PHP_AUTH_USER ...

Any suggestions

Sorry for  my English :)

Aras



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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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


This message is intended for the sole use of the individual and entity
to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  If you
are
not the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose
or
distribute to anyone the message or any information contained in the
message.  If you have received this message in error, please immediately
advise the sender by reply email and delete the message.  Thank you very
much.


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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] zend encoded files dont work

2002-01-31 Thread Matthew Walker

I'd imagine it's because windows zend has to compile them in a slightly
different manner.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Kunal Jhunjhunwala [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 31, 2002 12:41 PM
To: php-list
Subject: [PHP] zend encoded files dont work

Hey guys,
Zend encoded files on a linux machine dont seem to work on a windows
machine. Any ideas why? I have tried uploading the files in binary and
ascii
mode.. .and the optimizer is also loaded successfullly... the encoded
files
work on linux.. but not windows... any ideas why? is there any one else
havin the same problem??
Regards,
Kunal Jhunjhunwala


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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] problems with mt_rand()

2002-01-31 Thread Matthew Walker

Did you remember to seed it? 

See http://www.php.net/manual/en/function.mt-srand.php for info on how
to seed it.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Benjamin deRuyter [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 31, 2002 1:02 PM
To: PHP
Subject: [PHP] problems with mt_rand()

I need to generate a random number (range is not crucial) and I have
been
trying to use mt_rand().  However, I am finding that is generates the
same
value EVERY time.  This is true whether I supple a range or not.  For
example, the follow line of code generated 13 EVERY time...

$result = mt_rand(1,15);
echo $result;

In addition, this line of code generated 1755202938 EVERY time...

$result = mt_rand();
echo $result;

What am I doing wrong??

 - Ben


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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] Help with JPGraph in PHP.

2002-01-31 Thread Matthew Walker

You need to send the headers to tell the browser what kind of data
you're sending. Try something like this:

header(Content-type: image/png);

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Sridhar Moparthy [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 31, 2002 7:57 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] Help with JPGraph in PHP.

Also I am using GD2.0.
Does any one know where I can get GD older version ( like GD1.6)?


-Original Message-
From: Sridhar Moparthy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 9:23 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help with JPGraph in PHP.


Hi All,

Is any one is using JpGraphs to display graphs with PHP.
If so could you please help me?.

Here is what I have done.

1. Enabled extension php_gd.dll
2. Included jpgraph.php and jpgraph_line.php files.
3. Try to run the following code

$ydata = array ( 11,3,8,12,5,1,9,13,5,7);

$graph= new Graph(300,200);
$graph-setscale(textlin);

$lineplot = new LinePlot($ydata);

$graph-Add($lineplot);
$graph-Stroke();

I am not getting the graph abut I am getting some junk characters like

‰PNG  IHDR,È/

Am I missing anything here?. Do I need to set anything in php.ini file
?. Do
I need to set anything in jpgraph.php?

I am using PHP 4.06 On IIS, WinNT.

Thank you in advance!
Sridhar Moparthy






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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] preg_replace() 'space' the final frontier

2002-01-30 Thread Matthew Walker

$statement=preg_replace(/ /,br,$original,19);

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: hugh danaher [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 30, 2002 12:35 PM
To: Php-General
Subject: [PHP] preg_replace() 'space' the final frontier

 
What I am trying to do is have a line of text break at a space after
reading 19 words.  Having read the various methods of finding and
replacing one character with another, I settled on preg_replace as my
best choice, but this function doesn't accept a space in the regular
expression slot.  What can I do to get around this, or is there a better
function than the one I selected?

$statement=preg_replace( ,br,$original,19);

 Warning:  Empty regular expression in /home/www/host/document.php on
line 71


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] MySQL Fetch_Array VS. Fetch_Object

2002-01-30 Thread Matthew Walker

Note that you can do this:

print $row[field_name];

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Bryan Gintz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 30, 2002 11:49 AM
To: PHP List
Subject: [PHP] MySQL Fetch_Array VS. Fetch_Object

Does anyone know what the pros and cons of using mysql_fetch_object vs. 
mysql_fetch_array.

I find it easier to use the object version because you dont have to code

any extra statements to put them into regular variables.

print $obj-field_name;
as opposed to
$field_name = $row[field_name];
print $field_name;

Im just curious to see if there are any problems (resources, etc) that 
come with using the object method???



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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] preg_replace() 'space' the final frontier

2002-01-30 Thread Matthew Walker

Looking at what you wanted to do, I realized this isn't going to work.
That line of code will put a BR between each of the first 19 words.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Matthew Walker 
Sent: Wednesday, January 30, 2002 12:47 PM
To: hugh danaher; Php-General
Subject: RE: [PHP] preg_replace() 'space' the final frontier

$statement=preg_replace(/ /,br,$original,19);

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: hugh danaher [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 30, 2002 12:35 PM
To: Php-General
Subject: [PHP] preg_replace() 'space' the final frontier

 
What I am trying to do is have a line of text break at a space after
reading 19 words.  Having read the various methods of finding and
replacing one character with another, I settled on preg_replace as my
best choice, but this function doesn't accept a space in the regular
expression slot.  What can I do to get around this, or is there a better
function than the one I selected?

$statement=preg_replace( ,br,$original,19);

 Warning:  Empty regular expression in /home/www/host/document.php on
line 71


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] How can I decrypt a password I previously coded with md5()?

2002-01-30 Thread Matthew Walker

Exactly. The point of MD5 is that there is no way to get the password
back. This makes things much more secure if your site gets hacked.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Demitrious S. Kelly [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 30, 2002 3:03 PM
To: 'Jason G.'; [EMAIL PROTECTED]
Subject: RE: [PHP] How can I decrypt a password I previously coded with
md5()?

You don't. md5 is one way encryption

-Original Message-
From: Jason G. [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 30, 2002 2:06 PM
To: Nicolas Costes; Jose; [EMAIL PROTECTED]
Subject: Re: [PHP] How can I decrypt a password I previously coded with
md5()?

Hi Nicolas,

I would be interested in seeing the javascript md5 function if possible.

Thanks,

Jason Garber
IonZoft.com



At 11:18 AM 1/30/2002 +0100, Nicolas Costes wrote:

As already said here, you cannot reverse the md5() function ...
So :

 -The user fills a login box (login, password)
 -The PHP script 'crypts' this password with md5();
 -The already-encrypted password in the database (or the passwd

 file) is
 compared with the one provided by the user (and encrypted by
PHP) 
 : if they
 aren't the same ... Bye !!!

And for more security, I use a JavaScript MD5 function to encrypt the
provided password in the user's browser so it goes already encrypted on
the
net ... Then PHP's just got to compare it with the one in the database
!!!


Le Mercredi 30 Janvier 2002 10:51, Jose a écrit :
  I'm making a proyect in php, and I have some doubts about the md5.
  I encript a password with it, but I don't know how to decrypt it
again.
 
  Thanks.
 
 
 

---
 - --
  Jose Fco. ( [EMAIL PROTECTED] ).
  OLINET, S.L. Teléfono: 952207135 - Fax: 952207600
  Avda. Juan Sebastián Elcano, 39-41. 29017 Málaga.
 

---
 - --

--
  ( ° Nicolas Costes
  //\\  IUT de La Roche / Yon
/ \/ ) [EMAIL PROTECTED]
`-  http://luxregina.free.fr

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


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





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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




RE: [PHP] Outreaching (announcement)

2002-01-25 Thread Matthew Walker

I downloaded the current version to test, and I don't know how you call
it stable enough to use. I continually get permission denied errors
accessing the DB. Some of them go away if I refresh, others don't. And
yes, the user has full permissions to the relevant DB.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 24, 2002 8:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Outreaching (announcement)

Hi all!

As posted some time ago, the company I'm working for developed a GPL
system 
for project development (basically keeping in touch with the customers
while 
developing a project). I think this project may be of some interest for
some 
of you (well, hopefully, for may of you), so here's the manifesto:
__

OPT (Outreach Project Tool) is a PHP general-purpose virtual commonplace
for 
customers and developers to collaborate in developing projects. The
system 
provides documents archive, e-mail archive, request tracker, task
management, 
knowledge base, news administration, newsletter support and a lot of
other 
features (some project-based, some system-based).
__

Hope this may help some of you with your customers! The current version
is 
0.9 (beta - the first public release), but it's stable and comes with a
nice 
setup interface (yes, I have been thinking of you guys). This release
has 
been tested for more than eight months in a production environment, with
real 
customers.

So, the URL is http://sourceforge.net/projects/outreach - and you know
my 
e-mail for complaints :-)

HTH

Bogdan

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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.317 / Virus Database: 176 - Release Date: 1/21/2002
 

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




[PHP] mail() question

2002-01-23 Thread Matthew Walker

I’ve tried Reading The Fine Manual on this, and can’t find an easy
answer.
 
Here’s the headers for a message from the script, and the error I’m
getting on some mail it sends…
 
Return-Path: wwwrun
Received: (from wwwrun@localhost)
by arsenic.mth.com (8.11.6/8.11.3) id g0O4UCQ27546;
Wed, 23 Jan 2002 21:30:12 -0700
Date: Wed, 23 Jan 2002 21:30:12 -0700
Message-Id: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Order Receipt
From: [EMAIL PROTECTED]
Reply-To: HYPERLINK mailto:[EMAIL PROTECTED][EMAIL PROTECTED]
 
Some mail servers give this response:
The original message was received at Wed, 23 Jan 2002 21:30:12 -0700
from wwwrun@localhost
 
   - The following addresses had permanent fatal errors -
[EMAIL PROTECTED]
(reason: 550 REQUESTED ACTION NOT TAKEN: DNS FAILURE)
 
   - Transcript of session follows -
... while talking to mx.somewhere.com.:
 MAIL From:[EMAIL PROTECTED]
 550 REQUESTED ACTION NOT TAKEN: DNS FAILURE
554 5.0.0 Service unavailable
 
Here’s the line of PHP I’m using to send the mail:
mail($CustomerInfo[Email], Order Receipt, $text,From:
$SiteInfo[Email]\nReturn-Path: $SiteInfo[Email]\nReply-To:
$SiteInfo[Email]);
 
arsenic.mth.com is the LAN name of my box. How can I get PHP to send
mail as if it was from the DNS name for the box (mthmarketing.com)?
 
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 1/2/2002
 

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




[PHP] More on images...

2002-01-03 Thread Matthew Walker

Related to my last question about the cookies in images, is there any
way to get the referrer from the calling page without passing it as an
argument to the image generation script?
 
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
 

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




RE: [PHP] More on images...

2002-01-03 Thread Matthew Walker

Buh. That's the problem. There's no assurance that in will be used from
a PHP script, so I can't do that. Mrrr.

Let me explain what I'm doing, and someone can pipe up if they have a
better idea.

I'm writing a tracking module for a shopping cart system, so that we can
track where people came to our site from, and correlate that information
with whether or not they ordered. Right now, I'm trying to do this with
a php script in an image tag, so that I can set the cookies I need.
However, I need to be able to get the referrer from the page that is
calling the image, and I can't assume it's php. Any advice?

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Billy Harvey [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 03, 2002 3:25 PM
To: Matthew Walker
Subject: Re: [PHP] More on images...

On Thu, 2002-01-03 at 16:51, Matthew Walker wrote:
 Related to my last question about the cookies in images, is there any
 way to get the referrer from the calling page without passing it as an
 argument to the image generation script?
  
 Matthew Walker
 Ecommerce Project Manager
 Mountain Top Herbs

Matthew, you're going to have to save it as a variable somewhere to be
able to retrieve it.  If you have session management then you could just
register the variable and it would exist on the next page.

Billy



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 1/2/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 1/2/2002
 

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




RE: [PHP] More on images...

2002-01-03 Thread Matthew Walker

I solved it using Javascript to get the referrer of the parent doc, and
pass it as a get request.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Matthew Walker 
Sent: Thursday, January 03, 2002 3:46 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] More on images...

Buh. That's the problem. There's no assurance that in will be used from
a PHP script, so I can't do that. Mrrr.

Let me explain what I'm doing, and someone can pipe up if they have a
better idea.

I'm writing a tracking module for a shopping cart system, so that we can
track where people came to our site from, and correlate that information
with whether or not they ordered. Right now, I'm trying to do this with
a php script in an image tag, so that I can set the cookies I need.
However, I need to be able to get the referrer from the page that is
calling the image, and I can't assume it's php. Any advice?

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Billy Harvey [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 03, 2002 3:25 PM
To: Matthew Walker
Subject: Re: [PHP] More on images...

On Thu, 2002-01-03 at 16:51, Matthew Walker wrote:
 Related to my last question about the cookies in images, is there any
 way to get the referrer from the calling page without passing it as an
 argument to the image generation script?
  
 Matthew Walker
 Ecommerce Project Manager
 Mountain Top Herbs

Matthew, you're going to have to save it as a variable somewhere to be
able to retrieve it.  If you have session management then you could just
register the variable and it would exist on the next page.

Billy



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 1/2/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 1/2/2002
 

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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 1/2/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.313 / Virus Database: 174 - Release Date: 1/2/2002
 

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




[PHP] Cookies In Images...

2002-01-02 Thread Matthew Walker

Can anyone give me a pointer on where to go to find out how to send
cookies through images, preferably in PHP?
 
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
 

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




RE: [PHP] Cookies In Images...

2002-01-02 Thread Matthew Walker

Thanks. That's what I suspected, but I needed to make sure.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Bas van Rooijen [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 02, 2002 2:28 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Cookies In Images...

On Wed, 2 Jan 2002 14:11:39 -0700, Matthew Walker wrote:

Can anyone give me a pointer on where to go to find out how to send
cookies through images, preferably in PHP?



To do this you will have to point the HREF in your IMG tag to a PHP
script.

From that script you should do this:

- Pass the correct content-type header (default for PHP is text/html)
for example:
?
header(Content-Type: image/jpeg);
?

- Set the cookie as usual

- Then send the contents of the image you would like to display, for
example:

?
readfile(test.jpg);
?



bvr.



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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
 

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




RE: [PHP] Licensing??

2001-12-28 Thread Matthew Walker

Welcome to the world of free software.

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: Andrew V. Romero [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 28, 2001 9:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Licensing??

I am looking into installing php on some of our hospital servers and was
wondering about licensing issues.  Are you suppose to purchase any type
of license for installing php on a commercial server?  It seems a little
on the strange side that they (the php people) would just let you
install and use their product for free, what do they get out of it?
Thanks for any information,
Andrew V. Romero


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



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.310 / Virus Database: 171 - Release Date: 12/19/2001
 

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




[PHP] Restrict where PHP is Usable?

2001-10-02 Thread Matthew Walker

I've seen this done before on servers, but I'm not sure how to do it.
 
Is there a way to restrict PHP to certain directories, so that it can
only be used by files within those directories?
 
For example: I'm starting a web page hosting service, and I'd like to
make it so that most users can't use PHP. They'll have to pay a (very
small) monthly fee to have access to it. This is partly as a very loose
security measure, so that not everyone has access to PHP.
 
--
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.282 / Virus Database: 150 - Release Date: 9/25/2001




[PHP] PEAR DB Questions

2001-09-26 Thread Matthew Walker

I've got the docs you all mentioned in response to my earlier questions.
Thanks a ton! They were almost exactly what I needed.
 
There's only one thing that I can't figure out how to do with the
module. In PHP, there's a function 'mysql_insert_id()'. It returns the
Autoincriment ID of the last insert you performed. How do I get that
information with the PEAR DB module? 
 
--
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001




RE: [PHP] PEAR DB Questions

2001-09-26 Thread Matthew Walker

Thanks. That will work quite nicely.

-Original Message-
From: Jack Dempsey [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, September 26, 2001 1:20 PM
To: Matthew Walker; [EMAIL PROTECTED]
Subject: RE: [PHP] PEAR DB Questions

don't know about pear, but in case you can't do it, there's a mysql
version-
LAST_INSERT_ID()
like this:

mysql select last_insert_id();
+--+
| last_insert_id() |
+--+
|  262 |
+--+
1 row in set (0.04 sec)

-jack

-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 26, 2001 2:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PEAR DB Questions


I've got the docs you all mentioned in response to my earlier questions.
Thanks a ton! They were almost exactly what I needed.

There's only one thing that I can't figure out how to do with the
module. In PHP, there's a function 'mysql_insert_id()'. It returns the
Autoincriment ID of the last insert you performed. How do I get that
information with the PEAR DB module?

--
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001



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

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001



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




[PHP] DB.php, and how to use?

2001-09-25 Thread Matthew Walker

I've searched the whole PHP website for any reference to this lib that
comes standard with my distro of PHP4. No luck.
 
Can someone provide me with an address I can go to, to read about DB.php
and it's modules? (Specifically, the DB/mysql.php module)
 
If there is no website, can someone provide a quick set of examples for
how to use the class functions? I haven't done OO programming in a long
time, and I've never done it in PHP.
 
--
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001




RE: [PHP] Re: Sessions and include()...

2001-09-22 Thread Matthew Walker

Alright. If that's the case, how do you make sure a cookie gets set for
the remote domain? I'm working on a project to write a hosted shopping
cart, but we want people to have the ability to include pieces of the
display functionality on their own pages, if their host supports PHP.
But those pieces would need to use the same session as if they were on
/our/ server.

-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]] 
Sent: Friday, September 21, 2001 10:25 PM
To: Matthew Walker
Cc: [EMAIL PROTECTED]
Subject: [PHP] Re: Sessions and include()...

I believe:

include() gets parsed and executed on the server that is doing the
include-ing, not the remote server...

If that file has session_xxx() in it, you'll have started a session and
whatnot on the local server.

The remote server doesn't even have to have PHP on it at all, and its
configuration is irrelevant, other than allowing you to read some file
that
happens to have PHP source code in it...  Which, by the way, is a very
scarey concept unless you have complete security control over the remote
server...

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Matthew Walker [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Friday, September 21, 2001 11:48 AM
Subject: Sessions and include()...


 What happens if you use include() to include a file from another
server,
 and that file sets a session? Does the session get set for the domain
of
 the wrapper page, or does it get set for the domain of the included
 page?

 --
 Matthew Walker
 Ecommerce Project Manager
 Mountain Top Herbs

 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001




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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.280 / Virus Database: 147 - Release Date: 9/11/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.280 / Virus Database: 147 - Release Date: 9/11/2001



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




[PHP] Sessions and include()...

2001-09-21 Thread Matthew Walker

What happens if you use include() to include a file from another server,
and that file sets a session? Does the session get set for the domain of
the wrapper page, or does it get set for the domain of the included
page?
 
--
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001




[PHP] include() problem...

2001-09-20 Thread Matthew Walker

I've got a very odd problem. I'm trying to include 'DB/mysql.php', from
the /usr/lib/php directory, and it's not working. My include_path is set
properly (.:/usr/lib/php) and when I do
'print_r(ini_get(include_path));' it prints it properly. But when I
try and do an include, I get the following error.
 
Warning: Failed opening 'DB/mysql.php' for inclusion (include_path='')
in /usr/local/httpd/htdocs/test.php on line 2
 
Help? Please? I'm at a loss as to how to fix this, and I kind of need
to.
 
--
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs
 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001




RE: [PHP] include() problem...

2001-09-20 Thread Matthew Walker

I've tried including just a file that was in the /usr/lib/php directory.
No luck. I get exactly the same error (with the correct file name,
obviously). Also, note in the error that include() is seeing
include_path=''. What's up with that?

-Original Message-
From: Jeb Anderson Scarbrough [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 20, 2001 12:04 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] include() problem...

If you put the file into the include directory specified in the php.ini 
(.:/usr/lib/php) then I believe you should do:

include(mysql.php);

NOT

include(DB/mysql.php);

Someone please correct me if I'm wrong.




I've got a very odd problem. I'm trying to include 'DB/mysql.php', from
the /usr/lib/php directory, and it's not working. My include_path is set
properly (.:/usr/lib/php) and when I do
'print_r(ini_get(include_path));' it prints it properly. But when I
try and do an include, I get the following error.

Warning: Failed opening 'DB/mysql.php' for inclusion (include_path='')
in /usr/local/httpd/htdocs/test.php on line 2

Help? Please? I'm at a loss as to how to fix this, and I kind of need
to.

--
Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001

_
Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp


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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001



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




RE: [PHP] include() problem...

2001-09-20 Thread Matthew Walker

Checked that. Plenty of permissions.

Anyone else have any idea?

-Original Message-
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 20, 2001 1:48 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] include() problem...

Check the permissions on both the directory and the file, so that they
are
accessible to 'nobody' (or whomever PHP is running as). I'm not sure
what to
make of the empty include path in the error message.

Kirk


 I've tried including just a file that was in the /usr/lib/php 
 directory.
 No luck. I get exactly the same error (with the correct file name,
 obviously). Also, note in the error that include() is seeing
 include_path=''. What's up with that?

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001



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




RE: [PHP] include() problem...

2001-09-20 Thread Matthew Walker

Okay... This is odd. Despite the fact that
'print_r(ini_get(include_path));' returns the right include_path, I
just checked the php.ini file, and lo and behold, there is no include
path set. So... Have I just discovered a bug?

-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 20, 2001 2:52 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] include() problem...

Checked that. Plenty of permissions.

Anyone else have any idea?

-Original Message-
From: Johnson, Kirk [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 20, 2001 1:48 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] include() problem...

Check the permissions on both the directory and the file, so that they
are
accessible to 'nobody' (or whomever PHP is running as). I'm not sure
what to
make of the empty include path in the error message.

Kirk


 I've tried including just a file that was in the /usr/lib/php 
 directory.
 No luck. I get exactly the same error (with the correct file name,
 obviously). Also, note in the error that include() is seeing
 include_path=''. What's up with that?


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001



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