php-windows Digest 24 Jun 2003 22:55:08 -0000 Issue 1793

Topics (messages 20530 through 20543):

Re: What does this error mean?
        20530 by: Cristian MARIN
        20532 by: Dallas Goldswain

Using Excel in a PHP controlled environment
        20531 by: Herhuth, Ron

Re: php with Exchange server
        20533 by: Lance Q

Date question
        20534 by: Harpreet
        20535 by: Darvin Andrioli
        20536 by: John Ellingsworth

Eliminate a specific session variable
        20537 by: Matt Babineau
        20538 by: Metin Kale
        20539 by: Matt Babineau
        20540 by: Stephen
        20541 by: Matt Babineau
        20542 by: Melih Onvural

Re: Opening a file
        20543 by: erythros

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 ---
The class user already exist in the system which means you have to change
the name of your class into myUser or something else.(also the constructor
name)

-- 
-------------------------------------------------
Cristian MARIN - Developer
InterAKT Online (www.interakt.ro)
Tel:         +4021 312.53.12
Tel/Fax:  +4021 312.51.91
[EMAIL PROTECTED]
"Rodel D. Bautista" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi to all,
> I'm trying to install the "simple document management system" from
freshmeat
> and I'm getting the following error when I tried running it:
> Fatal error: Cannot redeclare class user in
> c:\apache\htdocs\sdms\lib\classes.inc on line 3
> What does this error mean? How can I eliminate this error? I have observed
> this also when I tried installing another document repository system from
> freshmeat.
>
> Any help will be highly appreciated.
>
> Thanks in advance.
>
> Rodel D. Bautista
> GSM NET OPS-NSA-OSS
> DMPI - Sun Cellular
>



--- End Message ---
--- Begin Message ---
"Rodel D. Bautista" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi to all,
> I'm trying to install the "simple document management system" from
freshmeat
> and I'm getting the following error when I tried running it:
> Fatal error: Cannot redeclare class user in
> c:\apache\htdocs\sdms\lib\classes.inc on line 3
> What does this error mean? How can I eliminate this error? I have observed
> this also when I tried installing another document repository system from
> freshmeat.
>
It could also be that you are including the page more than once in the same
logical block,
thus its trying to re-declare the class.
try changing include to include_once or remove the last include to the file.

eg.

<?php
include "baselibs.inc.php";
$var = funcfrombaselib();
//some code here

include "baselibs.inc.php";   <----- remove this line

$somevar = anotherfuncfrombaselibs();
//some code
?>

hope this helps


-- 
Regards
Dallas Goldswain
www.development.co.za
The hottest development forum in SA!
Sign up now!
Hundreds of Topics are being Discussed



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

I am trying to create a web app using the Excel COM object and PHP.  I'm
not sure if this is the right approach or not.  What I'm trying to do is
to have a user log in, if they have read only access to an Excel
Spreadsheet, the spreadsheet will open on the server with read only
access.  If they have read/write access the spreadsheet will open on the
server and allow them to write to the file and save it replacing the
original file.  In either case if the file is open no other users should
be able to access the file.  This is a highly trusted workgroup
environment so I'm not concerned about inadvertant overwriting etc.

How would I go about creating a web app that does this?  Is there already
something like this available?  ...or is this even possible?

Thanks,
Ron





--- End Message ---
--- Begin Message ---
PHP MAIL() relies on SMTP to send email. You will need to figure out where
on your network is an SMTP mail server. If you send mail to/from the
Internet, you will have one. Exchange 5.5 has the Internet Mail Connector,
and Exchange 2000 uses, by default, only SMTP.

A workaround maybe to setup an SMTP server just for PHP. There are some good
free ones out there. I believe Windows 2000 server even has one built-in.
Also for Windows, Mercury is very good (it's what I use).
http://www.pmail.com/

For linux, there is always sendmail and postfix. Postfix is pretty simple to
setup, www.postfix.org,
http://postfix.state-of-mind.de/patrick.koetter/smtpauth/index.html

Lance


"Robin Baxter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am having problems setting up mail. Our network uses Exchange Server for
> emails, and I am running PHP under Abyss Web Server.
>
> Unfortunately, due to legacy issues, our Exchange server is configured for
> X400 mail.... does this mean that the normal mail() function in php will
not
> work, or is there a workaround that I can try?!
>
> Rob
>
>



--- End Message ---
--- Begin Message ---
I am using php with sql server. I have a field expiration which is of type
datetime.

I add a date for the expiration as '06/24/03 09:09:09' using a web form.
When i try to display the same expiration in an edit form using
$row["expiration"]  it displays it as 'Jun 24 2003 09:09 AM'.
How can I display the date as the above without the conversion. If i see the
database the date is in the format I added '06/24/03... but it displays it
as June 24.....

Please help.

Thanks,

Regards,
Harpreet


--- End Message ---
--- Begin Message ---
> From: Harpreet [mailto:[EMAIL PROTECTED]
>
> I am using php with sql server. I have a field expiration which is of type
> datetime.
>
> I add a date for the expiration as '06/24/03 09:09:09' using a web form.
> When i try to display the same expiration in an edit form using
> $row["expiration"]  it displays it as 'Jun 24 2003 09:09 AM'.
> How can I display the date as the above without the conversion.

Do you mean MS SQL Server? If so, you must use the 'convert' function inside
your SQL query (i.e. select top 10 convert(char(10),DateTime_field,120) from
MyTable ) ).

Darvin



--- End Message ---
--- Begin Message ---
You can also place this into your script:

ini_set('mssql.datetimeconvert' , 0);

although the format is still changed:
In the DB:
3/24/2003 7:05:17 PM

Output onto php page:
2003-03-24 19:05:17

Thanks,

John Ellingsworth

-----Original Message-----
From: Darvin Andrioli [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 24, 2003 1:37 PM
To: Harpreet; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Date question


> From: Harpreet [mailto:[EMAIL PROTECTED]
>
> I am using php with sql server. I have a field expiration which is of type
> datetime.
>
> I add a date for the expiration as '06/24/03 09:09:09' using a web form.
> When i try to display the same expiration in an edit form using
> $row["expiration"]  it displays it as 'Jun 24 2003 09:09 AM'.
> How can I display the date as the above without the conversion.

Do you mean MS SQL Server? If so, you must use the 'convert' function inside
your SQL query (i.e. select top 10 convert(char(10),DateTime_field,120) from
MyTable ) ).

Darvin



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


--- End Message ---
--- Begin Message ---
Hi All-

I'm playing around with an authentication system and I can't figure out how to "Log" 
someone out of the system. Wha tI would like to do is be able to check if the session 
variable $_SESSION["logged_in"] exists. But if I unset() that session variable is 
still exists but it seems like the variable is just set to blank so an isset() check 
of that variable returns true, so they are still "logged_in". Is there any way to kill 
a single session variable using destroy() perhaps or will that nuke the entire session?

Thx-
Matt

--- End Message ---
--- Begin Message ---
if you don't want to "nuke" your entire session, but want to completely get rid of your session variable, I've used this below and works pretty well:


unset($myvariable);
session_unregister("$myvariable");

metin



At 02:40 PM 6/24/2003 -0400, Matt Babineau wrote:
Hi All-

I'm playing around with an authentication system and I can't figure out how to "Log" someone out of the system. Wha tI would like to do is be able to check if the session variable $_SESSION["logged_in"] exists. But if I unset() that session variable is still exists but it seems like the variable is just set to blank so an isset() check of that variable returns true, so they are still "logged_in". Is there any way to kill a single session variable using destroy() perhaps or will that nuke the entire session?

Thx-
Matt

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


--- End Message ---
--- Begin Message ---
Does this even apply when using the session variable method of $_SESSION['varname'] ?
> 
> if you don't want to "nuke" your entire session, but want to completely get 
> rid of your session variable, I've used this below and works pretty well:
> 
> unset($myvariable);
> session_unregister("$myvariable");
> 
> metin
> 
> 
> 
> At 02:40 PM 6/24/2003 -0400, Matt Babineau wrote:
> >Hi All-
> >
> >I'm playing around with an authentication system and I can't figure out 
> >how to "Log" someone out of the system. Wha tI would like to do is be able 
> >to check if the session variable $_SESSION["logged_in"] exists. But if I 
> >unset() that session variable is still exists but it seems like the 
> >variable is just set to blank so an isset() check of that variable returns 
> >true, so they are still "logged_in". Is there any way to kill a single 
> >session variable using destroy() perhaps or will that nuke the entire session?
> >
> >Thx-
> >Matt
> >
> >--
> >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 ---
$_SESSION['MyVariable'] = False;

Thats as good as unsetting it. And no, if your using register globals as off
(Like all good coders should!), then session_unregister won't work

Stephen

----- Original Message ----- 
From: "Matt Babineau" <[EMAIL PROTECTED]>
To: "Metin Kale" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, June 24, 2003 8:13 PM
Subject: Re: [PHP-WIN] Eliminate a specific session variable


> Does this even apply when using the session variable method of
$_SESSION['varname'] ?
> >
> > if you don't want to "nuke" your entire session, but want to completely
get
> > rid of your session variable, I've used this below and works pretty
well:
> >
> > unset($myvariable);
> > session_unregister("$myvariable");
> >
> > metin
> >
> >
> >
> > At 02:40 PM 6/24/2003 -0400, Matt Babineau wrote:
> > >Hi All-
> > >
> > >I'm playing around with an authentication system and I can't figure out
> > >how to "Log" someone out of the system. Wha tI would like to do is be
able
> > >to check if the session variable $_SESSION["logged_in"] exists. But if
I
> > >unset() that session variable is still exists but it seems like the
> > >variable is just set to blank so an isset() check of that variable
returns
> > >true, so they are still "logged_in". Is there any way to kill a single
> > >session variable using destroy() perhaps or will that nuke the entire
session?
> > >
> > >Thx-
> > >Matt
> > >
> > >--
> > >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
> >
>
>
>
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--- End Message ---
--- Begin Message ---
Cool thanks!

> $_SESSION['MyVariable'] = False;
> 
> Thats as good as unsetting it. And no, if your using register globals as off
> (Like all good coders should!), then session_unregister won't work
> 
> Stephen
> 
> ----- Original Message ----- 
> From: "Matt Babineau" <[EMAIL PROTECTED]>
> To: "Metin Kale" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, June 24, 2003 8:13 PM
> Subject: Re: [PHP-WIN] Eliminate a specific session variable
> 
> 
> > Does this even apply when using the session variable method of
> $_SESSION['varname'] ?
> > >
> > > if you don't want to "nuke" your entire session, but want to completely
> get
> > > rid of your session variable, I've used this below and works pretty
> well:
> > >
> > > unset($myvariable);
> > > session_unregister("$myvariable");
> > >
> > > metin
> > >
> > >
> > >
> > > At 02:40 PM 6/24/2003 -0400, Matt Babineau wrote:
> > > >Hi All-
> > > >
> > > >I'm playing around with an authentication system and I can't figure out
> > > >how to "Log" someone out of the system. Wha tI would like to do is be
> able
> > > >to check if the session variable $_SESSION["logged_in"] exists. But if
> I
> > > >unset() that session variable is still exists but it seems like the
> > > >variable is just set to blank so an isset() check of that variable
> returns
> > > >true, so they are still "logged_in". Is there any way to kill a single
> > > >session variable using destroy() perhaps or will that nuke the entire
> session?
> > > >
> > > >Thx-
> > > >Matt
> > > >
> > > >--
> > > >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
> > >
> >
> >
> >
> > -- 
> > 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 ---
If you set its expiration date to moments before the logout button is clicked then the 
session will die.

melih
> 
> From: Matt Babineau <[EMAIL PROTECTED]>
> Date: 2003/06/24 Tue PM 02:40:20 EDT
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Subject: [PHP-WIN] Eliminate a specific session variable
> 
> Hi All-
> 
> I'm playing around with an authentication system and I can't figure out how to "Log" 
> someone out of the system. Wha tI would like to do is be able to check if the 
> session variable $_SESSION["logged_in"] exists. But if I unset() that session 
> variable is still exists but it seems like the variable is just set to blank so an 
> isset() check of that variable returns true, so they are still "logged_in". Is there 
> any way to kill a single session variable using destroy() perhaps or will that nuke 
> the entire session?
> 
> Thx-
> Matt
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


--- End Message ---
--- Begin Message ---
easy... when you print out the list just add the necessary code...
whats your code look like and i can show you.

"Seth Buntin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I need a little bit of help.
>
> I have created a program that will list all the files in a directory I
just
> need to know how to make a link to these files so that when you click on
> them it opens them up...
>
> Thanks,
> Seth
>
>



--- End Message ---

Reply via email to