php-general Digest 10 Nov 2001 21:29:14 -0000 Issue 987

Topics (messages 74091 through 74124):

Re: Text Wrapper
        74091 by: jtjohnston
        74095 by: Andrew Brampton

Re: putting the result of PHP code into a string
        74092 by: Morten Gjetanger
        74093 by: power jessie
        74108 by: Morten Gjetanger

Re: Faking MS Access on MySQL linux box
        74094 by: mweb
        74109 by: John Lim

imageCopy :-(
        74096 by: jtjohnston
        74105 by: Andrew Kirilenko

URGENT FUND TRANSFER
        74097 by: MALIK ZULU

Re: get names of vars $HTTP_POST_VARS?
        74098 by: Papp Gyozo

Re: Passing vars...
        74099 by: Papp Gyozo

Re: Losing Session Variable in IE Only?
        74100 by: Herb Wiser

Total Newbie - concatenating variables.
        74101 by: David Mitchell
        74103 by: Matt Friedman

SSL & php
        74102 by: Colm Rafferty
        74104 by: Heilig (Cece) Szabolcs
        74110 by: Robert Klinkenberg

Re: HTTP_POST_VARS: Data there, but can't get to it
        74106 by: Lara J. Fabans
        74115 by: Lara J. Fabans

Why no one helps?
        74107 by: Christian Dechery
        74112 by: Kurt Lieber
        74114 by: Christian Dechery
        74118 by: Rasmus Lerdorf

class xxx extends a_class_from_the_include_path - problem
        74111 by: Wolfram Kriesing

Re: [PHP-DEV] class xxx extends a_class_from_the_include_path - problem
        74113 by: Markus Fischer

& in url's
        74116 by: GaM3R
        74119 by: Matt Friedman
        74121 by: Rasmus Lerdorf

ASP, ODBC, IIS 5, and PHP
        74117 by: Kevin Pratt

Install on Darwin fix?
        74120 by: PHP Mail

rules for headers?
        74122 by: jtjohnston

Apache User Groups?
        74123 by: Eric

global variable for all scripts
        74124 by: sascha biber

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 ---
In This case, nope, won't work:

ImageString($image,2,20,60,wordwrap($string,34),$blue);

http://www.collegesherbrooke.qc.ca/languesmodernes/course/postcard.php

How can I break "wordwrap($string,34)" into an aray and do something like
this:

$ypos = 60;
for i to array_length
{
ImageString($image,2,20,$ypos,array[i],$blue);
$ypos = $ypos + 15;
}

signed,

Perl convert :0)
John

--- End Message ---
--- Begin Message ---
now use explode with /n as the seprating character,

Andrew
----- Original Message ----- 
From: "jtjohnston" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 10, 2001 9:15 AM
Subject: [PHP] Nope: Text Wrapper


> In This case, nope, won't work:
> 
> ImageString($image,2,20,60,wordwrap($string,34),$blue);
> 
> http://www.collegesherbrooke.qc.ca/languesmodernes/course/postcard.php
> 
> How can I break "wordwrap($string,34)" into an aray and do something like
> this:
> 
> $ypos = 60;
> for i to array_length
> {
> ImageString($image,2,20,$ypos,array[i],$blue);
> $ypos = $ypos + 15;
> }
> 
> signed,
> 
> Perl convert :0)
> John
> 
> 
> -- 
> 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]
> 
> 

--- End Message ---
--- Begin Message ---
Ok. Maybe a bad example. But what if it's a function, e.g.

$id = 2;
$code = "<td><?php echo Func1($id) ?></td>"
$html = someFunction($code);

Now, $html should contain "<td>{the result of the Func1 function}</td>"

The reason why I want this is that I have a site where all the text on each
side lies in a MySQL database, and I have a php script which shows the pages
with a common header, footer, menu etc.. But I want the text to also contain
php code which will be evaluated by the script!

regards

Morten Gjetanger

"Jason Stechschulte" <[EMAIL PROTECTED]> skrev i melding
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, Nov 09, 2001 at 10:33:39PM +0100, Morten Gjetanger wrote:
> > I like to evaluate som PHP code, but I want the result to be putted into
a
> > string.
> > example:
> >
> > $var = "Test1";
> > $code = "<td><?php echo $var1?></td>";
> > $html = someFunction($code);
> >
> > After this i want $html to contain "<td>Test1</td>
>
> $var = "Test1";
> $code = "<td>$var</td>";
> $html = someFunction($code);
>
> Done.
>
> --
> Jason Stechschulte
> [EMAIL PROTECTED]
> --
> "You can't have filenames longer than 14 chars.
> You can't even think about them!"
>              -- Larry Wall in Configure from the perl distribution


--- End Message ---
--- Begin Message ---

$id = 2;
$code = "<td>" . Func1($id) . "</td>"
$html = someFunction($code);

hope that helps!

jessie

-----Original Message-----
From: Morten Gjetanger [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 10, 2001 1:23 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] putting the result of PHP code into a string


Ok. Maybe a bad example. But what if it's a function, e.g.

$id = 2;
$code = "<td><?php echo Func1($id) ?></td>"
$html = someFunction($code);

Now, $html should contain "<td>{the result of the Func1 function}</td>"

The reason why I want this is that I have a site where all the text on each
side lies in a MySQL database, and I have a php script which shows the pages
with a common header, footer, menu etc.. But I want the text to also contain
php code which will be evaluated by the script!

regards

Morten Gjetanger

"Jason Stechschulte" <[EMAIL PROTECTED]> skrev i melding
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, Nov 09, 2001 at 10:33:39PM +0100, Morten Gjetanger wrote:
> > I like to evaluate som PHP code, but I want the result to be putted into
a
> > string.
> > example:
> >
> > $var = "Test1";
> > $code = "<td><?php echo $var1?></td>";
> > $html = someFunction($code);
> >
> > After this i want $html to contain "<td>Test1</td>
>
> $var = "Test1";
> $code = "<td>$var</td>";
> $html = someFunction($code);
>
> Done.
>
> --
> Jason Stechschulte
> [EMAIL PROTECTED]
> --
> "You can't have filenames longer than 14 chars.
> You can't even think about them!"
>              -- Larry Wall in Configure from the perl distribution



--
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 incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.295 / Virus Database: 159 - Release Date: 11/1/2001

---
This mail is certified Virus Free. No need to worry.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.295 / Virus Database: 159 - Release Date: 11/1/2001

--- End Message ---
--- Begin Message ---
Ok. To be a bit more precise. the $code part could be any php code, e.g.

$code = <<<ENDM

require_once("someFile.inc");

$array1 = someFunc1($param1);

foreach($array1 as $val) {
  echo "<td>$val</td>\n";
}

ENDM;

regards

Morten Gjetanger

"Morten Gjetanger" <[EMAIL PROTECTED]> skrev i melding
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm quite sure there is a simple solution to the problem bellow!
>
> I like to evaluate som PHP code, but I want the result to be putted into a
> string.
>
> example:
>
> $var = "Test1";
> $code = "<td><?php echo $var1?></td>";
> $html = someFunction($code);
>
> After this i want $html to contain "<td>Test1</td>
>
> I've checked the eval function, but it just evaluates the code and just
> outputs the result. I really wants the output into a string!
>
> regards
>
> Morten Gjetanger
>
>


--- End Message ---
--- Begin Message ---
John,

thanks for the link, but isn't it a bit of overkill in my case?

What I need is to write PHP pages which manipulate a MS Access DB
via ODBC, because this is what the hosting company makes available
(and it's not going to change because of several reasons)

So, I am looking for explanation on how to do ONLY the testing
of suche pages on a STAND-ALONE Linux box. I want to run some DB
engine on it which is accessible through ODBC, so that I can
say "if my ODBC call was OK here, it will work also when I upload
on the NT/IIS server, because the interface is the same".

Keep in mind that performance is not an issue here. On the linux
PC I would only do testing, and the site on the real server currently
has ~4000 visits/month querying a DB with some hundreds of entries.

What do you think?
                           mweb

On Sat, Nov 10, 2001 13:02:14 at 01:02:14PM +0800, John Lim wrote:
> See http://php.weblogs.com/adodb_csv
> 
> "ADODB also supports SQL communications through HTTP as a database proxy. In
> plain English, if you have a FoxPro or Access database that you need to
> connect to from Unix, you can do so via HTTP (eg. Apache talking to IIS,
> which talks to a small PHP program [the proxy] that queries the database,
> packs it into serialized text and sends it back to Apache).
> 
>   PHP client -- Apache ------------ IIS -- PHP server -- Database
> 
> Or if you have to go through a firewall to access your database, this
> solution allows you to stream SQL queries as HTTP through the firewall."
> 
> [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote in message
> GMJD1G$[EMAIL PROTECTED]">news:GMJD1G$[EMAIL PROTECTED]...
> Hello,
> 
> For reasons not worth discussing here, I have to develop and test on
> Linux/Apache some PHP pages that will have to access via ODBC a MS Access
> database on an NT/IIS/PHP server.
> 
> I would like to do it by writing PHP pages that access via ODBC
> some mysql or other database on my linux box, in such a way that,
> if it works there, I just change some general setting, upload the pages
> and they work for sure on the MS Access thing (something like:
> ifdef LINUX then ODBC_ACCESSES_MYSQL
> ifdef NT    then ODBC_ACCESSES_MS_Access)
> 
> I am sure that this must be possible, but would really appreciate some
> examples/pointers to specific tutorial/similar stories/etc.
> 
> TIA,
> mweb
> 
> 
> 
> 
> -- 
> 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]

-- 
Never let your sense of morals prevent you from doing what is right
Salvor Hardin , "Foundation"
--- End Message ---
--- Begin Message ---
Hi Mweb,

yes it is overkill, but I don't know any other way to do it unless
you want to buy a 3rd party odbc driver for Access on Linux (is there one?)

Bye, John

Mweb <[EMAIL PROTECTED]> wrote in message 20011110104958.B3706@polaris">news:20011110104958.B3706@polaris...
> John,
>
> thanks for the link, but isn't it a bit of overkill in my case?
>
> What I need is to write PHP pages which manipulate a MS Access DB
> via ODBC, because this is what the hosting company makes available
> (and it's not going to change because of several reasons)
>
> So, I am looking for explanation on how to do ONLY the testing
> of suche pages on a STAND-ALONE Linux box. I want to run some DB
> engine on it which is accessible through ODBC, so that I can
> say "if my ODBC call was OK here, it will work also when I upload
> on the NT/IIS server, because the interface is the same".
>
> Keep in mind that performance is not an issue here. On the linux
> PC I would only do testing, and the site on the real server currently
> has ~4000 visits/month querying a DB with some hundreds of entries.
>
> What do you think?
>                            mweb
>
> On Sat, Nov 10, 2001 13:02:14 at 01:02:14PM +0800, John Lim wrote:
> > See http://php.weblogs.com/adodb_csv
> >
> > "ADODB also supports SQL communications through HTTP as a database
proxy. In
> > plain English, if you have a FoxPro or Access database that you need to
> > connect to from Unix, you can do so via HTTP (eg. Apache talking to IIS,
> > which talks to a small PHP program [the proxy] that queries the
database,
> > packs it into serialized text and sends it back to Apache).
> >
> >   PHP client -- Apache ------------ IIS -- PHP server -- Database
> >
> > Or if you have to go through a firewall to access your database, this
> > solution allows you to stream SQL queries as HTTP through the firewall."
> >
> > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote in message
> > GMJD1G$[EMAIL PROTECTED]">news:GMJD1G$[EMAIL PROTECTED]...
> > Hello,
> >
> > For reasons not worth discussing here, I have to develop and test on
> > Linux/Apache some PHP pages that will have to access via ODBC a MS
Access
> > database on an NT/IIS/PHP server.
> >
> > I would like to do it by writing PHP pages that access via ODBC
> > some mysql or other database on my linux box, in such a way that,
> > if it works there, I just change some general setting, upload the pages
> > and they work for sure on the MS Access thing (something like:
> > ifdef LINUX then ODBC_ACCESSES_MYSQL
> > ifdef NT    then ODBC_ACCESSES_MS_Access)
> >
> > I am sure that this must be possible, but would really appreciate some
> > examples/pointers to specific tutorial/similar stories/etc.
> >
> > TIA,
> > mweb
> >
> >
> >
> >
> > --
> > 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]
>
> --
> Never let your sense of morals prevent you from doing what is right
> Salvor Hardin , "Foundation"


--- End Message ---
--- Begin Message ---
Not that I'm sleep deprived ... :o)

Simple, I create an image, add a bunch of text and what not.
Now I want to add a graphic. (Probably a couple, who knows?)

imageCopy("test.bmp",$image,10,10,10,10,350,500,50);     <== doesn't
work.

Is this even the right function??

Description:
int ImageCopyMerge (resource dst_im, resource, src_im,
int dst_x, = 10
int dst_y, = 10
int src_x, = 10
int src_y, = 10
int src_w, = 350
int src_h, = 500
int pct = 50
)

So what am I doing wrong?

--------snip-----------
header("Content-type: image/png");

$height = 350;
$width = 500;
$image = imagecreate($width, $height+350);

$white = imagecolorallocate($image, 255, 255, 255);
$red = imagecolorallocate($image, 255, 0, 0);
$green = ImageColorAllocate($image, 0, 255, 0);
$blue = ImageColorAllocate($image, 0, 0, 255);
$black = imagecolorallocate($image, 0, 0, 0);

ImageString($image,5,30, 30 +350,  "hello",$blue);

imageCopy("test.bmp",$image,10,10,10,10,350,500,50);

imagepng($image);
imagedestroy($image);

--- End Message ---
--- Begin Message ---
Hello!

You should open "test.bmp" first.

Best regards,
Andrew Kirilenko. 

> -----Original Message-----
> From: jtjohnston [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, November 10, 2001 1:15 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] imageCopy :-(
> 
> 
> Not that I'm sleep deprived ... :o)
> 
> Simple, I create an image, add a bunch of text and what not.
> Now I want to add a graphic. (Probably a couple, who knows?)
> 
> imageCopy("test.bmp",$image,10,10,10,10,350,500,50);     <== doesn't
> work.
> 
> Is this even the right function??
> 
> Description:
> int ImageCopyMerge (resource dst_im, resource, src_im,
> int dst_x, = 10
> int dst_y, = 10
> int src_x, = 10
> int src_y, = 10
> int src_w, = 350
> int src_h, = 500
> int pct = 50
> )
> 
> So what am I doing wrong?
> 
> --------snip-----------
> header("Content-type: image/png");
> 
> $height = 350;
> $width = 500;
> $image = imagecreate($width, $height+350);
> 
> $white = imagecolorallocate($image, 255, 255, 255);
> $red = imagecolorallocate($image, 255, 0, 0);
> $green = ImageColorAllocate($image, 0, 255, 0);
> $blue = ImageColorAllocate($image, 0, 0, 255);
> $black = imagecolorallocate($image, 0, 0, 0);
> 
> ImageString($image,5,30, 30 +350,  "hello",$blue);
> 
> imageCopy("test.bmp",$image,10,10,10,10,350,500,50);
> 
> imagepng($image);
> imagedestroy($image);
> 
> 
> -- 
> 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]
> 
--- End Message ---
--- Begin Message ---
3/5   RIDER HAGGARD
CLOSE, JO, BORG
SOUTH AFRICA.
E [EMAIL PROTECTED]
 

                                    

        URGENT  AND  CONFIDENTIAL        
   (RE:  TRANSFER OF ($ 152,000.000.00 USD  
]ONE HUNDRED AND FIFTY TWO MILLION DOLLARS   

Dear sir,

We want to transfer to overseas ($ 152,000.000.00 USD)
One hundred and
Fifty two million United States Dollars) from a Prime
Bank in Africa, I want to ask you to  quietly  look
for a reliable and honest person who will be
capable  and fit to provide either an existing bank
account  or  to set up a new  Bank a/c  immediately to
receive this money, even an empty a/c can serve to 
receive this money, as long as you will remain honest
to me till the end for this important business
trusting in  you and believing  in God that you  will
never let me down either now or in future.

I am Mr,Malik Zulu. the Auditor General of prime
banks in Africa, during the course of our auditing  I
discovered a floating fund  in an account opened in
the bank in 1990 and since 1993 nobody has operated 
on this account again, after going through some old 
files in the records I discovered that the owner of
the account  died without a [heir]  hence  the money
is floating and  if I do not
remit this money out urgently it will be forfeited for
nothing. the owner of this account is  Mr.  Allan P.
Seaman, a foreigner, and an industrialist, and  he
died,  since 1993. and  no
other person knows about this account or any thing
concerning it, the account has no other beneficiary
and my investigation proved to me as well that Allan
P. Seaman   until his death was the manager  Diamond
Safari  [pty]. SA.  
  
We will start the  first transfer with fifty two
million [$52,000.000] upon successful transaction
without any disapointment from your side, we shall
re-apply for the payment of the remaining  rest amount
to your account,

The amount involved is (USD 152M) One hundred and
Fifty two million United States Dollars, only I want
to first transfer $52,000.000 [fifty two million
United States Dollar from this money into a
safe foreigners account abroad before the rest, but I
don't know any foreigner, I am only contacting you as
a foreigner because this money can not be approved to
a local person here, without valid international
foreign passport, but can only be approved to any
foreigner with valid international passport or drivers
license and foreign a/c  because the money is in us
dollars and
the former owner of the  a/c  Mr. Allan P. Seaman is 
a foreigner too, [and the money can only be approved
into a foreign a/c 

However, we will sign a binding agreement,  to bind us
together   I got your contact address  from the Girl
who operates computer,  I am revealing this to you
with believe in God that you will never let me down in
this business,  you are the first and the only person
that I am contacting for this business, so please
reply urgently so that I will inform you the next step
to take
urgently. Send also your private telephone and fax
number including the full details of the account to be
used for the deposit.

I want us to meet face to face to build confidence and
to sign a binding
agreement that will  bind us together  before
transferring the money to any account of  your choice
where the fund will be safe. Before we fly to your
country for withdrawal, sharing and  investments.

I need your full co-operation to make
this work fine. because the management is ready to
approve this payment to any foreigner who has correct
information of this account, which I will give to you,
upon your positive response and once I am convinced
that you  are  capable  and will meet up with
instruction of  a key bank official who is deeply
involved with me in this business.
I need your strong assurance that you will never, 
never let me down.

With my influence and the position of the bank
official we can transfer this
money to any foreigner's reliable account which you
can provide with assurance that this money will be
intact pending our physical arrival in your country
for
sharing. The bank official will  destroy all documents
of transaction
immediately we receive this money leaving no trace to
any place and to build confidence  you can  come
immediately  to discuss with me face to face after
which I will make this remittance in 
your presence and three of us will fly to your country
at least two days ahead of the money going into the
account.

I will apply for annual leave to get visa immediately
I hear from you that you are ready to act and receive
this fund in your account. I will use my position and
influence to obtain all legal approvals for  onward
transfer of this money to your account with
appropriate clearance from  the relevant  ministries
and
foreign exchange departments.

At the conclusion of this business, you will be given
35% of the total amount, 60% will be for me, while 5%
will be for expenses both parties might have incurred
during the process of transferring.

I look forward to your earliest reply through my email
[EMAIL PROTECTED]
yours truly

Malik Zulu





__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com
--- End Message ---
--- Begin Message ---
array_keys($HTTP_POST_VARS);

http://www.php.net/manual/en/function.array-keys.php

----- Original Message ----- 
From: "Joffrey van Wageningen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 09, 2001 1:21 PM
Subject: Re: [PHP] get names of vars $HTTP_POST_VARS?


> 
> a great way to debug things like this is to use var_dump or print_r...
> 
> http://www.php.net/manual/en/function.var-dump.php
> http://www.php.net/manual/en/function.print-r.php
> 
> <pre>
> <?php var_dump($HTTP_POST_VARS); ?>
> </pre>
> 
> short and simple :)
> 
> with kind regards,
> Joffrey van Wageningen
> 
> 
> On Fri, 9 Nov 2001, Hidayet Dogan wrote:
> > Or other way:
> >
> > while (list($key, $val) = each($HTTP_POST_VARS))
> >   echo "$key = $val<br>\n";
> >
> > On Fri, 9 Nov 2001, Vladimir Galkov wrote:
> >
> > > Good day!
> > >  Is there any way to get names of vars and values from $HTTP_POST_VARS if  I
> > > don't know their names and (ofcourse) values? (number can be taken from
> 
> 
> -- 
> 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]
> 
--- End Message ---
--- Begin Message ---
You must use session to maintain the continuity.

Using header('Location ...'); means that you redirected the client browser
to another page via HTTP. It is a stateless protocol ,and btw, you can 
redirect the client to a totally different host as well using HTTP headers.


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


----- Original Message ----- 
From: "Ashley M. Kirchner" <[EMAIL PROTECTED]>
To: "PHP-General List" <[EMAIL PROTECTED]>
Sent: Saturday, November 10, 2001 9:30 AM
Subject: [PHP] Passing vars...


> 
>     Small problem...  I used to have a single file that included others
> based on some variables set.  However, I've decided instead of including
> a different file, I would set a location header and redirect the browser
> to the (once included) file instead.  Problem is, now my variables
> aren't being passed from one page to the other now.
> 
>     My index.php file sets the following in a form:
> 
>     // variables passed
>     // $email[to]   -> who the mail is send to
>     // $email[from] -> from who the mail came it
>     // $name[to]    -> the name of the person who will get the mail
>     // $name[from]  -> the name of the person who send the mail
>     // $picture     -> the full picture-url
>     // $comment     -> comment
>     // $session[ID] -> a simple sessionID
>     // $album       -> album in catalog
>     // $startitem   -> page (item) in album
> 
>     ...and I need those variables passed on to the file to which I'm
> redirecting to.  Any ideas anyone?
> 
> --
> H | "Life is the art of drawing without an eraser." - John Gardner
>   +--------------------------------------------------------------------
>   Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
>   Director of Internet Operations / SysAdmin    .     800.441.3873 x130
>   Photo Craft Laboratories, Inc.            .     3550 Arapahoe Ave, #6
>   http://www.pcraft.com ..... .  .    .       Boulder, CO 80303, U.S.A.
> 
> 
> 
> -- 
> 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]
> 
--- End Message ---
--- Begin Message ---
I was doing some stupid shit like doing a session_unregister() on my
variables, then later, after successful login, redoing a session_register().

When I made a separate logoff.php page to unregister the variable, then a
redirect back to index.php to allow users to login again, everything worked
fine.  Very odd the way that it only messed up in IE6 though....

Thanks anyway for the tips.


"Pierre-Yves" <[EMAIL PROTECTED]> wrote in message
news:007201c1686b$6db59290$0100a8c0@py...
> Hello,
>
> I had the exact same problem as you last week with IE 6.0
>
> I was building my session on a domain but the variable used to build
> the session were coming from another domain.
>
> I was using a file on my server associated ususally with another domain
and
> that file had a session_start()
>
> I do not know what of these 2 thing caused the problem because I change
both
> at the same time and it worked!
> (I move the login form and didn't use the file...)
>
> It seems to be a problem with the default security settings of IE 6.0
> because when I was doing:
> Tools/Internet Options/Privacy/Advanced/and select "Override automatic
> cookie handling"
> everything worked!
>
> hope it help,
> py
>
>
>
>
>
> ----- Original Message -----
> From: "Herb Wiser" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, November 08, 2001 9:50 AM
> Subject: [PHP] Losing Session Variable in IE Only?
>
>
> > I am having the strangest problem and I'm not sure there is anybody on
> this
> > planet smart enough to figure it out....
> >
> > I have a PHP application that I was running and testing under an
existing
> > URL, but by adding a port number to go to a different directory.
> >
> > Like this, http://www.investmentteams.com:3333
> >
> > It worked fine.  I registered a domain name for it, got DNS set up, went
> to
> > the index.php page, did the login, but then when it transferred to the
> next
> > page, all the session variables were gone and this really makes the
whole
> > thing unusable.
> >
> > Here are the extenuating circumstances:
> >
> > It works fine in Netscape.
> > It works fine in IE 5-point-something at work.
> > Other websites using session variables (like www.investmentteams.com)
work
> > fine in IE6 at home.
> >
> > Oddly enough, the new URL is www.problemrpts.com , but if I cannot login
I
> > cannot enter a problem report!!!!
> >
> > Any guesses on this one?
> >
> > TIA
> >
> >
> >
> > --
> > 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]
> >
>


--- End Message ---
--- Begin Message ---
Hi,

This is my first foray into PHP (coming from a VB, ASP background). What I
am trying to do should be ridiculously easy, but for some reason I can't
figure out how to do this.
I have a form that builds a dynamic number of text boxes in a loop:

for($i=0;$i<$count;$i++)
{
        print("<input type=text name=item" . $i . ">");
}

that works fine. I end up with a number of textboxes named "item0", "item1",
"item2" and so on...When I submit the form, I pass over the $count value and
I want to loop through the count so that I can ge the value for each textbox
by building the textbox name dynamically. For example:

for($i=0;$i<$count;$i++)
{
        print("$item . $i");
}

Trying to print the value of "$item0", "$item1", etc...Obviously this
doesn't work. What am I overlooking here?

Many thanks in advance,

Dave


--- End Message ---
--- Begin Message ---
Try:

for($i=0;$i<$count;$i++)
{
  // in the global array, print the variable with the name: "item$i"
  print $GLOBALS["item$i"];
}

or even:

for($i=0;$i<$count;$i++)
{
  // in the post vars array, print the variable with the name: "item$i"
  // this one is probably more secure.
  print $HTTP_POST_VARS["item$i"];
}

Also, as an aside, unlike concatenation in vbscript (blech) you don't have
to break out of quotes all the time. That's because like in perl, php
variables within double quotes are interpolated.

So instead of writing:
print("<input type=text name=item" . $i . ">");

you may write:
print ("<input type=text name=item$i>");

Further, you don't need parenthesis with the print statement so you can
write:
print "<input type=text name=item$i>";

It's just a matter of preference, but I think it looks cleaner.

When concatenating several variables together into a string this can save a
ton of keystrokes and is easier to read and maintain.

Regards,
Matt.



----- Original Message -----
From: "David Mitchell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 10, 2001 9:19 AM
Subject: [PHP] Total Newbie - concatenating variables.


> Hi,
>
> This is my first foray into PHP (coming from a VB, ASP background). What I
> am trying to do should be ridiculously easy, but for some reason I can't
> figure out how to do this.
> I have a form that builds a dynamic number of text boxes in a loop:
>
> for($i=0;$i<$count;$i++)
> {
> print("<input type=text name=item" . $i . ">");
> }
>
> that works fine. I end up with a number of textboxes named "item0",
"item1",
> "item2" and so on...When I submit the form, I pass over the $count value
and
> I want to loop through the count so that I can ge the value for each
textbox
> by building the textbox name dynamically. For example:
>
> for($i=0;$i<$count;$i++)
> {
> print("$item . $i");
> }
>
> Trying to print the value of "$item0", "$item1", etc...Obviously this
> doesn't work. What am I overlooking here?
>
> Many thanks in advance,
>
> Dave
>
>
>
> --
> 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]
>
>
>

--- End Message ---
--- Begin Message ---
Dear all,
If I use a php script in a SSL webpage I will be using a remote email
address to send the incoming data  (personal details, name address etc...)
to...  e.g. [EMAIL PROTECTED]  using the standard mail() function.

SSL is secure for the interface between the user and the webpage and I
understand that once the email has reached its destination
([EMAIL PROTECTED]) it is only secure on the strength the mailbox
username/password.
My question is:
How secure is the email in transit from the SSL page to the recipient's
mailbox? Does SSL offer any security in this regard?
Or does it need to be encrypted?

Thanks
Colm Rafferty

--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

> How secure is the email in transit from the SSL page to the recipient's
> mailbox? 

A Does SSL offer any security in this regard?
B Or does it need to be encrypted?

Answer is: B :)

    you ----- ssl encrypted line ----->  server  
                                            |
                                            |
                                            |
                                            |
                                            V
 
                                    nonecure puretext 
                                      mail transfer

Cece
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE77Utv6MQc5qvp58IRAlcTAKCUwD/OP1jKdRTphuWCt4da0EsBDACdFShY
SKaZMYXkjUj9eAIZpTURu7A=
=5FIh
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
SSL encrypts the data between the user and your webserver only

It does not encrypt data send by you to your mailserver, nor does it
influence the way your mailserver sends the mailmessage to the mailserver of
the user. (in plain text)

So, you need to encrypt the data in the email. It is however not that easy
to catch a mailmessage while in transit and I assume that both you
mailserver and the mailserver of the user are both secure. Thus for simple
things this mostly isn't a real issue. If you use encryption you might want
to use something standard like PGP, so the user can use his normal email
program to read the mail.

Robert Klinkenberg
--- End Message ---
--- Begin Message ---
My bad for typing it in from memory. I'd retyped it in a few times, so I
thought i had it perfect.  Here's the exact code:

print_r ($HTTP_POSTVARS); // yeilds the array that I pasted down below
if ($flag=="process")
{
$whatdo = $HTTP_POSTVARS['whatdo'];
print_r($what_do);   // blank
.
.
.

 for ($x=0;$x<=$row;$x++)
 {

 $whatdox = $whatdo[$x];
print $whatdox;  // blank
.
.
.
//loop start
  <tr>
    <td nowrap>
      <p>
        <input type="radio" name="whatdo[<?php print $row?>]" value="load"
checked>
        Load<br>
        <input type="radio" name="whatdo[<?php print $row?>]"
value="delete">
        Delete<br>
        <input type="radio" name="whatdo[<?php print $row?>]"
value="change">
        Change Category</p>
    </td>
.
.
.

---------------------
Lara J. Fabans
Lodestone Software, Inc
[EMAIL PROTECTED]


> At 09:41 AM 10/11/01, Lara J. Fabans wrote:
> >Hi,
> >
> >I'm having some difficulties accessing HTTP_POST_VARS
> >
> >The original form has a table where each row has a set of 3 radio
> >buttons  name="whatdo<?php print $x?>[]"   where $x is the row counter.
> >(I'm using PHP to pull info into a table, then the user manipulates
> >the info, and it places the info into 2 other tables depending upon what
> >the choice is for the 3 radio buttons).
> >
> >So, on submit, it reloads the page, and I pull in all of the areas.  All
> >work except the radio buttons.
> >
> >I've tried:
> >$submitted_vars = $HTTP_POST_VARS;
> >$whatdo = $submitted_vars[whatdo];
> >---
> >and
> >$whatdo = $HTTP_POST_VARS["whatdo"];
> >--
> >
> >but when I do a print_r($whatdo)
> >it's blank
> >
> >When I do a
> >print_r($HTTP_POST_VARS)
> >I get
> >Array ( [whatdo] => Array ( [0] => load [1] => delete), [other
stuff]....)
> >
> >
> >What am I doing wrong :-)  How do I access this data?  It's so
frustrating
> >since all the rest of the postvars are working, and I can see that the
> >data's there in the HTTP_POST_VARS....I just can't get to it. (pun not
> >intended)
> >
> >Thanks,
> >Lara
> >
> >---------------------
> >Lara J. Fabans
> >Lodestone Software, Inc
> >[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]
>
>

--- End Message ---
--- Begin Message ---
Just an addendum, I changed it from radio buttons to a pop up menu

         <p>
           <select name="whatdo[]" id="whatdo">
             <option value="load" selected>Load</option>
             <option value="delete">Delete</option>
             <option value="change">Change Category</option>
           </select>
         </p>


Again, if I print_r (HTTP_POST_VARS), I can see the Array ( [whatdo] => 
Array ( [0] => load [1] => delete), [other
stuff]....)
but I cannot access it.  I'm doing the same exact syntax for the image 
name="image[]" which works perfectly.

I can find nothing on this in the documentation or any of the other 
wonderful books & websites out there.
Please, what am I doing wrong in trying to access the HTTP_POST_VARS?

Thanks,
Lara


At 08:36 AM 11/10/2001 -0800, Lara J. Fabans wrote:
>My bad for typing it in from memory. I'd retyped it in a few times, so I
>thought i had it perfect.  Here's the exact code:
>
>print_r ($HTTP_POSTVARS); // yeilds the array that I pasted down below
>if ($flag=="process")
>{
>$whatdo = $HTTP_POSTVARS['whatdo'];
>print_r($what_do);   // blank
>.
>.
>.
>
>  for ($x=0;$x<=$row;$x++)
>  {
>
>  $whatdox = $whatdo[$x];
>print $whatdox;  // blank
>.
>.
>.
>//loop start
>   <tr>
>     <td nowrap>
>       <p>
>         <input type="radio" name="whatdo[<?php print $row?>]" value="load"
>checked>
>         Load<br>
>         <input type="radio" name="whatdo[<?php print $row?>]"
>value="delete">
>         Delete<br>
>         <input type="radio" name="whatdo[<?php print $row?>]"
>value="change">
>         Change Category</p>
>     </td>
>.
>.
>.
>
>---------------------
>Lara J. Fabans
>Lodestone Software, Inc
>[EMAIL PROTECTED]
>
>
> > At 09:41 AM 10/11/01, Lara J. Fabans wrote:
> > >Hi,
> > >
> > >I'm having some difficulties accessing HTTP_POST_VARS
> > >
> > >The original form has a table where each row has a set of 3 radio
> > >buttons  name="whatdo<?php print $x?>[]"   where $x is the row counter.
> > >(I'm using PHP to pull info into a table, then the user manipulates
> > >the info, and it places the info into 2 other tables depending upon what
> > >the choice is for the 3 radio buttons).
> > >
> > >So, on submit, it reloads the page, and I pull in all of the areas.  All
> > >work except the radio buttons.
> > >
> > >I've tried:
> > >$submitted_vars = $HTTP_POST_VARS;
> > >$whatdo = $submitted_vars[whatdo];
> > >---
> > >and
> > >$whatdo = $HTTP_POST_VARS["whatdo"];
> > >--
> > >
> > >but when I do a print_r($whatdo)
> > >it's blank
> > >
> > >When I do a
> > >print_r($HTTP_POST_VARS)
> > >I get
> > >Array ( [whatdo] => Array ( [0] => load [1] => delete), [other
>stuff]....)
> > >
> > >
> > >What am I doing wrong :-)  How do I access this data?  It's so
>frustrating
> > >since all the rest of the postvars are working, and I can see that the
> > >data's there in the HTTP_POST_VARS....I just can't get to it. (pun not
> > >intended)

---------------------
Lara J. Fabans
Lodestone Software, Inc
[EMAIL PROTECTED]

--- End Message ---
--- Begin Message ---
Why doesn't anyone say something about my messages "probelms with sessions 
and SSI"?

Is it such a lame question???

_____________________________
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br

--- End Message ---
--- Begin Message ---
On Saturday 10 November 2001 08:42 am, Christian Dechery wrote:
> Why doesn't anyone say something about my messages "probelms with sessions
> and SSI"?

This list gets 2000 - 3000 messages per month and you find it surprising that 
not all messages get a response?  

My suggestion regarding SSI and PHP is to not use SSI.  Use include() or 
require() instead and keep it an all-PHP affair.

--kurt
--- End Message ---
--- Begin Message ---
At 10:33 10/11/01 -0800, you wrote:
>On Saturday 10 November 2001 08:42 am, Christian Dechery wrote:
> > Why doesn't anyone say something about my messages "probelms with sessions
> > and SSI"?
>
>This list gets 2000 - 3000 messages per month and you find it surprising that
>not all messages get a response?
>
>My suggestion regarding SSI and PHP is to not use SSI.  Use include() or
>require() instead and keep it an all-PHP affair.

but I'm trying to build a system that can be used without the need of PHP.
The person could include the PHP from another server in a HTML file... or 
even in the same server but without having to switch all the files from 
.html to .php just to install my system.

_____________________________
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br

--- End Message ---
--- Begin Message ---
Perhaps because you keep asking non-PHP related questions on the PHP 
lists.  I see a bunch of questions about Apache and .htaccess from you 
which you yourself admitted has nothing to do with PHP.  So, yes, your 
history of lame questions work against you.

But to answer your question, it is very likely your session id will get 
lost through an SSI include virtual.  Probably no way to fix that 
depending on how you are doing things.  Generally using SSI at all is a 
bad idea.  SSI will have to be turned on and that is just as much a hassle 
as turning on PHP these days.

-Rasmus

On Sat, 10 Nov 2001, Christian Dechery wrote:

> Why doesn't anyone say something about my messages "probelms with sessions 
> and SSI"?
> 
> Is it such a lame question???
> 
> _____________________________
> . Christian Dechery
> . . Gaita-L Owner / Web Developer
> . . http://www.webstyle.com.br
> . . http://www.tanamesa.com.br
> 
> 
> 


--- End Message ---
--- Begin Message ---
i have the following script:

<?php

require_once("PEAR.php");

class super extends PEAR
{
    function setup()
    {
        print("i am super<br>");
    }
}

class super1 extends super
{
    function setup()
    {
        print("i am super1<br>");
        parent::setup();
    }
}

class super2 extends super1
{
    function setup()
    {
        print("i am super2<br>");
        parent::setup();
    }
}

$s2 = new super2;
$s2->setup();

?>

it prints
        i am super2
        i am super1
        i am super1
        i am super1
        i am super1
        i am super1
        .... and so on

if class super _doesnt_ extend PEAR the expected output is printed
        i am super2
        i am super1
        i am super

i was looking for the error in PEAR.php but even if i empty the file 
and leave _only_ "class PEAR { } " in there it still does the 
unexpected, i can extend any class from the include_path, they all 
have this effect ... strange

so it's _not_ PEAR's fault, is this a php-bug? i am using 4.0.5 and 6
 
-- 
Wolfram
--- End Message ---
--- Begin Message ---
Seems to be fixed in CVS; reproduced with 4.0.6.

- Markus
--- End Message ---
--- Begin Message ---
; The separator used in PHP generated URLs to separate arguments.
; Default is "&".
;arg_separator.output = "&amp;"
  
; List of separator(s) used by PHP to parse input URLs into variables.
; Default is "&".
; NOTE: Every character in this directive is considered as separator!
;arg_separator.input = ";&"

now how can i replicate this on a per vhost level? i dont want to run it globally, i 
just need it for 1 vhost that im running that is meant to be all xhtml 1.1 compliant 
but the dammm PHPSESSID is screwing things up


Cameron
outworld.cx
--- End Message ---
--- Begin Message ---
I'm not sure if this answers your question but it seems to me that &amp; is
an html encoding whereas if you want to put something in the url you should
urlencode it.

This will eliminate the "&"s.

Matt.


----- Original Message -----
From: "GaM3R" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 10, 2001 1:54 PM
Subject: [PHP] &amp; in url's


; The separator used in PHP generated URLs to separate arguments.
; Default is "&".
;arg_separator.output = "&amp;"

; List of separator(s) used by PHP to parse input URLs into variables.
; Default is "&".
; NOTE: Every character in this directive is considered as separator!
;arg_separator.input = ";&"

now how can i replicate this on a per vhost level? i dont want to run it
globally, i just need it for 1 vhost that im running that is meant to be all
xhtml 1.1 compliant but the dammm PHPSESSID is screwing things up


Cameron
outworld.cx


--- End Message ---
--- Begin Message ---
On Sun, 11 Nov 2001, GaM3R wrote:

> ; The separator used in PHP generated URLs to separate arguments.
> ; Default is "&".
> ;arg_separator.output = "&amp;"
>   
> ; List of separator(s) used by PHP to parse input URLs into variables.
> ; Default is "&".
> ; NOTE: Every character in this directive is considered as separator!
> ;arg_separator.input = ";&"
> 
> now how can i replicate this on a per vhost level? i dont want to run it globally, i 
>just need it for 1 vhost that im running that is meant to be all xhtml 1.1 compliant 
>but the dammm PHPSESSID is screwing things up

<VirtualHost foo>
   php_value arg_separator.input ";&"
</VirtualHost>

It's documented in the configuration chapter.

-Rasmus

--- End Message ---
--- Begin Message ---
I appear to be having a problem where when I run a PHP script that uses ODBC
calls my ASP/ODBC driven pages stop functioning.  When I run a PHP script
that does not use ODBC there does not seem to be any problems with my
ASP/ODBC pages.  I was wondering if anyone out there has ever run in to a
problem similar or if there are different issues running PHP ASP ODBC and
IIS 5 on Win2k Advanced Server.

Thanks
Kevin Pratt


--- End Message ---
--- Begin Message ---
Apple broke the GCC on Mac OS X 10.0

Running make on PHP install produces this error:
/usr/bin/ld: -undefined error must be used when -twolevel_namespace is 
in effect

Here's the fix from Apple but it's over my head.
http://developer.apple.com/techpubs/macosx/ReleaseNotes/TwoLevelNamespaces.
html

Tried the usual fix -- defining OTHER_LDFLAGS = -flat_namespace (or some 
variant on that theme, such as EXTRA_LDFLAGS) -- but has had no luck.

--- End Message ---
--- Begin Message ---
I'm creating an image, but I want to do as below so when I do

http://www..../image.php it displays html and ...
http://www..../image.php?newimage=1  displays my image

However it crashes if $newimage=1
My image doesn't display.

My image works otherwise if I simply erase the if loop.

Is this a problem declaring headers?
How can I overcome this so I can contain everything in one file, rather
than farming the image out to a separate file.php?

<?php

if(!$newimage)
{
header("Content-type: text/html");
echo "hi<br>";
echo "rendu: $rendu<br>";
}else{

header("Content-type: image/png");
$image = imagecreate(500, 350);
//etc...
}
?>

--- End Message ---
--- Begin Message ---
Does anyone know of a usergroup for Apache? I am having difficulties
finding one and am having some troubles with Apache.


Thanks
Eric
--- End Message ---
--- Begin Message ---
hi ppl,

id like to set something like a global variable or constant.
i need this, to set the path of my document root. all scripts should then
use this path.

e.g.
my apache document root is: /www
all my skriptfiles are in /www/my_subdir

i include a special php script in all script files with:
/*
<? include("config/file.php");
....
?>
*/

if i like to move my scripts to /www/my_newdir i habe to change the
include() function in every script

any workaround here?

thanks a lot in advance

sascha
--
-------------------------------------------------------
Sascha Biber
Hegenloh Reisen GmbH
t: 0 71 61-67 34-68
f: 0 71 61-67 34-64
m: 0177-589 14 96




--- End Message ---

Reply via email to