php-windows Digest 4 Apr 2002 23:55:27 -0000 Issue 1078

Topics (messages 12928 through 12942):

Bounces
        12928 by: jmt2que001.sneakemail.com
        12929 by: Mike Flynn

Using ODBC
        12930 by: Someone Somewhere

PHP crash www service NT + IIS4
        12931 by: Dave

R: [PHP-WIN] Using ODBC
        12932 by: Alberto. Sartori

New to PHP Need Help
        12933 by: Jason Tobias
        12934 by: Mike Flynn
        12939 by: Piotr Pluciennik

For John w/ Q about $_SESSION
        12935 by: B.T.
        12937 by: B.T.

session variables
        12936 by: Lee, Ford

Re: Failed opening  for inclusion
        12938 by: LaserJetter
        12940 by: Ross Fleming

PHP and mySQL...
        12941 by: Anthony Ritter

Login problem not in FAQ
        12942 by: barry

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I can't figure out how to get email bounces to come back so that I can remove them 
from my lists. Is there some way to do this? I am using the mail function. 

Troy

-----------------------------------------------------
Protect yourself from spam, use http://sneakemail.com
--- End Message ---
--- Begin Message ---
At 09:19 AM 4/4/2002 +0000, you wrote:
>I can't figure out how to get email bounces to come back so that I can 
>remove them from my lists. Is there some way to do this? I am using the 
>mail function.
>
>Troy

If you mean remove them automatically, then I don't think there would be 
any way to do this other than setting the From: and Reply-To: headers to 
the address you want outgoing messages bounced to, then having PHP check 
that e-mail account's e-mail and detect bounced ones by parsing the 
messages.  That, or running your own mail server software.

If you mean manually, then you could just set the From: and Reply-To: 
headers to your e-mail address and all bounces would come back to that.

-Mike

--- End Message ---
--- Begin Message ---
Does anyone have any experience using ODBC to connect to an Access database,
I'm runing php and Apache in Windows 2000. Any help will be apreciated.


Thanks
Someone


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

I have a problem with some php pages when I submit via post a form, www 
service crash!

on the event log I have this message:
The Open Procedure for service "ContentFilter" in DLL "QPerf.dll"

Any ideas?

Thanks in advance

Bye,
Dave

--- End Message ---
--- Begin Message ---
I've used several times an ODBC Connection with Access db. I used the COM object. I 
found a simply example:

$dbname="prova.mdb";     
$query="SELECT * FROM users";

$connessione=new COM("ADODB.Connection");
$connessione->Open("DRIVER={Microsoft Access Driver (*.mdb)}; 
DBQ=C:\\inetpub\\wwwroot\\$dbname");
$rs=$connessione->execute($query);
if (!$rs->EOF)
 {
  while (!$rs->EOF)
  {
   $campo1=$rs->fields("name");
   $campo2=$rs->fields("surname");
   $campo3=$rs->fields("email");
   echo $campo1->value."<br>";
   echo $campo2->value."<br>";
   echo $campo3->value."<br><hr>";
  $rs->movenext();
  }
 }
$rs->close;
?>


-----Messaggio originale-----
Da: Someone Somewhere [mailto:[EMAIL PROTECTED]]
Inviato: giovedì 4 aprile 2002 17.45
A: [EMAIL PROTECTED]
Oggetto: [PHP-WIN] Using ODBC


Does anyone have any experience using ODBC to connect to an Access database,
I'm runing php and Apache in Windows 2000. Any help will be apreciated.


Thanks
Someone



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

--- End Message ---
--- Begin Message ---
I am trying to define variables through an anchor tag to retrive data from
MySQL,  When the script runs it displays Array.  I am running WIN2K and IIS
5

echo "<a href=location.php?location=2>Camp Street Cafe</a>";

Here is the script that is called.

<?php

$db = mysql_connect("localhost", "", "")
 or die ("Could not connect to Localhost");
mysql_select_db ("ETM", $db)
 or die ("Could not connect to the Database");

$table = "locations";
$location = ($_REQUEST["location"]);
$query = "Select * from $table where Location_ID = $location";
$result= mysql_query($query);
$Location_Info = mysql_fetch_row($result);

echo "<p>$Location_Info";

?>





--- End Message ---
--- Begin Message ---
mysql_fetch_row() returns an associative array containing all columns 
retrieved from the database.  You can't echo an array directly.  In the 
associative array, the keys are the column names from the table, the values 
are the values you retrieved in that row.

So you could do this to see what you have:

...all the same code...
$Location_Info = mysql_fetch_row($result);
foreach($Location_Info as $key => $value) {
   echo "$key: $value<br>\n";
}

That would display the row.  There's tons of tutorials on basic PHP<->MySQL 
stuff like this out on the web.  I recommend checking webmonkey.com, 
zend.com, phpbuilder.com, devshed.com.

Also, it's not great etiquette to send your message to multiple listservs 
at once.

-Mike

At 09:29 AM 4/4/2002 -0600, Jason Tobias wrote:
>I am trying to define variables through an anchor tag to retrive data from
>MySQL,  When the script runs it displays Array.  I am running WIN2K and IIS
>5
>
>echo "<a href=location.php?location=2>Camp Street Cafe</a>";
>
>Here is the script that is called.
>
><?php
>
>$db = mysql_connect("localhost", "", "")
>  or die ("Could not connect to Localhost");
>mysql_select_db ("ETM", $db)
>  or die ("Could not connect to the Database");
>
>$table = "locations";
>$location = ($_REQUEST["location"]);
>$query = "Select * from $table where Location_ID = $location";
>$result= mysql_query($query);
>$Location_Info = mysql_fetch_row($result);
>
>echo "<p>$Location_Info";
>
>?>
>
>
>
>
>
>
>--
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


Mike Flynn - Burlington, VT
http://www.mikeflynn.net/ - [EMAIL PROTECTED]
home=>work=>home=>store=>home [repeat daily]

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

mysql_fetch_row($result) function output is an array - so it's not strange that
your script produces such output. Read the manual for detailed explanation of
this function and how to handle the result set.
You should also know name of  the field you want to retrieve from db - in SQL
query you're selecting all record fields - maybe it's not necessary...

You can also try (I prefer :-)) this way:

$result= mysql_query($query);
$answer = mysql_fetch_array($result);
$Location_Info = $answer['required field name'];

echo $Location_Info;

HTH

Piotr


Jason Tobias wrote:

> I am trying to define variables through an anchor tag to retrive data from
> MySQL,  When the script runs it displays Array.  I am running WIN2K and IIS
> 5
>
> echo "<a href=location.php?location=2>Camp Street Cafe</a>";
>
> Here is the script that is called.
>
> <?php
>
> $db = mysql_connect("localhost", "", "")
>  or die ("Could not connect to Localhost");
> mysql_select_db ("ETM", $db)
>  or die ("Could not connect to the Database");
>
> $table = "locations";
> $location = ($_REQUEST["location"]);
> $query = "Select * from $table where Location_ID = $location";
> $result= mysql_query($query);
> $Location_Info = mysql_fetch_row($result);
>
> echo "<p>$Location_Info";
>
> ?>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Sorry to use public forum I totally lost your email address, but anyways, I finally 
managed to make this $_SESSION work although it's still weird to me (newbie) because 
the manual still said session_register() is not needed, but I couldn't find any other 
way to do it. Enough said, here's my test file (as is), just take a look at it and see 
if you can run it on your machine:


---- File 1 ----
<?
session_start();
//if (!isset($_SESSION['foo'])) {
//$_SESSION['foo'] = "test foo";
session_register("foo");
$foo = "Another test";
//}

session_register("groo");
$groo = "Test 2";

?><html><head><title>Reg Ses</title></head>
<body bgcolor="#FFFFFF">
<? // echo $_SESSION['foo'] . "<br>";
echo session_id() . "<br>";
echo $groo . "<br>";

echo "<br><br>";
?>
<a href="reg_2.php">reg_2.php</a>
</body>
</html>

---- File 2 ----
<?
session_start();
?><html><head><title>Sess</title>
    </head>
<body bgcolor="#FFFFFF">
<? print $_SESSION["foo"]." \$_SESSION <br>";
   print $_SESSION["groo"] ." \$_SESSION<br>";

   print "foo: $foo <br>";
   print "groo: $groo <br>";

   if (!isset($_SESSION["foo"])) {
      print "foo is registered!";
   } else {
      print "foo is not registered!";
   }

   echo "<br><br>";

   if (session_is_registered("groo")) {
      print "groo is registered!";
   } else {
      print "groo is not registered!";
   }

?>
</body>
</html>
--- End Message ---
--- Begin Message ---
I guess you're not the person who emailed me a couple of days ago. But if
you know the answer some time in the future, I still would like to know why
I still need to use session_register() although the manual specified I don't
need it if I use $_session["var"].


----- Original Message -----
From: "Asendorf, John" <[EMAIL PROTECTED]>
To: "B.T." <[EMAIL PROTECTED]>
Sent: Thursday, April 04, 2002 11:37 AM
Subject: RE: [PHP-WIN] For John w/ Q about $_SESSION


> I haven't had any trouble with it, but I was interested and gave it a
try...
>
> The line:
>
> if (!isset($_SESSION["foo"])) {
>
> should hit if the session variable IS NOT set, but it echoes "foo is
> registered..."
>
> I don't quite get why that is true...
>
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Nullum magnum ingenium sine mixtura dementiae fuit
>
>
> > -----Original Message-----
> > From: B.T. [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, April 04, 2002 2:34 PM
> > To: Asendorf, John
> > Subject: Re: [PHP-WIN] For John w/ Q about $_SESSION
> >
> >
> > Sorry didn't pay attention on the last name but was it you
> > that had the same
> > problem with me as to maintain session variables across pages?
> >
> > ----- Original Message -----
> > From: "Asendorf, John" <[EMAIL PROTECTED]>
> > To: "B.T." <[EMAIL PROTECTED]>
> > Sent: Thursday, April 04, 2002 10:52 AM
> > Subject: RE: [PHP-WIN] For John w/ Q about $_SESSION
> >
> >
> > > Me John? Or some other John?
> > >
> > > ---------------------
> > > John Asendorf - [EMAIL PROTECTED]
> > > Web Applications Developer
> > > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > > Licking County, Ohio, USA
> > > 740-349-3631
> > > Nullum magnum ingenium sine mixtura dementiae fuit
> > >
> > >
> > > > -----Original Message-----
> > > > From: B.T. [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, April 04, 2002 1:28 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: [PHP-WIN] For John w/ Q about $_SESSION
> > > >
> > > >
> > > > Sorry to use public forum I totally lost your email address,
> > > > but anyways, I finally managed to make this $_SESSION work
> > > > although it's still weird to me (newbie) because the manual
> > > > still said session_register() is not needed, but I couldn't
> > > > find any other way to do it. Enough said, here's my test file
> > > > (as is), just take a look at it and see if you can run it on
> > > > your machine:
> > > >
> > > >
> > > > ---- File 1 ----
> > > > <?
> > > > session_start();
> > > > //if (!isset($_SESSION['foo'])) {
> > > > //$_SESSION['foo'] = "test foo";
> > > > session_register("foo");
> > > > $foo = "Another test";
> > > > //}
> > > >
> > > > session_register("groo");
> > > > $groo = "Test 2";
> > > >
> > > > ?><html><head><title>Reg Ses</title></head>
> > > > <body bgcolor="#FFFFFF">
> > > > <? // echo $_SESSION['foo'] . "<br>";
> > > > echo session_id() . "<br>";
> > > > echo $groo . "<br>";
> > > >
> > > > echo "<br><br>";
> > > > ?>
> > > > <a href="reg_2.php">reg_2.php</a>
> > > > </body>
> > > > </html>
> > > >
> > > > ---- File 2 ----
> > > > <?
> > > > session_start();
> > > > ?><html><head><title>Sess</title>
> > > >     </head>
> > > > <body bgcolor="#FFFFFF">
> > > > <? print $_SESSION["foo"]." \$_SESSION <br>";
> > > >    print $_SESSION["groo"] ." \$_SESSION<br>";
> > > >
> > > >    print "foo: $foo <br>";
> > > >    print "groo: $groo <br>";
> > > >
> > > >    if (!isset($_SESSION["foo"])) {
> > > >       print "foo is registered!";
> > > >    } else {
> > > >       print "foo is not registered!";
> > > >    }
> > > >
> > > >    echo "<br><br>";
> > > >
> > > >    if (session_is_registered("groo")) {
> > > >       print "groo is registered!";
> > > >    } else {
> > > >       print "groo is not registered!";
> > > >    }
> > > >
> > > > ?>
> > > > </body>
> > > > </html>
> > > >
> > >
> >
>
--- End Message ---
--- Begin Message ---
I seem to have configuration problems....i just can't seem to get
session variables written to in files under win2000, NTFS w/ Apache
1.3.23 and
PHP 4.1.2 ......i've already done everything from session_start() on
every page
to making var global....anybody can help??  thanks....btw, i got the
same system on a Linux box running apache and php and it works fine....

Apparently under the bug report database for bug number 16043, my
exactly problem was described.  According to the PHP team, this
windows/apache1.3.23/php4.1.2 session not writing to file bug has been
fixed in the 4.2.0RC1 binaries.  I've patched my php4apache.dll with the
ones from 4.2.0RC1 AND it still doesn't work!!!  Anyone who used
4.2.0RC1 came across this problem and made it work?

--- End Message ---
--- Begin Message ---
I didnt think you can do that. It might work if you left out the http:// and
domain.com was the domain of your server. You usually have to do the local
path e.g. /usr/include/file.txt or c:/usr/include/file.txt.


"Sonia" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If  your server run at Linux : yes.
> But  about windows it seems not.
>
> I would like to know if there is a solution.
>
>
> "Alberto. Sartori" <[EMAIL PROTECTED]> a écrit dans le
message news:
[EMAIL PROTECTED]
> You can do this? use an URL as an argument for include?
>
> -----Messaggio originale-----
> Da: Sonia [mailto:[EMAIL PROTECTED]]
> Inviato: mercoledì 27 marzo 2002 13.39
> A: [EMAIL PROTECTED]
> Oggetto: [PHP-WIN] Failed opening for inclusion
>
>
> Hie all,
>
> Do someone knows why i've got an error when my script is:
>
> <?
> include ("http://domain.com/test.php";)
> ?>
>
>
> Error : Failed opening 'http://domain.com/test.php' for inclusion
> (include_path='')
>
> Other include on my localhost (server : IIS5) are ok
>
>
> Thanks all
>
> French kiss
> Sonia
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


--- End Message ---
--- Begin Message ---
Should do, make sure that u have
allow_url_fopen=On
in your php.ini

however, I don't know if it does server redirects.  Oh also make sure you're
using v4.0.5 (i think) or later?

Throwing myself wide open to shouts of "you're wrong!!" people firebombing
my house and laughing at me in the street and.... sigh yes I'm drunk again

Ross

-----Original Message-----
From: LaserJetter [mailto:[EMAIL PROTECTED]]
Sent: 04 April 2002 21:01
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Failed opening for inclusion


I didnt think you can do that. It might work if you left out the http:// and
domain.com was the domain of your server. You usually have to do the local
path e.g. /usr/include/file.txt or c:/usr/include/file.txt.


"Sonia" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If  your server run at Linux : yes.
> But  about windows it seems not.
>
> I would like to know if there is a solution.
>
>
> "Alberto. Sartori" <[EMAIL PROTECTED]> a écrit dans le
message news:
[EMAIL PROTECTED]
> You can do this? use an URL as an argument for include?
>
> -----Messaggio originale-----
> Da: Sonia [mailto:[EMAIL PROTECTED]]
> Inviato: mercoledì 27 marzo 2002 13.39
> A: [EMAIL PROTECTED]
> Oggetto: [PHP-WIN] Failed opening for inclusion
>
>
> Hie all,
>
> Do someone knows why i've got an error when my script is:
>
> <?
> include ("http://domain.com/test.php";)
> ?>
>
>
> Error : Failed opening 'http://domain.com/test.php' for inclusion
> (include_path='')
>
> Other include on my localhost (server : IIS5) are ok
>
>
> Thanks all
>
> French kiss
> Sonia
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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

--- End Message ---
--- Begin Message ---
Using MS Windows 98, Apache, PHP and mySQL.

I've installed Apache on my hard drive to test a database driven website
using PHP and mySQL.

Could somebody lead me through the steps if I want to continue using the
mySQL database and PHP when the site goes live and the files are uploaded
and published to my ISP's server?

Is this possible?

Thanking all in advance.
Tony Ritter








--- End Message ---
--- Begin Message ---
I have the following error when login Squirrel Mail.

You must be logged in to access this page.

I've checked that the system was not generating any cookie when I try to
login.  I expect this is the cause of problem as squirrelmail need cookie.

However, I've verified cookie was enabled by running a .PHP test with the
following code and checked that the cookie file was actually created.
<?php
  setcookie("Test", "test", time()+20);
>

I am using w2k server, IIS5, php 4.1.2 exe version, squirrel mail 1.2.5, and
IE5.5 browser.

Thank you very much.
Barry


--- End Message ---

Reply via email to