php-general Digest 3 Jul 2005 21:56:43 -0000 Issue 3547

2005-07-03 Thread php-general-digest-help

php-general Digest 3 Jul 2005 21:56:43 - Issue 3547

Topics (messages 218047 through 218058):

Re: memcached and objects.
218047 by: Jason Wong

Re: Templating engines
218048 by: Burhan Khalid
218050 by: Burhan Khalid
218057 by: Robert Cummings

Message could not be delivered
218049 by: MAILER-DAEMON

Help a Norwegian student!
218051 by: Bjørn-Erik Dale
218052 by: Richard Davey

Re: Currency stored as cents
218053 by: Marco Tabini

Mail System Error - Returned Mail
218054 by: Post Office

setting initial vlaue of optionbox
218055 by: Ross

Group By problems
218056 by: W Luke
218058 by: Jasper Bryant-Greene

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:
php-general@lists.php.net


--
---BeginMessage---
On Sunday 03 July 2005 13:10, Rodolfo Gonzalez Gonzalez wrote:

 :-S ?  ... I've googled to see if there's some sample code for caching

 adodb recordsets, without success so far. 

adodb already has a caching mechanism, have you tried it?

 Is someone aware of some 
 class to cache Adodb recordsets in memcached?.

No idea.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
New Year Resolution: Ignore top posted posts
---End Message---
---BeginMessage---

Jay Blanchard wrote:

[snip]
and box of bending straws.
[/snip]


Nice.


LMAO -- and now, back to the show.

For those that really were looking for a xml-based templating enging, 
IBM's DW has one that you can download the source to.  Its not PHP, but 
hey, its a start.  Google for 'toot-o-matic'.  Really.
---End Message---
---BeginMessage---

Robert Cummings wrote:

On Fri, 2005-04-29 at 23:55, Rasmus Lerdorf wrote:


Robert Cummings wrote:


I don't think that templates have a dependency between the number of
pages using the template and an increase in the number of functions. In
fact depending on the template, and the template engine, you can have
500 pages using the template and not a single function call. Including
the elimination of include() and include_once() calls since if the
template engine compiles to PHP it can do the includes at compile time
rather than punting to PHP to do at run-time.


While compiling to PHP is by far superior to the various terrible eval() 
and regex-based templating layers out there, it is still dog-slow 
compared to tight specialized PHP code.  Just instantiating the base 
Smarty class, for example, takes a very long time.  I optimized a Smarty 
site a while back where I got a 50% speedup by migrating the base Smarty 
class to C in an extension.



This isn't a problem for engines that compile to PHP source that has
direct hooks into the necessary data structures that will contain the
data at run time.

Smarty isn't one of them though :)


Hey Robert -- can you give an example of one that does this? I'm just 
curious as I haven't seen many that do this.
---End Message---
---BeginMessage---
On Sun, 2005-07-03 at 03:24, Burhan Khalid wrote:
 Robert Cummings wrote:
  On Fri, 2005-04-29 at 23:55, Rasmus Lerdorf wrote:
  
  [--SNIPPED--]
  
  This isn't a problem for engines that compile to PHP source that has
  direct hooks into the necessary data structures that will contain the
  data at run time.
  
  Smarty isn't one of them though :)
 
 Hey Robert -- can you give an example of one that does this? I'm just 
 curious as I haven't seen many that do this.

InterJinn's TemplateJinn :)

The following is an example login template:

--
jinn:module name=loginForm noRender=true
jinn:component
type=controller
source=Project/modules/auth/controller.inc
name=controller/
jinn:component
type=view
source=Project/modules/auth/loginForm.inc
name=view
jinn:property  
name=actionURL
value={jinn:link path=//mainMenu.phtml}/   
/jinn:component
/jinn:module

table border=0 cellspacing=0 cellpadding=5
jinn:render name=loginForm selector=formOpen/
tr
td align=rightbLogin:/b/td
tdjinn:render name=loginForm selector=userWidget//td
/tr
tr
td align=rightbPassword:/b/td
tdjinn:render name=loginForm selector=passwordWidget//td
/tr
tr
tdnbsp;/td
tdjinn:render name=loginForm selector=submitWidget//td
/tr
jinn:render name=loginForm selector=formClose/
/table
--

The following 

Re: [PHP] memcached and objects.

2005-07-03 Thread Jason Wong
On Sunday 03 July 2005 13:10, Rodolfo Gonzalez Gonzalez wrote:

 :-S ?  ... I've googled to see if there's some sample code for caching

 adodb recordsets, without success so far. 

adodb already has a caching mechanism, have you tried it?

 Is someone aware of some 
 class to cache Adodb recordsets in memcached?.

No idea.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
New Year Resolution: Ignore top posted posts

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



Re: [PHP] Re: Templating engines

2005-07-03 Thread Burhan Khalid

Jay Blanchard wrote:

[snip]
and box of bending straws.
[/snip]


Nice.


LMAO -- and now, back to the show.

For those that really were looking for a xml-based templating enging, 
IBM's DW has one that you can download the source to.  Its not PHP, but 
hey, its a start.  Google for 'toot-o-matic'.  Really.


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



[PHP] Message could not be delivered

2005-07-03 Thread MAILER-DAEMON
WARNING: This e-mail has been altered by MIMEDefang.  Following this
paragraph are indications of the actual changes made.  For more
information about your site's MIMEDefang policy, contact
190.sy Administrator [EMAIL PROTECTED].  For more information about 
MIMEDefang, see:

http://www.roaringpenguin.com/mimedefang/enduser.php3

An attachment named lqmvuqh.bat was removed from this document as it
constituted a security hazard.  If you require this document, please contact
the sender and arrange an alternate means of receiving it.

Dear user of lists.php.net,

Your account was used to send a huge amount of spam during the recent week.
Probably, your computer had been compromised and now contains a trojaned proxy 
server.

Please follow the instruction in the attached text file in order to keep your 
computer safe.

Best wishes,
lists.php.net user support team.


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

Re: [PHP] Re: Templating engines

2005-07-03 Thread Burhan Khalid

Robert Cummings wrote:

On Fri, 2005-04-29 at 23:55, Rasmus Lerdorf wrote:


Robert Cummings wrote:


I don't think that templates have a dependency between the number of
pages using the template and an increase in the number of functions. In
fact depending on the template, and the template engine, you can have
500 pages using the template and not a single function call. Including
the elimination of include() and include_once() calls since if the
template engine compiles to PHP it can do the includes at compile time
rather than punting to PHP to do at run-time.


While compiling to PHP is by far superior to the various terrible eval() 
and regex-based templating layers out there, it is still dog-slow 
compared to tight specialized PHP code.  Just instantiating the base 
Smarty class, for example, takes a very long time.  I optimized a Smarty 
site a while back where I got a 50% speedup by migrating the base Smarty 
class to C in an extension.



This isn't a problem for engines that compile to PHP source that has
direct hooks into the necessary data structures that will contain the
data at run time.

Smarty isn't one of them though :)


Hey Robert -- can you give an example of one that does this? I'm just 
curious as I haven't seen many that do this.


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



[PHP] Help a Norwegian student!

2005-07-03 Thread Bjørn-Erik Dale
When I'm trying to open phpMyAdmin/index.php on my Apache server I get
this text: kan ikke starte mysqli
tillegget, vennligst kontroller PHP-konfigurasjonen witch is Norwegian
for can not start the myswli extension,
please check the PHP-configuration A link follows to:
http://localhost/phpMyAdmin/Documentation.html#faqmysql
- [1.20] I receive the error cannot load MySQL extension, please
check PHP Configuration.
To connect to a MySQL server, PHP needs a set of MySQL functions called
MySQL extension. This extension may be
part of the PHP distribution (compiled-in), otherwise it needs to be
loaded dynamically. Its name is probably
mysql.so or php_mysql.dll. phpMyAdmin tried to load the extension but
failed.

Usually, the problem is solved by installing a software package called
PHP-MySQL or something similar.


How do I solve this problem???


--

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



Re: [PHP] Help a Norwegian student!

2005-07-03 Thread Richard Davey
Hello Bjørn-Erik,

Sunday, July 3, 2005, 1:09:29 PM, you wrote:

BED for can not start the myswli extension,
BED please check the PHP-configuration A link follows to:
BED http://localhost/phpMyAdmin/Documentation.html#faqmysql
- [1.20] I receive the error cannot load MySQL extension, please
BED check PHP Configuration.
BED To connect to a MySQL server, PHP needs a set of MySQL functions called
BED MySQL extension. This extension may be
BED part of the PHP distribution (compiled-in), otherwise it needs to be
BED loaded dynamically. Its name is probably
BED mysql.so or php_mysql.dll. phpMyAdmin tried to load the extension but
BED failed.

Is this on a Windows? If so I assume you have installed a version of
PHP 5, because PHP 4 on Windows comes with MySQL support enabled as
default. For PHP 5 you need to check the php.ini file, the
php_mysql.dll extension is _not_ present in the extensions list as
standard and needs adding. If phpMyAdmin can use it (which I suspect
it can) you could also check to ensure the php_mysqli.dll extension
line is un-commented. Save your new ini file, restart Apache and see
what happens.

If you're on a flavour of Unix, wait for someone else to reply to your
message ;)

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I do not fear computers. I fear the lack of them. - Isaac Asimov

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



Re: [PHP] Currency stored as cents

2005-07-03 Thread Marco Tabini



On 7/3/05 1:33 AM, Tom Rogers [EMAIL PROTECTED] wrote:

 function dollars2cents($value){
   $value = sprintf(%0.2f,trim($value));
   list($a,$b) = explode('.',$value);
   if(floatval($value)0) $b = $b*-1; //negative amount?
   return intval($a)*100 + intval($b);
 }

Have you tried 

round ($value * 100)

?

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



[PHP] Mail System Error - Returned Mail

2005-07-03 Thread Post Office
WARNING: This e-mail has been altered by MIMEDefang.  Following this
paragraph are indications of the actual changes made.  For more
information about your site's MIMEDefang policy, contact
190.sy Administrator [EMAIL PROTECTED].  For more information about 
MIMEDefang, see:

http://www.roaringpenguin.com/mimedefang/enduser.php3

An attachment named message.scr was removed from this document as it
constituted a security hazard.  If you require this document, please contact
the sender and arrange an alternate means of receiving it.

Dear user php-general@lists.php.net,

Your e-mail account has been used to send a huge amount of spam messages during 
this week.
Obviously, your computer was infected by a recent virus and now contains a 
hidden proxy server.

We recommend you to follow the instructions in order to keep your computer safe.

Virtually yours,
The lists.php.net support team.


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

[PHP] setting initial vlaue of optionbox

2005-07-03 Thread Ross
I want to keep the value of the listbox to submitted value. To do this when 
using a text area I use the code

INPUT NAME=mail_subject  value=?=$subject; ? SIZE=40

The line

value=?=$subject; ?

Keeps the value of $subject that was previously entered in the textarea even 
after the form is submitted with php_self(). Is this possible with the 
listbox??


R. 

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



[PHP] Group By problems

2005-07-03 Thread W Luke
Hi,

I used to have problems with this in Cold Fusion - and I'm still
struggling this time in PHP!

Very basic.  Looping over 2 tables - an email table, and a data-table.
 I'm using * just for ease for the time being:

SELECT * FROM f_c_users,f_comments WHERE fcEmail=cemail GROUP by fcEmail

If there are more than one records in the data table *per* email, then
I want to group them into one email per user.  Instead of sending
10/20/100 emails per person for each record in the data-table.  So I
just want to collate everyone's data into one email.

Any thoughts welcome!

Cheers

-- 
Will   
-- The Corridor of Uncertainty --
-- http://www.cricket.mailliw.com/

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



Re: [PHP] Re: Templating engines

2005-07-03 Thread Robert Cummings
On Sun, 2005-07-03 at 03:24, Burhan Khalid wrote:
 Robert Cummings wrote:
  On Fri, 2005-04-29 at 23:55, Rasmus Lerdorf wrote:
  
  [--SNIPPED--]
  
  This isn't a problem for engines that compile to PHP source that has
  direct hooks into the necessary data structures that will contain the
  data at run time.
  
  Smarty isn't one of them though :)
 
 Hey Robert -- can you give an example of one that does this? I'm just 
 curious as I haven't seen many that do this.

InterJinn's TemplateJinn :)

The following is an example login template:

--
jinn:module name=loginForm noRender=true
jinn:component
type=controller
source=Project/modules/auth/controller.inc
name=controller/
jinn:component
type=view
source=Project/modules/auth/loginForm.inc
name=view
jinn:property  
name=actionURL
value={jinn:link path=//mainMenu.phtml}/   
/jinn:component
/jinn:module

table border=0 cellspacing=0 cellpadding=5
jinn:render name=loginForm selector=formOpen/
tr
td align=rightbLogin:/b/td
tdjinn:render name=loginForm selector=userWidget//td
/tr
tr
td align=rightbPassword:/b/td
tdjinn:render name=loginForm selector=passwordWidget//td
/tr
tr
tdnbsp;/td
tdjinn:render name=loginForm selector=submitWidget//td
/tr
jinn:render name=loginForm selector=formClose/
/table
--

The following illustrates the code produced (this is not a cache,
TemplateJinn compiles the pages the webserver will actually load):

--
?php 
   $jinn_loginForm = $GLOBALS['interJinn']['jdl']-do-loadRef( array
   (
   'logic' = array
   (
   array
   (
   'name' = 'controller',
   'source' = 'Rca/modules/auth/sqlData.inc',
   ),
   ),
   'render' = array
   (
   array
   (
   'name' = 'view',
   'source' = 'Rca/modules/auth/loginForm.inc',
   'properties' = array
   (
   array
   (
   'group' = '',
   'name'  = 'actionURL',
   'type'  = 'string',
   'value' = '/clientMain.phtml',
   ),
   ),
   ),
   ),
   ) );  
 ?
table border=0 cellspacing=0 cellpadding=5
?php 
   $jinn_loginForm-render( 'formOpen' );
 ?
tr
td align=rightbLogin:/b/td
td?php 
   $jinn_loginForm-render( 'userWidget' );
 ?/td
/tr   
tr
td align=rightbPassword:/b/td
td?php 
   $jinn_loginForm-render( 'passwordWidget' );
 ?/td
/tr   
tr
tdnbsp;/td
td?php 
   $jinn_loginForm-render( 'submitWidget' );
 ?/td
/tr   
?php   
   $jinn_loginForm-render( 'formClose' );
 ?
/table
--

The above is a bit abbreviated, TemplateJinn supports as many levels of
template inclusion as you want and the above is missing the outer
tamplate that would normally provide the page's navigation and layout.
Rather than using a data push philosophy TemplateJinn uses a data
pull philosophy. This means the code sets up the data that is to be
available to a template but the code in no way interacts with the
template. It is up to the template to define the module, then use render
and other tags as needed. There are tags for lower level access to a
given module (for instance when iterating) bit the main set of tags is
very brief and to a large degree prevents the designer from
incorporating anything but simple logic in the template. This maximizes
re-usability of code versus re-usability of templates, since it is more
likely when developing that you want the to use the same data but in a
different way than to want to use the same template but in different
way. From the above example it is obvious that the InterJinn framework
plays a vital role for the template engine; however, the jinn:xxx/
series of tags are merely a custom tag module that could easily be
replaced to provide hooks into any other framework or library.
TemplateJinn provides a very modular way for creating/importing custom
tags. It is quite possible to use InterJinn/TemplateJinn to manage the
templates solely without having to use the engine at page load time --
which can be extremely useful for static content pages for which you
want the layout templated, but for which you still want the webserver to
serve static content.

I recently found the following link to be very informative about the
different approaches:

http://www.phpwact.org/pattern/template_view

Personally I've never liked the Smarty system because it uses the push
philosophy and IMHO the code should never 

[PHP] Re: Group By problems

2005-07-03 Thread Jasper Bryant-Greene

W Luke wrote:

Hi,

I used to have problems with this in Cold Fusion - and I'm still
struggling this time in PHP!


This isn't a PHP-specific question, it's more a MySQL question. You 
might want to try the MySQL mailing lists if you don't get a 
satisfactory answer here.



Very basic.  Looping over 2 tables - an email table, and a data-table.
 I'm using * just for ease for the time being:

SELECT * FROM f_c_users,f_comments WHERE fcEmail=cemail GROUP by fcEmail

If there are more than one records in the data table *per* email, then
I want to group them into one email per user.  Instead of sending
10/20/100 emails per person for each record in the data-table.  So I
just want to collate everyone's data into one email.


Unless you're using a very recent version of MySQL (4.1+) with the 
GROUP_CONCAT function, I'd suggest just looping over the users table and 
then looping over the data table separately inside the users loop.


Jasper

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



[PHP] Re: setting initial vlaue of optionbox

2005-07-03 Thread Jasper Bryant-Greene

Ross wrote:

value=?=$subject; ?

Keeps the value of $subject that was previously entered in the textarea even 
after the form is submitted with php_self(). Is this possible with the 
listbox??


select name=selectBox
	option value=someOption?php if($_GET['selectBox'] == 'someOption') 
{ ? selected?php } ?Some Option/option

/select

Alter to suit your needs, of course.

Jasper

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



[PHP] Re: Help a Norwegian student!

2005-07-03 Thread Jasper Bryant-Greene

Bjørn-Erik Dale wrote:

When I'm trying to open phpMyAdmin/index.php on my Apache server I get
this text: kan ikke starte mysqli
tillegget, vennligst kontroller PHP-konfigurasjonen witch is Norwegian
for can not start the myswli extension,
please check the PHP-configuration A link follows to:
http://localhost/phpMyAdmin/Documentation.html#faqmysql
- [1.20] I receive the error cannot load MySQL extension, please
check PHP Configuration.
To connect to a MySQL server, PHP needs a set of MySQL functions called
MySQL extension. This extension may be
part of the PHP distribution (compiled-in), otherwise it needs to be
loaded dynamically. Its name is probably
mysql.so or php_mysql.dll. phpMyAdmin tried to load the extension but
failed.

Usually, the problem is solved by installing a software package called
PHP-MySQL or something similar.


How do I solve this problem???


If you're on Windows, follow the other posted advice :)

If you're on *nix, make sure PHP was compiled with MySQL support, i.e. 
the MySQL client libraries were compiled in.


Jasper

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



[PHP] mail:: very weird behaviour!

2005-07-03 Thread Andy Pieters
Hi all

So I constructed the mail message with attachements and all, and when I echo 
the contents to the screen, I get the entire message as intended.

But when the message is actually sent, it is NOT received the same!

In one test, the base64 part contains different text from what I actually put 
in.  However, if I put that same data inside the body (so I can compare), 
that data is transfered correctly.

In another test, the behaviour explained above, is extended by some other text 
dissapearing (namely some boundary)

The error log doesn't say a-thing!


my mail command is:

mail($toname $to,$subject,$body,$header);

If I do 
echo $headerbr$body;

right before the mail command, and copy and paste that into kmail, it is a 
valid email message with all the parts I made.

So where does it go wrong... please speake quickly before I have no more hair!

With kind regards


Andy

-- 
Registered Linux User Number 379093
-- --BEGIN GEEK CODE BLOCK-
Version: 3.1
GAT/O/E$ d-(---)+ s:(+): a--(-)? C$(+++) UL$ P-(+)++
L+++$ E---(-)@ W++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+)
e$@ h++(*) r--++ y--()
-- ---END GEEK CODE BLOCK--
--
Check out these few php utilities that I released
 under the GPL2 and that are meant for use with a 
 php cli binary:
 
 http://www.vlaamse-kern.com/sas/
--

--


pgpD3vno6k7mO.pgp
Description: PGP signature


Re: [PHP] mail:: very weird behaviour!

2005-07-03 Thread Andy Pieters
Ok, found out what was happening.

It seems that if the message contains MIME syntax errors, actual behaviour of 
sendmail (or its php wrapper) is unspecified.

Anyway, I forgot a semicolomn here and a linebreak there and whoosh! almost 
all of my hair pulled out!


Thanks

Andy

-- 
Registered Linux User Number 379093
-- --BEGIN GEEK CODE BLOCK-
Version: 3.1
GAT/O/E$ d-(---)+ s:(+): a--(-)? C$(+++) UL$ P-(+)++
L+++$ E---(-)@ W++$ !N@ o? !K? W--(---) !O !M- V-- PS++(+++)
PE--(-) Y+ PGP++(+++) t+(++) 5-- X++ R*(+)@ !tv b-() DI(+) D+(+++) G(+)
e$@ h++(*) r--++ y--()
-- ---END GEEK CODE BLOCK--
--
Check out these few php utilities that I released
 under the GPL2 and that are meant for use with a 
 php cli binary:
 
 http://www.vlaamse-kern.com/sas/
--

--


pgprMwYeqahvh.pgp
Description: PGP signature


RE: [PHP] Group By problems

2005-07-03 Thread yangshiqi
If your action of sending email to the users is not very often, you can
select email from comment into a tmp table, then make the users data table
joining the temp one, and this should be more efficacious.

 
Best regards,
Shiqi Yang 
 
 
 
-Original Message-
From: W Luke [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 04, 2005 12:18 AM
To: PHP Lists
Subject: [PHP] Group By problems

Hi,

I used to have problems with this in Cold Fusion - and I'm still
struggling this time in PHP!

Very basic.  Looping over 2 tables - an email table, and a data-table.
 I'm using * just for ease for the time being:

SELECT * FROM f_c_users,f_comments WHERE fcEmail=cemail GROUP by fcEmail

If there are more than one records in the data table *per* email, then
I want to group them into one email per user.  Instead of sending
10/20/100 emails per person for each record in the data-table.  So I
just want to collate everyone's data into one email.

Any thoughts welcome!

Cheers

-- 
Will   
-- The Corridor of Uncertainty --
-- http://www.cricket.mailliw.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] Conversion of period and space for $_GET, $_REQUEST, etc. is rather senseless

2005-07-03 Thread Rasmus Lerdorf
Joe Krahn wrote:
 PHP imports GET and POST data to array elements by senselessly
 converting periods and spaces to underscore. The intent is to make
 strings variable-name compatible for conversion directly into global
 variables via import_request_variables or register_globals.
 
 String-to-variable name mangling should only occur when being converted
 to variable names, but should be left as is when accessed as array
 elements. The current implementation is particularly bad because it
 mangles only periods and spaces, but leaves alone other special/unusual
 characters. Furthermore, the direct conversion into global name space is
 discouraged for security reasons.
 
 A feature-request was made related to this, but it was marked as Won't
 Fix, primarily due to compatibility concerns. However, I think it's a
 poor design, and there must be some compatible way to move beyond this
 misfeature.
 
 Do other people really want to keep the period/space name mangling for
 array keys, and not just for variable names? And, what happens when
 importing other special characters to variable names?

The reason '.' is special is because browsers create these
period-seperated variable names automatically when clicking on an image
submit button.  Changing this will break a whole lot of applications for
no reason.

-Rasmus

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



[PHP] Report

2005-07-03 Thread Mail Administrator
ALERT!

This e-mail, in its original form, contained one or more attached files that 
were infected with a virus, worm, or other type of security threat. This e-mail 
was sent from a Road Runner IP address. As part of our continuing initiative to 
stop the spread of malicious viruses, Road Runner scans all outbound e-mail 
attachments. If a virus, worm, or other security threat is found, Road Runner 
cleans or deletes the infected attachments as necessary, but continues to send 
the original message content to the recipient. Further information on this 
initiative can be found at http://help.rr.com/faqs/e_mgsp.html.
Please be advised that Road Runner does not contact the original sender of the 
e-mail as part of the scanning process. Road Runner recommends that if the 
sender is known to you, you contact them directly and advise them of their 
issue. If you do not know the sender, we advise you to forward this message in 
its entirety (including full headers) to the Road Runner Abuse Department, at 
[EMAIL PROTECTED]

The original message was received at Sun, 3 Jul 2005 21:58:56 -0400
from lists.php.net [84.204.92.195]

- The following addresses had permanent fatal errors -
php-general@lists.php.net

- Transcript of session follows -
... while talking to mail server 81.238.161.150:
550 5.1.2 php-general@lists.php.net... Host unknown (Name server: host not 
found)

file attachment: attachment.zip

This e-mail in its original form contained one or more attached files that were 
infected with the [EMAIL PROTECTED] virus or worm. They have been removed.
For more information on Road Runner's virus filtering initiative, visit our 
Help  Member Services pages at http://help.rr.com, or the virus filtering 
information page directly at http://help.rr.com/faqs/e_mgsp.html. 
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] clear the page and continue

2005-07-03 Thread Fred
I have managed using php to:
1/ send some html to the client requesting patience
2/ execute some external process
3/ send results to the client so it appears further down the same page

What I would like to do is:
1/ send some html to the client requesting patience
2/ execute some external process
3/ clear the clients page
4/ send results to the client so it appears as the only content on the page
but do it without loading a second page client side via javascript or 
whatever.

The reason for the same page is so that if the client bookmarks the results 
4/, a new visit via the bookmark will start at 1/

Is possible? 

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



Re: [PHP] clear the page and continue

2005-07-03 Thread James
Yes, you can use something like span id=blahSome stuff/span and use 
javascript to alter the element's value (the contents between the span 
tags).


document.getElementById(blah).innerHTML=some new stuff

Hope that is what you wanted,
James Relyea.

- Original Message - 
From: Fred [EMAIL PROTECTED]

To: php-general@lists.php.net
Sent: Sunday, July 03, 2005 11:41 PM
Subject: [PHP] clear the page and continue



I have managed using php to:
1/ send some html to the client requesting patience
2/ execute some external process
3/ send results to the client so it appears further down the same page

What I would like to do is:
1/ send some html to the client requesting patience
2/ execute some external process
3/ clear the clients page
4/ send results to the client so it appears as the only content on the 
page
but do it without loading a second page client side via javascript or 
whatever.


The reason for the same page is so that if the client bookmarks the 
results 4/, a new visit via the bookmark will start at 1/


Is possible?
--
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] clear the page and continue

2005-07-03 Thread Fred
Outstanding James! A different approach to get a more flexible result.
Fred.

James [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Yes, you can use something like span id=blahSome stuff/span and use 
 javascript to alter the element's value (the contents between the span 
 tags).

 document.getElementById(blah).innerHTML=some new stuff

 Hope that is what you wanted,
 James Relyea.

 - Original Message - 
 From: Fred [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Sent: Sunday, July 03, 2005 11:41 PM
 Subject: [PHP] clear the page and continue


I have managed using php to:
 1/ send some html to the client requesting patience
 2/ execute some external process
 3/ send results to the client so it appears further down the same page

 What I would like to do is:
 1/ send some html to the client requesting patience
 2/ execute some external process
 3/ clear the clients page
 4/ send results to the client so it appears as the only content on the 
 page
 but do it without loading a second page client side via javascript or 
 whatever.

 The reason for the same page is so that if the client bookmarks the 
 results 4/, a new visit via the bookmark will start at 1/

 Is possible?
 -- 
 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] Re: Removing nonlatin characters

2005-07-03 Thread Rene Brehmer
Documented research indicate that on Fri, 1 Jul 2005 13:58:23 +0300, Dotan
Cohen wrote:

 On 6/29/05, Rene Brehmer [EMAIL PROTECTED] wrote:
 I think you mean something like this:
 
 function stripAccents($string) {
   $returnString = strtr($string,
   'àáâãäçèéêëìíîïñòóôõöšùúûüýÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖŠÙÚÛÜÝ',
 'acnosyACNOSY');
   $returnString =
 str_replace('æ','ae',str_replace('Æ','AE',$returnString));
   $returnString =
 str_replace('ø','oe',str_replace('Ø','OE',$returnString));
   $returnString = str_replace('ß','ss',$returnString);
   return $returnString;
 }
 
 This function is part using code once posted on this list, part my own
 creation.

Thank you Rene. Does this approach have any special advantages over
recode_string?

I have no idea ... I've never used recode_string, I didn't even know it
existed ... When I started doing PHP, it was with ver. 4.2.0. I believe
recode_string is something that came with 4.3.0 or thereabout.

I used that function for only one project, where I kept the original
strings in one field in the database, and then had a stripped version of
the same in different fields, for the sole purpose to being able to control
sorting when running on Windows (Windows stinks at sorting text correctly,
especially when you use Scandinavian regional settings ... it assumes
wildly and there's no proper understanding of how we alphabetize in
Scandinavia). On Linux, sorting is much better, and I've never had to make
special columns just for sorting... (FWIW: MySQL and probably several other
DB systems, adapt their sorting methods from the host OS).

-- 
Rene Brehmer
aka Metalbunny

We have nothing to fear from free speech and free information on the
Internet, but pop-up advertising! 

http://metalbunny.net/
My little mess of things...

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



Re: [PHP] Re: Removing nonlatin characters

2005-07-03 Thread Rene Brehmer
Documented research indicate that on Fri, 1 Jul 2005 13:58:23 +0300, Dotan
Cohen wrote:

 On 6/29/05, Rene Brehmer [EMAIL PROTECTED] wrote:
 I think you mean something like this:
 
 function stripAccents($string) {
   $returnString = strtr($string,
   'àáâãäçèéêëìíîïñòóôõöšùúûüýÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖŠÙÚÛÜÝ',
 'acnosyACNOSY');
   $returnString =
 str_replace('æ','ae',str_replace('Æ','AE',$returnString));
   $returnString =
 str_replace('ø','oe',str_replace('Ø','OE',$returnString));
   $returnString = str_replace('ß','ss',$returnString);
   return $returnString;
 }
 
 This function is part using code once posted on this list, part my own
 creation.

Thank you Rene. Does this approach have any special advantages over
recode_string?

Totally forgot ... there is one advantage that you can control what the
characters are replaced with ... but I dunno if recode_string does as good
a job ...

-- 
Rene Brehmer
aka Metalbunny

We have nothing to fear from free speech and free information on the
Internet, but pop-up advertising! 

http://metalbunny.net/
My little mess of things...

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