[PHP] PHPSESSIONID altering each time the page is loaded in IE

2004-01-20 Thread Tarrant Costelloe
As the subject says, I posted this bug report on the official php bugs
page http://bugs.php.net/bug.php?id=26950 and have now changed my
storing of user information to use cookies as such:

setcookie(cookie_auth_memberID, $row['id'], time()+604800,'/');
setcookie(cookie_auth_Username, $frmUsername, time()+604800,'/');
setcookie(cookie_auth_Password, $frmPassword, time()+604800,'/');
setcookie(cookie_auth_Group, $row['membergroup'], time()+604800,'/');

However anyway, on displaying my PHPSESSIONID in Internet Explorer 6, I
am now noticing that on the refresh of any page (by clicking on any
internal site link) the PHPSESSIONID is changing! This doesn't
happen in Mozilla or Opera, any ideas folks?

Top of each page looks like such:

session_save_path(/home/tazonlin/webs/www.planet-tolkien.com/sessions)
; 
session_start();

Regards,
 
Tarrant Costelloe

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



RE: [PHP] PHPSESSIONID altering each time the page is loaded in IE

2004-01-20 Thread Tarrant Costelloe
Nope, calling it once. For some odd reason as I have detailed here
http://bugs.php.net/bug.php?id=26950 IE is loosing all it's cookie data
on different clicks around the website. A piece at a time, however MOZ
and Opera are fine.

In Fellowship,
Tarrant 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 21 January 2004 00:22
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHPSESSIONID altering each time the page is loaded in
IE


 As the subject says, I posted this bug report on the official php bugs

 page http://bugs.php.net/bug.php?id=26950 and have now changed my 
 storing of user information to use cookies as such:

 setcookie(cookie_auth_memberID, $row['id'], time()+604800,'/'); 
 setcookie(cookie_auth_Username, $frmUsername, time()+604800,'/'); 
 setcookie(cookie_auth_Password, $frmPassword, time()+604800,'/'); 
 setcookie(cookie_auth_Group, $row['membergroup'], 
 time()+604800,'/');

 However anyway, on displaying my PHPSESSIONID in Internet Explorer 6, 
 I am now noticing that on the refresh of any page (by clicking on any 
 internal site link) the PHPSESSIONID is changing! This doesn't 
 happen in Mozilla or Opera, any ideas folks?


The only thing i have experienced is if you are calling session_start
twice ?



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

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



[PHP] Session expiry issues in IE, still.

2004-01-05 Thread Tarrant Costelloe
php-general,

I wrote to the list a couple of days ago about issues Planet-Tolkien.com
members were experiencing with Internet Explorer, where their PHP based
$_SESSION seemed to be expiring very speradically, where as Mozilla and
Opera browsers this issue was not occuring and they would stay logged-in.
It would appear this is a bit of a lost subject and little is known as to
why this might be happening on the list.

Just curious, but could it be something to do with the use of mod_rewrite?

Regards,
Tarrant

P.S. Our PHP configuration info is available at:
http://www.planet-tolkien.com/test.php

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



[PHP] PHP, Server-Side?

2004-01-04 Thread Tarrant Costelloe
php-general,

I was wondering if it is possible with PHP to create a snippet of code
which could execute on one server but be stored of a different server?

Basic premise is to sell a product written in PHP which people could
include on their site but not be able to edit or see the code, maybe by
using some kind of include(), url() or snippet method?

In Fellowship,
Tarrant 

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



RE: [PHP] PHP, Server-Side?

2004-01-04 Thread Tarrant Costelloe
Brilliant, just what I was looking for!

Thank You Larry.

In Fellowship,
Tarrant 

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED] 
Sent: 04 January 2004 16:58
To: Tarrant Costelloe; PHP List
Subject: RE: [PHP] PHP, Server-Side?


You can create a soap server.  I have one set up, the client side runs a
function which is translated into xml sent to the other server (in my
case over ssl) the other server translates to php, executes the function
and returns the results.  You create the actual code for the function on
the server and give the client details on what the function does and
what data it requires.  If you build both it is very easy.  The client
has no other options but to run the function name while supplying the
data.  ex.

server...

function pullLatestReport($login,$password,$howfarback)
{

check db for authentication...

if auth correct to run this function run

do queries nec. for request return result.
else
return error
}

As you can see the server has total control over what gets executed,
soap is designed to be platform independant.  .net, java etc. can be
used as the client.  Of course that is only a added benefit since you
are making both ends.

I use nusoap which is all php and isn't too hard to figure out.

Larry.

-Original Message-
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 04, 2004 11:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP, Server-Side?


php-general,

I was wondering if it is possible with PHP to create a snippet of code
which could execute on one server but be stored of a different server?

Basic premise is to sell a product written in PHP which people could
include on their site but not be able to edit or see the code, maybe by
using some kind of include(), url() or snippet method?

In Fellowship,
Tarrant

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

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

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



[PHP] PHP $_SESSION Expiring in IE

2004-01-03 Thread Tarrant Costelloe
Hello,

I have recently launched the new Planet-Tolkien.com, one would think
that writing a message board from scratch and a dynamic weather system,
a simple session login would be the least of my problems right? Wrong.

It would appear that for Mozilla and Opera keep a $_SESSION is not an
issue and the $_SESSION is continued until the member logs out. However
when members are using Internet Explorer browser (most versions it
seems), they can go around the site for varied amounts of time, usually
less than five minutes and then their $_SESSION will expire!!??

I cannot for the life of me figure out why a server side $_SESSION would
expire on IE but not for MOZ or Opera but it is, and I need to figure
out why and how can I fix this.

REF. All login information is saved as such:

session_save_path($path/sessions); 
session_start(); $_SESSION['session_memberID']=$session_memberID;
$_SESSION['session_username']=$session_username;
$_SESSION['session_groupID']=$membergroup;

In Fellowship,
Tarrant 

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



RE: [PHP] PHP $_SESSION Expiring in IE

2004-01-03 Thread Tarrant Costelloe
Are there any points in the program that redirect the user off site and
back or something with that affect that IE might be handling in a weird
way?

Nope

Do you have pages that detect the browser and feed alternate content
based on the browser?

Nope

do you always run the session_start before these checks?

Yes.

The only other thing I guess it could be is the .htaccess mod_rewrite
maybe? It's just weird that Internet Explorer is the only browser that
seemingly looses the members $_SESSION where as Mozilla is not effected
whatsoever.

In Fellowship,
Tarrant 

-Original Message-
From: Larry Brown [mailto:[EMAIL PROTECTED] 
Sent: 03 January 2004 16:34
To: Tarrant Costelloe; PHP List
Subject: RE: [PHP] PHP $_SESSION Expiring in IE


I use sessions with IE all the time without such a problem.  Are there
any points in the program that redirect the user off site and back or
something with that affect that IE might be handling in a wierd way?  Do
you have pages that detect the browser and feed alternate content based
on the browser?  If so do you always run the session_start before these
checks?

-Original Message-
From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 03, 2004 10:27 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP $_SESSION Expiring in IE


Hello,

I have recently launched the new Planet-Tolkien.com, one would think
that writing a message board from scratch and a dynamic weather system,
a simple session login would be the least of my problems right? Wrong.

It would appear that for Mozilla and Opera keep a $_SESSION is not an
issue and the $_SESSION is continued until the member logs out. However
when members are using Internet Explorer browser (most versions it
seems), they can go around the site for varied amounts of time, usually
less than five minutes and then their $_SESSION will expire!!??

I cannot for the life of me figure out why a server side $_SESSION would
expire on IE but not for MOZ or Opera but it is, and I need to figure
out why and how can I fix this.

REF. All login information is saved as such:

session_save_path($path/sessions);
session_start(); $_SESSION['session_memberID']=$session_memberID;
$_SESSION['session_username']=$session_username;
$_SESSION['session_groupID']=$membergroup;

In Fellowship,
Tarrant

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

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

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



RE: [PHP] PHP $_SESSION Expiring in IE

2004-01-03 Thread Tarrant Costelloe
Doesn't seem to have solved the problem... My session include file at
the top of all documents looks like:

session_save_path($some_path/sessions); 
ini_set('session.use_cookies', 1);
ini_set('session.gc_probability', 1);
ini_set('session.gc_maxlifetime', 60 * 60);
ini_set('session.auto_start', '1');
session_start();
header(Cache-control: private);

Here is a link to my PHP configuration:
http://www.planet-tolkien.com/test.php

In Fellowship,
Tarrant 

-Original Message-
From: Kirk Babb [mailto:[EMAIL PROTECTED] 
Sent: 03 January 2004 21:13
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP $_SESSION Expiring in IE


Have you tried the header(Cache-control: private) workaround for IE6?  I
seem to remember reading something about that on one of the web dev
sites (devshed probably).  Use that immediately after session_start()
and see if it makes a difference.

Kirk


Tarrant Costelloe [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Are there any points in the program that redirect the user off site 
 and back or something with that affect that IE might be handling in a 
 weird way?

 Nope

 Do you have pages that detect the browser and feed alternate content 
 based on the browser?

 Nope

 do you always run the session_start before these checks?

 Yes.

 The only other thing I guess it could be is the .htaccess mod_rewrite 
 maybe? It's just weird that Internet Explorer is the only browser that

 seemingly looses the members $_SESSION where as Mozilla is not 
 effected whatsoever.

 In Fellowship,
 Tarrant

 -Original Message-
 From: Larry Brown [mailto:[EMAIL PROTECTED]
 Sent: 03 January 2004 16:34
 To: Tarrant Costelloe; PHP List
 Subject: RE: [PHP] PHP $_SESSION Expiring in IE


 I use sessions with IE all the time without such a problem.  Are there

 any points in the program that redirect the user off site and back or 
 something with that affect that IE might be handling in a wierd way?  
 Do you have pages that detect the browser and feed alternate content 
 based on the browser?  If so do you always run the session_start 
 before these checks?

 -Original Message-
 From: Tarrant Costelloe [mailto:[EMAIL PROTECTED]
 Sent: Saturday, January 03, 2004 10:27 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP $_SESSION Expiring in IE


 Hello,

 I have recently launched the new Planet-Tolkien.com, one would think 
 that writing a message board from scratch and a dynamic weather 
 system, a simple session login would be the least of my problems 
 right? Wrong.

 It would appear that for Mozilla and Opera keep a $_SESSION is not an 
 issue and the $_SESSION is continued until the member logs out. 
 However when members are using Internet Explorer browser (most 
 versions it seems), they can go around the site for varied amounts of 
 time, usually less than five minutes and then their $_SESSION will 
 expire!!??

 I cannot for the life of me figure out why a server side $_SESSION 
 would expire on IE but not for MOZ or Opera but it is, and I need to 
 figure out why and how can I fix this.

 REF. All login information is saved as such:

 session_save_path($path/sessions);
 session_start(); $_SESSION['session_memberID']=$session_memberID;
 $_SESSION['session_username']=$session_username;
 $_SESSION['session_groupID']=$membergroup;

 In Fellowship,
 Tarrant

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

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

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

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



[PHP] SELECT * FROM

2001-08-29 Thread Tarrant Costelloe

Hello all, 
I have a designing a website of which people can submit news to, this works
fine. Just on the main page I have the following code (snippet);

?php
$db = mysql_connect(localhost, root);
mysql_select_db(tolkiengossip,$db);
$result = mysql_query(SELECT * FROM news,$db);
if ($myrow = mysql_fetch_array($result)) {
  echo table width=100% border=1 color=black cellpadding=3 cellspacing=0
bordercolor=#66\n;

  do {
printf(tr bgcolor=#99bTitle:/b %s bBy:/b %s |
bDate:/b %s /trtrb Article:/b %s/trtrb URL:/b a href=%s
target=_blankClick here/a/trbr\n, $myrow[title],
 $myrow[nickname],$myrow[created],$myrow[article],$myrow[link]);

  } while ($myrow = mysql_fetch_array($result));

echo /font/table\n;

This again works fine just, the problem is that it always leaves the first
ever article submitted at the top of the page and the latest go down and
down etc... I would like to get the latest article to go at the top and
oldest to the bottom.

Any help would be gratefully apreciated!

Kind Regards

Tarrant Costelloe (Taz)
Development Department
---
(+44) 01273 852014
(+44) 07714087114
--
Qoute/Saying/Poem of the day:
Common sense is the collection of prejudices acquired by age eighteen. -
George Burns
DISCLAIMER: Any opinions expressed in this email are those of the individual
and not necessarily those of insurE-Com Ltd.  (http://www.insur-e.net). This
email and any files transmitted with it, including replies and forwarded
copies (which may contain alterations) subsequently transmitted from
insurE-com, are confidential and solely for the use of the intended
recipient. It may contain material protected by attorney-client privilege.
If you are not the intended recipient or the person responsible for
delivering to the intended recipient, be advised that you have received this
email in error and that any use is strictly prohibited. If you have received
this email in error please notify the technical Infrastructure Group by
telephone on +44 (0)1273 204203 or via mail to [EMAIL PROTECTED],
including a copy of this message. Please then delete this email and destroy
any copies of it.


-- 
PHP General 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]




[PHP] if(!$submit)

2001-08-07 Thread Tarrant Costelloe

When using if (!$submit)  I get an error saying:
Warning: Undefined variable: submit in C:\Inetpub\webpub\default.php on line
1
Fair enough, so then I add if (isset(!$submit)) and I then get an error;
Parse error: parse error, expecting `T_VARIABLE' or `'$'' 
Could someone please tell me the more than likely simple sollution.

Thanks

Taz

-- 
PHP General 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]




[PHP] Passing variables

2001-05-23 Thread Tarrant Costelloe

Is there any other way of passing variables other than submitting them
through a form and passing them using a URL? E.G. Currently I am passing
them though a url which is not the safest means in anyway.

Suggestions would be appreciated.

Thanks in advance.

Tarrant Costelloe
Web Developer
InsurE-com Ltd.

Office Tel:  +44 (0)1273 852014
Mobile: +44 07714087114
[EMAIL PROTECTED]
http://www.insur-e.net


-- 
PHP General 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]




[PHP] Opera Localhost

2001-05-22 Thread Tarrant Costelloe

I seem unable to view my localhost by typing http://localhost; in my opera
client. It comes up with the error message, The server requested a login
authentication method which is not supported.

Anyone know a way about this?

Thanks in advance!

Tarrant Costelloe

-- 
PHP General 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]




[PHP] UK based Hosting?

2001-05-21 Thread Tarrant Costelloe

 Can anyone recommend a good/cheap uk based, PHP host? I say cheap as I am
 going to be needing about 500mg's of space for my current site
 (httpp://planet-tolkien.com) hosted with uk2.net.

-- 
PHP General 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]




[PHP] if $submit

2001-05-21 Thread Tarrant Costelloe

Whenever I use  the ? if ($submit) ? statement in a php page it always
comes up with:

Warning: Undefined variable
Until the submit has been hit, and then it continue on with the rest of the
script fine ( ifelse).

How do you stop this warning message?

Thanks in advance!

Tarrant Costelloe
Web Developer
InsurE-com Ltd.

Office Tel:  +44 (0)1273 852014
Mobile: +44 07714087114
[EMAIL PROTECTED]
http://www.insur-e.net


-- 
PHP General 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]




[PHP] *IF* it was that simple

2001-05-17 Thread Tarrant Costelloe

Ok here is a simple IF statement I am messing around with, yet the parser is
sending back an error message of which I cannot see the cause:

Code:


?php
if ($name == tarrant  $username == costtar  $password ==
password);
{
print(Your are now logged in $name, thank you.);
}
else
{
print(Access Denied! IP Logged);
}
?

Error:


Parse error: parse error in C:\locahost\parser.php on line 16

Line 16 being the line which contains else (line 6).


-- 
PHP General 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]




[PHP] parsing variables

2001-05-17 Thread Tarrant Costelloe

How exactly is it that you parse variables from one page to another without
using a form. I have heard you can do it by using the URL? 

Taz



-- 
PHP General 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]




[PHP] If (!$submit)

2001-05-17 Thread Tarrant Costelloe

When using:

?php if (!$submit)
{
// First html page containing login form
}
else
{
// Results of login form, including login failed or successful print()
}
?

I get an error on line one, due to it at first not recognising the variable
$submit. If I ignore this and continue to fill in the form, on the clicking
the submit button I am then delivered to the same page of which it shows the
results.

So the only problem being, is when you first go to the page you get:

Warning: Undefined variable: submit in C:\Documents and Settings\Tarrant
Costelloe\Desktop\locahost\default.php on line 1

then the form, on which being filled in and submitted brings you back to the
page without the message and a print() of whether login successful or not.
How do I get rid of the original error?

Tarrant Costelloe
Web Developer
InsurE-com Ltd.

Office Tel:  +44 (0)1273 852014
Mobile: +44 07714087114
[EMAIL PROTECTED]
http://www.insur-e.net


-- 
PHP General 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]




[PHP] Deleting 1 file line

2001-05-16 Thread Tarrant Costelloe

Does anyone know what the code is, if you wanted to specify a specific line
in a file to delete and also to wipe clean the entire file?

Thanks in advance!

Taz

-- 
PHP General 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]




[PHP] Shopping with variables

2001-05-16 Thread Tarrant Costelloe

I am currently just messing around with a basic shopping cart, but have
stumbled onto a problem.
Bascially there is three input boxes all name DVD, VIDEO, CD and these are
also variables. Once the user has said they wanted 15 cd's for example,
the form then takes them onto the shop.php. Which say's something along the
lines of:

?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ?

This prints out, You have bought 16 - Thank you for example, see the
problem? How do I get it to print the variable name not just it's value?

Tarrant Costelloe
Software Developer
InsurE-com Ltd.

Tel:  +44 (0)1273 852014
[EMAIL PROTECTED]
http://www.insur-e.net


-- 
PHP General 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]




[PHP] Writing to files

2001-05-14 Thread Tarrant Costelloe

What's the most basic syntax for writing to a text file using PHP. I would
like to store some variables in one and then retrieve them a later stage...?

Taz

-- 
PHP General 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]