php-windows Digest 21 Jun 2001 15:01:33 -0000 Issue 621

Topics (messages 7960 through 7966):

Re: diference between date
        7960 by: Ruslan Ohitin
        7965 by: Michel Laine

Re: Problem starting session
        7961 by: Ruslan Ohitin
        7962 by: ADSL Online.Net
        7963 by: Nold, Mark

problem with MAIL and BCC
        7964 by: Delbono

db performance
        7966 by: Scott

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]


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


Hello Danilo,

Try to use this:

$d1 = strtotime("07-05-2001"); //  $d1 and $d2 are unix timestamps.
$d2 = strtotime("06-05-2001");

$diff_sec = $d2 - $d1; //    difference in seconds.

$diff_days = $diff_sec / (60 * 60 * 24); // difference in days

-- 
Best regards,
 Ruslan Ohitin
 mailto:[EMAIL PROTECTED]



DM> Hi there;

DM> How could I get the diference between two dates 
DM> for exemplo:
DM> 07-05-2001 and 06-05-2001 I wil get this date from my sql.
DM> How could I do that??
DM> Thank you very much.

DM> Danilo Meles






Danilo Meles wrote:

> Hi there;
>
> How could I get the diference between two dates
> for exemplo:
> 07-05-2001 and 06-05-2001 I wil get this date from my sql.
> How could I do that??
> Thank you very much.
>
> Danilo Meles
>
> --
> PHP Windows 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]

You can also find some good stuff in this tutorial:
http://www.phpbuilder.com/columns/akent20000610.php3

--

Michel Laine






Hello Ben,

You must specify path to store session data in php.ini:
session.save_path = /path/to/store/session/data
(/tmp by default)

php must have write permissions on this dir.

-- 
Best regards,
 Ruslan Ohitin
 [EMAIL PROTECTED]


BE> I am getting the following on a Windows 2000 Professional installation when 
BE> I try to start a session:

BE> Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, O_RDWR) failed: m 
BE> (2) in
BE> e:\inetpub\wwwroot\cd\common.inc on line 27






Ben,

The solution is to change the path of the variable "session_data" in your
php.ini file. Standard this path is set to /tmp which does not work.

Copy your session_data directory to e:/inetpub and point the session_data
variable in php.ini to that path.

regards,
Marnix

> I am getting the following on a Windows 2000 >Pro installation when  I try
to start a session:
>Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, >O_RDWR) failed:
m(2) in
> e:\inetpub\wwwroot\cd\common.inc on line 27
>Any help would be much appreciated.
>
> Regards,
> Ben






----------------------------------------------------------------------------
----------------- 
Disclaimer: The information contained in this email is intended only for the
use of the person(s) to whom it is addressed and may be confidential or
contain legally privileged information. If you are not the intended
recipient you are hereby notified that any perusal, use, distribution,
copying or disclosure is strictly prohibited. If you have received this
email in error please immediately advise us by return email at
[EMAIL PROTECTED] and delete the email document without making a
copy. 
----------------------------------------------------------------------------
-----------------
I cant remember where it looks for /tmp but you'll need to do you have a
c:\tmp or even an e:\tmp that is writable by the webserver?

You could change the session settings in your php.ini to point explicitley
to c:\tmp (or wherever)




Mark Nold
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Senior Consultant
 
Change is inevitable, except from vending machines. 



-----Original Message-----
From: Ben Edwards [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 24, 2001 4:55 AM
To: [EMAIL PROTECTED]
Subject: Problem starting session


I am getting the following on a Windows 2000 Professional installation when 
I try to start a session:

Warning: open(/tmp\sess_9ab091b811c5675d90fabf4392b3c110, O_RDWR) failed: m 
(2) in
e:\inetpub\wwwroot\cd\common.inc on line 27

Any help would be much appreciated.

Regards,
Ben
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
* Ben Edwards [EMAIL PROTECTED]    +44 (0)7970 269 522 *
* Campaign Against proper English, Dyslexia division         *
* Homepage                http://www.gifford.co.uk/~bedwards *
* i-Contact Progressive Video    http://www.videonetwork.org *
* Smashing the Corporate image     http://www.subvertise.org *
* Bristol's radical news            http://www.bristle.co.uk *
* Open Directory Project                 http://www.dmoz.org *
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+




Hello,
I tried to use BCC in may mail()  but it doesn't work.


Server is Win2k


Also CC has problems ...

If I send to:

To:  [EMAIL PROTECTED]

CC:  [EMAIL PROTECTED]


Then 
if I download my mails, I can see:

CC:  [EMAIL PROTECTED]

but the CC is not delivered (also on valid email address..)


Any Idea?


I copied the 1st script present on php.net/mail


Thanks
Nicola    





Hi-

I have a Microsoft SQL 2000 server that I am running a simple query 
from.  It is
taking up to a minute to call.  Running IIS 5.0, IE 5.5.

Any thoughts?  I checked the following:

1-A similar ASP script is fine.
2-I can ping the server
3-In MS Query analyzer it takes milliseconds to finish

Here is the code:

<select name="RESORT_ID">
<option value="All">Search All Resorts</option>
<?
        $connection = mssql_connect("scott", "blah", "blah!!") or die ("Can't 
connect to db server");
        $db = mssql_select_db("webdb", $connection) or die ("Can't select db!");
        $sql = "select resort_id,resort_name from resort order by resort_name";
        $sql_result = mssql_query($sql,$connection) or die ("Can't run query!");
        while ($row = mssql_fetch_array($sql_result)){
                $resort_id = $row["resort_id"];
                $resort_name = $row["resort_name"];
                echo "<option value=\"$resort_id\">$resort_name</option>";
                }
                mssql_free_result($sql_result);
                mssql_close($connection);
                ?>
        </select>               



Reply via email to