php-windows Digest 5 Apr 2003 05:25:53 -0000 Issue 1668
Topics (messages 19293 through 19312):
Re: Web services
19293 by: Svensson, B.A.T. (HKG)
19303 by: Mihail Bota
Re: PHP Editor
19294 by: Stephen
19295 by: Jill.Ramonsky.Aculab.com
19296 by: Piotr Pluciennik
19304 by: John
PHP and beers...
19297 by: Svensson, B.A.T. (HKG)
19299 by: Asendorf, John
Re: PHP Editor - proud answers
19298 by: Svensson, B.A.T. (HKG)
May be of interest for web development...
19300 by: Svensson, B.A.T. (HKG)
Re: Subject: session ids
19301 by: Iggy
Re: Subject: PHP probs with XML docs
19302 by: Neil Smith
still sessions
19305 by: Iggy
19306 by: Charles P. Killmer
19307 by: Piotr Pluciennik
19308 by: Iggy
19309 by: Stephen
Re: PHP array => Javascript array :: solved
19310 by: Ignatius Reilly
sessions problems
19311 by: Gregory Kaczmarczyk
19312 by: Gregory Kaczmarczyk
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 ---
> Hello,
>
> I konw this subject was discussed extensively by the members of this list;
> I became interested in it simply because this is one of my new tasks. I
> have to enable the site as a server for web service.
> What I have by now is a MySql database and a PHP web interface which
> manipulates data from the
> database. As far I understood, my job would be to take requests from
> clients, run queries and then feed the results back to clients. Since I
> used PHP by now, I'd like to stick with it.
> So, I'd like to ask your help for any
> hints/suggestions/ideas/tutorials/etc. regarding this problem.
> Thanks a lot!
Is it just me? Because I don't understand the problem description.
Do you want to automate what you are doing manual?
--- End Message ---
--- Begin Message ---
I was just trying to ask for any help in understanding of SOAP, XML-RPC,
their use and some simple example for starters...
On Fri, 4 Apr 2003, Svensson, B.A.T. (HKG) wrote:
> > Hello,
> >
> > I konw this subject was discussed extensively by the members of this list;
> > I became interested in it simply because this is one of my new tasks. I
> > have to enable the site as a server for web service.
> > What I have by now is a MySql database and a PHP web interface which
> > manipulates data from the
> > database. As far I understood, my job would be to take requests from
> > clients, run queries and then feed the results back to clients. Since I
> > used PHP by now, I'd like to stick with it.
> > So, I'd like to ask your help for any
> > hints/suggestions/ideas/tutorials/etc. regarding this problem.
> > Thanks a lot!
>
> Is it just me? Because I don't understand the problem description.
>
> Do you want to automate what you are doing manual?
>
>
--- End Message ---
--- Begin Message ---
Or for a slightly more technical option, I like using maguma studio light.
Its free and has nice features. For a full list, try this site thou:
Full list of editors http://phpeditors.dancinghippo.com/
My favourite editor http://www.maguma.com/en/lightdownload.html
----- Original Message -----
From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
To: "Php Win32 list" <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 2:35 PM
Subject: RE: [PHP-WIN] PHP Editor
> > Does anyone have any recomendations for a good inexpensive / free editor
for
> > PHP files?
>
> notepad.exe
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
TextPad
Available from http://www.textpad.com
This is one of those excellect programmers editors which can do proper
syntax recognition and coloring (of PHP, and many other languages besides),
and the PHP syntax rules are themselves stored in an easy-to-edit text file,
so if more functions get added to PHP in the future, they can still be
appropriately colored. TextPad can also be configured to execute PHP files
from a menu item and can even capture the output into another text window.
Rumor has it that it can even be configured so that if you double-click on a
PHP error message you get jumped to the correct file and line containing the
error - but I haven't got that to work yet (although I have got it to work
for Java so it definitely does work).
Jill
-----Original Message-----
From: Chris and Trish Kaelin [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 5:12 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP Editor
Does anyone have any recomendations for a good inexpensive / free editor for
PHP files?
Chris Kaelin
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Anders, you are probably very proud of your answers...
--- "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]>
wrote:
> > Does anyone have any recomendations for a good
> inexpensive / free editor for
> > PHP files?
>
> notepad.exe
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
--- End Message ---
--- Begin Message ---
Textpad
You'll want something with line numbers so you can track down errors.
"Chris And Trish Kaelin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Does anyone have any recomendations for a good inexpensive / free editor
for
> PHP files?
>
> Chris Kaelin
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
--- End Message ---
--- Begin Message ---
I have this problem with a php CD: I can't find it! I need to find it
because I put my beer opener on top of it, so now I wonder if anybody
know how I can find it? We are namely going to start to drink our Friday
beers with in 1 hour now, so I am really desperate to locate it.
--- End Message ---
--- Begin Message ---
How rude to us Americans. We're just starting our workday and you taunt us
with your proximity to beer drinking time!
I fart in your general direction!
---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 9:02 AM
> To: Php Win32 list
> Subject: [PHP-WIN] PHP and beers...
>
>
> I have this problem with a php CD: I can't find it! I need to find it
> because I put my beer opener on top of it, so now I wonder if anybody
> know how I can find it? We are namely going to start to drink
> our Friday
> beers with in 1 hour now, so I am really desperate to locate it.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Yep, its free, and it easy to access, does not need
hazel with download an installation, etc. Simply the
most splendid optimal solution; even I can use it!
//Anders
> -----Original Message-----
> From:
> Sent: Friday, April 04, 2003 3:58 PM
> To: Svensson, B.A.T. (HKG); Php Win32 list
> Subject: RE: [PHP-WIN] PHP Editor
>
>
> Anders, you are probably very proud of your answers...
>
> --- "Svensson, B.A.T. wrote:
> > > Does anyone have any recomendations for a good
> > inexpensive / free editor for
> > > PHP files?
> >
> > notepad.exe
>
--- End Message ---
--- Begin Message ---
I terms of searching for help with I problem I have, I ran into this link:
http://www.google.nl/search?q=cache:FzULnguBHt8C:www.microsoft.com/backstage/SERVEROP.doc+stopweb.vbs+site:microsoft.com&hl=nl&ie=UT
F-8
which might be of general interest for those guys who uses Bill's web server.
--- End Message ---
--- Begin Message ---
ok this has helped alot and I found the source of my problems.
However I have another question now:
once created I pass the session ID through the URL. I also have some
variables defined within this session and I would like to be able to access
those on the subsequent pages until I kill the session. Sofar I had no
success.
I tried using the session_name("foo"); on the page where I initially create
the session and then using the same session name on the subsequent page
before I do session_start();
because I read somewhere that this is how you access your already created
session, without creating a new one, but this has failed sofar.
A new session is created and I can't access my old variables obviously.
What am I doing wrong?
Please, understand that I am fairly new to PHP so these may be stupid
questions, but I need to learn this somehow.
Thanx,
Iggy
"Neil Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 01:14 04/04/2003 +0000, you wrote:
> >Now my understanding of sessions may be
> >wrong, but I though when you kill a session the id is killed as well.
>
> It is.
>
> Your session is held by passing a 'session cookie' (not stored) on every
> request to the server. That session cookie is dropped when you close the
> associated browser window, and basically just contains your session ID.
>
> >that would mean when I refresh the page, a new id should be generated.
>
> No, it wouldn't, *or* shouldn't. That is how it's supposed to work :: The
> session is active till you close that browser window, because that window
> is passing the session ID up to the server until its closed.
>
> This also applies to any windows spawned *from it* -- by pressing Ctrl +
N,
> using window.open in javascript, or using the _blank target in an anchor
> or form tag etc.
>
> >Unfortunately this does not happen and I can't figure out why. Only
> >after I shut all browser windows down, I get a new id and then the same
> >story again.
>
> Correct, that's how it works. Not necessarily *all* windows though - open
> them by clicking the browser icon in the taskbar & it'll work fine, but I
> bet you're opening new windows from the existing browser window, which
then
> gets them all the same session ID.
>
> >Now, I know that the damn session is erased from the temp folder because
>
> Correct. And cause its a session cookie, its not stored on your cookies
> folder, either.
>
> >I see it happen, however the id sticks to the browser for whatever
> >reason. I am running php4.2.3 on w2k pro and IIS
>
> HTH
> Neil Smith.
>
>
--- End Message ---
--- Begin Message ---
According to the xhtml spec, you should be sending the doctype tags and PIs
like this :
http://www.w3schools.com/xhtml/xhtml_syntax.asp
<!DOCTYPE Doctype goes here>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title goes here</title>
</head>
<body>
Body text goes here
</body>
</html>
Which means that you should *not* hav a PI at the top specifying xml. So,
if you send a header with content-type of xml but leave out the PI a the
top of the document, what happens ? (NB : PHP will send content type
text/html unless you specify otherwise )
Hope that helps
Neil.
At 09:08 04/04/2003 -0500, you wrote:
In a message dated 04/04/2003 09:09:05 GMT Standard Time,
[EMAIL PROTECTED] writes:
(Or rather, *what* are you sending and what *headers* are you also
sending ?)
Below are the headers I was sending....
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
...obviously, above these headers where the sessions codes.
Tryst
--- End Message ---
--- Begin Message ---
ok I have a very simply question to which I have not found a good answer
yet.
I have disabled cookie based sessions, i.e I pass the session Id through the
URL. How do I access the variables and their data that are related to that
session ID on subsequent pages?
Thanx
Iggy
--- End Message ---
--- Begin Message ---
Set session values like this
session_start();
$_SESSION["username"] = "sjohnson";
Get session values like this
session_start();
echo $_SESSION["username"];
The $_SESSION MUST be uppercase.
Charles Killmer
-----Original Message-----
From: Iggy [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 10:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] still sessions
ok I have a very simply question to which I have not found a good answer
yet.
I have disabled cookie based sessions, i.e I pass the session Id through
the URL. How do I access the variables and their data that are related
to that session ID on subsequent pages?
Thanx
Iggy
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
AFAIK you can access them same way like in cookie
based sessions when SID is on.
HTH
Piotr
--- Iggy <[EMAIL PROTECTED]> wrote:
> ok I have a very simply question to which I have not
> found a good answer
> yet.
>
> I have disabled cookie based sessions, i.e I pass
> the session Id through the
> URL. How do I access the variables and their data
> that are related to that
> session ID on subsequent pages?
>
> Thanx
> Iggy
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
--- End Message ---
--- Begin Message ---
I have done this million times, but it doesn't work.
I declare the session variables like you said it, but the moment I go on the
next page a new session is started instead of retrieving the old one.
I don't know if there is something in the php.ini file that I still need to
set, but I am getting frustrated. The way you mentioned works fine if you
have cookies enabled ( I mean if this is set in php.ini to 1's, but as you
see I have both of those disabled)
; Whether to use cookies.
session.use_cookies = 0
; This option enables administrators to make their users invulnerable to
; attacks which involve passing session ids in URLs; defaults to 0.
; session.use_only_cookies = 0
But for reliability reason I don't want to use cookies whatsoever.
"Charles P. Killmer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Set session values like this
session_start();
$_SESSION["username"] = "sjohnson";
Get session values like this
session_start();
echo $_SESSION["username"];
The $_SESSION MUST be uppercase.
Charles Killmer
-----Original Message-----
From: Iggy [mailto:[EMAIL PROTECTED]
Sent: Friday, April 04, 2003 10:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] still sessions
ok I have a very simply question to which I have not found a good answer
yet.
I have disabled cookie based sessions, i.e I pass the session Id through
the URL. How do I access the variables and their data that are related
to that session ID on subsequent pages?
Thanx
Iggy
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
before calling session start, use this:
session_id( xxx )
xxx must be the session ID as created on the previous page. If you need to
know what the session id currently is use
session_id()
xxx must be alpha-numeric only btw. If there is no session with the session
id of xxx, then a new session will be started WHEN session_start() is called
Stephen
----- Original Message -----
From: "Iggy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 5:21 PM
Subject: Re: [PHP-WIN] still sessions
> I have done this million times, but it doesn't work.
> I declare the session variables like you said it, but the moment I go on
the
> next page a new session is started instead of retrieving the old one.
>
> I don't know if there is something in the php.ini file that I still need
to
> set, but I am getting frustrated. The way you mentioned works fine if you
> have cookies enabled ( I mean if this is set in php.ini to 1's, but as you
> see I have both of those disabled)
>
>
> ; Whether to use cookies.
> session.use_cookies = 0
>
> ; This option enables administrators to make their users invulnerable to
> ; attacks which involve passing session ids in URLs; defaults to 0.
> ; session.use_only_cookies = 0
>
>
>
> But for reliability reason I don't want to use cookies whatsoever.
>
>
>
>
>
>
> "Charles P. Killmer" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> Set session values like this
>
> session_start();
> $_SESSION["username"] = "sjohnson";
>
> Get session values like this
>
> session_start();
> echo $_SESSION["username"];
>
>
> The $_SESSION MUST be uppercase.
>
> Charles Killmer
>
> -----Original Message-----
> From: Iggy [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 04, 2003 10:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] still sessions
>
>
> ok I have a very simply question to which I have not found a good answer
> yet.
>
> I have disabled cookie based sessions, i.e I pass the session Id through
> the URL. How do I access the variables and their data that are related
> to that session ID on subsequent pages?
>
> Thanx
> Iggy
>
>
>
> --
> 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 ---
In face of the lack of enthusiasm generated by my question, I decided to
write the blasted function myself. (a refreshing exercise in recursion)
If anyone is interested to obtain a copy, drop me a note.
Ignatius
"l'avantage d'être borgne, c'est qu'il faut deux fois moins de temps pour
s'habituer à l'obscurité".
____________________________________________
----- Original Message -----
From: "Ignatius Reilly" <[EMAIL PROTECTED]>
To: "Win32 list PHP" <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 2:53 PM
Subject: PHP array => Javascript array
> Hello,
>
> I am looking for a function or a class to convert a multidimensional
> associative PHP array into an equivalent Javascript array (that is the
> declaration string in : var my_array = <string>)
>
> Googled to no avail.
> If somebody can save me a few hours of coding this thing, I would greatly
> appreciate.
>
> Thanks
> Ignatius
>
--- End Message ---
--- Begin Message ---
New to windows/PHP!
I'm having quite a bit of trouble with getting sessions to work right.
I've got PHP 4.3.1 installed on Windows 2000 with IIS. php.ini is
default from installation.
Each time I run session_start(), a new session is created disgarding the
previous page's session. If I call ini_set('session.auto_start', '1'),
the next page returns a $SESSION['any_var'] as nothing.
How can I get the session to "stick"?
If anyone needs more info on the configuration, please let me know.
Thanks for any/all help!
Greg
--- End Message ---
--- Begin Message ---
1. 'session.save_path' is set to 'c:\php\sessiondata'
I watched that directory & this is what I found:
Example1 For each page I call session_start(), a new session file
gets created. So: call a page, file gets created checking, say,
$_SESSION['username']. nothing there, so call login page. After login is
submitted, another file gets created while registering session vars.
Next go back to original page, another session file gets created
checking for, say $_SESSION['username'] existence. Since another session
is created, that variable is null.
Example2: I ini_set('session.auto_save', '1'), & session_start()
once (one session file gets created). But then when I return to the
original page (no session_start() should be needed?), the
$_SESSION['username'] ends up being null again.
From my unix experience with sessions, there should only be one file
created & reused (in both examples), right?
2. I actually use $_SESSION['name'], mine ($SESSION['any_var']) was
a typo.
Having these examples of what I've tried, do you have any idea what
could possibly be going wrong here? Or do you have any ideas on what I
could try to get around this problem?
Thanks,
Greg
Bill Liao wrote:
Hi,
1. check php.ini session.save_path
2. $SESSION['any_var'] should be $_SESSION['any_var']
----- Original Message -----
From: "Gregory Kaczmarczyk" <[EMAIL PROTECTED]>
Newsgroups: php.windows
To: <[EMAIL PROTECTED]>
Sent: Friday, April 04, 2003 2:13 PM
Subject: sessions problems
New to windows/PHP!
I'm having quite a bit of trouble with getting sessions to work right.
I've got PHP 4.3.1 installed on Windows 2000 with IIS. php.ini is
default from installation.
Each time I run session_start(), a new session is created disgarding the
previous page's session. If I call ini_set('session.auto_start', '1'),
the next page returns a $SESSION['any_var'] as nothing.
How can I get the session to "stick"?
If anyone needs more info on the configuration, please let me know.
Thanks for any/all help!
Greg
--- End Message ---