OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
php-general Digest 22 Feb 2008 05:01:33 -0000 Issue 5307

php-general-digest-helplists.php.net
Date: Thu Feb 21 2008 - 23:01:33 CST


php-general Digest 22 Feb 2008 05:01:33 -0000 Issue 5307

Topics (messages 269798 through 269836):

Re: System errno in PHP
        269798 by: Richard Lynch

Re: All Survey leading to PHP
        269799 by: Andrés Robinet
        269805 by: Matty Sarro
        269806 by: Jason Pruim

Re: unable to unset reference
        269800 by: Richard Lynch

cxml
        269801 by: JR

Re: Thread Safety [partially solved]
        269802 by: Thiago Pojda

Re: temporary error
        269803 by: Nathan Rixham

Re: APC & __autoload & webclusters
        269804 by: Nathan Nobbe
        269807 by: Nathan Rixham
        269821 by: Nathan Nobbe

PHP To an EXE Executable for Win32 ( Is it possible)
        269808 by: Dan
        269809 by: Mario Guenterberg
        269810 by: Matty Sarro
        269811 by: Jay Blanchard
        269812 by: Andrés Robinet
        269823 by: Bastien Koert

Cannot get php_http.dll to work
        269813 by: Alexis
        269817 by: Shawn McKenzie

Copy Network Share W/ Diff. Creds To Local Folder?
        269814 by: Jason Paschal
        269819 by: Nathan Rixham
        269826 by: Manuel Lemos

AMP installer
        269815 by: Ryan A
        269818 by: Chris
        269820 by: Nathan Rixham
        269822 by: Andrés Robinet
        269824 by: Warren Vail

Re: More than one values returned?
        269816 by: Greg Donald
        269825 by: Nick Stinemates

Problem with quotes
        269827 by: Mário Gamito
        269829 by: Andrés Robinet
        269830 by: Casey

Exception vs exception
        269828 by: Prabath Kumarasinghe
        269831 by: Chris
        269833 by: Andrés Robinet
        269835 by: Prabath Kumarasinghe

form cleaner class
        269832 by: nihilism machine
        269834 by: Casey
        269836 by: Casey

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


On Wed, February 20, 2008 2:56 am, Michal Maras wrote:
> I have read http://php.net/fopen from top to bottom, but I could not
> find
> how to get system error number.
> With set_error_handler I can get string for example
>
> fopen(hmc_configuration.cfg)
> [function.fopen<http://ds63450.mspr.detemobil.de/%7Emmaras/HMC/function.fopen>]:
> failed to open stream: Permission denied
>
> but I need integer number not string, because string error messages
> depends
> on locale setting.
> Of course, I can test some conditions before fopen, but it is not
> enough
> for me.

Put in a Feature Request to expose the error number from the OS, I
guess...

http://bugs.php.net/

It *seems* like it ought to be reasonable enough to this naive user.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

attached mail follows:


> -----Original Message-----
> From: Richard Lynch [mailto:ceol-i-e.com]
> Sent: Thursday, February 21, 2008 11:36 AM
> To: Allan Fernandes
> Cc: php-generallists.php.net
> Subject: Re: [PHP] All Survey leading to PHP
>
> On Thu, February 21, 2008 6:29 am, Allan Fernandes wrote:
> > 1) Is there any method to protect source code of my applications even
> > when
> > deployed at the clients Server.
>
> Have a good, clear contract and relationship with the client.
>
> You can also attempt to "encode" them with any number of PHP encoders,
> all of which have been and can be cracked by a determined user.
>
> > 2) Can I call Delphi Dll's
>
> You may be able to use COM objects.
> http://php.net/com
>
> --
> Some people have a "gift" link here.
> Know what I want?
> I want you to buy a CD from some indie artist.
> http://cdbaby.com/from/lynch
> Yeah, I get a buck. So?
>
> --

I assume you will be deploying your applications on a windows server, right?
Otherwise, COM is NOT an option (probably .Net is ???).

Just curious, why would you want to call a Delphi DLL (which is no different
than any DLL)?
Just curious (x2) has anybody tried Delphi 4 PHP
(http://www.codegear.com/products/delphi/php)?

As a Delphi fan... if you are moving to PHP development, I'd say you forget all
you know about Delphi (or .Net for that matter) except the very generic
programming and OOP concepts.

If you plan to target Linux... forget about DLLs. However, if you will always
use your own server for deployment, you could try *migrating* your existing
codebase as a set of modules and cgi programs (I don't know, it depends on what
you are trying to do). Check out Freepascal (http://www.freepascal.org/).

Anyway, if you are deploying PHP web applications for *all* OSs, you'd better
off forgetting about Delphi and get good tutorials/courses/books on PHP. And if
you want a Delphi-like IDE... be prepared for deception, only Delphi4PHP gets
somewhere close to that (and I don't know how high are the runtime requirements
to run PHP-VCL applications). There are very good PHP IDEs, such as Zend Studio,
PHPDesigner, and NuSphere, etc... but forget about clicking and dragging
components on a form if that's your choice.

Regards,

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: infobestplace.net  | MSN Chat: bestbestplace.net  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com

attached mail follows:


You can attempt to protect your code with Zend guard or a couple other
utilities. I believe theres also some php obfuscation utilities out there -
consult google. Ultimately though, even with compiled code you will never
stop someone who wants to see your code, decompilers are commonplace. As
mentioned in a previous response, a clear cut contract is your best bet here
(especially since things like zend guard require additional software, which
will in turn decrease performance).

On Thu, Feb 21, 2008 at 12:07 PM, Andrés Robinet <agrobinetbestplace.biz>
wrote:

> > -----Original Message-----
> > From: Richard Lynch [mailto:ceol-i-e.com]
> > Sent: Thursday, February 21, 2008 11:36 AM
> > To: Allan Fernandes
> > Cc: php-generallists.php.net
> > Subject: Re: [PHP] All Survey leading to PHP
> >
> > On Thu, February 21, 2008 6:29 am, Allan Fernandes wrote:
> > > 1) Is there any method to protect source code of my applications even
> > > when
> > > deployed at the clients Server.
> >
> > Have a good, clear contract and relationship with the client.
> >
> > You can also attempt to "encode" them with any number of PHP encoders,
> > all of which have been and can be cracked by a determined user.
> >
> > > 2) Can I call Delphi Dll's
> >
> > You may be able to use COM objects.
> > http://php.net/com
> >
> > --
> > Some people have a "gift" link here.
> > Know what I want?
> > I want you to buy a CD from some indie artist.
> > http://cdbaby.com/from/lynch
> > Yeah, I get a buck. So?
> >
> > --
>
> I assume you will be deploying your applications on a windows server,
> right?
> Otherwise, COM is NOT an option (probably .Net is ???).
>
> Just curious, why would you want to call a Delphi DLL (which is no
> different
> than any DLL)?
> Just curious (x2) has anybody tried Delphi 4 PHP
> (http://www.codegear.com/products/delphi/php)?
>
> As a Delphi fan... if you are moving to PHP development, I'd say you
> forget all
> you know about Delphi (or .Net for that matter) except the very generic
> programming and OOP concepts.
>
> If you plan to target Linux... forget about DLLs. However, if you will
> always
> use your own server for deployment, you could try *migrating* your
> existing
> codebase as a set of modules and cgi programs (I don't know, it depends on
> what
> you are trying to do). Check out Freepascal (http://www.freepascal.org/).
>
> Anyway, if you are deploying PHP web applications for *all* OSs, you'd
> better
> off forgetting about Delphi and get good tutorials/courses/books on PHP.
> And if
> you want a Delphi-like IDE... be prepared for deception, only Delphi4PHP
> gets
> somewhere close to that (and I don't know how high are the runtime
> requirements
> to run PHP-VCL applications). There are very good PHP IDEs, such as Zend
> Studio,
> PHPDesigner, and NuSphere, etc... but forget about clicking and dragging
> components on a form if that's your choice.
>
> Regards,
>
> Rob
>
> Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
> 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL
> 33308 |
> TEL 954-607-4207 | FAX 954-337-2695 |
> Email: infobestplace.net | MSN Chat: bestbestplace.net | SKYPE:
> bestplace |
> Web: bestplace.biz | Web: seo-diy.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


Also, if the program is that good and revolutionary someone will just
rewrite it. Granted, a compiled program would take longer to clone
then an open source program. But it can still be done...

In fact that's how I got started in programming... Cloning other
peoples apps to figure out how they did it and if I could make it do
it to :) But I did it just for me. Didn't sell my programs.

On Feb 21, 2008, at 2:24 PM, Matty Sarro wrote:

> You can attempt to protect your code with Zend guard or a couple other
> utilities. I believe theres also some php obfuscation utilities out
> there -
> consult google. Ultimately though, even with compiled code you will
> never
> stop someone who wants to see your code, decompilers are
> commonplace. As
> mentioned in a previous response, a clear cut contract is your best
> bet here
> (especially since things like zend guard require additional
> software, which
> will in turn decrease performance).
>
> On Thu, Feb 21, 2008 at 12:07 PM, Andrés Robinet <agrobinetbestplace.biz
> >
> wrote:
>
>>> -----Original Message-----
>>> From: Richard Lynch [mailto:ceol-i-e.com]
>>> Sent: Thursday, February 21, 2008 11:36 AM
>>> To: Allan Fernandes
>>> Cc: php-generallists.php.net
>>> Subject: Re: [PHP] All Survey leading to PHP
>>>
>>> On Thu, February 21, 2008 6:29 am, Allan Fernandes wrote:
>>>> 1) Is there any method to protect source code of my applications
>>>> even
>>>> when
>>>> deployed at the clients Server.
>>>
>>> Have a good, clear contract and relationship with the client.
>>>
>>> You can also attempt to "encode" them with any number of PHP
>>> encoders,
>>> all of which have been and can be cracked by a determined user.
>>>
>>>> 2) Can I call Delphi Dll's
>>>
>>> You may be able to use COM objects.
>>> http://php.net/com
>>>
>>> --
>>> Some people have a "gift" link here.
>>> Know what I want?
>>> I want you to buy a CD from some indie artist.
>>> http://cdbaby.com/from/lynch
>>> Yeah, I get a buck. So?
>>>
>>> --
>>
>> I assume you will be deploying your applications on a windows server,
>> right?
>> Otherwise, COM is NOT an option (probably .Net is ???).
>>
>> Just curious, why would you want to call a Delphi DLL (which is no
>> different
>> than any DLL)?
>> Just curious (x2) has anybody tried Delphi 4 PHP
>> (http://www.codegear.com/products/delphi/php)?
>>
>> As a Delphi fan... if you are moving to PHP development, I'd say you
>> forget all
>> you know about Delphi (or .Net for that matter) except the very
>> generic
>> programming and OOP concepts.
>>
>> If you plan to target Linux... forget about DLLs. However, if you
>> will
>> always
>> use your own server for deployment, you could try *migrating* your
>> existing
>> codebase as a set of modules and cgi programs (I don't know, it
>> depends on
>> what
>> you are trying to do). Check out Freepascal (http://www.freepascal.org/
>> ).
>>
>> Anyway, if you are deploying PHP web applications for *all* OSs,
>> you'd
>> better
>> off forgetting about Delphi and get good tutorials/courses/books on
>> PHP.
>> And if
>> you want a Delphi-like IDE... be prepared for deception, only
>> Delphi4PHP
>> gets
>> somewhere close to that (and I don't know how high are the runtime
>> requirements
>> to run PHP-VCL applications). There are very good PHP IDEs, such as
>> Zend
>> Studio,
>> PHPDesigner, and NuSphere, etc... but forget about clicking and
>> dragging
>> components on a form if that's your choice.
>>
>> Regards,
>>
>> Rob
>>
>> Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
>> 5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale,
>> FL
>> 33308 |
>> TEL 954-607-4207 | FAX 954-337-2695 |
>> Email: infobestplace.net | MSN Chat: bestbestplace.net | SKYPE:
>> bestplace |
>> Web: bestplace.biz | Web: seo-diy.com
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>

--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424
www.raoset.com
japruimraoset.com

attached mail follows:


On Wed, February 20, 2008 9:23 am, Sylvain R. wrote:

> I would like to implement it in order to delete automaticly from
> memory
> useless objects.
> It can be really useful for example to make schedulers in PHP in order
> to
> avoid "max memory usage exceeded" errors.

If you really don't need it any more, unset all the variables pointing
to it.

PHP Garbage Collects it.

Problem solved.

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

attached mail follows:


Does anyone have examples or know of documentation in order to receive and
respond to cxml punchout requests. I'm attempting to integrate my cart with
a catalog however have not done much coding with cxml or xml. Thanks in
advance.

attached mail follows:


I found out that my problem was using apache2 apxs2 to build php.

I tried: './configure
--with-oci8-instant-client=/oracle/instantclient/;make;make install', it's
not thread safe anymore.

But now I ran into another problem: it did not build (of course) a apache2
module, only a CGI. I don't want that, what can I do?

System Linux debian 2.6.18-4-486 #1 Wed May 9 22:23:40 UTC 2007 i686
Build Date Feb 21 2008 10:16:45
Configure Command './configure'
'--with-oci8-instant-client=/oracle/instantclient/'
Server API CGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety disabled
Registered PHP Streams php, http, ftp

-----Mensagem original-----
De: Thiago Pojda [mailto:thiago.pojdasoftpartech.com.br]
Enviada em: quarta-feira, 20 de fevereiro de 2008 09:32
Para: 'Tom Rogers'
Cc: php-generallists.php.net; 'PHP Install'
Assunto: RES: [PHP] Thread Safety

Tom,

That did not do it either. I'm sure I'm missing something stupid, just can't
find out what.

PHPInfo:

System Linux debian 2.6.18-4-486 #1 Mon Mar 26 16:39:10 UTC 2007 i686
Build Date Feb 20 2008 05:43:08
Configure Command './configure'
'--with-oci8-instant-client=/oracle/instantclient/'
'--with-apxs2=/usr/bin/apxs2' '--disable-zts'
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20050606
Debug Build no
Zend Memory Manager enabled
Thread Safety enabled
Registered PHP Streams php, http, ftp

Apache:

debian:/usr/src/php-4.4.8# apache2ctl -V Server version: Apache/2.2.3
Server built: Jan 27 2008 18:13:21
Server's Module Magic Number: 20051115:3 Server loaded: APR 1.2.7, APR-Util
1.2.7 Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 32-bit
Server MPM: Prefork
  threaded: no
    forked: yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D
APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D
SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D
AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT=""
 -D SUEXEC_BIN="/usr/lib/apache2/suexec"
 -D DEFAULT_PIDLOG="/var/run/apache2.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
 -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

-----Mensagem original-----
De: Tom Rogers [mailto:trogerskwikin.com] Enviada em: terça-feira, 19 de
fevereiro de 2008 20:40
Para: Thiago Pojda
Cc: php-generallists.php.net
Assunto: Re: [PHP] Thread Safety

Hi,

Wednesday, February 20, 2008, 3:00:28 AM, you wrote:
TP> Not quite sure if this is the right list, but here I am...
TP>
TP> I'm trying to use zend platform and it requires the Thread Safety
TP> option set to off.
TP>
TP> I just compiled php and I can't find what argument to build php that
TP> way, what am I missing?
TP>
TP> PHP 4.4.8
TP>
TP>
TP> Thanks!

--disable-zts should do it

--
regards,
Tom

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

attached mail follows:


Andrés Robinet wrote:
>> -----Original Message-----
>> From: Shawn McKenzie [mailto:nospammckenzies.net]
>> Sent: Thursday, February 21, 2008 10:36 AM
>> To: php-generallists.php.net
>> Subject: [PHP] Re: temporary error
>>
>> Mirco Soderi wrote:
>>> In my opinion, variable names are a personal choice, I think the time
>>> you loose when writing the name (about a second is long less than the
>>> time you gain when, months later, you go and modify the code and you
>>> have clear the content and meaning of each variable.
>>>
>>> In the original code there were no sintax errors, I added some errors
>>> when pasting here. Sorry.
>>>
>>> I have found that in the first execution, it was the
>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati that evaluated to
>>> false. After having removed the two-field key that I had originally
>>> defined for that table and having added an autoincrement key, the
>>> problem seems to be solved.
>>>
>>> Do you find any reason for that?
>>>
>>>
>>> ""Mirco Soderi"" <m.soderialice.it> ha scritto nel messaggio
>>> news:39.96.21621.F728DB74pb1.pair.com...
>>>> Consider the following code:
>>>>
>>>> $sqlQueryInserimentoDatiAllenamentoCalciPiazzati = "INSERT INTO ...
>>>> etc etc ...." $queryInserimentoDatiAllenamentoCalciPiazzati =
>>>> mysql_query($sqlQueryInserimentoDatiAllenamentoCalciPiazzati);
>>>> if($queryInserimentoDatiAllenamentoCalciPiazzati) { // do something
>>>> } if($queryInserimentoDatiAllenamentoCalciPiazzati) {
>>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati =
>>>> mysql_query("insert into log ... etc etc ...");
>>>> if($logQueryInserimentoDatiAllenamentoCalciPiazzati) { // do
>>>> something } } if($queryInserimentoDatiAllenamentoCalciPiazzati &&
>>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati) { // do something
>>>> }
>>>>
>>>> 1st execution: $queryInserimentoDatiAllenamentoCalciPiazzati &&
>>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati, where clause of
>>>> last conditional statement, evaluates to false even if both queries
>>>> are correctly executed.
>>>>
>>>> I modify as follows:
>>>>
>>>> $sqlQueryInserimentoDatiAllenamentoCalciPiazzati = "INSERT INTO ...
>>>> etc etc ...." $queryInserimentoDatiAllenamentoCalciPiazzati =
>>>> mysql_query($sqlQueryInserimentoDatiAllenamentoCalciPiazzati);
>>>> if($queryInserimentoDatiAllenamentoCalciPiazzati) { // do something
>>>> } else echo("error message 1");
>>>> if($queryInserimentoDatiAllenamentoCalciPiazzati) {
>>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati =
>>>> mysql_query("insert into log ... etc etc ...");
>>>> if($logQueryInserimentoDatiAllenamentoCalciPiazzati) { // do
>>>> something } else echo("error message 2"); }
>>>> if($queryInserimentoDatiAllenamentoCalciPiazzati &&
>>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati) { // do something
>>>> }
>>>>
>>>> 2nd execution: $queryInserimentoDatiAllenamentoCalciPiazzati &&
>>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati, where clause of
>>>> last conditional statement, evaluates to true.
>>>>
>>>> Now, I modify again, back to the original version:
>>>>
>>>> $sqlQueryInserimentoDatiAllenamentoCalciPiazzati = "INSERT INTO ...
>>>> etc etc ...." $queryInserimentoDatiAllenamentoCalciPiazzati =
>>>> mysql_query($sqlQueryInserimentoDatiAllenamentoCalciPiazzati);
>>>> if($queryInserimentoDatiAllenamentoCalciPiazzati) { // do something
>>>> } if($queryInserimentoDatiAllenamentoCalciPiazzati) {
>>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati =
>>>> mysql_query("insert into log ... etc etc ...");
>>>> if($logQueryInserimentoDatiAllenamentoCalciPiazzati) { // do
>>>> something } } if($queryInserimentoDatiAllenamentoCalciPiazzati &&
>>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati) { // do something
>>>> }
>>>>
>>>> 3rd execution: $queryInserimentoDatiAllenamentoCalciPiazzati &&
>>>> $logQueryInserimentoDatiAllenamentoCalciPiazzati, where clause of
>>>> last conditional statement, evaluates to true.
>>>>
>>>> Do you know any reason for that?
>> Glad to see that you found your problem. Variables may be easier to read
>> with some underscores.
>>
>> Personally, here is what I use as a counter in most all of my code,
>> instead of $i++; which isn't always clear.
>>
>> $Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter =
>> $Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter +
>> ($Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter /
>> $Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter);
>>
>> If you wan to shorten a bit you can use a constant as the counter
>> increment like so:
>>
>> define('Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter', 1);
>>
>> $Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter =
>> $Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter +
>> Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter;
>>
>> -Shawn
>>
>
> You forgot to add the project name you are working on to the counter, this way
> you'll never confuse yourself at all.
>
> define('Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter_For_Project
> _Spaghetti', 1);
>
> $Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter_For_Project_Spaghetti =
> $Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter_For_Project_Spaghetti +
> Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter_For_Project_Spaghet
> ti;
>
> LOL

I often find the best way to clarify whats going on in a specific
section of code is to document it properly. I'd strongly suggest you do
the same Mirco, it'll save you hours in the future.

<?php
/**
  * Project Spaghetti Super Cala Fraga Listic
  * Ex Peal Ado Tio Us Incremental Counter
  *
  * Incrementation of Super Cala based Integer variables
  * Definitions and Library
  *
  * Thu Feb 21 17:19:44 GMT 2008
  *
  * copyright 2008, Project Spaghetti Solutions Ltd, UK
  * package Project_Spaghetti
  * subpackage Super
  * subsubpackage Cala
  * subsubsubpackage Fraga
  * subsubsubsubpackage Listic
  * subsubsubsubsubsubpackage Ex
  * subsubsubsubsubsubsubpackage Peal
  * subsubsubsubsubsubsubsubpackage Ado
  * subsubsubsubsubsubsubsubsubpackage Tio
  * subsubsubsubsubsubsubsubsubsubsubpackage Us
  * subsubsubsubsubsubsubsubsubsubsubsubpackage Counter
  * subsubsubsubsubsubsubsubsubsubsubsubsubpackage Increment
  * author "Mirco Soderi" <m.soderialice.it>
  * version 1.0.0.0.1.0.2.3.0.4.56.0.2b.9
  * revision 98.3.0.0.2.0.b
  */

/**
  * Definition of the numerical integer value used
  * within all single integer incrementation functions needing
  * an incremental value of one(1); within the Super Cala Fraga Listic
  * Ex Peal Ado Tio Us subpackage counter incrementation of
  * Project Spaghetti 1.0.0.0.1.0.2.3.0.4.56.0.2b.9
  * rev 98.3.0.0.2.0.b
  */

define('Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter_For_Project
_Spaghetti', 1);

/**
  * Compacted incrementation function of the numerical integer value used
  * within all the Super Cala Fraga Listic Ex Peal Ado Tio Us subpackage
  * counter incrementation; this is the function that increments our
  * value held in the Counter variable by surely to god your not still
  * reading this the number defined in the incrementation value
  * definition for counter value project spaghetti.
  * Project Spaghetti 1.0.0.0.1.0.2.3.0.4.56.0.2b.9
  * rev 23.0.3.0.7.1.a
  */
$Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter_For_Project_Spaghetti =
$Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter_For_Project_Spaghetti +
Increment_Super_Cala_Fraga_Listic_Ex_Peal_Ado_Tio_Us_Counter_For_Project_Spaghetti;

?>

sure beats $i++

attached mail follows:


On Thu, Feb 21, 2008 at 12:01 PM, Jochem Maas <jochemiamjochem.com> wrote:

> Richard Lynch schreef:
> > If it's that inter-tangled, then I would hazard a WILD GUESS that the
> > __autoload will still end up loading everything...
>
> but not on every request ;-) ... I do use output caching, and I know
> not everything is actually used in every request.

i think youre good to go w/ autoload not loading everything up, but what
about existing include / require directives? if the code doesnt already
use __autoload() its almost certainly strewn w/ these. so i think if you
want the boost from __autoload, not loading up everything, youll at least
have
to strip these out.

I know - but it's a rubbish solution because it offer no control as to what
> is cleared from the APC cache, sometimes I want to clear opcodes,
> sometimes user-data,
> sometimes both ... graceful means being forced to clear everything.

you can pass a parameter to apc_clear_cache()
http://www.php.net/manual/en/function.apc-clear-cache.php
that distinguishes what you want to clear; user data or cached opcode.
obviously calling it from the cli will not clear the webserver user cache
though.

One would think that there was something like this indeed - I cannot find
> it,
> but then there must be something ... I assume, for instance, that Yahoo!**
> occassionally
> see fit to clear APC caches on more than one machine and I doubt Rasmus
> sits there and
> opens a browser to run apc.php on each one ;-)

i dont know how yahoo does it, but i do know a little about how facebook
does it; they had
3 speakers at the dc php conference last year. i think you might find these
slides helpful,
(sorry for the ridiculuus url)
http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Ftekrat.com%2Ftalks_files%2Fphpdc2007%2Fapc%40facebook.pdf&ei=tce9R9T4FqrszATeiZG6CA&usg=AFQjCNF_1Ecm2cL1EINgRQG9k3fTEclzpA&sig2=ifrJK545M2liBdXbRrHrIw

you can use capistrano to deploy the new files; but it may be more
convenient to use php
and http requests to update all the server caches; *just a thought*.

there are optimizations that are possible as well, such as setting,
apc.stat=0 and
using apc_compile_file() rather than clearing the entire cache, but these
techniques add
complexity. it sounds like you just want to get a decent bumb w/o too much
additional
complexity, so i wouldnt recommend them here, but i thought id mention them
in passing..

-nathan

attached mail follows:


Nathan Nobbe wrote:
> On Thu, Feb 21, 2008 at 12:01 PM, Jochem Maas <jochemiamjochem.com> wrote:
>
>> Richard Lynch schreef:
>>> If it's that inter-tangled, then I would hazard a WILD GUESS that the
>>> __autoload will still end up loading everything...
>> but not on every request ;-) ... I do use output caching, and I know
>> not everything is actually used in every request.
>
>
> i think youre good to go w/ autoload not loading everything up, but what
> about existing include / require directives? if the code doesnt already
> use __autoload() its almost certainly strewn w/ these. so i think if you
> want the boost from __autoload, not loading up everything, youll at least
> have
> to strip these out.
>
> I know - but it's a rubbish solution because it offer no control as to what
>> is cleared from the APC cache, sometimes I want to clear opcodes,
>> sometimes user-data,
>> sometimes both ... graceful means being forced to clear everything.
>
>
> you can pass a parameter to apc_clear_cache()
> http://www.php.net/manual/en/function.apc-clear-cache.php
> that distinguishes what you want to clear; user data or cached opcode.
> obviously calling it from the cli will not clear the webserver user cache
> though.
>
> One would think that there was something like this indeed - I cannot find
>> it,
>> but then there must be something ... I assume, for instance, that Yahoo!**
>> occassionally
>> see fit to clear APC caches on more than one machine and I doubt Rasmus
>> sits there and
>> opens a browser to run apc.php on each one ;-)
>
>
> i dont know how yahoo does it, but i do know a little about how facebook
> does it; they had
> 3 speakers at the dc php conference last year. i think you might find these
> slides helpful,
> (sorry for the ridiculuus url)
> http://www.google.com/url?sa=t&ct=res&cd=1&url=http%3A%2F%2Ftekrat.com%2Ftalks_files%2Fphpdc2007%2Fapc%40facebook.pdf&ei=tce9R9T4FqrszATeiZG6CA&usg=AFQjCNF_1Ecm2cL1EINgRQG9k3fTEclzpA&sig2=ifrJK545M2liBdXbRrHrIw
>
> you can use capistrano to deploy the new files; but it may be more
> convenient to use php
> and http requests to update all the server caches; *just a thought*.
>
> there are optimizations that are possible as well, such as setting,
> apc.stat=0 and
> using apc_compile_file() rather than clearing the entire cache, but these
> techniques add
> complexity. it sounds like you just want to get a decent bumb w/o too much
> additional
> complexity, so i wouldnt recommend them here, but i thought id mention them
> in passing..
>
> -nathan
>

Nathan,

cheers for the link to facebook pdf, just had a read and it's good
stuff, also lead me on to this after a short google:

http://sizzo.org/wp/wp-content/uploads/2007/09/facebook_performance_caching.pdf

*wanders off for a couple of hours on php.net/apc*

Nathan:
almost march 14th :D

attached mail follows:


On Thu, Feb 21, 2008 at 3:20 PM, Nathan Rixham <nrixhamgmail.com> wrote:

> Nathan,
>
> cheers for the link to facebook pdf, just had a read and it's good
> stuff, also lead me on to this after a short google:
>
>
> http://sizzo.org/wp/wp-content/uploads/2007/09/facebook_performance_caching.pdf

ya; thats another from the dc conference. and thats where i discovered
that facebook
uses globals, which i mentioned in a thread a while back about globals. i
dont know that
much of their stuff is really oo at all; but im sure some of it is, since
the system is so big.

<http://sizzo.org/wp/wp-content/uploads/2007/09/facebook_performance_caching.pdf>
> Nathan:
> almost march 14th :D

i already submitted an abstract for the 08 conference if thats the
allusion.. :)
on spl, to be precise; but it seems nobody really cares about it, much;
which is a shame if you ask me; ergo the topic choice ;)

-nathan

attached mail follows:


I know that there's apparently some way to compile PHP to make it run
faster. But has anyone come up with a system to turn PHP scripts into an
.exe? What I mean is you would run the exe and see exactly the same thing
as if you were viewing the script through a webbrowser, but without having
to install php.

What is the name of this?

- Dan

attached mail follows:


On Thu, Feb 21, 2008 at 02:16:55PM -0700, Dan wrote:
> I know that there's apparently some way to compile PHP to make it run
> faster. But has anyone come up with a system to turn PHP scripts into an
> .exe? What I mean is you would run the exe and see exactly the same
> thing as if you were viewing the script through a webbrowser, but without
> having to install php.
>
> What is the name of this?

Hi...

look at this:
http://www.php-editors.com/forums/other-php-tools/2374-php-compiler-embedder-php2exe.html

Greetings
Mario

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/CM d- s++: a+ C++++>$ UBL*++++$ 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------

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iQIVAwUBR73sqjUZahlMISn3AQJuNQ//eAozmA34NNxxogHP4BgtPTG8XbyzN6mE
arKS08SFbehG/rjVL38dDRkuXUPeP4Dvjfk8oNgVGbnbRt7wjgRhXm/GtTiFdDG0
JjmH+II6oKlWjmX92dOzShdlAqy4o8HM1km9gwNsLeGsCxWCu5yUq8m2RBh8WoVs
9nwW3ENHeGO+Sy4wx51bb03MnMJ5CApaITUdz54Uvx5fqivK+tZEZ6Adnu2ULDmR
5AcRKlHYWZQPhf0JZb55NeOLjrcBRBV1arMFCHTnYBD9HU0tjYl4yBU4WBrlwfOx
6reN4xiJ4htMxhpSjA5FtVPFh5E5RkO9JTz1vXoR2h0PS7ciSyufJbmjd6ej6ume
mHKG0oqmWBR47KJkhufrg+KbmYmMlhPzfRjzDMTvnXvO+808Uy/YQDOqnPcz+Ukz
atUGRpP46vHt45x4f4l1wL3ClVjIoJW2GGx/ZJzclWZjJBAnR9Wr30VTlll6hi0f
8hukSEEYWz1zzsU10X7RYa/nK79RgipUgbl5282AXZRZcVt4QRO/h1D9xIZWsNcv
TZs1XfKfSx5o8loc7iFyVLuf9h7j1iMvf5+2dTcNiKnwb4rszYOIh3y4vQUI6Re9
PbFCh5p8XeaWX5i+4TU5cuGTmQkS/zoqlBl9CdOiWsv9pWHzhbgAv8W7b76HRFEF
RKgdWnJ5QvI=
=yyh+
-----END PGP SIGNATURE-----

attached mail follows:


Color me corrected :) I'm gonna have to look into these utils myself.
Thanks!

On Thu, Feb 21, 2008 at 4:27 PM, Mario Guenterberg <mghavelsoft.com> wrote:

> On Thu, Feb 21, 2008 at 02:16:55PM -0700, Dan wrote:
> > I know that there's apparently some way to compile PHP to make it run
> > faster. But has anyone come up with a system to turn PHP scripts into
> an
> > .exe? What I mean is you would run the exe and see exactly the same
> > thing as if you were viewing the script through a webbrowser, but
> without
> > having to install php.
> >
> > What is the name of this?
>
> Hi...
>
> look at this:
>
> http://www.php-editors.com/forums/other-php-tools/2374-php-compiler-embedder-php2exe.html
>
> Greetings
> Mario
>
> --
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.12
> GCS/CM d- s++: a+ C++++>$ UBL*++++$ 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------
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iQIVAwUBR73sqjUZahlMISn3AQJuNQ//eAozmA34NNxxogHP4BgtPTG8XbyzN6mE
> arKS08SFbehG/rjVL38dDRkuXUPeP4Dvjfk8oNgVGbnbRt7wjgRhXm/GtTiFdDG0
> JjmH+II6oKlWjmX92dOzShdlAqy4o8HM1km9gwNsLeGsCxWCu5yUq8m2RBh8WoVs
> 9nwW3ENHeGO+Sy4wx51bb03MnMJ5CApaITUdz54Uvx5fqivK+tZEZ6Adnu2ULDmR
> 5AcRKlHYWZQPhf0JZb55NeOLjrcBRBV1arMFCHTnYBD9HU0tjYl4yBU4WBrlwfOx
> 6reN4xiJ4htMxhpSjA5FtVPFh5E5RkO9JTz1vXoR2h0PS7ciSyufJbmjd6ej6ume
> mHKG0oqmWBR47KJkhufrg+KbmYmMlhPzfRjzDMTvnXvO+808Uy/YQDOqnPcz+Ukz
> atUGRpP46vHt45x4f4l1wL3ClVjIoJW2GGx/ZJzclWZjJBAnR9Wr30VTlll6hi0f
> 8hukSEEYWz1zzsU10X7RYa/nK79RgipUgbl5282AXZRZcVt4QRO/h1D9xIZWsNcv
> TZs1XfKfSx5o8loc7iFyVLuf9h7j1iMvf5+2dTcNiKnwb4rszYOIh3y4vQUI6Re9
> PbFCh5p8XeaWX5i+4TU5cuGTmQkS/zoqlBl9CdOiWsv9pWHzhbgAv8W7b76HRFEF
> RKgdWnJ5QvI=
> =yyh+
> -----END PGP SIGNATURE-----
>
>

attached mail follows:


[snip]
But has anyone come up with a system to turn PHP scripts into an
.exe?
[/snip]

http://www.priadoblender.com/index.php?layout=main&cslot_1=2

 

attached mail follows:


> -----Original Message-----
> From: Dan [mailto:frozendicegmail.com]
> Sent: Thursday, February 21, 2008 4:17 PM
> To: php-generallists.php.net
> Subject: [PHP] PHP To an EXE Executable for Win32 ( Is it possible)
>
> I know that there's apparently some way to compile PHP to make it run
> faster. But has anyone come up with a system to turn PHP scripts into an
> .exe? What I mean is you would run the exe and see exactly the same thing
> as if you were viewing the script through a webbrowser, but without having
> to install php.
>
> What is the name of this?
>
> - Dan
>
> --

If you want to see exactly the same thing as if you were viewing the script
through a webbrowser...
... THEN YOU'LL NEED a webbrowser.

PHP only generates the HTML output (and under some circunstances JS, CSS and
other file types).

If you mean to develop desktop applications in PHP, then you want to take a look
at PHP-GTK (http://gtk.php.net/).

If you mean to just convert a script PHP into binary code for whatever purpose
you want, then probably you should be after the Roadsend compiler
http://www.roadsend.com/home/index.php?pageID=compiler or any other similar
solution (if they exist - ???).

However, assuming that your solely goal is to make PHP run faster, the first and
best step you can take is to "improve your application and database design" and
"optimize your PHP code". Then, you can take further steps, such as installing
an opcode cache, or accelerator (Zend Optimizer, eAccelerator, XCache, etc).

Regards,

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: infobestplace.net  | MSN Chat: bestbestplace.net  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com

attached mail follows:


www.roadsend.com ?

bastien
----------------------------------------
> To: php-generallists.php.net
> From: frozendicegmail.com
> Date: Thu, 21 Feb 2008 14:16:55 -0700
> Subject: [PHP] PHP To an EXE Executable for Win32 ( Is it possible)
>
> I know that there's apparently some way to compile PHP to make it run
> faster. But has anyone come up with a system to turn PHP scripts into an
> .exe? What I mean is you would run the exe and see exactly the same thing
> as if you were viewing the script through a webbrowser, but without having
> to install php.
>
> What is the name of this?
>
> - Dan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

_________________________________________________________________

attached mail follows:


Hi,

I have tried umpteen times to get this to work by PHP still insists that
it cannot find the 'HttpRequest' Class.

Using PHP 5.2.3
Downloaded latest version of php_http.dll, for PHP 5.2.x from the PECL
website
Installed it in the D:\PHP\ext directory
Added 'extension=php_http.dll' to the php.ini file
made sure the extension_dir is set to 'D:\PHP'
Restarted Apache..even restarted the entire computer

And with all of this it's still not recognising this Class.

I've searched all over the net but to no avail...pretty much every
answer refers to adding the extension line to the .ini file.

Can anyone advise what else I may be able to do?

Thanks
Alexis

attached mail follows:


Alexis wrote:
> Hi,
>
> I have tried umpteen times to get this to work by PHP still insists that
> it cannot find the 'HttpRequest' Class.
>
> Using PHP 5.2.3
> Downloaded latest version of php_http.dll, for PHP 5.2.x from the PECL
> website
> Installed it in the D:\PHP\ext directory
> Added 'extension=php_http.dll' to the php.ini file
> made sure the extension_dir is set to 'D:\PHP'
> Restarted Apache..even restarted the entire computer
>
> And with all of this it's still not recognising this Class.
>
> I've searched all over the net but to no avail...pretty much every
> answer refers to adding the extension line to the .ini file.
>
> Can anyone advise what else I may be able to do?
>
> Thanks
> Alexis

"made sure the extension_dir is set to 'D:\PHP' "

Why, when you said it is in 'D:\PHP\ext' ???

-Shawn

attached mail follows:


I'm building a web app on a windows server for a company.
an aspect of that requires grabbing a sound file from a network share, which
i attempted with a windows copy command via exec(), but PHP needs to be able
to pass the authentication credentials.

runas requires password interactivity, and i've looked at runasspc but that
costs for commercial use and was hoping to avoid it if possible.

is there a way to finesse runas with PHP? some trick to get PHP to offer
the password?

or is there some other clever way to make this happen?

Thank you,
Jason

attached mail follows:


Jason Paschal wrote:
> I'm building a web app on a windows server for a company.
> an aspect of that requires grabbing a sound file from a network share, which
> i attempted with a windows copy command via exec(), but PHP needs to be able
> to pass the authentication credentials.
>
> runas requires password interactivity, and i've looked at runasspc but that
> costs for commercial use and was hoping to avoid it if possible.
>
> is there a way to finesse runas with PHP? some trick to get PHP to offer
> the password?
>
> or is there some other clever way to make this happen?
>
> Thank you,
> Jason
>

tried "map network drive", it should automatically connect at logon
simply letting you X:\file.ext [might work]

attached mail follows:


Hello,

on 02/21/2008 07:48 PM Jason Paschal said the following:
> I'm building a web app on a windows server for a company.
> an aspect of that requires grabbing a sound file from a network share, which
> i attempted with a windows copy command via exec(), but PHP needs to be able
> to pass the authentication credentials.
>
> runas requires password interactivity, and i've looked at runasspc but that
> costs for commercial use and was hoping to avoid it if possible.
>
> is there a way to finesse runas with PHP? some trick to get PHP to offer
> the password?
>
> or is there some other clever way to make this happen?

Yes, you can use this stream handler class that lets you access files in
Windows shares as if they were local files:

http://www.phpclasses.org/smb4php

--

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

attached mail follows:


Hey!

Need to reinstall Apache PHP and MySql for personal development use on my new laptop... I usually used phpdev in the past but now I want php5 compatability... can anyone recommend any such "all in one installer".

And yes, I know its good experience and so on to do each one manually... but dont have the time to pure over help docs for hours or days.

Am on Win Vista premium.

Thanks!
Ryan
 
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)

      ____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

attached mail follows:


Ryan A wrote:
> Hey!
>
> Need to reinstall Apache PHP and MySql for personal development use on my new laptop... I usually used phpdev in the past but now I want php5 compatability... can anyone recommend any such "all in one installer".
>
> And yes, I know its good experience and so on to do each one manually... but dont have the time to pure over help docs for hours or days.

http://www.apachefriends.org/en/xampp.html

--
Postgresql & php tutorials
http://www.designmagick.com/

attached mail follows:


Ryan A wrote:
> Hey!
>
> Need to reinstall Apache PHP and MySql for personal development use on my new laptop... I usually used phpdev in the past but now I want php5 compatability... can anyone recommend any such "all in one installer".
>
> And yes, I know its good experience and so on to do each one manually... but dont have the time to pure over help docs for hours or days.
>
> Am on Win Vista premium.
>
> Thanks!
> Ryan
>
> ------
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
>
>
>
>
> ____________________________________________________________________________________
> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo.com/r/hs

xampp - hate to even say it

seriously though just run the msi installer's from apache, mysql and php
- it'll take about 10 minutes

nath
march 14th soon :)

attached mail follows:


> -----Original Message-----
> From: Ryan A [mailto:genphpyahoo.com]
> Sent: Thursday, February 21, 2008 6:24 PM
> To: php php
> Subject: [PHP] AMP installer
>
> Hey!
>
> Need to reinstall Apache PHP and MySql for personal development use on my
> new laptop... I usually used phpdev in the past but now I want php5
> compatability... can anyone recommend any such "all in one installer".
>
> And yes, I know its good experience and so on to do each one manually...
> but dont have the time to pure over help docs for hours or days.
>
> Am on Win Vista premium.
>
> Thanks!
> Ryan
>
> ------
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
>
>
>
>
>
> ___________________________________________________________________________
> _________
> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
> --

Hi there,

It's not that hard to install them all separately and configure them. However,
yes, sometimes you just want a quickstart and then customize as needed. This is
my recommendation for Windows XP
(http://www.apachefriends.org/en/xampp-windows.html), I don't know of Vista, but
it seems to work for that OS too.

Also, I prefer to use MySQL gui tools for MySQL administration (instead of the
bundled mysqladmin - or even PHPMyadmin, which I use only for exporting - that
comes with XAMPP) http://dev.mysql.com/downloads/gui-tools/5.0.html.

Hope this helps, though you will get other options as well, this is much of a
personal choice (One year ago I installed them all separately, to get very
familiar with the setup).

Regards,

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: infobestplace.net  | MSN Chat: bestbestplace.net  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com

attached mail follows:


I can recommend apache2triad http://apache2triad.net

Downloads at

http://sourceforge.net/project/showfiles.php?group_id=93507

release 1.5.4 includes

php
perl
python
mysql
postgress
and much more included pop and ftp servers, open SSL, etc, that all run on
Windows

HTH,

Warren Vail

> -----Original Message-----
> From: Chris [mailto:dmagickgmail.com]
> Sent: Thursday, February 21, 2008 3:53 PM
> To: Ryan A
> Cc: php php
> Subject: Re: [PHP] AMP installer
>
> Ryan A wrote:
> > Hey!
> >
> > Need to reinstall Apache PHP and MySql for personal development use on
> my new laptop... I usually used phpdev in the past but now I want php5
> compatability... can anyone recommend any such "all in one installer".
> >
> > And yes, I know its good experience and so on to do each one manually...
> but dont have the time to pure over help docs for hours or days.
>
> http://www.apachefriends.org/en/xampp.html
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


On 2/19/08, Nick Stinemates <nickstinemates.org> wrote:
> I said, simply, returning an array of objects was usually an indication
> of poor design.

No it's not. Nearly every MVC framework in existence implements some
sort of ActiveRecord finder that does exactly that.

Rails:
foo = Foo.find( :all )

Django:
foo = Foo.objects.all()

ZF:
$foo = new Foo();
$foo->fetchRow( $foo->select() );

All return arrays of objects.

--
Greg Donald
http://destiney.com/

attached mail follows:


Greg Donald wrote:
> On 2/19/08, Nick Stinemates <nickstinemates.org> wrote:
>
>> I said, simply, returning an array of objects was usually an indication
>> of poor design.
>>
>
> No it's not. Nearly every MVC framework in existence implements some
> sort of ActiveRecord finder that does exactly that.
>
> Rails:
> foo = Foo.find( :all )
>
> Django:
> foo = Foo.objects.all()
>
> ZF:
> $foo = new Foo();
> $foo->fetchRow( $foo->select() );
>
> All return arrays of objects.
>
>
>
I'm glad you're literate enough to understand what *indication* and
*usually* mean.

Oh wait..

--
==================
Nick Stinemates (nickstinemates.org)
http://nick.stinemates.org

AIM: Nick Stinemates
MSN: nickstinemateshotmail.com
Yahoo: nickstinematesyahoo.com
==================

attached mail follows:


Hi,

Sorry for such a laim question.

I have this code:

$host = 'http://' . $_SERVER['HTTP_HOST'];

"foreach($browser as $key => $val){
         echo "<img src=\"dcs/" . $key . '.png"' . " />" . " ";
         (...) "

but it has a bug, I need to add the server domain before the picture, so
  I did:

$host = 'http://' . $_SERVER['HTTP_HOST'];

"foreach($browser as $key => $val){
         echo $host . "<img src=\"dcs/" . $key . '.png"' . " />" . " ";
         (...)"

But this way, all it echoes is the $host variable.

What am I missing here ?

Any help would be appreciated.

Warm Regards,
Mário Gamito

attached mail follows:


> -----Original Message-----
> From: Mário Gamito [mailto:gamitogmail.com]
> Sent: Thursday, February 21, 2008 11:04 PM
> To: php-generallists.php.net
> Subject: [PHP] Problem with quotes
>
> Hi,
>
> Sorry for such a laim question.
>
>
>
> I have this code:
>
> $host = 'http://' . $_SERVER['HTTP_HOST'];
>
> "foreach($browser as $key => $val){
> echo "<img src=\"dcs/" . $key . '.png"' . " />" . " ";
> (...) "
>
>
> but it has a bug, I need to add the server domain before the picture, so
> I did:
>
> $host = 'http://' . $_SERVER['HTTP_HOST'];
>
> "foreach($browser as $key => $val){
> echo $host . "<img src=\"dcs/" . $key . '.png"' . " />" . " ";
> (...)"
>
> But this way, all it echoes is the $host variable.
>
> What am I missing here ?
>
> Any help would be appreciated.
>
> Warm Regards,
> Mário Gamito

Mmm... It may have to do with operator precedence

Try either:

<code>
        echo ($host . "<img src=\"dcs/" . $key . '.png"' . " />" . " ");
</code>

Or,

<code>
        $output = $host . "<img src=\"dcs/" . $key . '.png"' . " />" . " ";
        echo $output;
</code>

Regards,

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: infobestplace.net  | MSN Chat: bestbestplace.net  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com

attached mail follows:


On Thu, Feb 21, 2008 at 8:04 PM, Mário Gamito <gamitogmail.com> wrote:
> Hi,
>
> Sorry for such a laim question.
>
>
>
> I have this code:
>
> $host = 'http://' . $_SERVER['HTTP_HOST'];
>
> "foreach($browser as $key => $val){
> echo "<img src=\"dcs/" . $key . '.png"' . " />" . " ";
> (...) "
>
>
> but it has a bug, I need to add the server domain before the picture, so
> I did:
>
> $host = 'http://' . $_SERVER['HTTP_HOST'];
>
> "foreach($browser as $key => $val){
> echo $host . "<img src=\"dcs/" . $key . '.png"' . " />" . " ";
> (...)"
>
> But this way, all it echoes is the $host variable.
>
> What am I missing here ?
>
> Any help would be appreciated.
>
> Warm Regards,
> Mário Gamito
>

Not the problem, but:

echo "<img src=\"dcs/" . $key . '.png"' . " />" . " ";

can be condensed to:

echo "<img src=\"dcs/$key.png\" /> ";

--
-Casey

attached mail follows:


Hi All

Recently I'm came across following code snippet
regarding exceptions there I'm executing invalid query
and catch the exception as follows.

First Approach
-------------------------------------------
try{
$result = mysql_query('SELECT * from unknowntable');

}catch(exception $e){
  echo $e->getTrace();

}
-------------------------------------------

Second Approach
-------------------------------------------
try{

$result = mysql_query('SELECT * from unknowntable');
if (!$result) {
    throw new MySQLException('Query failed to
execute')
}

}cathc(MySQLException $e){
     echo $e->getMessage();
}cathc(Exception $e){
     echo $e->getMessage();
}
-------------------------------------------

Which one is the best approach and efficient and what
the recommended approach.

Cheers

Prabath

      ____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

attached mail follows:


Prabath Kumarasinghe wrote:
> Hi All
>
> Recently I'm came across following code snippet
> regarding exceptions there I'm executing invalid query
> and catch the exception as follows.
>
> First Approach
> -------------------------------------------
> try{
> $result = mysql_query('SELECT * from unknowntable');
>
>
> }catch(exception $e){
> echo $e->getTrace();
>
> }
> -------------------------------------------

Since mysql_query doesn't throw an exception, you cannot catch it.

mysql_query returns false if an error occurs, otherwise it returns a
result resource.

http://www.php.net/mysql_query

--
Postgresql & php tutorials
http://www.designmagick.com/

attached mail follows:


> -----Original Message-----
> From: Prabath Kumarasinghe [mailto:prabath321yahoo.com]
> Sent: Thursday, February 21, 2008 11:19 PM
> To: php-generallists.php.net
> Subject: [PHP] Exception vs exception
>
> Hi All
>
> Recently I'm came across following code snippet
> regarding exceptions there I'm executing invalid query
> and catch the exception as follows.
>
> First Approach
> -------------------------------------------
> try{
> $result = mysql_query('SELECT * from unknowntable');
>
>
> }catch(exception $e){
> echo $e->getTrace();
>
> }
> -------------------------------------------
>
>
> Second Approach
> -------------------------------------------
> try{
>
> $result = mysql_query('SELECT * from unknowntable');
> if (!$result) {
> throw new MySQLException('Query failed to
> execute')
> }
>
> }cathc(MySQLException $e){
> echo $e->getMessage();
> }cathc(Exception $e){
> echo $e->getMessage();
> }
> -------------------------------------------
>
> Which one is the best approach and efficient and what
> the recommended approach.
>
> Cheers
>
> Prabath
>
>
>
> ___________________________________________________________________________
> _________
> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo.com/r/hs

Class names are case insensitive, so "Exception" is the same as "exception".

Now, about the first approach: Does the mysql extension throw exceptions???
(maybe you just didn't write the throw statement, I presume).

About the second approach: What is "catchc"? (I guess it's just a typo). And,
what other exceptions are you expecting to be thrown out of the try block to use
the second *generic* catch? If you and only you are throwing the custom *
MySQLException* exception (which you should code and throw under the proper
conditions) why do you need a generic *Exception* catch block?

Regards,

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: infobestplace.net  | MSN Chat: bestbestplace.net  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com

attached mail follows:


--- Chris <dmagickgmail.com> wrote:

> Prabath Kumarasinghe wrote:
> > Hi All
> >
> > Recently I'm came across following code snippet
> > regarding exceptions there I'm executing invalid
> query
> > and catch the exception as follows.
> >
> > First Approach
> > -------------------------------------------
> > try{
> > $result = mysql_query('SELECT * from
> unknowntable');
> >
> >
> > }catch(exception $e){
> > echo $e->getTrace();
> >
> > }
> > -------------------------------------------
>
> Since mysql_query doesn't throw an exception, you
> cannot catch it.
>
> mysql_query returns false if an error occurs,
> otherwise it returns a
> result resource.
>
> http://www.php.net/mysql_query

But it's give a many information using $e->getTrace()
is this correct. If there are several mysql_query then
I can put it as bunch within try block and catch
exception easily.

In second approach for every query I have to write
throw new MySQLException("My Message"). It's very time
consuming isn't it?

Cheers

Prabath

>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

      ____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

attached mail follows:


What is a better idea? Using this class in my db class and using
CleanInput on the sql statements, or using it in the top of the all
pages with form input to clean the $_POST's? Also, any ideas or
comments on improving the class?

<?php

class FormCleaner {

        // Initializer
        function __construct() {
                if (count($_POST) > 0) {
                        foreach($_POST as $curPostKey => $curPostVal) {
                                   $_POST[$curPostKey] = $this->CleanInput($curPostVal);
                        }
                }
        }

        // Clean Form Input
        public function CleanInput($UserInput) {
                $allowedtags = "<b></b><i></i><h1></h1><a></a><img><ul></ul><li></
li><blockquote></blockquote>";
                $notallowedattribs = array("javascript:|onclick|ondblclick|
onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|
onkeydown|onkeyupsi");
                $changexssto = '';
                $UserInput = preg_replace($notallowedattribs, $changexssto,
$UserInput);
                $UserInput = strip_tags($UserInput, $allowedtags);
                $UserInput = nl2br($UserInput);
                return $UserInput;
        }
}

?>

attached mail follows:


On Thu, Feb 21, 2008 at 8:53 PM, nihilism machine
<nihilismmachinegmail.com> wrote:
> What is a better idea? Using this class in my db class and using
> CleanInput on the sql statements, or using it in the top of the all
> pages with form input to clean the $_POST's? Also, any ideas or
> comments on improving the class?
>
> <?php
>
> class FormCleaner {
>
> // Initializer
> function __construct() {
> if (count($_POST) > 0) {
> foreach($_POST as $curPostKey => $curPostVal) {
> $_POST[$curPostKey] = $this->CleanInput($curPostVal);
> }
> }
> }
>
> // Clean Form Input
> public function CleanInput($UserInput) {
> $allowedtags = "<b></b><i></i><h1></h1><a></a><img><ul></ul><li></
> li><blockquote></blockquote>";
> $notallowedattribs = array("javascript:|onclick|ondblclick|
> onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|
> onkeydown|onkeyupsi");
> $changexssto = '';
> $UserInput = preg_replace($notallowedattribs, $changexssto,
> $UserInput);
> $UserInput = strip_tags($UserInput, $allowedtags);
> $UserInput = nl2br($UserInput);
> return $UserInput;
> }
> }
>
> ?>
>

Does this line work?:
                       foreach($_POST as $curPostKey => $curPostVal) {
                               $_POST[$curPostKey] =
$this->CleanInput($curPostVal);
                       }

If I recall correctly, you can't modify the array within a foreach
block... or am I going crazy?

--
-Casey

attached mail follows:


On Thu, Feb 21, 2008 at 8:59 PM, Casey <heavyccaseygmail.com> wrote:
>
> On Thu, Feb 21, 2008 at 8:53 PM, nihilism machine
> <nihilismmachinegmail.com> wrote:
> > What is a better idea? Using this class in my db class and using
> > CleanInput on the sql statements, or using it in the top of the all
> > pages with form input to clean the $_POST's? Also, any ideas or
> > comments on improving the class?
> >
> > <?php
> >
> > class FormCleaner {
> >
> > // Initializer
> > function __construct() {
> > if (count($_POST) > 0) {
> > foreach($_POST as $curPostKey => $curPostVal) {
> > $_POST[$curPostKey] = $this->CleanInput($curPostVal);
> > }
> > }
> > }
> >
> > // Clean Form Input
> > public function CleanInput($UserInput) {
> > $allowedtags = "<b></b><i></i><h1></h1><a></a><img><ul></ul><li></
> > li><blockquote></blockquote>";
> > $notallowedattribs = array("javascript:|onclick|ondblclick|
> > onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|
> > onkeydown|onkeyupsi");
> > $changexssto = '';
> > $UserInput = preg_replace($notallowedattribs, $changexssto,
> > $UserInput);
> > $UserInput = strip_tags($UserInput, $allowedtags);
> > $UserInput = nl2br($UserInput);
> > return $UserInput;
> > }
> > }
> >
> > ?>
> >
>
> Does this line work?:
>
> foreach($_POST as $curPostKey => $curPostVal) {
> $_POST[$curPostKey] =
> $this->CleanInput($curPostVal);
> }
>
> If I recall correctly, you can't modify the array within a foreach
> block... or am I going crazy?
>
> --
> -Casey
>

Nevermind, wrong language! :P

--
-Casey