OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 20 Jun 2003 22:02:40 -0000 Issue 2129

php-general-digest-helplists.php.net
Date: Fri Jun 20 2003 - 17:02:40 CDT


php-general Digest 20 Jun 2003 22:02:40 -0000 Issue 2129

Topics (messages 152284 through 152351):

Re: strange crypt() problem
        152284 by: Awlad Hussain
        152320 by: Don Read

Re: Convert KB to MB?
        152285 by: Ian Mantripp
        152303 by: Brent Baisley
        152332 by: Mike Migurski

Re: How to secure site?
        152286 by: Marek Kilimajer

Re: Migrating pre-4.1 code to a post-4.1 server with regist er_globals on
        152287 by: Ford, Mike [LSS]
        152308 by: Johnson, Kirk

Re: Can't pass query string from HTML to PHP
        152288 by: Ford, Mike [LSS]
        152291 by: Thorsten Körner
        152292 by: Thorsten Körner

Re: preg_match
        152289 by: sven
        152319 by: Aaron Axelsen

Re: Help me compose myself... I'm about to kill Microsoft....
        152290 by: Steve M
        152302 by: Daniel

Re: safe mode and mail
        152293 by: David Nicholson

Re: [Newman] Passing an image through a php file.
        152294 by: Lars Torben Wilson
        152345 by: Mark Tehara
        152347 by: Lars Torben Wilson

Synchronize MYSQL
        152295 by: khuram noman
        152297 by: John W. Holmes
        152309 by: Neil
        152316 by: Jim McNeely

Re: ie issue: when I do a forced redirect with the header()
        152296 by: Pete Morganic

open_basedir
        152298 by: dorgon
        152307 by: Ernest E Vogelsinger

Need Instruction on how to compile PHP in Win32...
        152299 by: Scott Fletcher

Cannot modify header information - headers already sent
        152300 by: Logan McKinley
        152301 by: Henning Sittler

Call Servlet Java from PHP
        152304 by: maximiliano_potje.salutia.com.br
        152305 by: Jay Blanchard

clearing cache
        152306 by: Mark McCulligh
        152318 by: Jeff Harris
        152333 by: Mark McCulligh
        152344 by: Kevin Stone

ErrorDocument doesn't work for PHP scripts
        152310 by: php.fiddaman.net
        152311 by: Wendell Brown
        152313 by: Wendell Brown
        152317 by: Wendell Brown
        152323 by: Andy Fiddaman

Uploading/retrieving PDFs to and from Oracle BLOB
        152312 by: Michael Champagne

mail() without subjects and froms
        152314 by: Johannes Reichardt
        152315 by: David Nicholson
        152321 by: David Nicholson
        152334 by: Manuel Lemos

Passing Date/Time
        152322 by: Kyle Babich
        152337 by: Kyle Babich
        152338 by: Kyle Babich

SQL Sanitation in PHP
        152324 by: Jeff Stewart

Re: Cookies- peanut butter or chocolate??
        152325 by: Don Read

Odd reactions to Globals On/Off
        152326 by: Lee Herron QCS

updateable database- please help- only displaying first word from field
        152327 by: Matt Hedges
        152328 by: Adam Voigt
        152329 by: Don Read
        152330 by: Matt Hedges
        152331 by: Adam Voigt

Standalone PHP Client?
        152335 by: Galen P. Zink
        152336 by: Galen P. Zink
        152340 by: Brian V Bonini
        152341 by: Jay Blanchard
        152342 by: Galen P. Zink

updateable database 2nd question
        152339 by: Matt Hedges
        152346 by: Don Read

Search Engine
        152343 by: Michael A Smith

PHP Problem regarding updating through text boxes
        152348 by: Matt Hedges
        152349 by: Esteban Fernandez
        152350 by: Esteban Fernandez

Re: Error in php after uprading
        152351 by: Javier

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


If I use MD5 based encryption...would i have similar problem in the future
when i move the codes around to different server?

----- Original Message -----
From: "Jeff Harris" <jharrisrallycentral.us>
To: "Sævar Öfjörð" <ofjordsimnet.is>
Cc: <php-generallists.php.net>
Sent: Friday, June 20, 2003 12:06 AM
Subject: RE: [PHP] strange crypt() problem

> It looks like "Some operating systems support more than one type of
> encryption. In fact, sometimes the standard DES-based encryption is
> replaced by an MD5-based encryption algorithm. The encryption type is
> triggered by the salt argument. At install time, PHP determines the
> capabilities of the crypt function and will accept salts for other
> encryption types. If no salt is provided, PHP will auto-generate a
> standard two character salt by default, unless the default encryption type
> on the system is MD5, in which case a random MD5-compatible salt is
> generated. PHP sets a constant named CRYPT_SALT_LENGTH which tells you
> whether a regular two character salt applies to your system or the longer
> twelve character salt is applicable."
>
> The first server you were using was using DES, this new server is using
> MD5. Since hashes are one-way algorithms, you appear to be SOL. However,
> you might be able to work something with mcrypt and someone who knows
> anything about it.
>
> http://www.php.net/manual/en/ref.mcrypt.php
>
> Jeff
>
> On Jun 19, 2003, "Sævar Öfjörð" claimed that:
>
> |
> |Well, if you don't find another solution for this, you could generate
> |random passwords for each member and mail them to them. Then you would
> |md5() them and update the DB with new md5()'ed passwords... This is not
> |the easy way out so I hope someone finds out why the crypt() is behaving
> |strangely.
> |
> |Sævar - ICELAND
> |
> |-----Original Message-----
> |From: Huzz [mailto:huzzbangladeshimatch.com]
> |Sent: 19. júní 2003 22:43
> |To: php-generallists.php.net
> |Subject: Re: [PHP] strange crypt() problem
> |
> |I already have about 1000 members their password crypted using crypt();
> |would they able to login using their password or they have to change it
> |again??
> |
> |Thanks
> |
> |
> |"SævË Ölêöyp" <ofjordsimnet.is> wrote in message
> |news:001501c336ad$d70cac80$0100a8c0dmc...
> |Try using md5() instead because it is more widely supported than crypt()
> |and it leaves no room for errors.
> |
> |Hope it helps,
> |Sævar ICELAND
> |
> |
> |-----Original Message-----
> |From: Huzz [mailto:huzzbangladeshimatch.com]
> |Sent: 19. júní 2003 21:43
> |To: php-generallists.php.net
> |Subject: [PHP] strange crypt() problem
> |
> |I have this bit of code to crypt user password in user registration as
> |shown
> |below.
> |
> | $cryptpass=crypt($makepass);
> |which generated crypted password like eg 37Q9fppLHc4fQ with php 4.0
> |
> |And am using the codes below to check for valid login..
> |// $pass - from login page
> |// $dbpass - from the database
> | $pass=crypt($pass,substr($dbpass,0,2));
> | }
> | if (strcmp($dbpass,$pass)) {
> | return(0);
> | }
> |
> |
> |Recently i have moved the same file to a new server with php 4.3.1 the
> |problem is the same piece of codes above generates completely differen
> |crypted value eg.$1$RjZHv7qx$h/L9ZUNT48rilHB6fGoMP/ .. hence the login
> |codes above does not work... :(
> |
> |Please someone tell me that i am not going mad....
> |
> |please help
> |huzz
> |
> --
> Registered Linux user #304026.
> "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
> Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


On 19-Jun-2003 Huzz wrote:
> I have this bit of code to crypt user password in user registration as
> shown
> below.
>
> $cryptpass=crypt($makepass);
> which generated crypted password like eg 37Q9fppLHc4fQ with php 4.0
>
> And am using the codes below to check for valid login..
> // $pass - from login page
> // $dbpass - from the database
> $pass=crypt($pass,substr($dbpass,0,2));
> }
> if (strcmp($dbpass,$pass)) {
> return(0);
> }
>
>
> Recently i have moved the same file to a new server with php 4.3.1 the
> problem is the same piece of codes above generates completely differen
> crypted value eg.$1$RjZHv7qx$h/L9ZUNT48rilHB6fGoMP/ .. hence the login
> codes above does not work... :(
>

The '$1$' means it's a md5 password.

Don't chop-up the encryped passwd.
Use the whole string for the seed and let crypt() handle it:

$epass=crypt($pass, $dbpass);

if (strcmp($dbpass,$epass)) {
  ...

Regards,
--
Don Read dreadtexas.net
-- It's always darkest before the dawn. So if you are going to
   steal the neighbor's newspaper, that's the time to do it.
                            (53kr33t w0rdz: sql table query)

attached mail follows:


on Thu, Jun 19, 2003, Brent Baisley wrote:

>Ahhh, but then marketing gets involved and changes the 1024 to 1000 and
>ta da, you now have more MegaBytes. 1024 is the right number to use,
>but don't be surprised if it doesn't match with some numbers you might
>compare it to.

Not necessarily, in data storage 1mb = 1024kb but in data transfer 1mb =
1000kb.

Ian

attached mail follows:


Again I say "Ahhh". Are you mixing your bits and bytes then?
1MB =1024KB
1mb=1000kb

Although upper and lower case seem to have becoming interchangeable,
even though technically they have different meaning. The simple formula
is suddenly getting more complicated.

On Friday, June 20, 2003, at 04:41 AM, Ian Mantripp wrote:

>> Ahhh, but then marketing gets involved and changes the 1024 to 1000
>> and
>> ta da, you now have more MegaBytes. 1024 is the right number to use,
>> but don't be surprised if it doesn't match with some numbers you might
>> compare it to.
>
> Not necessarily, in data storage 1mb = 1024kb but in data transfer 1mb
> =
> 1000kb.
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

attached mail follows:


>>Ahhh, but then marketing gets involved and changes the 1024 to 1000 and
>>ta da, you now have more MegaBytes. 1024 is the right number to use, but
>>don't be surprised if it doesn't match with some numbers you might
>>compare it to.
>
>Not necessarily, in data storage 1mb = 1024kb but in data transfer 1mb =
>1000kb.

Isn't it the case that in data storage the 'b' means 'bytes', while in
data transfer the 'b' means 'bits'? It makes a difference: talking about
1000 bytes is awkward, while 1000 bits is not.

---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html

attached mail follows:


Andrew Afliatunov wrote:
> Other way - I can turn on safe_mode and include www/lib in
> safe_mode_include_dir. In this case projects will be able to include
> scripts from lib, BUT won't be able to create files in cache because
> scripts and cache have different owners.

Go this way, but create a separate cache dir for each project in its own
directory.
Probably even you would have problems telling which cache file belongs
to which project, so how would a stupid computer know the difference.

attached mail follows:


> -----Original Message-----
> From: Johnson, Kirk [mailto:kjohnsonzootweb.com]
> Sent: 19 June 2003 20:31
> To: php-generallists.php.net
> Subject: [PHP] Migrating pre-4.1 code to a post-4.1 server with
> register_globals on
>
>
> A heads-up to those who are moving old code with
> register_globals "on" to a
> server with a newer PHP version and register_globals still "on":
>
> In the old days, the rule was simple. For a session variable,
> whatever value
> was in the global variable at the end of the script was what
> was saved to
> the session, and that value was restored on the next page.
>
> Under a newer version of PHP, e.g., 4.3.2, this is no longer
> true in one
> case. Assume we have a session variable, 'a', that has been
> assigned some
> value:
>
> $a = 'someValue';
> session_register('a');
>
> Then
>
> unset($a);
>
> will unset the global variable, $a, but NOT the corresponding
> element in the
> two session arrays, $HTTP_SESSION_VARS and $_SESSION.

Actually, this should only be true for versions 4.1.0 to 4.2.3 -- the manual
page at http://uk.php.net/manual/en/ref.session.php (admittedly a *long* way
down it and hidden under the "Examples" heading!) contains this warning:

"There is a defect in PHP 4.2.3 and earlier. If you register a new session
variable by using session_register(), the entry in the global scope and the
$_SESSION entry will not reference the same value until the next
session_start(). I.e. a modification to the newly registered global variable
will not be reflected by the $_SESSION entry. This has been corrected in PHP
4.3."

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.fordlmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

attached mail follows:


> -----Original Message-----
> From: Ford, Mike [LSS] [mailto:M.Fordlmu.ac.uk]
> Sent: Friday, June 20, 2003 2:57 AM
> To: Johnson, Kirk; php-generallists.php.net
> Subject: RE: [PHP] Migrating pre-4.1 code to a post-4.1 server with
> regist er_globals on
>
>
> > -----Original Message-----
> > From: Johnson, Kirk [mailto:kjohnsonzootweb.com]
> > Sent: 19 June 2003 20:31
> > To: php-generallists.php.net
> > Subject: [PHP] Migrating pre-4.1 code to a post-4.1 server with
> > register_globals on
> >
> >
> > A heads-up to those who are moving old code with
> > register_globals "on" to a
> > server with a newer PHP version and register_globals still "on":
> >
> > In the old days, the rule was simple. For a session variable,
> > whatever value
> > was in the global variable at the end of the script was what
> > was saved to
> > the session, and that value was restored on the next page.
> >
> > Under a newer version of PHP, e.g., 4.3.2, this is no longer
> > true in one
> > case. Assume we have a session variable, 'a', that has been
> > assigned some
> > value:
> >
> > $a = 'someValue';
> > session_register('a');
> >
> > Then
> >
> > unset($a);
> >
> > will unset the global variable, $a, but NOT the corresponding
> > element in the
> > two session arrays, $HTTP_SESSION_VARS and $_SESSION.
>
> Actually, this should only be true for versions 4.1.0 to
> 4.2.3 -- the manual
> page at http://uk.php.net/manual/en/ref.session.php
> (admittedly a *long* way
> down it and hidden under the "Examples" heading!) contains
> this warning:
>
> "There is a defect in PHP 4.2.3 and earlier. If you register
> a new session
> variable by using session_register(), the entry in the global
> scope and the
> $_SESSION entry will not reference the same value until the next
> session_start(). I.e. a modification to the newly registered
> global variable
> will not be reflected by the $_SESSION entry. This has been
> corrected in PHP
> 4.3."

Please let me clarify what I am saying. The manual reference above is
correct, *to a point*.

In 4.3.2, when you *assign* to any one of the session variable $a,
$HTTP_SESSION_VARS['a'], or $_SESSION['a'], you simultaneously *assign* to
the other two. For example,

$HTTP_SESSION_VARS['a'] = 'iguana';

simultaneously *assigns* 'iguana' to $a and $_SESSION['a'].

However, unset($a) does NOT unset $HTTP_SESSION_VARS['a'] or $_SESSION['a'],
with two results. One, the value of the session variable, $a, is no longer
in sync with $HTTP_SESSION_VARS['a'] and $_SESSION['a']. Two, $a will have
the value 'iguana' restored on the next session_start(). This is unexpected
behavior and not explained in the manual, AFAIK.

Kirk

attached mail follows:


> -----Original Message-----
> From: Robby Ku [mailto:robbykuyahoo.com]
> Sent: 20 June 2003 08:25
>
> Thanks for the fast response given. I tried both Jan's and
> Martin's method but it won't solve the problem.
>
> I've tried to change "register_globals = On" in php.ini and i
> got the same result.

Did you restart your Web server after making the change?

> I've tried using $_Get['name'] instead of $name but i got the
> following error:

That's $_GET -- PHP variable names are case-sensitive, so $_Get is not the
same thing.

> Parse error: parse error, unexpected
> T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE
> or T_NUM_STRING in c:\inetpub\wwwroot\Welcome.php on line 5

I'm guessing here since you didn't post your revised code, but are you
trying to interpolate it in a double-quoted string? Then you also need to
use braces, like:

   echo "Welcome, {$_GET['name']}";

If it's not that, post your code as it is now for people to look at.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.fordlmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

attached mail follows:


Am Freitag, 20. Juni 2003 08:06 schrieb Robby Ku:
> Hi,
>
> I've got a problem passing a query string from a HTML file to a PHP file. I
> created a HTML file called "welcome.html" with the following link:
>
> <a href="welcome.php?name=Andy"> Hi, I'm Andy </a>
>
> I am trying to pass the query string Andy to a PHP file called
> "welcome.php" with the following command:
>
> <?php echo ("Welcome, $name!"); ?>
Change this line to:
<?php
        echo"Welcome, " . $_GET['name'];
?>

and that's it.
If this doesn't work, because your PHP-Version is <=4.0.6 than try this, if
you can't update:

<?php
        echo"Welcome, " . $HTTP_GET_VARS['name'];
?>

For security-reasons leave your php.ini with:
register_globals=off

>
> After i load "welcome.html" in my browser, i try linking it to
> "welcome.php" through the hyperlink i created. But the result i got was
>
> "Welcome, !"
"Welcome, Andy!" ;-)

CU
Thorsten

--
Thorsten Körner http://www.123tkShop.org

attached mail follows:


Hi again
Am Freitag, 20. Juni 2003 11:47 schrieb Thorsten Körner:
> Am Freitag, 20. Juni 2003 08:06 schrieb Robby Ku:
> > Hi,
> >
> > I've got a problem passing a query string from a HTML file to a PHP file.
> > I created a HTML file called "welcome.html" with the following link:
> >
> > <a href="welcome.php?name=Andy"> Hi, I'm Andy </a>
> >
> > I am trying to pass the query string Andy to a PHP file called
> > "welcome.php" with the following command:
> >
> > <?php echo ("Welcome, $name!"); ?>
>
> Change this line to:
> <?php
> echo"Welcome, " . $_GET['name'];
> ?>
> and that's it.
> If this doesn't work, because your PHP-Version is <=4.0.6 than try this, if
> you can't update:
>
> <?php
> echo"Welcome, " . $HTTP_GET_VARS['name'];
> ?>
Sorry I forgot the "!"-Char. So do it this way:
echo"Welcome, " . $_GET['name'] . "!";
or
echo"Welcome, " . $HTTP_GET_VARS['name'] . "!";
depending onyour PHP-Version.

> For security-reasons leave your php.ini with:
> register_globals=off
>
> > After i load "welcome.html" in my browser, i try linking it to
> > "welcome.php" through the hyperlink i created. But the result i got was
> >
> > "Welcome, !"
>
> "Welcome, Andy!" ;-)
Now it appears as wanted.

CU
Thorsten
--
Thorsten Körner http://www.123tkShop.org

attached mail follows:


preg_matchtry without backslashes.

$pattern = "/$search/i";
if (preg_match ($pattern, $date[$i]))
{
    echo "$date[$i]<br />";
}

you don't need the .*? in your regex (either * or ? multiplier) as preg_match searches for any occurance (not from begin ^ or to end $).

ciao SVEN
  "Aaron Axelsen" <axelseaaamadmax.com> schrieb im Newsbeitrag news:000101c336ea$3efd9840$6400a8c0DELTA...
  -----BEGIN PGP SIGNED MESSAGE-----
  Hash: SHA1

  I am trying to code a search, and i need to get my matching
  expression to work right. The user can enter a value swhich is
  stored in the vraible $search.

  What the below loop needs to do, is search each entry of the array
  for any occurance of the $search string. If i hard code in the
  string it works, but not when passed as a varaible. Is there
  something I am missing? Do i need to convert the $search variable to
  soetmhing?

          if (preg_match ("/.*?\\\$search.*?/i",$date[$i])) {
                  print "$date[$i]<br>";
          }

  - ---
  Aaron Axelsen
  AIM: AAAK2
  Email: axelseaaamadmax.com

  Want reliable web hosting at affordable prices?
  www.modevia.com

  Web Dev/Design Community/Zine
  www.developercube.com

  -----BEGIN PGP SIGNATURE-----
  Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

  iQA/AwUBPvKWA7rnDjSLw9ADEQIfGQCgwAO5ikh/RIN5OXoVkC8F4FH/YAoAoJE5
  zMxHkRssHbU2Vm4svv2hId8O
  =DJOi
  -----END PGP SIGNATURE-----

attached mail follows:


 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks,

I weas reading on the php website under the preg_match functino and
people were saying that you had to excape the $ so that iw ould be
evaluated right. That's what got me confused.

- ---
Aaron Axelsen
AIM: AAAK2
Email: axelseaaamadmax.com

Want reliable web hosting at affordable prices?
www.modevia.com
 
Web Dev/Design Community/Zine
www.developercube.com

- -----Original Message-----
From: sven [mailto:sveniegmx.li]
Sent: Friday, June 20, 2003 4:31 AM
To: php-generallists.php.net
Subject: [PHP] Re: preg_match

preg_matchtry without backslashes.

$pattern = "/$search/i";
if (preg_match ($pattern, $date[$i]))
{
    echo "$date[$i]<br />";
}

you don't need the .*? in your regex (either * or ? multiplier) as
preg_match searches for any occurance (not from begin ^ or to end $).

ciao SVEN
  "Aaron Axelsen" <axelseaaamadmax.com> schrieb im Newsbeitrag
news:000101c336ea$3efd9840$6400a8c0DELTA...
  -----BEGIN PGP SIGNED MESSAGE-----
  Hash: SHA1

  I am trying to code a search, and i need to get my matching
  expression to work right. The user can enter a value swhich is
  stored in the vraible $search.

  What the below loop needs to do, is search each entry of the array
  for any occurance of the $search string. If i hard code in the
  string it works, but not when passed as a varaible. Is there
  something I am missing? Do i need to convert the $search variable
to
  soetmhing?

          if (preg_match ("/.*?\\\$search.*?/i",$date[$i])) {
                  print "$date[$i]<br>";
          }

  - ---
  Aaron Axelsen
  AIM: AAAK2
  Email: axelseaaamadmax.com

  Want reliable web hosting at affordable prices?
  www.modevia.com

  Web Dev/Design Community/Zine
  www.developercube.com

  -----BEGIN PGP SIGNATURE-----
  Version: PGPfreeware 7.0.3 for non-commercial use
<http://www.pgp.com>

  iQA/AwUBPvKWA7rnDjSLw9ADEQIfGQCgwAO5ikh/RIN5OXoVkC8F4FH/YAoAoJE5
  zMxHkRssHbU2Vm4svv2hId8O
  =DJOi
  -----END PGP SIGNATURE-----

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPvM3FrrnDjSLw9ADEQLSSQCgp9Fmuoyn1LEkAA2vhcAsbXdsoKMAnjXd
VSnoMXvBNIzW4BmJdk7Ki8rt
=aWuk
-----END PGP SIGNATURE-----

attached mail follows:


On Thu, 19 Jun 2003 13:21:07 +0200, Daniel wrote:

> Okay, I think I'll have to kill myself...

> I can't believe I am this stupid, but it turned out I was working on a copy
> of the file, not the real one. D'OH!!!

> Sorry, guys!

> Daniel

That's no reason not to kill M$...

+a
Steve
--
Steve Mansfield-Devine
Aéro-club d'Andaines - LFAO - Bagnoles de l'Orne (Couterne)
http://www.webvivant.com/aero-andaines

attached mail follows:


LOL =)

"Steve M" <steve.mwanadoo.fr> wrote in message
news:11prpoj5e03r6$.sswq1ul7txpz$.dlg40tude.net...
> On Thu, 19 Jun 2003 13:21:07 +0200, Daniel wrote:
>
> > Okay, I think I'll have to kill myself...
>
> > I can't believe I am this stupid, but it turned out I was working on a
copy
> > of the file, not the real one. D'OH!!!
>
> > Sorry, guys!
>
> > Daniel
>
> That's no reason not to kill M$...
>
> +a
> Steve
> --
> Steve Mansfield-Devine
> Aéro-club d'Andaines - LFAO - Bagnoles de l'Orne (Couterne)
> http://www.webvivant.com/aero-andaines

attached mail follows:


Hello,

This is a reply to an e-mail that you wrote on Fri, 20 Jun 2003 at 01:40,
lines prefixed by '>' were originally written by you.
> Hi,
> safe mode on and mass mailing wished. I know that it's not possible to
> set
> the time limit, when safe mode is on. Sure mass mailing using mail
> function
> takes longer than default execution time of the script. My codes
> should be
> portable, that why modification of php.ini is not an option. The users
> shouldn't be experinced and authorized to do this. In brief, I have to
> find
> a solution without a need to work in shell.
> So, due to my theoratical knowledge it seems to be a solution, to
> queue the
> mails to sendmail by using popen. Is it true? Or what could be your
> suggestion for this issue.
> Thanks in advance,
> Senih

You could only send a certain amount of e-mails on each execution and use
a meta-refresh to continually call the script. I do this on one site and
also display a progress bar that updates on each refresh which is a bit
better for the end user rather than have them staring at nothing until
eventually all the mails have sent.

All the best,

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

          Professional Web Development by David Nicholson
                    http://www.djnicholson.com/

    QuizSender.com - How well do your friends actually know you?
                     http://www.quizsender.com/
                    (developed entirely in PHP)

attached mail follows:


On Thu, 2003-06-19 at 20:19, Mark Tehara wrote:
> <?php
>
> $myimage="..//..//site//images//2.jpg";
>
> header("Content-type: image/jpeg");
> fopen ("$myimage", "r");
> readfile("$myimage") ;
> fclose("$myimage");
>
> ?>
>
> This seemed to do the trick for me. Thank you.
>
> / Mark

Even better, you don't even need the fopen() and fclose() calls;
readfile() is doing this with just the filename.

  http://www.php.net/readfile

--
 Torben Wilson <torbenphp.net> +1.604.709.0506
 http://www.thebuttlesschaps.com http://www.inflatableeye.com
 http://www.hybrid17.com http://www.themainonmain.com
 -----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----

attached mail follows:


Ahh, the Docs don't tell you that.

They are a little weard wehen it comes to that ....

----- Original Message -----
From: "Lars Torben Wilson" <torbenphp.net>
To: "Mark Tehara" <mephilipsdomain.com>
Cc: "PHP" <php-generallists.php.net>
Sent: Friday, June 20, 2003 10:53 PM
Subject: Re: [PHP] [Newman] Passing an image through a php file.

> On Thu, 2003-06-19 at 20:19, Mark Tehara wrote:
> > <?php
> >
> > $myimage="..//..//site//images//2.jpg";
> >
> > header("Content-type: image/jpeg");
> > fopen ("$myimage", "r");
> > readfile("$myimage") ;
> > fclose("$myimage");
> >
> > ?>
> >
> > This seemed to do the trick for me. Thank you.
> >
> > / Mark
>
> Even better, you don't even need the fopen() and fclose() calls;
> readfile() is doing this with just the filename.
>
> http://www.php.net/readfile
>
>
> --
> Torben Wilson <torbenphp.net> +1.604.709.0506
> http://www.thebuttlesschaps.com http://www.inflatableeye.com
> http://www.hybrid17.com http://www.themainonmain.com
> -----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


On Fri, 2003-06-20 at 12:07, Mark Tehara wrote:
> Ahh, the Docs don't tell you that.
>
> They are a little weard wehen it comes to that ....

How so?

int readfile ( string filename [, bool use_include_path [, resource
context]])

It does say 'filename', not 'resource'. Seems pretty unequivocal.
However, if there is something wrong with the presentation or if you
have suggestions for improvements, I can take a look at it for you.

--
 Torben Wilson <torbenphp.net> +1.604.709.0506
 http://www.thebuttlesschaps.com http://www.inflatableeye.com
 http://www.hybrid17.com http://www.themainonmain.com
 -----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----

attached mail follows:


Dear Members

How to Synchronize two MYSQL databases in php

Thanks
khuram noman

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

attached mail follows:


khuram noman wrote:
> Dear Members
>
> How to Synchronize two MYSQL databases in php
>
> Thanks
> khuram noman

Don't use PHP, just use the replication that's already built into MySQL.

--
---John Holmes...

Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

PHP|Architect: A magazine for PHP Professionals – www.phparch.com

attached mail follows:


Khuram Noman wrote:
> Dear Members
>
> How to Synchronize two MYSQL databases in php
>
> Thanks
> khuram noman
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com

Hello

as usual there are a few ways to do tackle this job.
My preference is to stop mysql and use rsync to transfer the data , then
  restart it. Mysql4+ supports clustering also.

If you do not stop mysql while u do the sync you risk a corruption of
copied data.

See man rsync and mysql.com for details of each way.

The clustering seems like allot of work to me , it depends how up to
date you need to keep

Cheers

Neil

attached mail follows:


 From Paul Dubois's MySQL book:

"If you are dumping a database so that you can transfer the database to
another server:
(on the unix command line or in a shell script)

% mysqladmin -h boa.snake.net create samp_db
% mysqldump samp_db | mysql -h boa.snake.net samp_db"

the first command obviously creates the db, the second dumps the data
to it. You can also take the update log which records deletes, inserts,
updates, etc. as SQL statements, and pipe those to another MySQL server
in a similar manner.

HTH

Jim McNeely
Envision Data
Custom, intuitive, practical software for your business.
jimenvisiondata.com
http://www.envisiondata.com

On Friday, June 20, 2003, at 07:00 AM, John W. Holmes wrote:

> khuram noman wrote:
>> Dear Members
>> How to Synchronize two MYSQL databases in php
>> Thanks
>> khuram noman
>
> Don't use PHP, just use the replication that's already built into
> MySQL.
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals – www.phparch.com
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Slkigh Ammendment to below
<?php
header("Location: https://www.google.com") ;
die;
?>

Jake Johnson wrote:
> Have you tried...
> <?php
> header("Location: https://www.google.com") ;
> ?>
>
> Regards,
> Jake Johnson
> jakeplutoid.com
>
> ------------------------------------------------------------------
> Plutoid - http://www.plutoid.com
> Shop Plutoid for the best prices on Rims and Car Audio Products
>
>
> On Tue, 17 Jun 2003, Jeff Means wrote:
>
>
>>How do I force IE to update the location bar when I do a forced redirect??
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>

attached mail follows:


hi folks,

I just realised that open_basedir also prevents the access to /tmp.
Thus, file uploads aren't possible.

One solution would be, to use a tmp directory within open_basedir, to
give PHP the required write access.

But assume you're using a server with multiple VirtualHosts and
www-dirs. You use open_basedir to limit the access of every script
running in a specific VirtualHost/www-dir to its proper www-dir.

Now you would have to create a .../tmp directory for each single
www-dir, which is not very pretty.

Would it be possible to limit access to open_basedir without the
exception of /tmp, to allow the uploads?

/dorgon

attached mail follows:


At 15:03 20.06.2003, dorgon said:
--------------------[snip]--------------------
>Would it be possible to limit access to open_basedir without the
>exception of /tmp, to allow the uploads?
--------------------[snip]--------------------

You (or your server admin) should add /tmp to the allowed directories:

open_basedir = /tmp:/www/yourvirtualhost

This should give you access to both trees.

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

attached mail follows:


Hi!

    I have been looking around on the website and haven't found what I'm
looking for. What I am looking for is instruction on what software do I
need on the machine, environment variables, etc. and the instruction on the
compiling of the php as cgi executable for win32.

Thanks,
 Scott

attached mail follows:


I am having a problem when i use an include file to include database
connectivity, however if i cut and paste the code out of the include and
place it directly into the .php file it works. I am not sure how to figure
this problem out.
<=================== error:
Warning: Cannot modify header information - headers already sent by (output
started at c:\inetpub\wwwroot\PHP\includes\db_conn.inc:1) in
c:\inetpub\wwwroot\PHP\login_action.php on line 29
<=================== main page
<?
session_start();
include("includes\db_conn.inc");
if(!isset($HTTP_POST_VARS['login']))
 echo "end in if 1";
else if(empty($HTTP_POST_VARS['login']))
 echo "end in if 2";
else
 $login = $HTTP_POST_VARS['login'];

if(!isset($HTTP_POST_VARS['pw']))
 echo "end in if 3";
else if(empty($HTTP_POST_VARS['pw']))
 echo "end in if 4";
else
 $pw = $HTTP_POST_VARS['pw'];

$strSQL = "SELECT * FROM [Login] WHERE [Login] = '".$login."' AND pw =
'".$pw."'";
$rs = $conn->execute($strSQL);
if(!$rs->EOF)
{
 $_SESSION = "TRUE";
 $out = "admin_menu.php";
}
else
 $out = "login.php?err=error";
header("Location: ".$out);
?>
<=================== include
  <?
  $conn = new COM("ADODB.Connection");
  $strConn = "DRIVER={Microsoft Access Driver (*.mdb)};
DBQ=C:\Inetpub\wwwroot\PHP\data\Registration.mdb";
  $conn->open($strConn);
  ?>
<=================== include
Thanks in advance,
~Logan

begin 666 db_conn.inc
M(" \/PT*(" D8V]N;B ](&YE=R!#3TTH(D%$3T1"+D-O;FYE8W1I;VXB*3L-
M"B )'-T<D-O;FX/2 B1%))5D52/7M-:6-R;W-O9G006-C97-S($1R:79E
M<B H*BYM9&(I?3L1$)1/4,Z7$EN971P=6)<=W=W<F]O=%Q02%!<9&%T85Q2
M96=I<W1R871I;VXN;61B(CL#0H("1C;VYN+3YO<&5N*"1S=')#;VYN*3L-
%"B /SX`
`
end

begin 666 login_action.php
M/#\-"G-E<W-I;VY?<W1A<G0H*3L-"FEN8VQU9&4H(FEN8VQU9&5S7&1B7V-O
M;FXN:6YC(BD[#0II9BA:7-S970H)$A45%!?4$]35%]605)36R=L;V=I;B==
M*2D-"EE8VAO(")E;F0:6X:68,2([#0IE;'-E(&EF*&5M<'1Y*"1(5%10
M7U!/4U1?5D%24ULG;&]G:6XG72DI#0H)96-H;R B96YD(&EN(&EF(#(B.PT*
M96QS90T*"21L;V=I;B ]("1(5%107U!/4U1?5D%24ULG;&]G:6XG73L-"T*
M:68H(6ES<V5T*"1(5%107U!/4U1?5D%24ULG<'<G72DI#0H)96-H;R B96YD
M(&EN(&EF(#,B.PT*96QS92!I9BAE;7!T>2D2%144%]03U-47U9!4E-;)W!W
M)UTI*0T*"65C:&\(F5N9"!I;B!I9B T(CL-"F5L<V4-"DD<'</2 D2%14
M4%]03U-47U9!4E-;)W!W)UT[#0HD<W1R4U%,(#T(E-%3$5#5" J($923TT
M6TQO9VEN72!72$5212!;3&]G:6Y=(#T)R(N)&QO9VEN+B(G($%.1"!P=R ]
M("<B+B1P=RXB)R([#0HD<G,/2 D8V]N;BT^97AE8W5T92D<W1R4U%,*3L-
M"FEF*"$D<G,M/D5/1BD-"GL-"DD7U-%4U-)3TX/2 B5%)512([#0H))&]U
M=" ](")A9&UI;E]M96YU+G!H<"([#0I]#0IE;'-E#0H))&]U=" ](")L;V=I
M;BYP:' _97)R/65R<F]R(CL-"FAE861E<BB3&]C871I;VXZ("(N)&]U="D[
$#0H_/``
`
end

attached mail follows:


The problem does not appear to be database related, it appears to header
related. You are trying to send header information after sending regular
output. You can't do this:

<?php
echo 'blah blah';
header("Location: ".$out);
?>

BUT you can do this:

<?php
$some_text = my_function();
if ($some_text) echo $some_text;
else header("Location: ".$out);

function my_function() {
  // some code goes here
  if ($something) return $some_text;
  return;
} // end my_function()
?>

Try looking at line 29. that's the line where you are trying to output a
header after outputing some text.

Henning Sittler
www.inscriber.com

-----Original Message-----
From: Logan McKinley [mailto:loganglobalweb.net]
Sent: Friday, June 20, 2003 10:04 AM
To: php-generallists.php.net
Subject: [PHP] Cannot modify header information - headers already sent

I am having a problem when i use an include file to include database
connectivity, however if i cut and paste the code out of the include and
place it directly into the .php file it works. I am not sure how to figure
this problem out.
<=================== error:
Warning: Cannot modify header information - headers already sent by (output
started at c:\inetpub\wwwroot\PHP\includes\db_conn.inc:1) in
c:\inetpub\wwwroot\PHP\login_action.php on line 29
<=================== main page
<?
session_start();
include("includes\db_conn.inc");
if(!isset($HTTP_POST_VARS['login']))
 echo "end in if 1";
else if(empty($HTTP_POST_VARS['login']))
 echo "end in if 2";
else
 $login = $HTTP_POST_VARS['login'];

if(!isset($HTTP_POST_VARS['pw']))
 echo "end in if 3";
else if(empty($HTTP_POST_VARS['pw']))
 echo "end in if 4";
else
 $pw = $HTTP_POST_VARS['pw'];

$strSQL = "SELECT * FROM [Login] WHERE [Login] = '".$login."' AND pw =
'".$pw."'";
$rs = $conn->execute($strSQL);
if(!$rs->EOF)
{
 $_SESSION = "TRUE";
 $out = "admin_menu.php";
}
else
 $out = "login.php?err=error";
header("Location: ".$out);
?>
<=================== include
  <?
  $conn = new COM("ADODB.Connection");
  $strConn = "DRIVER={Microsoft Access Driver (*.mdb)};
DBQ=C:\Inetpub\wwwroot\PHP\data\Registration.mdb";
  $conn->open($strConn);
  ?>
<=================== include
Thanks in advance,
~Logan

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

attached mail follows:


Hi Peolpe!

I'm trying to call a Servlet Java from PHP and it doesn't works..

I tried CURL, but no works, I tried put code Java inside PHP, but no works
too.

Does Somebody can give a light?

Thanks
Max

attached mail follows:


[snip]
I'm trying to call a Servlet Java from PHP and it doesn't works..

I tried CURL, but no works, I tried put code Java inside PHP, but no
works
too.

Does Somebody can give a light?
[/snip]

Can you show us the code?

Jay

attached mail follows:


I am building a two page search feature. The user fills out page one, that
takes them to page two. Then from page two they get the results page from
the search. If the user hits the back button in their browser I want them
to go back to page one, NOT page two.

Is the some way I can make page two cache clear, so when the user hits the
back up button the page has to be reload from the server at which point I
can forward them back to page one.

Thanks,
Mark.

attached mail follows:


 On Jun 20, 2003, "Mark McCulligh" claimed that:

|I am building a two page search feature. The user fills out page one, that
|takes them to page two. Then from page two they get the results page from
|the search. If the user hits the back button in their browser I want them
|to go back to page one, NOT page two.
|
|Is the some way I can make page two cache clear, so when the user hits the
|back up button the page has to be reload from the server at which point I
|can forward them back to page one.
|
|Thanks,
|Mark.

The problem isn't "how do I clear the cache for page 2," it's really "how
do I allow for people to press the back button on the results page and go
back to page 1."

So, why not create a link <a href='page1.php'>Change search criteria</a>?

Or, you can also insert a session variable on the results page. Page 2
will check for the existance of it. If it exists, clear it and bounce the
user to page 1.

Jeff
--
Registered Linux user #304026.
"lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED
Responses to this message should conform to RFC 1855.

attached mail follows:


I can't just create a link on the last page back to the first page. Because
if the user hits the back button on the browser they end up on page 2.
Which can't happen. Once you are on the last page the user can't by anyway
get back to page 2, unless they start over on page 1.

What I am planning on doing is passing the variables using the POST method.
Then have a hidden variable pass with the pages. If this hidden variable is
missing then redirect the user back to page 1. Thus if I can get page 2 to
be cleared from the browsers cache after it has been displayed, if the user
came back to this page using the back button the page will be reload from
the server because it is not in cache, there for my code will not find the
hidden variable and redirect the user back to page 1.

I think the theory of this will work ok, but I don't know how to clear a
page from the browsers cache after it is displayed.

Thanks,
Mark.

"Jeff Harris" <jharrisrallycentral.us> wrote in message
news:Pine.LNX.4.44.0306200907390.7604-100000www.rallycentral.us...
> On Jun 20, 2003, "Mark McCulligh" claimed that:
>
> |I am building a two page search feature. The user fills out page one,
that
> |takes them to page two. Then from page two they get the results page from
> |the search. If the user hits the back button in their browser I want
them
> |to go back to page one, NOT page two.
> |
> |Is the some way I can make page two cache clear, so when the user hits
the
> |back up button the page has to be reload from the server at which point I
> |can forward them back to page one.
> |
> |Thanks,
> |Mark.
>
> The problem isn't "how do I clear the cache for page 2," it's really "how
> do I allow for people to press the back button on the results page and go
> back to page 1."
>
> So, why not create a link <a href='page1.php'>Change search criteria</a>?
>
> Or, you can also insert a session variable on the results page. Page 2
> will check for the existance of it. If it exists, clear it and bounce the
> user to page 1.
>
> Jeff
> --
> Registered Linux user #304026.
> "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import"
> Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED
> Responses to this message should conform to RFC 1855.
>
>
>

attached mail follows:


----- Original Message -----
From: "Mark McCulligh" <mmccullisykescanada.com>
To: <php-generallists.php.net>
Sent: Friday, June 20, 2003 11:44 AM
Subject: Re: [PHP] clearing cache

> I can't just create a link on the last page back to the first page.
Because
> if the user hits the back button on the browser they end up on page 2.
> Which can't happen. Once you are on the last page the user can't by
anyway
> get back to page 2, unless they start over on page 1.
>
> What I am planning on doing is passing the variables using the POST
method.
> Then have a hidden variable pass with the pages. If this hidden variable
is
> missing then redirect the user back to page 1. Thus if I can get page 2
to
> be cleared from the browsers cache after it has been displayed, if the
user
> came back to this page using the back button the page will be reload from
> the server because it is not in cache, there for my code will not find the
> hidden variable and redirect the user back to page 1.
>
> I think the theory of this will work ok, but I don't know how to clear a
> page from the browsers cache after it is displayed.
>
> Thanks,
> Mark.

[SNIP]

Mark, this is kind of a lame hack but give it a try...

/** PAGE A (first form) **/
<?
session_start();
if (isset($_POST['submit'])) {
 header("Location: test3.php");
 exit;
}
?>

/** PAGE B (second form) **/
<?
session_start();
if ($_SESSION['startover']) {
 $_SESSION['startover'] = false;
 header("Location: test2.php");
 exit;
}

if (isset($_POST['submit'])) {
 header("Location: test4.php");
 exit;
}
?>

/** PAGE C (results page) **/
<?
session_start();
$_SESSION['startover'] = true;
?>

The idea is to keep a "startover" variable in the session. The variable is
set when you reach Page C (the results page). When the user hits the back
button the variable is tested on Page B for true or false. If it's true
header() redirect back to Page A. Otherwise it prints and/or validates the
form on Page B.

Why header() redirect between each page? Becuase it overwrites the post
data allowing you to use your back button without a repost. This results in
a much cleaner more controlable user interface. If you need to pass form
data between forms then simply store the post data in the Session and
extract it on the next page.

If I'm right, what you're going to see in the browser's back button history
using this method is a single instance of PAGE A repeated for each cycle.

Good luck with this.

HTH,
Kevin

attached mail follows:


I'm having a problem configuring my web server to redirect 404 errors to
a custom error page. It almost looks like the PHP parser is getting hold
of the request before apache has checked to see if the file exists.

It works fine if you request an unknown page on the server that isn't
a PHP script, but fails if it is.

Examples:

http://www.jeamland.org/blah.htm
        Displays the custom error page
        Logs: [Fri Jun 20 14:25:51 2003] [error] [client X.X.X.X]
                File does not exist:
                /spool/web/www.jeamland.org/html/blah.htm

http://www.jeamland.org/blah.html (or blah.php)
        Displays a browser generated 404 error page
        Logs: [client 194.72.110.12] script not found or unable to stat

Here's most of my virtualhost configuration, any thoughts appreciated!

Thanks,

Andy

<VirtualHost *:80>
        ServerName www.jeamland.org
        DocumentRoot /spool/web/www.jeamland.org/html

        php_value include_path ".:/opt/php/lib/php"
        php_value auto_prepend_file none
        php_value auto_append_file none

        ErrorDocument 404 /_error.html

        <Directory /spool/web/www.jeamland.org/html>
                AddType application/x-httpd-php .html
                php_value include_path ".:/spool/web/www.jeamland.org/lib"
                php_value auto_prepend_file header.php
                php_value auto_append_file footer.php
        </Directory>
</VirtualHost>

attached mail follows:


On Fri, 20 Jun 2003 15:08:39 GMT, phpfiddaman.net wrote:

> <Directory /spool/web/www.jeamland.org/html>
> AddType application/x-httpd-php .html
> php_value include_path ".:/spool/web/www.jeamland.org/lib"
> php_value auto_prepend_file header.php
> php_value auto_append_file footer.php
> </Directory>

Just a guess, but... you always have a file in that directory. It looks
somehting like this:

<?PHP
  
  include "header.php";

?>
...FILE_NOT_FOUND....
<?PHP
  
  include "footer.php";

?>

Try it without the:

> php_value auto_prepend_file header.php
> php_value auto_append_file footer.php

attached mail follows:


On Fri, 20 Jun 2003 10:15:43 -0500, Wendell Brown wrote:

>Try it without the:
>
>> php_value auto_prepend_file header.php
>> php_value auto_append_file footer.php

Or check for the existence of the requested file in the header and if
not found, send the 302 header with a forward to your custom page.

If you don't know what the header is supposed to look like, grab a copy
of SamSpade (http://www.samspade.org/ssw/) and use it to view the
headers of a page that is forwarding correctly. BTW, it's FREE!!!!

attached mail follows:


On Fri, 20 Jun 2003 10:34:04 -0500, Wendell Brown wrote:

>>> php_value auto_prepend_file header.php
>>> php_value auto_append_file footer.php

Andy, I've tried the following (with my server info, of course) in one
of my directories and it works like a champ! It doesn't matter if it's
php, htm or html!

----- .htaccess ------

AddType application/x-httpd-php .html
php_value auto_prepend_file
"/spool/web/www.jeamland.org/html/header.php"
php_value auto_append_file
"/spool/web/www.jeamland.org/html/footer.php"

ErrorDocument 404 http://www.jeamland.org/_error.html

attached mail follows:


: ErrorDocument 404 http://www.jeamland.org/_error.html

Yep, it does seem to work if I put the whole URL in the ErrorDocument
directive rather than just /_error.html !
Unfortunately, that makes the web server snd a redirect which isn't exactly
what I want (unless you know of a way to get at the originally requested URL
?)

: Or check for the existence of the requested file in the header and if
: not found, send the 302 header with a forward to your custom page.

I'm not entirely sure that the header is actually being run..
If I move the header out of the way, I don't get any errors about it:

>> Browse to www.jeamland.org with header.php removed <<

 [client X.X.X.X] PHP Warning: Unknown(header.php): failed to open stream:
No such file or directory in Unknown on line 0
[client X.X.X.X] PHP Warning: (null)(): Failed opening 'header.php' for
inclusion (include_path='.:/spool/web/www.jeamland.org/lib') in Unknown on
line 0

>> Now browse to www.jeamland.org/bob.html <<
[client X.X.X.X] script not found or unable to stat

What seems to be happening is that apache is seeing the request for a .html
file and calling PHP which is returning a set of 404 headers.. For some
reason, apache isn't testing for the existence of the file first. I've no
idea if this is a PHP or apache problem but hopefully there's a way to work
around it

Thanks for the very rapid response!

Andy

attached mail follows:


Can anyone point me to some sample code for uploading and later retrieving PDFs
or other binary files into an Oracle BLOB field? I've been searching for some
time and haven't been able to come up with anything. It looks like there's
new LOB functions for OCI but they aren't documented at all on the PHP site.
Does anyone have a good tutorial or sample code on doing something like this.
Thanks in advance for any assistance.

Mike Champagne
mchampagnecapis.com

******************************************************************
This communication is for informational purposes only. It is not
intended as an offer or solicitation for the purchase or sale of
any financial instrument or as an official confirmation of any
transaction, unless specifically agreed otherwise. All market
prices, data and other information are not warranted as to
completeness or accuracy and are subject to change without
notice. Any comments or statements made herein do not
necessarily reflect the views or opinions of Capital Institutional
Services, Inc. Capital Institutional Services, Inc. accepts no
liability for any errors or omissions arising as a result of
transmission. Use of this communication by other than intended
recipients is prohibited.
******************************************************************

attached mail follows:


Hi there!

I have a weired problem with a 4.12 php version on win2k.

When i mail more then one email i often have the problem that the mail
reaches their recipient but the subject and from does not work properly,
instead this
is on top of the email. but strangely sometimes it just works normal.

does someone know the reason for such "empty subject" mails?

- Johannes

attached mail follows:


Hello,

This is a reply to an e-mail that you wrote on Fri, 20 Jun 2003 at 16:40,
lines prefixed by '>' were originally written by you.
> Hi there!
> I have a weired problem with a 4.12 php version on win2k.
> When i mail more then one email i often have the problem that the mail
> reaches their recipient but the subject and from does not work
> properly,
> instead this
> is on top of the email. but strangely sometimes it just works normal.
> does someone know the reason for such "empty subject" mails?
> - Johannes

When you call the mail() function are you using the headers parameter, if
so have you accidentally put a double newline in your headers, if so this
would cause all of the headers below the double newline to appear in the
body.

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

          Professional Web Development by David Nicholson
                    http://www.djnicholson.com/

    QuizSender.com - How well do your friends actually know you?
                     http://www.quizsender.com/
                    (developed entirely in PHP)

attached mail follows:


Hello,

This is a reply to an e-mail that you wrote on Fri, 20 Jun 2003 at 17:44,
lines prefixed by '>' were originally written by you.
> Hi!
> I guess i do not make any weired things, the configuration looks like
> this:
> mail("$mail",
> "$message",
> "From: "foofoo.foo"<foofoo.foo>");

Looks like you are passing the parameters in the wrong order, it should
be:
mail("toaddress.com","subject","message","From: Yourname
<youaddress.com>");

Read this for more info:
http://uk.php.net/manual/en/function.mail.php

HTH

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/

          Professional Web Development by David Nicholson
                    http://www.djnicholson.com/

    QuizSender.com - How well do your friends actually know you?
                     http://www.quizsender.com/
                    (developed entirely in PHP)

attached mail follows:


Hello,

On 06/20/2003 12:39 PM, Johannes Reichardt wrote:
> I have a weired problem with a 4.12 php version on win2k.
>
> When i mail more then one email i often have the problem that the mail
> reaches their recipient but the subject and from does not work properly,
> instead this
> is on top of the email. but strangely sometimes it just works normal.
>
> does someone know the reason for such "empty subject" mails?

That looks like of one of those bugs of the mail() function. You may
want to try this class that comes with work arounds for those bugs:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

attached mail follows:


I have a input field in a form that is disabled by javascript but is assigned a value in the code that is the RFC 822 formated date. Why is this field not included in the $HTTP_POST_VARS?

Here is the page I am talking about:
http://babich.us/xlog/post.php

When the page is submitted all other values are passed except the date/time value, why? How do I fix it?

Thanks,
--
Kyle

attached mail follows:


Nothing passes when it is disabled via HTML either.

> just for shits and giggles, why not manually disable the field without using
> javascript and see what happens. just add the word "disabled" to the tag.
> <input disabled type='text' name="date" value="">
>
> >From: "Kyle Babich" <kylerunbox.com>
> >Reply-To: kylerunbox.com
> >To: php-generallists.php.net
> >Subject: [PHP] Passing Date/Time
> >Date: Fri, 20 Jun 2003 16:55:29 GMT
> >
> >I have a input field in a form that is disabled by javascript but is
> >assigned a value in the code that is the RFC 822 formated date. Why is
> >this field not included in the $HTTP_POST_VARS?
> >
> >Here is the page I am talking about:
> >http://babich.us/xlog/post.php
> >
> >When the page is submitted all other values are passed except the date/time
> >value, why? How do I fix it?
> >
> >Thanks,
> >--
> >Kyle
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> _________________________________________________________________
> The new MSN 8: advanced junk mail protection and 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
>

attached mail follows:


That works, thanks.

> Try setting that date as a type="hidden" value instead. Do a
> print_r($_POST) at the other end to see what comes up!
>
> -Michael
> On Fri, 2003-06-20 at 08:55, Kyle Babich wrote:
> > I have a input field in a form that is disabled by javascript but is assigned a value in the code that is the RFC 822 formated date. Why is this field not included in the $HTTP_POST_VARS?
> >
> > Here is the page I am talking about:
> > http://babich.us/xlog/post.php
> >
> > When the page is submitted all other values are passed except the date/time value, why? How do I fix it?
> >
> > Thanks,
> > --
> > Kyle
> >
>
>

attached mail follows:


I'm using PHP's odbc_ functions to access an Access database, and I'm
concerned about security. Do you folks have any recommendations on the best
ways to sanitize my SQL queries?

I've read plenty about what characters I should strip from SQL queries that
use user input, namely " , / \ * & ( ) $ % ^ ~ ´ ?

Does PHP require anything more?

--
Jeff S.

attached mail follows:


On 19-Jun-2003 Steve Keller wrote:
> At 6/19/2003 02:10 PM, Sparky Kopetzky wrote:
>
> > 2. How do you put 2 items that you want to save in the cookie and
> retrieve??
>
> Smuch 'em together into a single variable with a delimiter you're sure
> won't show up in either value, something like "##", between them. Then,
> when you read the cookie value in, just explode it by your delimiter.
>

setcookie (twovar, serialize(array($var1, $var2)), ...);

...

list($var1, $var2) = unserialize($_COOKIE['twovar']);

Regards,
--
Don Read dreadtexas.net
-- It's always darkest before the dawn. So if you are going to
   steal the neighbor's newspaper, that's the time to do it.
                            (53kr33t w0rdz: sql table query)

attached mail follows:


Anyone know why $HTTP_SESSION_VARS['var'] and
$HTTP_SESSION_VARS[vararray][var1] both contain values with register_globals
ON, but only $HTTP_SESSION_VARS[vararray][var1] contains values if
register_globals is OFF?

attached mail follows:


Hello. I am making an online database of my wines that I want my friends to
be able to edit. The page below displays the wines. I want the fields in
text boxes so later they can be easily edited. However, the text boxes only
display the first word of the field from the database. For example, in the
Name text box, let's say the wine's name is Norton Malbec, it only displays
Norton. Does anyone know how to fix this?

thanks very much
Matt Hedges

<?php

$db = mysql_connect("host", "username", "pw")
 or die ("The Database is momentarily down. Sorry for the delay.");
mysql_select_db("username",$db);

    $sql = "SELECT * FROM wines WHERE id='1'";
    $result = mysql_query($sql);

echo "<b><u><font face=verdana>Wines in Database</font></b></u>:<p>\n";
echo "<table border=1 bgcolor=white valign=top cellspacing=2
cellpadding=2>\n";

while ($row = mysql_fetch_array($result))
 {
   extract($row);
     echo "<tr bgcolor=3399cc>\n
           <td><input type=text name=US value=$US></td>\n
           <td><input type=text name=Bodega value=$Bodega></td>\n
           <td><input type=text name=Name value=$Name></td>\n
           <td><input type=text name=Grape value=$Grape></td>\n
           <td><input type=text name=Year value=$Year></td>\n
           <td><input type=text name=Region value=$Region></td>\n
           <td><input type=text name=SubRegion value=$SubRegion></td>\n
           </tr>\n";
  }
echo "</table>\n";

?>

--
___________________________
| Matt Hedges
| http://hedgesinnovations.com
|

attached mail follows:


Put quote's around name, I would suspect the space
is throwing off the value equals, example:

<td><input type=text name=Name value=\"$name\"></td>\n

On Fri, 2003-06-20 at 13:31, Matt Hedges wrote:
> Hello. I am making an online database of my wines that I want my friends to
> be able to edit. The page below displays the wines. I want the fields in
> text boxes so later they can be easily edited. However, the text boxes only
> display the first word of the field from the database. For example, in the
> Name text box, let's say the wine's name is Norton Malbec, it only displays
> Norton. Does anyone know how to fix this?
>
> thanks very much
> Matt Hedges
>
>
>
>
>
> <?php
>
> $db = mysql_connect("host", "username", "pw")
> or die ("The Database is momentarily down. Sorry for the delay.");
> mysql_select_db("username",$db);
>
> $sql = "SELECT * FROM wines WHERE id='1'";
> $result = mysql_query($sql);
>
> echo "<b><u><font face=verdana>Wines in Database</font></b></u>:<p>\n";
> echo "<table border=1 bgcolor=white valign=top cellspacing=2
> cellpadding=2>\n";
>
> while ($row = mysql_fetch_array($result))
> {
> extract($row);
> echo "<tr bgcolor=3399cc>\n
> <td><input type=text name=US value=$US></td>\n
> <td><input type=text name=Bodega value=$Bodega></td>\n
> <td><input type=text name=Name value=$Name></td>\n
> <td><input type=text name=Grape value=$Grape></td>\n
> <td><input type=text name=Year value=$Year></td>\n
> <td><input type=text name=Region value=$Region></td>\n
> <td><input type=text name=SubRegion value=$SubRegion></td>\n
> </tr>\n";
> }
> echo "</table>\n";
>
> ?>
>
>
>
>
>
>
>
> --
> ___________________________
> | Matt Hedges
> | http://hedgesinnovations.com
> |
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


On 20-Jun-2003 Matt Hedges wrote:
<snip>

> However, the text boxes
> only display the first word of the field from the database.

Quote your values.

<snipagain>

> <td><input type=text name=Name value=$Name></td>\n

             <td><input type=text name="Name" value="$Name"></td>

Regards,
--
Don Read dreadtexas.net
-- It's always darkest before the dawn. So if you are going to
   steal the neighbor's newspaper, that's the time to do it.
                          

attached mail follows:


Thanks!

"Matt Hedges" <matthedges.org> wrote in message
news:20030620173151.34951.qmailpb1.pair.com...
> Hello. I am making an online database of my wines that I want my friends
to
> be able to edit. The page below displays the wines. I want the fields in
> text boxes so later they can be easily edited. However, the text boxes
only
> display the first word of the field from the database. For example, in
the
> Name text box, let's say the wine's name is Norton Malbec, it only
displays
> Norton. Does anyone know how to fix this?
>
> thanks very much
> Matt Hedges
>
>
>
>
>
> <?php
>
> $db = mysql_connect("host", "username", "pw")
> or die ("The Database is momentarily down. Sorry for the delay.");
> mysql_select_db("username",$db);
>
> $sql = "SELECT * FROM wines WHERE id='1'";
> $result = mysql_query($sql);
>
> echo "<b><u><font face=verdana>Wines in Database</font></b></u>:<p>\n";
> echo "<table border=1 bgcolor=white valign=top cellspacing=2
> cellpadding=2>\n";
>
> while ($row = mysql_fetch_array($result))
> {
> extract($row);
> echo "<tr bgcolor=3399cc>\n
> <td><input type=text name=US value=$US></td>\n
> <td><input type=text name=Bodega value=$Bodega></td>\n
> <td><input type=text name=Name value=$Name></td>\n
> <td><input type=text name=Grape value=$Grape></td>\n
> <td><input type=text name=Year value=$Year></td>\n
> <td><input type=text name=Region value=$Region></td>\n
> <td><input type=text name=SubRegion value=$SubRegion></td>\n
> </tr>\n";
> }
> echo "</table>\n";
>
> ?>
>
>
>
>
>
>
>
> --
> ___________________________
> | Matt Hedges
> | http://hedgesinnovations.com
> |
>
>

attached mail follows:


Actually just putting a " around doesn't work because his
original echo uses those, so you have to escape them, like:

\"

On Fri, 2003-06-20 at 13:39, Don Read wrote:
> On 20-Jun-2003 Matt Hedges wrote:
> <snip>
>
> > However, the text boxes
> > only display the first word of the field from the database.
>
> Quote your values.
>
> <snipagain>
>
> > <td><input type=text name=Name value=$Name></td>\n
>
> <td><input type=text name="Name" value="$Name"></td>
>
> Regards,
> --
> Don Read dreadtexas.net
> -- It's always darkest before the dawn. So if you are going to
> steal the neighbor's newspaper, that's the time to do it.
>
--
Adam Voigt (adamcryptocomm.com)
Linux/Unix Network Administrator
The Cryptocomm Group

attached mail follows:


I work for a small networking company. We're working on a piece of
software that will be run server-side with PHP and MySQL. It allows the
user to develop an online store and handles all the complex shopping
cart stuff with ease. It is a port of an originally client-side
application. We would like to be able to hand out demo discs that do
not require the internet to try it out - having a standalone try-out
version is a big source of customers.

Is there any kind of standalone PHP/MySQL engine that could be
reasonably installed from a CD and run on most Windows machines? If
there was some method to compile the PHP into a binary or otherwise
protect it, it would be really good because our company would not be
too excited about handing out the near-complete source to our product
on all the demo discs. It would be nice if there was support for
non-Windows OSes, but Windows is by far the majority in market share
and the other OSes could easily just pop into an HTML document that
directs them to our online version.

Thanks,

Galen P. Zink

attached mail follows:


Well, having a solid product that people can look at offline has been a
major selling point in the past. The customers we cater to appreciate a
physical product. We could give them HTML that sends them online, but
we could just as easily give them a card with an URL on it and not
waste CD media for a 1K shortcut file. I can't confess to completely
understand these people who really want a local product for something
that must be uploaded to the internet in the end and is dependent on
our servers to handle checkout and order processing - it's just a
psychological thing, I guess.

I'm trying to investigate how hard it would be to get a demo product on
a CD that basically goes through an installer process and installs some
back end PHP/MySQL stuff so a demo can be run locally. What exactly
would be involved in compiling a PHP client with the source myself -
are there any existing products along these lines? It probably wouldn't
be practical to develop a whole project our selves, but if there was
something already out there, we might use it.

-Galen

On Friday, June 20, 2003, at 11:04 AM, Michael A Smith wrote:

> Why not have them all do that? HTML that re-directs? Other than taking
> the source, compiling yourself, or taking the pre-compiled windows
> binaries and including them, that's the only way.
>
> -Michael
> On Fri, 2003-06-20 at 09:57, Galen P. Zink wrote:
>> I work for a small networking company. We're working on a piece of
>> software that will be run server-side with PHP and MySQL. It allows
>> the
>> user to develop an online store and handles all the complex shopping
>> cart stuff with ease. It is a port of an originally client-side
>> application. We would like to be able to hand out demo discs that do
>> not require the internet to try it out - having a standalone try-out
>> version is a big source of customers.
>>
>> Is there any kind of standalone PHP/MySQL engine that could be
>> reasonably installed from a CD and run on most Windows machines? If
>> there was some method to compile the PHP into a binary or otherwise
>> protect it, it would be really good because our company would not be
>> too excited about handing out the near-complete source to our product
>> on all the demo discs. It would be nice if there was support for
>> non-Windows OSes, but Windows is by far the majority in market share
>> and the other OSes could easily just pop into an HTML document that
>> directs them to our online version.
>>
>> Thanks,
>>
>> Galen P. Zink
>>
>

attached mail follows:


On Fri, 2003-06-20 at 13:57, Galen P. Zink wrote:
> I work for a small networking company. We're working on a piece of
> software that will be run server-side with PHP and MySQL. It allows the
> user to develop an online store and handles all the complex shopping
> cart stuff with ease. It is a port of an originally client-side
> application. We would like to be able to hand out demo discs that do
> not require the internet to try it out - having a standalone try-out
> version is a big source of customers.
>
> Is there any kind of standalone PHP/MySQL engine that could be
> reasonably installed from a CD and run on most Windows machines? If
> there was some method to compile the PHP into a binary or otherwise
> protect it, it would be really good because our company would not be
> too excited about handing out the near-complete source to our product
> on all the demo discs. It would be nice if there was support for
> non-Windows OSes, but Windows is by far the majority in market share
> and the other OSes could easily just pop into an HTML document that
> directs them to our online version.
>

How about demoing the client app and saying there is also an on-line
version...??

attached mail follows:


[snip]
Is there any kind of standalone PHP/MySQL engine that could be
reasonably installed from a CD and run on most Windows machines?
[/snip]

Check out the PHP-GTK http://gtk.php.net/ . I am not sure if there is a
'portable' data source to go with it, but it sounds like what you'd want

Jay

attached mail follows:


On Friday, June 20, 2003, at 11:42 AM, Brian V Bonini wrote:

> On Fri, 2003-06-20 at 13:57, Galen P. Zink wrote:
>> I work for a small networking company. We're working on a piece of
>> software that will be run server-side with PHP and MySQL. It allows
>> the
>> user to develop an online store and handles all the complex shopping
>> cart stuff with ease. It is a port of an originally client-side
>> application. We would like to be able to hand out demo discs that do
>> not require the internet to try it out - having a standalone try-out
>> version is a big source of customers.
>>
>> Is there any kind of standalone PHP/MySQL engine that could be
>> reasonably installed from a CD and run on most Windows machines? If
>> there was some method to compile the PHP into a binary or otherwise
>> protect it, it would be really good because our company would not be
>> too excited about handing out the near-complete source to our product
>> on all the demo discs. It would be nice if there was support for
>> non-Windows OSes, but Windows is by far the majority in market share
>> and the other OSes could easily just pop into an HTML document that
>> directs them to our online version.
>>
>
>
> How about demoing the client app and saying there is also an on-line
> version...??
>
>

Well, I wish that it was that easy, but although there are a lot of
loyal users to our client version, it has *major* flaws. We're
basically taking the existing functionality and wrapping it into a
similar but correct GUI and fixing so many bugs and changing the
interface at least enough to confuse the user. Also, we plan to
eliminate the client side version for new users once the server side
version is up. So basically, we can't.

-Galen

attached mail follows:


Thanks for the help. I now have the wine information displaying in text
boxes (below is the code that displays all the