php-windows Digest 16 Jan 2008 01:40:46 -0000 Issue 3400
Topics (messages 28716 through 28723):
Re: Ok, next step/question
28716 by: Jacob Kruger
28717 by: Jacob Kruger
28718 by: Jacob Kruger
28719 by: Jacob Kruger
28720 by: Niel Archer
28722 by: Jacob Kruger
Installing PHP on IIS7 using FastCGI
28721 by: Mary Ellen Curtin
Re: Can't get MySQL extensions to load
28723 by: Bruce Cowin
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 ---
Ok.
Just tested this on another machine as well, and I now see if I go to the
phpInfo link on the WAMP server homepage on either machine it does seem to
work, but not in my own pages.
Also, rechecked on both machines, and I actually noticed that the very first
line:
<? php session_start(); ?>
does in fact seem to be being processed/disappears, but the rest of the php
code is still rendering unprocessed in those pages, so who knows.
Maybe I should actually send some of you my actual page file in case there's
something strange therein that I'm not noticing - who knows.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message -----
From: "Matt Horn" <[EMAIL PROTECTED]>
To: "Jacob Kruger" <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2008 1:23 PM
Subject: Re: [PHP-WIN] Ok, next step/question
does
<?php
phpinfo();
?>
return anything?
On 15/01/2008, Jacob Kruger <[EMAIL PROTECTED]> wrote:
Ok.
Been trying out various things including double-checking if my error
display
settings were there etc. etc., and finally sort of figured out what was
going wrong when I eventually saved the output of main.php from internet
explorer after it was still not showing any output, and then I sort of
discovered that for whatever reason, the PHP code isn't actually being
interpreted/processed since it still shows up in the html source thereof.
FWIW, here's the complete source code of that main.php file (as it
appears
when I edit it, or when I save it from IE):
<?php session_start(); ?>
<!doctype html public "-//W3C//DTD HTML 4.0 //EN">
<html>
<head>
<title>Admin main page</title>
</head>
<body>
<? php
echo "admin?: " . $_SESSION["admin"] . "<br />";
echo "What the hell!?!?!?";
?>
</body>
</html>
Anyideas (and FWIW, I have tried changing various small things, but who
knows...)?
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message -----
From: "James Crow" <[EMAIL PROTECTED]>
To: "Jacob Kruger" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, January 11, 2008 8:25 PM
Subject: Re: [PHP-WIN] Ok, next step/question
> That is correct. The session_start() command must appear in each script
> that needs to access the $_SESSION variable.
>
> Thanks,
> James
>
> On Fri, 2008-01-11 at 15:57 +0200, Jacob Kruger wrote:
>> Ok. Just realised that you might have meant that I need that
>> session_start(); statement on the first line of every page?
>>
>> Stay well
>>
>> Jacob Kruger
>> Blind Biker
>> Skype: BlindZA
>> '...Fate had broken his body, but not his spirit...'
>>
>> ----- Original Message -----
>> From: "Jacob Kruger" <[EMAIL PROTECTED]>
>> To: <[EMAIL PROTECTED]>
>> Sent: Friday, January 11, 2008 3:52 PM
>> Subject: Re: [PHP-WIN] Ok, next step/question
>>
>>
>> > Already got that one on the very first line of the initial
>> > (index.php)
>> > page,
>> > and I am assigning an array element in that first page, which seems
>> > to
>> > work
>> > fine.
>> >
>> > Stay well
>> >
>> > Jacob Kruger
>> > Blind Biker
>> > Skype: BlindZA
>> > '...Fate had broken his body, but not his spirit...'
>> >
>> > ----- Original Message -----
>> > From: "James Crow" <
>> > [EMAIL PROTECTED]>
>> > To: "Jacob Kruger" <
>> > [EMAIL PROTECTED]>
>> > Cc: <
>> > [EMAIL PROTECTED]>
>> > Sent: Friday, January 11, 2008 3:42 PM
>> > Subject: Re: [PHP-WIN] Ok, next step/question
>> >
>> >> Jacob,
>> >>
>> >> You must issue a session_start() prior to outputting any code to
>> >> the
>> >> browser for sessions to work. There are tons of different ways to
>> >> configure things, but session_start() as the first thing in the
>> >> script
>> >> should get you started. Here is a basic example:
>> >>
>> >> index.php:
>> >> <?php
>> >> session_start();
>> >> $_SESSION['test_me'] = 'My test $_SESSION variable'; // stores a
>> >> value
>> >> in the $_SESSION array
>> >> ?>
>> >> <html><head>
>> >> <meta http-equiv="refresh" content="0;url=page2.php">
>> >> </head></html>
>> >> ################## End of index.php ##################
>> >>
>> >>
>> >> page2.php:
>> >> <?php
>> >> session_start()
>> >> ?>
>> >> <html><head><title>Page 2</title></head><body>
>> >> <?php
>> >> echo $_SESSION['test_me'];
>> >> ?>
>> >> </body></html>
>> >> ################# End of page2.php #######################
>> >>
>> >> The index.php page simply stores a value in the $_SESSION super
>> >> global
>> >> array and then immediately redirects to page2.php. page2.php
>> >> retrieves
>> >> the value stored by index.php and displays it as the content of the
>> >> web
>> >> page.
>> >>
>> >> This code is all from memory so it might have a bug, but it is how
>> >> I
>> >> got
>> >> started working with session support in PHP.
>> >>
>> >> Thanks,
>> >> James
>> >>
>> >>
>> >> On Fri, 2008-01-11 at 12:26 +0200, Jacob Kruger wrote:
>> >>> Now got that main page redirecting/spitting out the relevant JS
>> >>> code
>> >>> to
>> >>> get
>> >>> it to move on to the next page, but there I was trying to
>> >>> ascertain
>> >>> if
>> >>> the
>> >>> session variable/array element had actually been set, and, for
>> >>> whatever
>> >>> reason, no PHP code seems to be executing in main.php.
>> >>>
>> >>> Below is what I currently have inbetween the <body></body> tags:
>> >>>
>> >>> <? php
>> >>> echo "testing...";
>> >>> ?>
>> >>>
>> >>> Before I was trying to do something along the lines of:
>> >>> echo $_SESSION["admin"];
>> >>>
>> >>> And that also did nothing.
>> >>>
>> >>> I also tried changing the static HTML content to see if maybe the
>> >>> output
>> >>> was
>> >>> just being cached or something, but that renders correctly.
>> >>>
>> >>> Any ideas? (am I just not 'trying' correctly or something)
>> >>>
>> >>> Stay well
>> >>>
>> >>> Jacob Kruger
>> >>> Blind Biker
>> >>> Skype: BlindZA
>> >>> '...Fate had broken his body, but not his spirit...'
>> >>>
>> >>
>> >>
>> >
>> > --
>> > 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
--
-------------------------------------------
[EMAIL PROTECTED]
http://www.cypherpunk.za.net
------------------------------------------
--- End Message ---
--- Begin Message ---
Installed the full WAMP server configuration after I was encountering
problems with the PHP add-on for IIS, and I now simply stop IIs, then start
WAMP, and FWIW, I literally installed it on the second machine right now to
try this out, but, like I said, it also seems to have a problem of sorts.
Strangest thing is that while the installed page for PHPInfo works, it won't
even work in one of my own pages that has it in.
FWIW, I have WAMP server v.2.0 - AFAIK the latest version so I don't think
the problem is actually therein.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message -----
From: "Matt Horn" <[EMAIL PROTECTED]>
To: "Jacob Kruger" <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2008 2:05 PM
Subject: Re: [PHP-WIN] Ok, next step/question
looks tome as if php is not correctly installed
how did you install it?
zip or msi?
ISAPI filter or the cgi option?
On 15/01/2008, Jacob Kruger <[EMAIL PROTECTED]> wrote:
Nope.
Also tried that one, and not just in that page. Wherever I put it
(except I
haven't tried it in the 'working' index.php yet) it also returns nothing.
Just strange that the first page (index.php) still processes the logon
entries in that form, and spits out the required javascript to then take
you
to the page that does nothing. Have tried various combinations of F5,
Ctrl
+ F5 etc. to make sure that it's not just a client-side cacheing doing
something, so who knows.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message -----
From: "Matt Horn" <[EMAIL PROTECTED]>
To: "Jacob Kruger" <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2008 1:23 PM
Subject: Re: [PHP-WIN] Ok, next step/question
> does
> <?php
> phpinfo();
> ?>
>
> return anything?
>
>
> On 15/01/2008, Jacob Kruger <[EMAIL PROTECTED]> wrote:
>> Ok.
>>
>> Been trying out various things including double-checking if my error
>> display
>> settings were there etc. etc., and finally sort of figured out what
>> was
>> going wrong when I eventually saved the output of main.php from
>> internet
>> explorer after it was still not showing any output, and then I sort of
>> discovered that for whatever reason, the PHP code isn't actually being
>> interpreted/processed since it still shows up in the html source
>> thereof.
>>
>> FWIW, here's the complete source code of that main.php file (as it
>> appears
>> when I edit it, or when I save it from IE):
>>
>> <?php session_start(); ?>
>> <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
>> <html>
>> <head>
>> <title>Admin main page</title>
>> </head>
>> <body>
>> <? php
>> echo "admin?: " . $_SESSION["admin"] . "<br />";
>> echo "What the hell!?!?!?";
>> ?>
>> </body>
>> </html>
>>
>> Anyideas (and FWIW, I have tried changing various small things, but
>> who
>> knows...)?
>>
>> Jacob Kruger
>> Blind Biker
>> Skype: BlindZA
>> '...Fate had broken his body, but not his spirit...'
>>
>> ----- Original Message -----
>> From: "James Crow" <[EMAIL PROTECTED]>
>> To: "Jacob Kruger" <[EMAIL PROTECTED]>
>> Cc: <[EMAIL PROTECTED]>
>> Sent: Friday, January 11, 2008 8:25 PM
>> Subject: Re: [PHP-WIN] Ok, next step/question
>>
>>
>> > That is correct. The session_start() command must appear in each
>> > script
>> > that needs to access the $_SESSION variable.
>> >
>> > Thanks,
>> > James
>> >
>> > On Fri, 2008-01-11 at 15:57 +0200, Jacob Kruger wrote:
>> >> Ok. Just realised that you might have meant that I need that
>> >> session_start(); statement on the first line of every page?
>> >>
>> >> Stay well
>> >>
>> >> Jacob Kruger
>> >> Blind Biker
>> >> Skype: BlindZA
>> >> '...Fate had broken his body, but not his spirit...'
>> >>
>> >> ----- Original Message -----
>> >> From: "Jacob Kruger" <[EMAIL PROTECTED]>
>> >> To: <[EMAIL PROTECTED]>
>> >> Sent: Friday, January 11, 2008 3:52 PM
>> >> Subject: Re: [PHP-WIN] Ok, next step/question
>> >>
>> >>
>> >> > Already got that one on the very first line of the initial
>> >> > (index.php)
>> >> > page,
>> >> > and I am assigning an array element in that first page, which
>> >> > seems
>> >> > to
>> >> > work
>> >> > fine.
>> >> >
>> >> > Stay well
>> >> >
>> >> > Jacob Kruger
>> >> > Blind Biker
>> >> > Skype: BlindZA
>> >> > '...Fate had broken his body, but not his spirit...'
>> >> >
>> >> > ----- Original Message -----
>> >> > From: "James Crow" <
>> >> > [EMAIL PROTECTED]>
>> >> > To: "Jacob Kruger" <
>> >> > [EMAIL PROTECTED]>
>> >> > Cc: <
>> >> > [EMAIL PROTECTED]>
>> >> > Sent: Friday, January 11, 2008 3:42 PM
>> >> > Subject: Re: [PHP-WIN] Ok, next step/question
>> >> >
>> >> >> Jacob,
>> >> >>
>> >> >> You must issue a session_start() prior to outputting any code
>> >> >> to
>> >> >> the
>> >> >> browser for sessions to work. There are tons of different ways
>> >> >> to
>> >> >> configure things, but session_start() as the first thing in the
>> >> >> script
>> >> >> should get you started. Here is a basic example:
>> >> >>
>> >> >> index.php:
>> >> >> <?php
>> >> >> session_start();
>> >> >> $_SESSION['test_me'] = 'My test $_SESSION variable'; // stores a
>> >> >> value
>> >> >> in the $_SESSION array
>> >> >> ?>
>> >> >> <html><head>
>> >> >> <meta http-equiv="refresh" content="0;url=page2.php">
>> >> >> </head></html>
>> >> >> ################## End of index.php ##################
>> >> >>
>> >> >>
>> >> >> page2.php:
>> >> >> <?php
>> >> >> session_start()
>> >> >> ?>
>> >> >> <html><head><title>Page 2</title></head><body>
>> >> >> <?php
>> >> >> echo $_SESSION['test_me'];
>> >> >> ?>
>> >> >> </body></html>
>> >> >> ################# End of page2.php #######################
>> >> >>
>> >> >> The index.php page simply stores a value in the $_SESSION super
>> >> >> global
>> >> >> array and then immediately redirects to page2.php. page2.php
>> >> >> retrieves
>> >> >> the value stored by index.php and displays it as the content of
>> >> >> the
>> >> >> web
>> >> >> page.
>> >> >>
>> >> >> This code is all from memory so it might have a bug, but it is
>> >> >> how
>> >> >> I
>> >> >> got
>> >> >> started working with session support in PHP.
>> >> >>
>> >> >> Thanks,
>> >> >> James
>> >> >>
>> >> >>
>> >> >> On Fri, 2008-01-11 at 12:26 +0200, Jacob Kruger wrote:
>> >> >>> Now got that main page redirecting/spitting out the relevant JS
>> >> >>> code
>> >> >>> to
>> >> >>> get
>> >> >>> it to move on to the next page, but there I was trying to
>> >> >>> ascertain
>> >> >>> if
>> >> >>> the
>> >> >>> session variable/array element had actually been set, and, for
>> >> >>> whatever
>> >> >>> reason, no PHP code seems to be executing in main.php.
>> >> >>>
>> >> >>> Below is what I currently have inbetween the <body></body>
>> >> >>> tags:
>> >> >>>
>> >> >>> <? php
>> >> >>> echo "testing...";
>> >> >>> ?>
>> >> >>>
>> >> >>> Before I was trying to do something along the lines of:
>> >> >>> echo $_SESSION["admin"];
>> >> >>>
>> >> >>> And that also did nothing.
>> >> >>>
>> >> >>> I also tried changing the static HTML content to see if maybe
>> >> >>> the
>> >> >>> output
>> >> >>> was
>> >> >>> just being cached or something, but that renders correctly.
>> >> >>>
>> >> >>> Any ideas? (am I just not 'trying' correctly or something)
>> >> >>>
>> >> >>> Stay well
>> >> >>>
>> >> >>> Jacob Kruger
>> >> >>> Blind Biker
>> >> >>> Skype: BlindZA
>> >> >>> '...Fate had broken his body, but not his spirit...'
>> >> >>>
>> >> >>
>> >> >>
>> >> >
>> >> > --
>> >> > 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
>>
>>
>
>
> --
>
> -------------------------------------------
> [EMAIL PROTECTED]
> http://www.cypherpunk.za.net
> ------------------------------------------
>
--
-------------------------------------------
[EMAIL PROTECTED]
http://www.cypherpunk.za.net
------------------------------------------
--- End Message ---
--- Begin Message ---
Ok.
That seems to have fixed it (on at least one of the machines)
Thanks.
S'pose that's one of the irritations when using a screenreader since I
suppose I ass-umed that it didn't make a difference, and my screenreader
reads the different versions in exactly the same way.
Thanks again, and let's now see if I can come right further on.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message -----
From: "germana" <[EMAIL PROTECTED]>
To: "Jacob Kruger" <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2008 2:14 PM
Subject: Re: [PHP-WIN] Ok, next step/question
I don't know if im getting you well, and maybe this was an error on the
email and not in your code but.....
this, i think should be like:
<?php
echo "admin?: " . $_SESSION["admin"] . "<br />";
echo "What the hell!?!?!?";
?>
Note the space between <? and 'php' in your code.....
On Tue, 2008-01-15 at 13:05 +0200, Jacob Kruger wrote:
<? php
echo "admin?: " . $_SESSION["admin"] . "<br />";
echo "What the hell!?!?!?";
?>
Good Look!!!
--- End Message ---
--- Begin Message ---
No longer really relevant, but FWIW, my files are in a subfolder of
C:\WAMP\www, and like I said, it was in fact processing index.php, but not
all the code in main.php and they are in the same folder.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message -----
From: "Matt Horn" <
[EMAIL PROTECTED]>
To: "Jacob Kruger" <
[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2008 2:18 PM
Subject: Re: [PHP-WIN] Ok, next step/question
ok
this is a stupid question but yeah
your files are in the htdoc directory ?
and that has been set us as the place php will process files?
On 15/01/2008, Jacob Kruger <
[EMAIL PROTECTED]
wrote:
Installed the full WAMP server configuration after I was encountering
problems with the PHP add-on for IIS, and I now simply stop IIs, then
start
WAMP, and FWIW, I literally installed it on the second machine right now
to
try this out, but, like I said, it also seems to have a problem of sorts.
Strangest thing is that while the installed page for PHPInfo works, it
won't
even work in one of my own pages that has it in.
FWIW, I have WAMP server v.2.0 - AFAIK the latest version so I don't
think
the problem is actually therein.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message -----
From: "Matt Horn" <
[EMAIL PROTECTED]>
To: "Jacob Kruger" <
[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2008 2:05 PM
Subject: Re: [PHP-WIN] Ok, next step/question
> looks tome as if php is not correctly installed
>
> how did you install it?
> zip or msi?
>
> ISAPI filter or the cgi option?
>
>
> On 15/01/2008, Jacob Kruger <
[EMAIL PROTECTED]
wrote:
>> Nope.
>>
>> Also tried that one, and not just in that page. Wherever I put it
>> (except I
>> haven't tried it in the 'working' index.php yet) it also returns
>> nothing.
>>
>> Just strange that the first page (index.php) still processes the logon
>> entries in that form, and spits out the required javascript to then
>> take
>> you
>> to the page that does nothing. Have tried various combinations of F5,
>> Ctrl
>> + F5 etc. to make sure that it's not just a client-side cacheing doing
>> something, so who knows.
>>
>> Stay well
>>
>> Jacob Kruger
>> Blind Biker
>> Skype: BlindZA
>> '...Fate had broken his body, but not his spirit...'
>>
>> ----- Original Message -----
>> From: "Matt Horn" <
[EMAIL PROTECTED]>
>> To: "Jacob Kruger" <
[EMAIL PROTECTED]>
>> Sent: Tuesday, January 15, 2008 1:23 PM
>> Subject: Re: [PHP-WIN] Ok, next step/question
>>
>>
>> > does
>> > <?php
>> > phpinfo();
>> > ?>
>> >
>> > return anything?
>> >
>> >
>> > On 15/01/2008, Jacob Kruger <
[EMAIL PROTECTED]
wrote:
>> >> Ok.
>> >>
>> >> Been trying out various things including double-checking if my
>> >> error
>> >> display
>> >> settings were there etc. etc., and finally sort of figured out what
>> >> was
>> >> going wrong when I eventually saved the output of main.php from
>> >> internet
>> >> explorer after it was still not showing any output, and then I sort
>> >> of
>> >> discovered that for whatever reason, the PHP code isn't actually
>> >> being
>> >> interpreted/processed since it still shows up in the html source
>> >> thereof.
>> >>
>> >> FWIW, here's the complete source code of that main.php file (as it
>> >> appears
>> >> when I edit it, or when I save it from IE):
>> >>
>> >> <?php session_start(); ?>
>> >> <!doctype html public "-//W3C//DTD HTML 4.0 //EN">
>> >> <html>
>> >> <head>
>> >> <title>Admin main page</title>
>> >> </head>
>> >> <body>
>> >> <? php
>> >> echo "admin?: " . $_SESSION["admin"] . "<br />";
>> >> echo "What the hell!?!?!?";
>> >> ?>
>> >> </body>
>> >> </html>
>> >>
>> >> Anyideas (and FWIW, I have tried changing various small things, but
>> >> who
>> >> knows...)?
>> >>
>> >> Jacob Kruger
>> >> Blind Biker
>> >> Skype: BlindZA
>> >> '...Fate had broken his body, but not his spirit...'
>> >>
>> >> ----- Original Message -----
>> >> From: "James Crow" <
[EMAIL PROTECTED]>
>> >> To: "Jacob Kruger" <
[EMAIL PROTECTED]>
>> >> Cc: <
[EMAIL PROTECTED]>
>> >> Sent: Friday, January 11, 2008 8:25 PM
>> >> Subject: Re: [PHP-WIN] Ok, next step/question
>> >>
>> >>
>> >> > That is correct. The session_start() command must appear in each
>> >> > script
>> >> > that needs to access the $_SESSION variable.
>> >> >
>> >> > Thanks,
>> >> > James
>> >> >
>> >> > On Fri, 2008-01-11 at 15:57 +0200, Jacob Kruger wrote:
>> >> >> Ok. Just realised that you might have meant that I need that
>> >> >> session_start(); statement on the first line of every page?
>> >> >>
>> >> >> Stay well
>> >> >>
>> >> >> Jacob Kruger
>> >> >> Blind Biker
>> >> >> Skype: BlindZA
>> >> >> '...Fate had broken his body, but not his spirit...'
>> >> >>
>> >> >> ----- Original Message -----
>> >> >> From: "Jacob Kruger" <
[EMAIL PROTECTED]>
>> >> >> To: <
[EMAIL PROTECTED]>
>> >> >> Sent: Friday, January 11, 2008 3:52 PM
>> >> >> Subject: Re: [PHP-WIN] Ok, next step/question
>> >> >>
>> >> >>
>> >> >> > Already got that one on the very first line of the initial
>> >> >> > (index.php)
>> >> >> > page,
>> >> >> > and I am assigning an array element in that first page, which
>> >> >> > seems
>> >> >> > to
>> >> >> > work
>> >> >> > fine.
>> >> >> >
>> >> >> > Stay well
>> >> >> >
>> >> >> > Jacob Kruger
>> >> >> > Blind Biker
>> >> >> > Skype: BlindZA
>> >> >> > '...Fate had broken his body, but not his spirit...'
>> >> >> >
>> >> >> > ----- Original Message -----
>> >> >> > From: "James Crow" <
>> >> >> >
[EMAIL PROTECTED]>
>> >> >> > To: "Jacob Kruger" <
>> >> >> >
[EMAIL PROTECTED]>
>> >> >> > Cc: <
>> >> >> >
[EMAIL PROTECTED]>
>> >> >> > Sent: Friday, January 11, 2008 3:42 PM
>> >> >> > Subject: Re: [PHP-WIN] Ok, next step/question
>> >> >> >
>> >> >> >> Jacob,
>> >> >> >>
>> >> >> >> You must issue a session_start() prior to outputting any
>> >> >> >> code
>> >> >> >> to
>> >> >> >> the
>> >> >> >> browser for sessions to work. There are tons of different
>> >> >> >> ways
>> >> >> >> to
>> >> >> >> configure things, but session_start() as the first thing in
>> >> >> >> the
>> >> >> >> script
>> >> >> >> should get you started. Here is a basic example:
>> >> >> >>
>> >> >> >> index.php:
>> >> >> >> <?php
>> >> >> >> session_start();
>> >> >> >> $_SESSION['test_me'] = 'My test $_SESSION variable'; //
>> >> >> >> stores a
>> >> >> >> value
>> >> >> >> in the $_SESSION array
>> >> >> >> ?>
>> >> >> >> <html><head>
>> >> >> >> <meta http-equiv="refresh" content="0;url=page2.php">
>> >> >> >> </head></html>
>> >> >> >> ################## End of index.php ##################
>> >> >> >>
>> >> >> >>
>> >> >> >> page2.php:
>> >> >> >> <?php
>> >> >> >> session_start()
>> >> >> >> ?>
>> >> >> >> <html><head><title>Page 2</title></head><body>
>> >> >> >> <?php
>> >> >> >> echo $_SESSION['test_me'];
>> >> >> >> ?>
>> >> >> >> </body></html>
>> >> >> >> ################# End of page2.php #######################
>> >> >> >>
>> >> >> >> The index.php page simply stores a value in the $_SESSION
>> >> >> >> super
>> >> >> >> global
>> >> >> >> array and then immediately redirects to page2.php. page2.php
>> >> >> >> retrieves
>> >> >> >> the value stored by index.php and displays it as the content
>> >> >> >> of
>> >> >> >> the
>> >> >> >> web
>> >> >> >> page.
>> >> >> >>
>> >> >> >> This code is all from memory so it might have a bug, but it
>> >> >> >> is
>> >> >> >> how
>> >> >> >> I
>> >> >> >> got
>> >> >> >> started working with session support in PHP.
>> >> >> >>
>> >> >> >> Thanks,
>> >> >> >> James
>> >> >> >>
>> >> >> >>
>> >> >> >> On Fri, 2008-01-11 at 12:26 +0200, Jacob Kruger wrote:
>> >> >> >>> Now got that main page redirecting/spitting out the relevant
>> >> >> >>> JS
>> >> >> >>> code
>> >> >> >>> to
>> >> >> >>> get
>> >> >> >>> it to move on to the next page, but there I was trying to
>> >> >> >>> ascertain
>> >> >> >>> if
>> >> >> >>> the
>> >> >> >>> session variable/array element had actually been set, and,
>> >> >> >>> for
>> >> >> >>> whatever
>> >> >> >>> reason, no PHP code seems to be executing in main.php.
>> >> >> >>>
>> >> >> >>> Below is what I currently have inbetween the <body></body>
>> >> >> >>> tags:
>> >> >> >>>
>> >> >> >>> <? php
>> >> >> >>> echo "testing...";
>> >> >> >>> ?>
>> >> >> >>>
>> >> >> >>> Before I was trying to do something along the lines of:
>> >> >> >>> echo $_SESSION["admin"];
>> >> >> >>>
>> >> >> >>> And that also did nothing.
>> >> >> >>>
>> >> >> >>> I also tried changing the static HTML content to see if
>> >> >> >>> maybe
>> >> >> >>> the
>> >> >> >>> output
>> >> >> >>> was
>> >> >> >>> just being cached or something, but that renders correctly.
>> >> >> >>>
>> >> >> >>> Any ideas? (am I just not 'trying' correctly or something)
>> >> >> >>>
>> >> >> >>> Stay well
>> >> >> >>>
>> >> >> >>> Jacob Kruger
>> >> >> >>> Blind Biker
>> >> >> >>> Skype: BlindZA
>> >> >> >>> '...Fate had broken his body, but not his spirit...'
>> >> >> >>>
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> > --
>> >> >> > 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
>> >>
>> >>
>> >
>> >
>> > --
>> >
>> > -------------------------------------------
>> >
[EMAIL PROTECTED]
>> >
http://www.cypherpunk.za.net
>> > ------------------------------------------
>> >
>>
>>
>
>
> --
>
> -------------------------------------------
>
[EMAIL PROTECTED]
>
http://www.cypherpunk.za.net
> ------------------------------------------
>
--
PHP Windows Mailing List (
http://www.php.net/)
To unsubscribe, visit:
http://www.php.net/unsub.php
--
-------------------------------------------
[EMAIL PROTECTED]
http://www.cypherpunk.za.net
------------------------------------------
--- End Message ---
--- Begin Message ---
Hi,
the second tag has a space between "<?" and "php" making it invalid as
a starting php tag. That would explain why it's not being processed
--
Niel Archer
--- End Message ---
--- Begin Message ---
Thanks.
Yes, we figured that one out.
Like I said earlier, the problem is that I basically didn't realise the
difference since my screenreader software doesn't read those two versions
differently, so, to be honest, I hadn't realised it was a problem.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...Fate had broken his body, but not his spirit...'
----- Original Message -----
From: "Niel Archer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 15, 2008 6:08 PM
Subject: Re: [PHP-WIN] Ok, next step/question
Hi,
the second tag has a space between "<?" and "php" making it invalid as
a starting php tag. That would explain why it's not being processed
--
Niel Archer
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Or, more precisely, *trying* to install it.
The "Previously" part of my tale can be found here:
forums.iis.net/t/1147538.aspx
in a post on the IIS.NET forums.
To make a long and circumstantial story short, I currently have
installed:
- IIS7
- PHP 5.2.5, non-thread-safe version
- the FastCGI technical preview
When I was looking at these instructions
blogs.iis.net/bills/archive/2007/05/19/how-to-install-fastcgi-and-php-on-iis7-beta-3-video.aspx
I noticed that everything Bills mentioned looks like what I have, except
in
applicationhost.config under
<location path="Default Web Site">
<system.webServer>
I also have:
<handlers accessPolicy="Script, Execute, Read">
<remove name="PHP" />
<add name="PHP" path="*.php" verb="*" type=""
modules="IsapiModule" scriptProcessor="C:\php\php5isapi.dll"
resourceType="File" requireAccess="Script" preCondition="" />
</handlers>
which Bills doesn't mention. So I backed IIS and this file up, and then
deleted those lines, in the spirit of scientific enquiry and hitting
stuff
until it works.
Now:
1. Static .php pages appear just fine -- that is, an "index.php" page
with
only HTML, no actual PHP scripting.
2. I don't get an error message when I run phpinfo() or other
actively-scripted pages -- but I don't see anything else, either. It's
all
a blank.
I assume that the problem is the lack of a PHP handler with "Execute",
but I
have no idea what to call it or where to put it.
MEC
Doctor Science, MA
doctorscience dot blogspot dot com
--- End Message ---
--- Begin Message ---
I have a similar issue. We copied a PHP installation that was
successful on Windows 2000 to a 2003 server. Although it works fine on
2000, it won't load any of the extensions on 2003. I've checked the
.ini file and the extensions are definitely uncommented, the
extension_dir setting is correct, I've included c:\php in the path. PHP
works (as phpinfo() runs) but extensions don't load. A couple of things
I've noted that are different on this server (in case it's related):
- if I use cgi-win.exe, php pages won't load so have to use
phpisapi5.dll
- in phpinfo, the ini file path shows as C:\Windows instead of c:\php
even though there is no php.ini file in that folder
Can anyone help??
Regards,
Bruce
>>> "Patrick Farley" <[EMAIL PROTECTED]> 9/12/2007 6:11:58 p.m. >>>
Evening.
I've installed the latest PHP using the zip files (not the installer)
to my
Windows 2003 machine with IIS. I have tested the installation with a
phpinfo() and was successful. I installed Roundcube and when trying
to
connect to the site was greeted with an error about being unable to
connect
to the database. I rechecked my connection string and all seemed
well.
Figuring I'd come back to it later, I went to install Joomla and during
the
install process was told that Joomla is unable to connect to MySQL.
I have checked and rechecked my php.ini file (though I may be missing
something not obvious)
PHP in general works.
My system PATH is configured for C:\php and I have restarted several
times
I've even redownloaded the php zip files and compared the md5 to make
sure
it was not corrupt.
MySQL is active and working on localhost for an email server without
any
issue.
Have tried both mysql.dll and mysqli.dll
I have searched Google with out any success.
Is this something with PHP or my MySQL install? I'm out of ideas.
Patrick
--- End Message ---