Re: [PHP] Session from php in ASP

2006-03-17 Thread Myk OLeary
PHP and ASP both have built in session handling.  The only problem  
is, they instantiate the sessions themselves.  Therefore, whenever  
you hit a page in ASP you'll start one session, but if you  
immediately hit a PHP  page on the same server in the same browser  
from  the same machine, you start a brand spanking new PHP session.


It'd be possible to write a handler that wrote information in and out  
of cookies and a DB and effectively merge the two systems into using  
the same handler.


Alternatively, you could use (un)serialize(); in PHP (along with the  
ASP equivalent) to store data in files, but I don't see that as being  
as efficient for this scenario.


-Myk OLeary
[EMAIL PROTECTED]
BLOG: http://www.blueneedle.com/wordpress/?bnphplists

On Mar 17, 2006, at 4:22 AM, Stefan wrote:


Hi NG

is it possible to get a Sessionvariable set in php read in an asp- 
file with

the tag %= Session(php) %?

Thanks in advance
Stefan

--
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] CPanel, PHP5 as CGI (was Re: [PHP] php 5 installation problem)

2006-03-17 Thread Myk OLeary
Ask them to install PHP5 to work with only .php5 extensioned files.   
They have no interoperability issues - you have access to PHP 5.   
PHP4 and PHP5 can safely coexist on the same server like this, as  
they aren't serving up the same files...


-Myk OLeary
[EMAIL PROTECTED]
BLOG: http://www.blueneedle.com/wordpress/?bnphplists

On Mar 17, 2006, at 7:17 AM, tedd wrote:


Edwin wrote:


I really have no idea (read: lazy to check now ;-) ) what
CPanel is. If it is a program written in PHP (4?), they could
just fix it to work with PHP5 -- CGI mode or not.


I sure would like to know because two of my host can't install PHP  
5 due to problems they have with CPanel and PHP 5 working together.


tedd
--
-- 
--

http://sperling.com

--
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] IE quirk

2006-03-17 Thread Myk OLeary
In this case it is very likely a feature.  It sounds like the  
Security settings are set at default in IE, which is to disallow  
third party cookies without P3P privacy policies.  I bet that if you  
add a P3P privacy policy header, that IE will like you just fine.   
This started with IE6, so you can try testing in IE5 to see if it  
works there right now.  If it does, continue on by reading the below  
URL..


http://www.w3.org/P3P/

-Myk OLeary
[EMAIL PROTECTED]
BLOG: http://www.blueneedle.com/wordpress/?bnphplists

On Mar 17, 2006, at 8:30 AM, Joe Henry wrote:


With IE, it's not a quirk. It's a feature.


On Thursday 16 March 2006 3:31 pm, Jay Blanchard wrote:

[snip]
I created a small bannering program. It works great in Firefox. But I
have a problem with IE.
If I place the banner on a different domain than the bannering  
program,

Ex:

www.bannerserver.com

www.otherserver.com   has img tag calling from www.bannerserver.com


I use a session to keep track of the banner that is displayed,  
have even

tried using cookies directly.

Works great in firefox, problem with IE is first time vising
www.otherserver.com, clicking on the img does not work,  
apparently, the
session was never start/recorded when retrieving the image.  
However, if


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



Re: [PHP] Converting a string

2006-03-17 Thread Myk OLeary
You're best off using an array that matches human readable form to  
field name as someone else suggested earlier.  Form names for basic  
fields like this should be standardized such that auto form fillers  
(aka Google toolbar) are able to work.  They won't know that your  
field named hmnrdble_F-irst_N-ame equates to a first name field.   
Skip the dastardly regexp and keep it simple.


On the posted to page populate the array with boolean values as you  
do you boundary checking.  If you fail, then save it to session,  
redirect back to the form, read the array from session, and you have  
access to ALL fields that failed, so you can not only have a message  
at top, but the ability to mark each field with a style or some such  
to visually draw the user to what they need to fix.


-Myk OLeary
[EMAIL PROTECTED]
BLOG: http://www.blueneedle.com/wordpress/?bnphplists

On Mar 17, 2006, at 11:21 AM, Jay Blanchard wrote:


[snip]
Then you should change the name of the field.  Seriously, what
do you
expect the script to do, exactly? and once you know the answer, what
would you do to achieve that?  Put that (emphasis to the second
question) in words and someone might be able to help you.
[/snip]

I expect that I can take a string, like 'psFirstName' and change it to
'First Name'. that way I don't have to worry about what some web
designer named his fields, I can turn them into human readable strings
without having to manually create a new array.

So far I have this

$newKey = preg_split(/([A-Z])/, substr($key, 2), -1,
PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);

Which returns;

Array
(
[0] = F
[1] = irst
[2] = N
[3] = ame
)

--
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