Re: Ok, next step/question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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" <matt@xxxxxxxxxxxxxxxxx>
To: "Jacob Kruger" <jacobk@xxxxxxxxxxx>
Sent: Tuesday, January 15, 2008 2:05 PM
Subject: Re:  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 <jacobk@xxxxxxxxxxx> 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" <matt@xxxxxxxxxxxxxxxxx>
To: "Jacob Kruger" <jacobk@xxxxxxxxxxx>
Sent: Tuesday, January 15, 2008 1:23 PM
Subject: Re:  Ok, next step/question


> does
> <?php
> phpinfo();
> ?>
>
> return anything?
>
>
> On 15/01/2008, Jacob Kruger <jacobk@xxxxxxxxxxx> 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" <james@xxxxxxxxxxxxx>
>> To: "Jacob Kruger" <jacobk@xxxxxxxxxxx>
>> Cc: <php-windows@xxxxxxxxxxxxx>
>> Sent: Friday, January 11, 2008 8:25 PM
>> Subject: Re:  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" <jacobk@xxxxxxxxxxx>
>> >> To: <php-windows@xxxxxxxxxxxxx>
>> >> Sent: Friday, January 11, 2008 3:52 PM
>> >> Subject: Re:  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" <
>> >> > james@xxxxxxxxxxxxx>
>> >> > To: "Jacob Kruger" <
>> >> > jacobk@xxxxxxxxxxx>
>> >> > Cc: <
>> >> > php-windows@xxxxxxxxxxxxx>
>> >> > Sent: Friday, January 11, 2008 3:42 PM
>> >> > Subject: Re:  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
>>
>>
>
>
> --
>
> -------------------------------------------
> matt@xxxxxxxxxxxxxxxxx
> http://www.cypherpunk.za.net
> ------------------------------------------
>




--

-------------------------------------------
matt@xxxxxxxxxxxxxxxxx
http://www.cypherpunk.za.net
------------------------------------------


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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux