php-windows Digest 19 Jan 2003 03:33:27 -0000 Issue 1543
Topics (messages 17962 through 17969):
Re: cookies problem
17962 by: Chris Kranz
Re: cookies problem (FIXED)
17963 by: Ed
Re: Subject: cookies problem
17964 by: Neil Smith
Re: Subject: Getting HTML Content as a variable
17965 by: Neil Smith
PHP warning ... ???
17966 by: SniperVegeta. \(SV\)
Re: Subject: cookies problem (FIXED)
17967 by: Ed
arrays and nested arrays and loops and databases...
17968 by: H Marc Bower
17969 by: Dash McElroy
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've had the same problem myself. Seems to happen with a default install
of IIS 5 etc. etc.
I've changed the php.ini so it should create and save the cookies, but
it just ignores them.
Sorry, no solution, I just made workarounds :(
chris kranz
fatcuban.com
-----Original Message-----
From: Ed [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 18, 2003 3:12 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] cookies problem
I seem to be having a problem with cookies not being saved and I'm using
W2k, IIS 5.0, with php 4.3. I just upgraded from a previous version of
php
that worked fine. Anyone had this problem or know of a solution?
Thanks,
Ed
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I'm not sure why this worked and I noticed there were hundreds of others in
various mailing lists with the same problem, but all I did was change this
in the php.ini file:
error_reporting = E_ALL
To This:
error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
Now cookis and sessions work just like they're supposed to.
Ed
"Ed" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I seem to be having a problem with cookies not being saved and I'm using
> W2k, IIS 5.0, with php 4.3. I just upgraded from a previous version of
php
> that worked fine. Anyone had this problem or know of a solution?
>
> Thanks,
>
> Ed
>
>
--- End Message ---
--- Begin Message ---
Oddly enough I just had the same problem after messing with my php.ini -
Check you have a valid drive and path for your cookie (session) save path :
session.save_path = C:/temp
Ought to do it.
Or, do you mean *your browser* cookies aren't working?
Can't help you with that, this is a PHP list, you need to know your browser
better in that case :-)
Cheers,
Neil Smith
At 15:13 18/01/2003 +0000, you wrote:
Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
From: "Ed" <[EMAIL PROTECTED]>
Date: Sat, 18 Jan 2003 09:12:09 -0600
Subject: cookies problem
I seem to be having a problem with cookies not being saved and I'm using
W2k, IIS 5.0, with php 4.3. I just upgraded from a previous version of php
that worked fine. Anyone had this problem or know of a solution?
Thanks,
Ed
--- End Message ---
--- Begin Message ---
Hi Greg - dunno about (1) myself :-)
Would be interested to hear, but I assume it involves appending these
values to the hostname you are acquiring the data from. By analogy with the
ftp:// url scheme, I imahine you can do it like this - try it and let us
know if it worked for you :
http://user:[EMAIL PROTECTED]/
This will depend I guess on the authentication scheme at the other end - if
it requires cookies or filling in a form I guess you're buggered - your
milage may vary etc etc.
In answer to (2) :
When you rewrite the HTML, add the following to the top of your HTML output :
<BASE href="http://192.168.1.100">
or whatever the hostname is you acquired the files from. Its a standard
HTML tag.
That will point all absolute paths to the system root on the specified server.
HTH
Neil Smith.
At 15:13 18/01/2003 +0000, you wrote:
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Message-Id: <[EMAIL PROTECTED]>
Subject: Getting HTML Content as a variable
Hi,
I've been directed to use file() or implode() to get the html content of a
web page, like this: $html = implode ('', file
('http://192.168.1.100/PHP/index.php'));
1 ) How do I pass authentication to websites that require username &
password? In Cold Fusion the CFHTTP tag allows you to pass
USERNAME="myusername" PASSWORD="mypassword", there must be an equivalent
parameter in PHP.
2) When I output the content of $html, which is the web page stored as a
variable, the images are not there. Again, in Cold Fusion the CFHTTP tag
takes care of this when you specify RESOLVEURL="YES", and I'm guessing
there is a way in PHP to store the web page WITH images intact?
thanks! ph_Greg
--- End Message ---
--- Begin Message ---
i got a little mix up now
i get:
[warn] Loaded DSO modules/php4apache.so uses plain Apache 1.3 API, this
module might crash under EAPI! (please recompile it with -DEAPI)
But it just works, maybe someone can help me whit this
i got:
Apache 1.3.27 (Win23)
mod_SSL 2.8.12
OpenSSL 0.9.6h
PHP 4.3.0
--
SniperVegeta. (SV)
SystemVar. (SV)
SV-Warez
--- End Message ---
--- Begin Message ---
It's not a browser problem, as I said in my post php wasn't saving the
cookies. This seems to be a widespred problem after searching many mailing
lists and seeing this problem on every one of them, with no fixes. I had
already changed my path to c:\php\sessions, so that wasn't the problem
either. What finally fixed it was changing this in the php.ini file:
error_reporting = E_ALL
To This:
error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
Now cookis and sessions work just like they're supposed to.
Ed
"Neil Smith" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Oddly enough I just had the same problem after messing with my php.ini -
> Check you have a valid drive and path for your cookie (session) save path
:
>
> session.save_path = C:/temp
>
> Ought to do it.
>
> Or, do you mean *your browser* cookies aren't working?
> Can't help you with that, this is a PHP list, you need to know your
browser
> better in that case :-)
>
> Cheers,
> Neil Smith
>
> At 15:13 18/01/2003 +0000, you wrote:
> >Message-ID: <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >From: "Ed" <[EMAIL PROTECTED]>
> >Date: Sat, 18 Jan 2003 09:12:09 -0600
> >Subject: cookies problem
> >
> >I seem to be having a problem with cookies not being saved and I'm using
> >W2k, IIS 5.0, with php 4.3. I just upgraded from a previous version of
php
> >that worked fine. Anyone had this problem or know of a solution?
> >
> >Thanks,
> >
> >Ed
>
--- End Message ---
--- Begin Message ---
Well... I can usually puzzle myself through these things, but I figured
it's time to ask the list. :) It may be a simple thing that I'm missing,
but here's what I have.
The structure that I'm trying to modify is as follows:
$to = array(
array(
'address'=>'[EMAIL PROTECTED]',
'name'=>'Bob Smith'
),
array(
'address'=>'[EMAIL PROTECTED]',
'name'=>'John Jones'
)
);
That said, I have a database of names and email addresses which I want to
insert into this structure, but in a loop since I don't want to have an
array() section for each one, not knowing how many are going to be in the
list at the time this script is run. I want to loop the 'sub' array()
statements so that I can build up the main array(). I use mysql as follows:
$query = "select email, fullname from tablename where updateannounce = 1";
$result = mysql_query($query);
while ($output = mysql_fetch_array($result))
{
//This is where I want the loop of arrays to appear, so I can
dynamically insert the email and fullname fields into the obvious spots
}
I need to figure out how to do this, essentially:
$to = array(<loop to fill other array() statements>);
I don't know how to get that loop to work inside the overall array()
statement, though... any assistance would be greatly appreciated.
Thank you,
Marc
--- End Message ---
--- Begin Message ---
If I understand correctly, you want to have an array containing an array
with people's email address and name from your db like this:
$to[0]['address'] = [EMAIL PROTECTED]
$to[0]['name'] = Bob Smith
$to[1]['address'] = [EMAIL PROTECTED]
$to[1]['name'] = John Jones
(the above is obviously not valid PHP...)
I would do something like this:
$to = array();
$query = "select email, fullname from tablename where updateannounce = 1";
$result = mysql_query($query);
while ($output = mysql_fetch_array($result)) {
$to[] = array('address' => $output['address'],
'name' => $output['name']);
}
assuming, of course, that your database column names are 'address' and
'name'.
This should work, but I may have borked something up on the name based
arrays.
-Dash
"The pyramid is opening!"
"Which one?"
"The one with the ever-widening hole in it!"
-- Firesign Theater, "How Can You Be In Two Places At
Once When You're Not Anywhere At All"
On Sat, 18 Jan 2003, H Marc Bower wrote:
> Well... I can usually puzzle myself through these things, but I figured
> it's time to ask the list. :) It may be a simple thing that I'm missing,
> but here's what I have.
>
> The structure that I'm trying to modify is as follows:
>
> $to = array(
> array(
> 'address'=>'[EMAIL PROTECTED]',
> 'name'=>'Bob Smith'
> ),
> array(
> 'address'=>'[EMAIL PROTECTED]',
> 'name'=>'John Jones'
> )
> );
>
> That said, I have a database of names and email addresses which I want to
> insert into this structure, but in a loop since I don't want to have an
> array() section for each one, not knowing how many are going to be in the
> list at the time this script is run. I want to loop the 'sub' array()
> statements so that I can build up the main array(). I use mysql as follows:
>
> $query = "select email, fullname from tablename where updateannounce = 1";
> $result = mysql_query($query);
> while ($output = mysql_fetch_array($result))
> {
> //This is where I want the loop of arrays to appear, so I can
> dynamically insert the email and fullname fields into the obvious spots
> }
>
>
> I need to figure out how to do this, essentially:
>
> $to = array(<loop to fill other array() statements>);
>
> I don't know how to get that loop to work inside the overall array()
> statement, though... any assistance would be greatly appreciated.
>
> Thank you,
>
> Marc
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---