[PHP] Question: Wai-aria?

2009-09-22 Thread Parham Doustdar
Hello there,
I have asked on the mailing lists that have blind users and no one seems to 
know about this technology (that is ironically created to help us blind folks). 
I was wondering if anyone here has the experience of implementing Wai-aria. 
Since my question is rather about Wai-aria than PHP and is off-topic, I'm first 
of all sorry to be posting it here (it is rather an act of desperation). 
Secondly, I ask people who have the time to help me to please contact me 
off-list at parham90 at gmail dot com.
Thanks.
-- 
---
Contact info:
Skype: parham-d
MSN: fire_lizard16 at hotmail dot com
GoogleTalk: parha...@gmail.com
Twitter: PD90
email: parham90 at GMail dot com

Re: [PHP] using a USB device (flash) in the Virtualbox

2009-09-22 Thread Ashley Sheridan
On Mon, 2009-09-21 at 22:50 -0700, chamba kasonde wrote:
> Hi!
> I am a new user of this feature and tool and would like to transfer data and 
> info to and from Windows Xp in the Virtualbox running on a Linux Ubuntu 
> platform.
> My first version of Virtualbox was 2._ _ _ which said it did not support that 
> feature.
> Therefore, I upgraded to 3._ _ _ which supports it but the flash does not 
> show nor appear in the XP window.
> How do I get to use my flash on both parallel running systems?
> 
> 
>   
Totally the wrong list for that sort of question. It's not even remotely
related to PHP...

Thanks,
Ash
http://www.ashleysheridan.co.uk




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



Re: [PHP] Question: Wai-aria?

2009-09-22 Thread Fernando Castillo Aparicio
Ups! By mistake I didn't reply to all. Resending. Sorry.





De: Parham Doustdar 
Para: php-general@lists.php.net
Enviado: martes, 22 de septiembre, 2009 9:41:44
Asunto: [PHP] Question: Wai-aria?

Hello there,
I
have asked on the mailing lists that have blind users and no one seems
to know about this technology (that is ironically created to help us
blind folks). I was wondering if anyone here has the experience of
implementing Wai-aria. Since my question is rather about Wai-aria than
PHP and is off-topic, I'm first of all sorry to be posting it here (it
is rather an act of desperation). Secondly, I ask people who have the
time to help me to please contact me off-list at parham90 at gmail dot
com.
Thanks.
-- 
---
Contact info:
Skype: parham-d
MSN: fire_lizard16 at hotmail dot com
GoogleTalk: parha...@gmail.com
Twitter: PD90
email: parham90 at GMail dot com


Have you tried the contact section for WAI at w3.org? 
http://www.w3.org/WAI/contacts

They have a WAI Interest Group mailing list (w3c-wai-ig-requ...@w3.org, 
"suscribe" as subject), and I believe that would be the best place to look for 
help.

Good luck.



  

Re: [PHP] Re: Validation XHTML code and repairing broken one

2009-09-22 Thread Michael A. Peters

Al wrote:





Hello,

I have few questions about validation XHTML and repairing if it's
broken. The problem is that I have some, for example HTML code (simple
web page) and want to load that page to DOMDocument and than make
something of it. That part works perfect, but if there is unclosed tag
or something like that when I try to load that page I get an error
because now that code is not valid. So my question would be, is there
some way that I could build some script in php that would run thought
that page and check if it's valid or not, and if it's not than try to
repair it. Something that you have in all tools, for example Eclipse,
NetBeans, etc. If anyone have any idea, please help me, because I'm
stuck in here :-(

Regards,
Dusan



I spent some time on this issue because I have several applications 
where users enter text that must be later displayed as valid XHTML on a 
webpage.


I've found Tidy [a PHP extension] is the best and simplest solution.


I agree - you can pass it through tidy and then import it into a DOM or 
whatever it is you need x(ht)ml for.


It works well for me.

You can also use HTML Purifier to remove tags you do not want to allow, 
and HTML Purifier can pass it through tidy for you.


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



Re: [PHP] using a USB device (flash) in the Virtualbox

2009-09-22 Thread Robert Cummings



Ashley Sheridan wrote:

On Mon, 2009-09-21 at 22:50 -0700, chamba kasonde wrote:

Hi!
I am a new user of this feature and tool and would like to transfer data and 
info to and from Windows Xp in the Virtualbox running on a Linux Ubuntu 
platform.
My first version of Virtualbox was 2._ _ _ which said it did not support that 
feature.
Therefore, I upgraded to 3._ _ _ which supports it but the flash does not show 
nor appear in the XP window.
How do I get to use my flash on both parallel running systems?


  

Totally the wrong list for that sort of question. It's not even remotely
related to PHP...


You want to skip the OSE version and get the version that has USB 
support built in. The open source edition does not have USB support due 
to licensing (or somesuch) issues.


Alternatively you can set up a shared folder so that a folder on your 
Ubuntu host can be mapped to a drive in the Windows XP guest. The latter 
is more convenient for sharing your uh.. PHP data amongst multiple guests.


Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

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



[PHP] session.gc_maxlifetime

2009-09-22 Thread Tom Worster
i'm not 100% sure what the manual means when it says...

session.gc_maxlifetime integer
session.gc_maxlifetime specifies the number of seconds after which data will
be seen as 'garbage' and cleaned up. Garbage collection occurs during
session start.

what event exactly does the "after which" here refer to?

i'd like to think that it means that a session is eligible for gc no sooner
than session.gc_maxlifetime seconds after the most recent access (read or
write) to that session. but it seems dangerously presumptuous to assume that
this is the case.

what do you take it to mean?



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



[PHP] Re: session.gc_maxlifetime

2009-09-22 Thread Ralph Deffke
Hi Tom,

i did find this in the bug reports, its pretty new and should be an answer.

http://news.php.net/php.doc.bugs/2653

ralph_def...@yahoo.de


"Tom Worster"  wrote in message
news:c6de9eee.12c8d%...@thefsb.org...
> i'm not 100% sure what the manual means when it says...
>
> session.gc_maxlifetime integer
> session.gc_maxlifetime specifies the number of seconds after which data
will
> be seen as 'garbage' and cleaned up. Garbage collection occurs during
> session start.
>
> what event exactly does the "after which" here refer to?
>
> i'd like to think that it means that a session is eligible for gc no
sooner
> than session.gc_maxlifetime seconds after the most recent access (read or
> write) to that session. but it seems dangerously presumptuous to assume
that
> this is the case.
>
> what do you take it to mean?
>
>



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



[PHP] Re: session.gc_maxlifetime

2009-09-22 Thread Ralph Deffke
I forgot to mention, that this doesn't mean, you can not read data after
this timeout or that a session does ALWAYS die after this timeout. I would
assume, that the server has to have a reason to run garbage clean up. If the
server is not running a clean up, I would expect the session would excist
longer for access.

ralph_def...@yahoo.de


"Tom Worster"  wrote in message
news:c6de9eee.12c8d%...@thefsb.org...
> i'm not 100% sure what the manual means when it says...
>
> session.gc_maxlifetime integer
> session.gc_maxlifetime specifies the number of seconds after which data
will
> be seen as 'garbage' and cleaned up. Garbage collection occurs during
> session start.
>
> what event exactly does the "after which" here refer to?
>
> i'd like to think that it means that a session is eligible for gc no
sooner
> than session.gc_maxlifetime seconds after the most recent access (read or
> write) to that session. but it seems dangerously presumptuous to assume
that
> this is the case.
>
> what do you take it to mean?
>
>



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



Re: [PHP] Re: session.gc_maxlifetime

2009-09-22 Thread Tom Worster
thank you, Ralph!

i'm going to be bold and assume that tom at punkave dot com is right despite
that the report was discarded.

i got a complaint from a client about some users reporting being logged out
with rather short periods of inactivity. but session.gc_maxlifetime is set
to 6 hours so i don't think that's the source of the problem.


On 9/22/09 4:17 PM, "Ralph Deffke"  wrote:

> Hi Tom,
> 
> i did find this in the bug reports, its pretty new and should be an answer.
> 
> http://news.php.net/php.doc.bugs/2653
> 
> ralph_def...@yahoo.de
> 
> 
> "Tom Worster"  wrote in message
> news:c6de9eee.12c8d%...@thefsb.org...
>> i'm not 100% sure what the manual means when it says...
>> 
>> session.gc_maxlifetime integer
>> session.gc_maxlifetime specifies the number of seconds after which data
> will
>> be seen as 'garbage' and cleaned up. Garbage collection occurs during
>> session start.
>> 
>> what event exactly does the "after which" here refer to?
>> 
>> i'd like to think that it means that a session is eligible for gc no
> sooner
>> than session.gc_maxlifetime seconds after the most recent access (read or
>> write) to that session. but it seems dangerously presumptuous to assume
> that
>> this is the case.
>> 
>> what do you take it to mean?
>> 
>> 
> 
> 



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



Re: [PHP] Re: session.gc_maxlifetime

2009-09-22 Thread Ralph Deffke
Hi Tom,

in sometimes 2001 I did have incidences with those things, and as I remember
over the past years there where some trouble with operating systems and
stuff. This part is very deep inside the os. I would expect that this is
still to consider. I also would check, if this occurs on very busy/low
memory server.

If I would programm the garbage collection clean up part, and if the server
is about to run out of memory, I would kill sessions being longer time idle
even when they are not yet as old as it is set in the gc_maxlifetime. This
would be far better then shutting down the whole server just because there a
100 of idle sessions waiting to get used again.

as u mention a maxlivetime of 6h I would bet, that this is the problem. I
would not trust such a long lifetime at all.

If sessions have to be active such a long time, I would see only cooky based
solutions

let me know, what u did investigate on this.

ralph_def...@yahoo.de


"Tom Worster"  wrote in message
news:c6deae55.12cae%...@thefsb.org...
> thank you, Ralph!
>
> i'm going to be bold and assume that tom at punkave dot com is right
despite
> that the report was discarded.
>
> i got a complaint from a client about some users reporting being logged
out
> with rather short periods of inactivity. but session.gc_maxlifetime is set
> to 6 hours so i don't think that's the source of the problem.
>
>
> On 9/22/09 4:17 PM, "Ralph Deffke"  wrote:
>
> > Hi Tom,
> >
> > i did find this in the bug reports, its pretty new and should be an
answer.
> >
> > http://news.php.net/php.doc.bugs/2653
> >
> > ralph_def...@yahoo.de
> >
> >
> > "Tom Worster"  wrote in message
> > news:c6de9eee.12c8d%...@thefsb.org...
> >> i'm not 100% sure what the manual means when it says...
> >>
> >> session.gc_maxlifetime integer
> >> session.gc_maxlifetime specifies the number of seconds after which data
> > will
> >> be seen as 'garbage' and cleaned up. Garbage collection occurs during
> >> session start.
> >>
> >> what event exactly does the "after which" here refer to?
> >>
> >> i'd like to think that it means that a session is eligible for gc no
> > sooner
> >> than session.gc_maxlifetime seconds after the most recent access (read
or
> >> write) to that session. but it seems dangerously presumptuous to assume
> > that
> >> this is the case.
> >>
> >> what do you take it to mean?
> >>
> >>
> >
> >
>
>



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



[PHP] Misusing The URLENCODE/DECODE() Functions

2009-09-22 Thread Nitsan Bin-Nun
Hi List

I usually don't tend to post here but I have no time and no idea :(

I'm using .htaccess and a php router file (based upon regex patterns) in
order to create google-friendly URL's

It works like a charm, but somehow it has decoding '+' signs and similar
things into the appropriate character

For instance, I'm trying to reach this page:
A%252bk/ASTROBEAM_S130.html


It's being parsed by the following regex pattern:
'bulb/(.+/.+)\.html' => 'index.php?a=lamp_by_model&model=$1',

The loaded page PHP content is:
list($make, $model) = parse_model_slug($_GET['model']);

The parse_model_slug() function:
function parse_model_slug($slug)
{
$r = explode("/", $slug);
$r[0] = str_replace("_", " ", $r[0]);
$r[1] = str_replace("_", " ", $r[1]);
var_dump($r);
die;
return array('make' => $r[0], 'model' => $r[1]);
}

The current output is:
A%252bk/ASTROBEAM_S130

array(2) {
  [0]=>
  string(7) "A%252bk"

  [1]=>
  string(14) "ASTROBEAM S130"
}


Then whenever I add urldecode() to the function:
function parse_model_slug($slug)
{
$r = explode("/", $slug);
$r[0] = str_replace("_", " ", urldecode($r[0]));

$r[1] = str_replace("_", " ", urldecode($r[1]));
var_dump($r);
die;
return array('make' => $r[0], 'model' => $r[1]);
}



A%252bk/ASTROBEAM_S130array(2) {

  [0]=>
  string(5) "A%2bk"
  [1]=>
  string(14) "ASTROBEAM S130"
}


I have no idea how to parse this string right.

Any help would be highly appreciated!!

--
Nitsan


[PHP] Basic of Basics

2009-09-22 Thread Todd Dunning

Just put yourself in these shoes:

1. It's before you learned SQL.
2. You can declare variables and call includes and that's about it.
3. Your site looks great, the includes are ready. The variables are already 
in the includes.

4. You have a delimited file, 15K rows, 30 columns.
5. You have to get it done tonight.
6. Your entire career has been spent using static files, but now it's time 
to grow up.


Here's the challenge for you, Mr. Pre-SQL:
1. You need the usual search results, say about 20 rows, and the result 
page.  The most basic of basics.

2. Thank the gurus at php.general.



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



Re: [PHP] Basic of Basics

2009-09-22 Thread Robert Cummings

Todd Dunning wrote:

Just put yourself in these shoes:

1. It's before you learned SQL.
2. You can declare variables and call includes and that's about it.
3. Your site looks great, the includes are ready. The variables are already 
in the includes.

4. You have a delimited file, 15K rows, 30 columns.
5. You have to get it done tonight.
6. Your entire career has been spent using static files, but now it's time 
to grow up.


Here's the challenge for you, Mr. Pre-SQL:
1. You need the usual search results, say about 20 rows, and the result 
page.  The most basic of basics.

2. Thank the gurus at php.general.


There's a link out there somewhere about posting well formed questions. 
The above, if it is a question (I don't see any question marks), does 
not in any way adhere to the principles of a well formed question.


The existence of 5 suggests that 6 should have happened already.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

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



Re: [PHP] Basic of Basics

2009-09-22 Thread Todd Dunning
Rob it's LAMP php5. Godaddy virtual dedicated.  I'm considering if I should 
just bite the bullet and attempt to build my first SQL db tonight, because 
there's plenty of info about doing the basics via sql.  I have phpMyAdmin 
and cPanel.  It's a classic noob issue of whether to spend extra time doing 
it the right way or not.


Thanks very much for your interest in helping.

- Original Message - 
From: "Robert Cummings" 

To: "Todd Dunning" 
Cc: 
Sent: Tuesday, September 22, 2009 5:22 PM
Subject: Re: [PHP] Basic of Basics



Todd Dunning wrote:

Just put yourself in these shoes:

1. It's before you learned SQL.
2. You can declare variables and call includes and that's about it.
3. Your site looks great, the includes are ready. The variables are 
already in the includes.

4. You have a delimited file, 15K rows, 30 columns.
5. You have to get it done tonight.
6. Your entire career has been spent using static files, but now it's 
time to grow up.


Here's the challenge for you, Mr. Pre-SQL:
1. You need the usual search results, say about 20 rows, and the result 
page.  The most basic of basics.

2. Thank the gurus at php.general.


There's a link out there somewhere about posting well formed questions. 
The above, if it is a question (I don't see any question marks), does not 
in any way adhere to the principles of a well formed question.


The existence of 5 suggests that 6 should have happened already.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP





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



Re: [PHP] Basic of Basics

2009-09-22 Thread Robert Cummings

Todd Dunning wrote:
Rob it's LAMP php5. Godaddy virtual dedicated.  I'm considering if I should 
just bite the bullet and attempt to build my first SQL db tonight, because 
there's plenty of info about doing the basics via sql.  I have phpMyAdmin 
and cPanel.  It's a classic noob issue of whether to spend extra time doing 
it the right way or not.


Thanks very much for your interest in helping.


The following will do it without a database:



You still need to parse your feed afterwards which I presumed was a CSV 
or tab delimited style file WITHOUT newlines.


Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

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



[PHP] Testing "Broken Pipe" Recovery?

2009-09-22 Thread Dee Ayy
How do I intentionally break a pipe so that I can test recovering
under this eventuality?

I saw this post "[PHP] Pushing the limits of stream_socket_server()
and stream_select()" but my intermittent broken pipe occurs with 1
client, so I don't want to to create a 252 client situation.

I'm actually testing a client against a remote 3rd party server.  I
was thinking of creating my own server; connect my client to that; and
maybe just killing my server process while it's connected (rather than
using fclose which may be too clean).  Is that the right approach?

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