php-general Digest 6 Feb 2005 18:40:48 -0000 Issue 3271
Topics (messages 208137 through 208147):
Re: Problem with session
208137 by: Theeraputh Mekathikom
208139 by: yangshiqi
Re: about watermark
208138 by: daniel.electroteque.org
stream filters (php5)
208140 by: Tjerk Meesters
installing php on 2 apache server
208141 by: Stephane Parenton
208142 by: John Nichel
208143 by: Stephane Parenton
208145 by: John Nichel
[HAB] How to build a member area with PHP Sessions
208144 by: OOzy Pal
208146 by: Jerry Kita
Re: Where's xml in PHP5?
208147 by: Yann Larrivée
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[email protected]
----------------------------------------------------------------------
--- Begin Message ---
I found the problem. I have passed SID using GET and then using
session_id($_GET['sid']);, it works fine.
But it seems that I cannot use cookie at all. I tried to set cookie
manually, setcookie();. Nothing happen, I cannot
retrive my variable using $_COOKIE['sid'];. Is there anyway to check
cookie enabling? My web browser
seems to be ok since I can accept cookies from other site. I do wonder
whether that it is because the server PHP
configuration.
Best Regards,
Thone
--- End Message ---
--- Begin Message ---
Make sure that in your php.ini, include this:
variables_order = "GPC"
gpc_order = "GPC"
there C means $_COOKIES
Best regards,
Yang Shiqi
-----Original Message-----
From: Theeraputh Mekathikom [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 06, 2005 2:52 PM
To: yangshiqi
Cc: [email protected]
Subject: Re: [PHP] Problem with session
I found the problem. I have passed SID using GET and then using
session_id($_GET['sid']);, it works fine.
But it seems that I cannot use cookie at all. I tried to set cookie
manually, setcookie();. Nothing happen, I cannot
retrive my variable using $_COOKIE['sid'];. Is there anyway to check
cookie enabling? My web browser
seems to be ok since I can accept cookies from other site. I do wonder
whether that it is because the server PHP
configuration.
Best Regards,
Thone
--- End Message ---
--- Begin Message ---
i am pretty sure GD can watermark ?
> Does anyone can recommend some app about watermark(open source)?
>
> Coz I want to use it in our production, so I must use sth which is
> certified very safely and fast.
>
> Thx.
>
>
>
> Best regards,
>
> Yang Shiqi
>
>
>
>
>
>
>
>
--- End Message ---
--- Begin Message ---
Hi all,
This question is based on the given example at
http://php.net/manual/en/function.stream-filter-register.php
Does anyone have an example of how to implement stream filters that
produce their output until all input has been read? For instance, a
stream version of md5() which -on every invocation - takes a 4K buffer
from input and keeps the current state in a private variable, until EOF.
The filter class would look like this:
class md5_filter extends php_user_filter {
// keep state info here
private $buf='';
function filter($in, $out, &$consumed, $closing)
{
while ($bucket = stream_bucket_make_writeable($in)) {
$this->buf .= $bucket->data; // build state data (in a more
sensible way than this!)
$consumed += $bucket->datalen;
}
// no more buckets from bucket input brigage
if ($closing) {
// all input has been read at this point, so make new bucket??
$bucket = stream_bucket_new(??,md5($this->buf));
// and append it to the output bucket brigade
stream_bucket_append($out,$bucket);
return PSFS_PASS_ON;
}
return PSFS_FEED_ME;
}
}
EOF is signalled by the $closing parameter in the filter() method. After
that, one would need to create a bucket to use on stream_bucket_append().
Any ideas?
Kind regards,
Jack
--- End Message ---
--- Begin Message ---
Hi everyone,
I've looked at google and the archive, but did not found an accurate
answer, so here's my question (that is certainly common though...)
I have one mdk 10.1 box that has 1 apache server 1.3.x. Now i want this
apache to be the production apache server and i need to have another
apache server to be an httpd test server. So what i want is 2 strictly
separated apache/php configuration on the same box. Is it possible, and
is there any how to somewhere to help me place the config files at the
right places ?
Best regards
Stephane
--- End Message ---
--- Begin Message ---
Stephane Parenton wrote:
Hi everyone,
I've looked at google and the archive, but did not found an accurate
answer, so here's my question (that is certainly common though...)
I have one mdk 10.1 box that has 1 apache server 1.3.x. Now i want this
apache to be the production apache server and i need to have another
apache server to be an httpd test server. So what i want is 2 strictly
separated apache/php configuration on the same box. Is it possible, and
is there any how to somewhere to help me place the config files at the
right places ?
Just install the second version of Apache in a different location
(--prefix=/path/to/other/location), and run it on a different port (the
listen directive in the httpd.conf)
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
John Nichel wrote:
Stephane Parenton wrote:
Hi everyone,
I've looked at google and the archive, but did not found an accurate
answer, so here's my question (that is certainly common though...)
I have one mdk 10.1 box that has 1 apache server 1.3.x. Now i want
this apache to be the production apache server and i need to have
another apache server to be an httpd test server. So what i want is 2
strictly separated apache/php configuration on the same box. Is it
possible, and is there any how to somewhere to help me place the
config files at the right places ?
Just install the second version of Apache in a different location
(--prefix=/path/to/other/location), and run it on a different port
(the listen directive in the httpd.conf)
Well, this is ok to have 2 seperate httpd, but what i need, and that was
not clear in my first mail, is that i also want 2 php setup, one for the
prod apache and the other one for the test... This is THIS point that
seems a bit confused regarding the php config files to run with apache...
stephane
--- End Message ---
--- Begin Message ---
Stephane Parenton wrote:
<snip>
John Nichel wrote:
Just install the second version of Apache in a different location
(--prefix=/path/to/other/location), and run it on a different port
(the listen directive in the httpd.conf)
Well, this is ok to have 2 seperate httpd, but what i need, and that was
not clear in my first mail, is that i also want 2 php setup, one for the
prod apache and the other one for the test... This is THIS point that
seems a bit confused regarding the php config files to run with apache...
stephane
Configure and build the second version of php against the second version
of Apache. Either before you build Apache...
./configure --with-apache=/path/to/second/apache/source
Or as a DSO....
./configure --with-apxs=/path/to/second/apache/apxs
--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com
--- End Message ---
--- Begin Message ---
Dears
Can anyone direct me to a good tutorial on how to build a member area using php
sessions?
Thank you
OOzy
Regards,
OOzy
What is the purpose of life?
---------------------------------
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'
--- End Message ---
--- Begin Message ---
OOzy Pal wrote:
Dears
Can anyone direct me to a good tutorial on how to build a member area using php sessions?
Thank you
OOzy
Regards,
OOzy
What is the purpose of life?
---------------------------------
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'
I'm not aware of a tutorial but I do have member areas on my website. I
also will display certain items on a web page depending on whether a
member is actually logged in.
The process is something like this:
1. Members logs into website using USERID and PASSWORD
2. Prior to every new page a session is started
3. If member is in-session then set VALIDLOGON = 'YES'
4. At that point I can display links or images or anything
that are dependent on VALIDLOGON = 'YES'
For example I have PHP code that looks something like:
if (validlogon == 'YES') {
Display stuff that only members see
}
I've also taken it a further step by creating a variable called
'Privileges' which gives gives certain members greater access to
information.
For example I might have PHP code that looks something like:
if (validlogon == 'YES' and privilege = 'C') {
Display stuff for members who have C privilege
}
The last example is the case where I don't want non-members to see a
particular page. I do the check for validlogon at the beginning of the
script .... if the user is not validated then user gets bounced back to
the site HOME page. This PHP code looks like:
if ($validlogon == "NO") {
header("Location: home.php?msg=INVALID USERID OR PASSWORD");
exit; }
Anyways, that's the general idea. It works for me. Others may have more
complex schemes but this serves my purpose well. I'm not a professional
programmer so I generally look for stuff that I can easily understand.
Hope this helps.
--
Jerry Kita
http://www.salkehatchiehuntersville.com
email: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I am not shure but you may want to check if you have expath installed with
your apache. The XML functions require expath, if you don't have bundled with
Apache you can specify the path to it
--with-expat-dir
For more information on installation
seehttp://ca3.php.net/manual/en/ref.xml.php [INSTALLATION]
Yann
On February 5, 2005 16:52, Brian V Bonini wrote:
> Just compiled PHP5 usign --enable-xml (though I see it is supposed to be
> enabled by defaut however I'm getting 'call to undefined function'
> errors now.
>
> Fatal error: Call to undefined function xml_parser_create() in
> bla/bla/bla on line xxx
>
> phpinfo(): http://gfx-design.com/test/
>
> Apache is 2.x
--- End Message ---