RES: [PHP] Hiding all browser toolbars - how?

2008-02-19 Thread Thiago Pojda

[snip]
Greetings everyone! I am currently working on a web application (aren't we
all?). The main page which users will look at is simply a login prompt, and
upon logging in a new browser window will be launched. I would like that
window to have no browser bars, etc so all of the space taken up by the
window is dedicated to the app. I know this can be done in ASP (my company's
software does it) but I am curious if its possible or not with PHP? If not,
maybe javascript? Any advice at all would be wonderful, thanks![/snip]

It will either be JavaScript or starting the browser in a kiosk mode


As said, that's not up to php (server-side) but to HTML/JavaScript
(client-side).

But if you want to hide the address bar, remember that in Firefox3 and IE7
that's not possible (AFAIK).


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

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



[PHP] Thread Safety

2008-02-19 Thread Thiago Pojda
Not quite sure if this is the right list, but here I am...
 
I'm trying to use zend platform and it requires the Thread Safety option set
to off.
 
I just compiled php and I can't find what argument to build php that way,
what am I missing?
 
PHP 4.4.8
 
 
Thanks!

Atenciosamente,


  www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

 


RES: [PHP] Thread Safety

2008-02-19 Thread Thiago Pojda
I was expecting that. I just compiled it to enable oci8 module and the
source is ready for modifications. :)

Isn't there any argument you pass to ./configure to disable Thread Safety? I
didn't find any and neither google or php-install list answer anything.

Thanks.

-Mensagem original-
De: Daniel Brown [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 19 de fevereiro de 2008 15:16
Para: Thiago Pojda
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Thread Safety

On Feb 19, 2008 12:00 PM, Thiago Pojda <[EMAIL PROTECTED]>
wrote:
> Not quite sure if this is the right list, but here I am...
>
> I'm trying to use zend platform and it requires the Thread Safety 
> option set to off.
>
> I just compiled php and I can't find what argument to build php that 
> way, what am I missing?

To modify thread safety options, unfortunately it requires a full
reconfiguration and recompilation of the binaries.  There's no INI setting,
it's compiled right into the core.

--


Daniel P. Brown
Senior Unix Geek


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



[PHP] RES: [PHP-INSTALL] Re: [PHP] Thread Safety

2008-02-19 Thread Thiago Pojda
 

-Mensagem original-
mailto:[EMAIL PROTECTED] 
Assunto: [PHP-INSTALL] Re: [PHP] Thread Safety

On Feb 19, 2008 1:21 PM, Thiago Pojda <[EMAIL PROTECTED]>
wrote:
> I was expecting that. I just compiled it to enable oci8 module and the 
> source is ready for modifications. :)
>
> Isn't there any argument you pass to ./configure to disable Thread 
> Safety? I didn't find any and neither google or php-install list answer
anything.

Don't quote me on this, and I'll defer to someone that may know better
than I in this case, but I believe that you can pass
'--enable-thread-safety' to ./configure to enable it (default), so I'd
imagine '--disable-thread-safety' would be the flag to send.

You may want to try subscribing to the php-install list (go to
http://php.net/mailing-lists.php).  I'm CC'ing your email to that list in
hopes that someone there can better help you.


./configure --disable-thread-safety did not do the trick, neither did
--with-tsrm-pthreads=no.

I've tried php-install mailing list and no1 answered.

Going trougth configure script, there are some places with thread_safe
arguments, but messing around didn't help me much.

Perhaps something to do with apxs2?

This is the default configure I need to run, where I'm trying to add no TS
commands:

./configure --with-oci8-instant-client=/oracle/instantclient
--with-apxs2=/usr/bin/apxs2




ORIGINAL MESSAGE

Not quite sure if this is the right list, but here I am...

I'm trying to use zend platform and it requires the Thread Safety option set
to off.

I just compiled php and I can't find what argument to build php that way,
what am I missing?

PHP 4.4.8


--


Daniel P. Brown
Senior Unix Geek


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



RES: [PHP] Thread Safety

2008-02-20 Thread Thiago Pojda
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:[EMAIL PROTECTED] 
Enviada em: terça-feira, 19 de fevereiro de 2008 20:40
Para: Thiago Pojda
Cc: php-general@lists.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



RES: [PHP] Help on running external command

2008-02-20 Thread Thiago Pojda
You're using single quotes (') and therefore variables within will not be
resolved.

try either:

exec("su - vpopmail -c
\"/var/qmail/bin/maildirmake/home/vpopmail/domains/wwlib.lan/\" .
$username"); 

exec('su - vpopmail -c
"/var/qmail/bin/maildirmake/home/vpopmail/domains/wwlib.lan/"' .
$username');

try echoing the result before exec'ing:

echo('su - vpopmail -c
"/var/qmail/bin/maildirmake/home/vpopmail/domains/wwlib.lan/" . $username');


cheers,

Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros



-Mensagem original-
De: Mário Gamito [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 20 de fevereiro de 2008 11:32
Para: PHP General list
Assunto: [PHP] Help on running external command

Hi,

I need to run an eternal command from a PHP page.

My code is:
"
$username= 'lixo';

$username = 'lixo';

exec('su - vpopmail -c
"/var/qmail/bin/maildirmake/home/vpopmail/domains/wwlib.lan/" . $username');
"

But I get the error:
"/var/qmail/bin/maildirmake/home/vpopmail/domains/wwlib.lan/: Not a
directory"

Which means that the $username variable isn't being appended to the string.

Any help would be appreciated.

Warm Regards,
Mário Gamito

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



RES: [PHP] All Survey leading to PHP

2008-02-21 Thread Thiago Pojda
Point 1 I can answer, not sure about 2.

1) Yes there is, there are many tools for that on the Web. First one that
comes to my mind is Zend Guard, it generates .class-like files. But this one
requires some extra stuff on the web server which some others don't.

-Mensagem original-
De: Allan Fernandes [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 21 de fevereiro de 2008 09:29
Para: php-general@lists.php.net
Assunto: [PHP] All Survey leading to PHP

Hi,

I have been doing a survey on which development environment will be the best
to move on to. PHP is most highly recommended. I have following doubts
though.
1) Is there any method to protect source code of my applications even when
deployed at the clients Server.
2) Can I call Delphi Dll's

Regards
Allan

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



RES: [PHP] Thread Safety [partially solved]

2008-02-21 Thread Thiago Pojda

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:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 20 de fevereiro de 2008 09:32
Para: 'Tom Rogers'
Cc: php-general@lists.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:[EMAIL PROTECTED] Enviada em: terça-feira, 19 de
fevereiro de 2008 20:40
Para: Thiago Pojda
Cc: php-general@lists.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

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



RES: [PHP] Date Function

2008-02-22 Thread Thiago Pojda
 
$start_date =  date("Y-m-d H:i:s", strtotime($date_format)); echo
$start_date; ?>

capital H should do it


-Mensagem original-
De: VamVan [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 22 de fevereiro de 2008 16:48
Para: php-general@lists.php.net
Assunto: [PHP] Date Function

Hi All,

Greetings!!

A small PHP Script for help



output is 2008-02-22 02:00:00

but not 2008-02-22 14:00:00

How can i get my output as 2008-02-22 14:00:00.

Thanks
V

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



RES: [PHP] Set PHP session expire to 2 months

2008-02-25 Thread Thiago Pojda
Perhaps the user doesn't have cookies disabled but often clean them?

Another software could be doing that.

-Mensagem original-
De: Manuel Barros Reyes [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 25 de fevereiro de 2008 13:55
Para: php-general@lists.php.net
Assunto: [PHP] Set PHP session expire to 2 months

Hi, I'm working on a site that needs that once the user chooses his country
the question should not be asked again (while the user doesn't manually
delete the cookies in his browser).

The question is asked only in the index.php and the answer is stored in
$_SESSION["pais"]. If the user tries to enter the site once again and the
session variable is still set the question is not asked again as it is
supposed to happen. The session data is configured to last for aprox. 2
months and it works in the browsers I've tried it but still I receive
reports of users who are constantly being asked for their countries they
also told me they don't have cookies blocked.

Below I paste the code I am using inside index.php to test if the session is
set:



Can someone see something wrong with this? Inside home.php I do the opposite
if the session var. is not set the redirect to index.php.



Thanks in advance.
Manuel

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



RES: [PHP] Re: Plant Extracts and Our Factory

2008-02-25 Thread Thiago Pojda
YOu could try reading only the even lines, maybe ther's something... 

-Mensagem original-
De: Matty Sarro [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 25 de fevereiro de 2008 13:58
Para: Daniel Brown
Cc: Wolf; [EMAIL PROTECTED] php. net; Shawn McKenzie
Assunto: Re: [PHP] Re: Plant Extracts and Our Factory

This is not spam, obviously there's some sort of UNIXy recursive joke here,
we just have to find it.

On Mon, Feb 25, 2008 at 11:40 AM, Daniel Brown <[EMAIL PROTECTED]> wrote:

>Amazing some of the brightest minds on the Internet communicate 
> on these lists and yet no one can recognize an obvious SPAM 
> message.  ;-P
>
> --
> 
>
> Daniel P. Brown
> Senior Unix Geek
> 
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: 
> http://www.php.net/unsub.php
>
>

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



[PHP] PHPDoc autocomplete hints

2008-02-26 Thread Thiago Pojda
Guys,
 
I'm new to this thing and I'm not sure if it's my IDE (ZendStudioNeon)
problem, or if I'm doing something wrong. I always use PHPDoc block comments
on my functions, but this time I'm using factories in my code and missing
autocomplete on those objects. I've tried using those hints as below, but
with no luck. What am I missing?
 
/* This code is not real */
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory->getUserDAO(); //autocomplete ok
$usrObj->resetPW($usr, $newPw); // no autocomplete here
 
I've tryed using:
$DAOFactory = new DAOFactory();
$usrObj = $DAOFactory->getUserDAO(); //autocomplete ok
/* @var $usrObj UserDAO */
$usrObj->resetPW($usr, $newPw); // but still no autocomplete here
 
Tried also
/* @var UserDAO */
$usrObj->resetPW($usr, $newPw); // no luck either
 
 
Thanks for your help.
 
 
PS: I've sent a similar message to ZendStudioNeon mailing list.

Atenciosamente,


  www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

 


RES: [PHP] Ob_Flush issue

2008-02-26 Thread Thiago Pojda
try now

http://pastebin.ca/919399 

Remember IE only starts displaying a page after it receives 256bytes.

-Mensagem original-
De: Ritesh Nadhani [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 26 de fevereiro de 2008 17:07
Para: php-general@lists.php.net
Assunto: [PHP] Ob_Flush issue

Hello

I have a sample code like: http://pastebin.ca/919386

I have around 4000 rows returned so it should show me partial output at
client after each 100 rows but it never does. I am only getting the output
after full completion.

Though if you remove the step code and output after every row then i can see
the update.

My phpinfo(): http://craig.cs.uiowa.edu/smt/phpinfo.php

Any idea what might be the problem? I want to show a status message after
every 100 rows processed..

--
Ritesh
http://www.riteshn.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



RES: [PHP] What design patterns do you usually use?

2008-02-27 Thread Thiago Pojda
-Mensagem original-
De: Wolf [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 27 de fevereiro de 2008 12:06


 Jochem Maas <[EMAIL PROTECTED]> wrote: 

> > 
> > Yeah, but I can't fit into that dress.  ;-P
> 
> besides the flower pattern doesn't really suit you, go with blue 
> velvet ;-)
> 

No, go with the Crushed purple velvet with the pageboy sleeves, that should
accentuate the colors of your hair...

:-P


Okay, this is just getting weird...



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



RES: [PHP] Guidance

2008-02-27 Thread Thiago Pojda
Well, let's see.. IMO you should try:

[1] HTML: Before anything, you should study the fundamental tags (html,
table, div) and some about DOM (this helps w/ XML also).
[2] PHP: Using php to build the results for html, embedding php in html,
forms, etc
[3] SQL: Storing data is essential, try using PHP to store/retrieve data
from databases and show in HTML pages
[4] JavaScript: Client-side validations, DOM manipulation
[5] XML: Well, it's like a HTML but w/ the purpose to store data
[6] Design Patterns: Write reusable code, stuff well discussed here on this
list
[7] AJAX: Write a Javascript that calls a PHP that returns a XML and display
it's results in HTML w/o reloading the entire page, that's pretty much what
it is.

Can't help to rewrite code, you'll always rethink what you've done before.
PHP has a LOT of build-in functions to help you out, everytime you want to
do something, go to php.net and see if there's a function around to help you
out.

And ask around, people here are ready anytime :)

Oh, and Welcome!


=> Thiago

-Mensagem original-
De: Matty Sarro [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 27 de fevereiro de 2008 16:50
Para: php-general@lists.php.net
Assunto: [PHP] Guidance

Greetings all!
I am still relatively new to any kind of web design or php programming, I'll
be completely honest. I am used to working with C, Perl, Java, and a splash
of C++. PHP and web application development are kind of a new bag for me and
I'm still trying to get my bearings. I see that designing a web application
can involve all of the following: html, javascript, php, sql, ajax, xml,
design patterns, and other things. Its kind of... information overload right
now? For what I want to do I know I'm going to need to learn all of them,
but coming up with a roadmap for "what should I learn first?" is becoming
problematic. I want to start working on projects but I'm just not sure what
order to learn things in. I don't want to come up with something that works,
and then have to re-write it all over again simply because I read a new
chapter in a new book.

I would just like some advice on what order to go about this stuff. Thanks!
-Matthew

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



RES: [PHP] Guidance

2008-02-28 Thread Thiago Pojda
Go to:

http://php.net/mailing-lists.php 

-Mensagem original-
De: Timothy Asiedu [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 28 de fevereiro de 2008 09:16
Para: Stut; php-general@lists.php.net
Cc: [EMAIL PROTECTED]
Assunto: Re: [PHP] Guidance

Dear Sir/Madam,
   
  Please I would be grateful if you could remove my e-mail address:
[EMAIL PROTECTED] from the general Mailing List. 
   
  I look forward to having a favourable response from you. Thank you.
   
   
  Best regards,
   
   
  Timothy Asiedu.
   
  

Stut <[EMAIL PROTECTED]> wrote:
  On 27 Feb 2008, at 21:50, Shawn McKenzie wrote:
> Shawn McKenzie wrote:
>> Stut wrote:
>>> I've interviewed more than my fair share of "web developers" who 
>>> couldn't reverse an array without using array_reverse if their life 
>>> depended on it. Sometimes it really does scare me!
>>>
>>> So my experience is that there are far more web developers out there 
>>> than software engineers who do web development, and it's getting 
>>> harder to find decent software engineers to do web-based work at a 
>>> reasonable price. The good ones are rare - so rare in fact that I'm 
>>> having trouble finding one at the moment. If anyone considers 
>>> themselves a software engineer rather than a web developer and would 
>>> like a job in Windsor drop me a note.
>>>
>> Job! Now!
>>
>> foreach($array as $k => $v) {
>> $reversed[$v] = $k;
>> }
>> $array = $reversed; //optional
> No wait!

Yeah, nice try ;)

Anyways, I assume you're based in the US somewhere so unless you're
considering emigrating to the UK you were never in the running.

-Stut

--
http://stut.net/

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



   
-
Never miss a thing.   Make Yahoo your homepage.

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



RES: [PHP] auto-wrap on posts

2008-02-28 Thread Thiago Pojda
Only thing I've seen is my post formatting getting messed up after then
4th~5th line. I'm on outlook tho.

-Mensagem original-
De: Nathan Nobbe [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 28 de fevereiro de 2008 12:06
Para: PHP General list
Assunto: [PHP] auto-wrap on posts

all,

a fellow poster has been kind enough to bring to my attention how jacked
some of my posts appear.
i was manually formatting my posts, but it appears the list server must also
be doing some formatting as many of my posts come out all jacked up looking,
some with only a single word on a line.
ive now resolved to just keep on typing all the way to the end of a line in
the gmail editor, but then they look like crap in the editor; though ill do
it to save face for the public postings if i have to ;) any body else
encounter this ?

-nathan

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



RES: [PHP] ZCE guidance needed

2008-02-28 Thread Thiago Pojda
 

-Mensagem original-
De: Ray Hauge [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 28 de fevereiro de 2008 11:23
Para: Nathan Nobbe
Cc: Shelley; php-general@lists.php.net
Assunto: Re: [PHP] ZCE guidance needed

Same here.  I read the practice book and took the Vulcan training tests.

http://www.phparch.com/c/product/vulcan/view

My work paid for an online training that got me both of them for free, so I
used them.  The hardest part for me was just setting a date and stop
procrastinating.  The test was easier than I was expecting, though there
were a few things that I didn't know on there.  The tests were my best
training though.

---

I've been reading the ZCE FAQ and there says they will ask stuff about
regex. How much of regex do they ask about? I have to say I know very little
about this :)


-- 
Ray Hauge
www.primateapplications.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



RES: [PHP] auto-wrap on posts

2008-02-28 Thread Thiago Pojda

-Mensagem original-
De: Daniel Brown [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 28 de fevereiro de 2008 13:14

On Thu, Feb 28, 2008 at 11:13 AM, Thiago Pojda
<[EMAIL PROTECTED]> wrote:
>  I'm on outlook tho.

That's your first mistake ;-P
--

I have no choice, company policies ;)

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



RES: [PHP] Making sure an include file works

2008-02-29 Thread Thiago Pojda
De: Daniel Brown [mailto:[EMAIL PROTECTED] 

On Thu, Feb 28, 2008 at 9:58 PM, Richard S. Crawford 
<[EMAIL PROTECTED]> wrote:
> I'm trying to figure out a way to make sure an included PHP file has 
> no syntax  errors before actually including it as a part of project. 
> Is this even  possible?  I'm running into brick walls.

As far as I know, the only way to do that is via the CLI 
(or accessing the include file directly in the browser).

Make sure that error_reporting is enabled and that it's set 
to report E_ALL if you want to really be sure your code is 
clean (i.e. - reporting unused, undefined, and uninstantiated 
variables, et cetera).

Then, if done from a *nix command line, just type:
php -l /path/to/include/file.php

--


--**--

Just being curious and lazy. The description of php -l in php.net says it
executes the script to check it's syntax.

Ok, but... It _executes_ the script as if I ran it directly? or just
_checks_ it's syntax?

There's a big difference in there.


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



RES: [PHP] Anyone jump from Studio 5.5.x -> Zend Eclipse?

2008-03-03 Thread Thiago Pojda
De: Bojan Tesanovic [mailto:[EMAIL PROTECTED] 

I agree with Ray

Eclipse has more extensibility than Z. Studio , but the 
question is do you need it, I preffer doing PHP coding in 
Studio, I learned a lot of shortcuts and doing coding is so 
much faster and less frustrating than doing it in Eclipse 
though et the end of the day it is up to  
you, in my ream 12 of us, 50% is using eclipse and 50% is using Zend   
(those one that are using Eclipse are PHP coders that know Java or C+ 
+ so they feel more comfortable with Eclipse ... ) , I alos know Java
and I am using Eclipse for that , for me one of the most useful 
thing in Zend is (CTRL+D X,C or Apple+D , X, C) which 
duplicates copies and paste lines in Studio , switching to 
Eclipse I just miss those shortcuts so I am always finding 
myself going back to Z. Studio


On Mar 2, 2008, at 4:32 PM, Ray Hauge wrote:

> Steve Finkelstein wrote:
>> Hi all,
>> I've tried googling around to find some blogs with decent 
information 
>> on whether Zend Eclipse is mature enough to make the jump over from 
>> 5.5.x just yet.
>> Admittedly, I've dropped Zend Studio as of late and been writing all 
>> of my code in TextMate -- but at the end of the day when a 
project is 
>> complex enough, Zend Studio is much more powerful than TextMate with 
>> all of its features and remote debugging capabilities.
>> Anyhow, I'm curious if it's worth it to check out Zend Eclipse yet.
>> We're a team of about 5-6 developers and I've been getting 
asked by a 
>> few colleagues if I've tried it out yet since I'm usually the one to 
>> try out the newer technologies.
>> I'd love to hear some feedback.
>> Thanks!
>> /sf



I've been trying it since Beta1. Beta1 was like Eclipse PDT (PHP Development
Tools) + Zend products support.

Beta2 fixed some very frustrating bugs but still left some around.

On the QA release (aka Zend Studio for Eclipse 6.0) I did not see much
difference and I'm still really disappointed they took this move instead of
releasing another Beta (perhaps business area was pushing them).

Most of their bugs are actually Eclipse ones, things like the shift+tab
support has something to do with whitespaces and tabs for indents and I've
no idea when it will be fixed.

I've been using Neon (ZS4E) @ work and Zend Studio 5.5 @ home and I have to
say, even Neon having a lot more resources than ZS5.5 it's still a bit messy
and I'll be staying with 5.5 for a while. Yes, there are tons of good new
stuff. But if you really intend to use many of those, you'll have to get
used with "workarounds".

What's nice about this is, a lot of the bugs they're finding and fixing, are
going to original Eclipse project :)

As said, give it a respectful try before making a choice. Once you get used
to Eclipse's interface you rarely switch back (expect when you get annoyed
with code editor bugs :)


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



[PHP] PHP performance

2008-03-03 Thread Thiago Pojda
Guys,
 
I've been asked to build a performance report for a PHP app. I can't profile
it using automated tools as I don't have full access to the server, only to
the application itself.
 
It's a PHP4 Object-Oriented app, which uses ADODB as abstraction layer with
a Oracle 8i databse. The system also uses a VB.NET socket server for some
data manipulation.
 
As for migrating to PHP5 I think it's crucial, but I need facts that it
really runs faster than PHP4. Anyone? :)
 
Any ideas on what might be the bottleneck?
 
Thanks guys

Atenciosamente,


  www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

 


RES: [PHP] PHP performance

2008-03-03 Thread Thiago Pojda
-Mensagem original-
De: Eric Butera [mailto:[EMAIL PROTECTED] 


On Mon, Mar 3, 2008 at 12:09 PM, Thiago Pojda 
<[EMAIL PROTECTED]> wrote:
> Guys,
>
>  I've been asked to build a performance report for a PHP app. I can't 
> profile  it using automated tools as I don't have full access to the 
> server, only to  the application itself.
>
>  It's a PHP4 Object-Oriented app, which uses ADODB as abstraction 
> layer with  a Oracle 8i databse. The system also uses a VB.NET socket 
> server for some  data manipulation.
>
>  As for migrating to PHP5 I think it's crucial, but I need facts that 
> it  really runs faster than PHP4. Anyone? :)
>
>  Any ideas on what might be the bottleneck?
>
>  Thanks guys
>

Try and get a copy of the files and database, then set it up on 
your dev machine.  Then profile using Xdebug.

If you're looking for comparison numbers maybe look at:
http://sebastian-bergmann.de/archives/745-Benchmark-of-PHP-Branc
hes-3.0-through-5.3-CVS.html

Just FYI, using ADODB will slow down the performance of your 
app.  Any function calls cost against you and it all adds up.




I have a copy of the files and database, but setting it up is not that
simple. This vb.net is licensed and we don't have license for.

If I could profile the app I'd be more than happy, but that's not going to
happen anytime soon.

Thanks for those numbers, they'll be handy :)

ADODB removal will be studied, thanks for the hint!


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



RES: [PHP] PHP performance

2008-03-04 Thread Thiago Pojda
-Mensagem original-
De: Jochem Maas [mailto:[EMAIL PROTECTED] 
Eric Butera schreef:
> On Mon, Mar 3, 2008 at 6:18 PM, Chris <[EMAIL PROTECTED]> wrote:
>>  > Just FYI, using ADODB will slow down the performance of your app.  
>> Any  > function calls cost against you and it all adds up.
>>
>>  If you remove it, then you remove functionality - so before you go 
>> and  rip it out, check whether it's the bottleneck using xdebug.
>>
>>  I use an abstraction layer all the time and the benefits far 
>> outweigh  the 'costs'.
>>
>>  --
>>  Postgresql & php tutorials
>>  http://www.designmagick.com/
>>
> 
> Hi Chris,
> 
> These 'benefits' you talk about really only matter if you switch your 
> databases.  If this app is written against Oracle and they never plan 
> to change it, then it isn't a bad idea to cut out that fat and just 
> deal with the native interface.  Even writing wrapper functions that 
> are very basic that abstract mysql_query or mssql_query end up adding 
> a lot of overhead over lots of requests.  Look at some of the PDO 
> benchmarks.  It is slower than the native functions too because it is 
> just a wrapper.
> 
> Even further if you are writing an app where you care about 
> performance you should be writing your SQL to the point where it 
> really isn't portable using all the little vendor specific 
features so 
> that you get the most out of it.
> 
> From my personal profiling most of my application time is spent in 
> data access.  So the less layers you have there the faster it runs.

the adodb php layers are insignificant compared to the cost of 
the db connection and the round trip to retrieve data from the 
db. the significant application time you speak of is undoubtly 
spent at the database performing and retrieving the data as 
opposed to measurable overhead caused by a [number of] wrapper 
function[s].

high probability that SQL related tweaks (indexing, query 
restructuring, db tuning) will win you much, much more than 
removing any db abstraction layer

> 
> But that is just my 2cents on it.  :)
> 


First of all, thanks for helping me out :)

The vb.net stuff does a lot of business and database stuff, it's
really tied up with the app. Actually I've no idea how it works internally,
all I know is that we send data strings via socket and it returns the
results the same way. It's kind of a black box. :/

I'm going for:
Tune SQL and move a lot of heavy queries directly to
procedures/functions in BD
Tune apache
Perhaps switch from PHP4=>5 (if I'm allowed to)
Try memchache

We had a talk with a sysadmin and tried installing xdebug in the
server, but it's a RHEL4AS w/o php-devel packages (phpize) and we can't find
a RPM for that anyone? :)


Thiago



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



RES: [PHP] 2 Questions: Static variables and the nature of the online manual

2008-03-04 Thread Thiago Pojda
 

-Mensagem original-
De: Svevo Romano [mailto:[EMAIL PROTECTED] 

Hi there,

Many thanks for your answer. I've also gone through your 
example and it took me 10 minutes to understand how the 
operator precedence was working there.
Was expecting 1 on the first call :)

But this is not the point. You've nailed my question very 
preciseley in your first answer: 'the preceding line is only 
run on the first call to the function'.

My only question is (at it is related to the nature of the 
online manual):
how do you know it and I don't? This thing is the only logical 
explanation to the fact the $a doesn't get initialized again to 
0 in any subsequent call to the function, but it's not written 
anywhere in the manual page. And it seems the most important 
statement in my opinion, that justifies what I see as an 
exception to a normal flow.

Hope all this makes sense.
Thanks,
S 




You can use http://bugs.php.net/report.php to report a documentation
"bug" and they'll change the docs :)

Thiago




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



RES: [PHP] PHP performance

2008-03-05 Thread Thiago Pojda
De: Richard Lynch [mailto:[EMAIL PROTECTED] 

#1
Get the code, install it on a box in the closet, run valgrind 
--callgrind

This will give you a stack trace of what gets called the MOST 
in your application.

Look for "tall" trees in the call graph, and fix those first.

#2
You can use 'ab' (apache benchmark) or similar to test it externally.

#3
You can also script things with Selenium IDE and then use 
Selenium remote control to run them repeatedly, for the 
end-user experience.

Don't let server non-access stop you from doing #1 though...





  Sweet!

  I'll be trying those tools, Richard. Thanks :)

  Installing xdebug is getting rougher than expected as it's a RHEL4AS, php
4.3.4 w/o php-devel and a screwed up gcc :/


  I'll let you know what worked for me.


  Thiago




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



RES: [PHP] maintaining [user] state without a session ...

2008-03-05 Thread Thiago Pojda
At 10:45 AM -0500 3/5/08, Jason Pruim wrote:
>Me personally, I'm on Wife 1.0 (Still working out a few bugs before
>1.1 is released) But I do have Son 1.20 and in a few months Son 2.0 
>will be released into the wild.. The only problem I have found with 
>wife 1.0 and son 1.20 is my bank account which used to be 5.0 is much 
>closer to 1.0 now... Anyone else experience that? :)

Similar --

But it went for college for daughter 1.0, 2.0 and son 1.0.

And let's not to forget daughter 1.0 and her 1.0 and 2.0 weddings.

Cheers,

tedd
--




You don't have to go that far to have a bank account downgrade, I'm still on
Wife RC1 and that's already happening...

I hope I get newer versions of bank account before going to Final :)

Thiago



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



RES: [PHP] CVS Scripts

2008-03-06 Thread Thiago Pojda
-Mensagem original-
De: Eric Butera [mailto:[EMAIL PROTECTED] 
>
>  CONFIDENTIALITY NOTICE
>  This email is private and confidential and may contain legally 
> privileged  information. If you are not named as an addressee it may 
> be unlawful for you  to read, copy, distribute, disclose or otherwise 
> use the information  contained in this email. If you are not the 
> intended recipient of this email  please destroy this communication 
> and contact [EMAIL PROTECTED]
>
>
>
>
>
>

   I'm not really sure I can reply to you because of your 
   confidentiality notice.  I mean it isn't like you sent an email 
   to a public mailing list where thousands of people can see it. ;)

   Maybe this will help: http://cruisecontrol.sourceforge.net/



Ever noticed that the sentence "it may be unlawful for you  to read"
is at the bottom of the email? Well, for you to read that you probably
already read it all, isn't it?





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



RES: [PHP] maintaining [user] state without a session ...

2008-03-11 Thread Thiago Pojda
-Mensagem original-
De: Stut [mailto:[EMAIL PROTECTED] 


On 4 Mar 2008, at 13:57, Jochem Maas wrote:
> Stut mentioned a little while back that he avoids using the built-in 
> session

> mechanism if at all possible, but still manages to track user state 
> ... now I can think of a way or two that he might do that but I was 
> wondering if any one could give an idea about the write way to do it 
> in terms of high performance :-)

Finally found time to finish the article, sorry for the delay...

http://stut.net/articles/sessionless_sessions.html

Constructive criticism welcome.

-Stut


Good one, but how about CPU Load? Did it increase much?




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



RES: [PHP] Newbie question, Which way is best?

2008-03-20 Thread Thiago Pojda
De: George J [mailto:[EMAIL PROTECTED] 

> So calling the script via the form works i.e it passes the 
> neccessary variables to constrct the sql query for the next 
> call. 

As Shawn said, if you really need the query again add it to session, never,
NEVER give the user the ability to see/execute queries by himself (remember
POST data could be easily manipulated). Remember what Daniel said, adding a
DELETE FROM is not hard and veeery bad.

> If the user clicks one of the pagination links, that 
> calls itself, all that is passed is the page=$i variable. I 
> need to include the 'SELECT * FROM...' query either as a string 
> or an array of seperate values for the changed query.

Ok, let me ask you something. Why post to itself? You could have a script
only to do form actions, that way you can:
1 Separate huge php validations with your html form.
2 Use functions to handle the incoming data and writing the new query (or
the old one again).

As it's built at server side, the user is never going to see your query or
[1]manipulate it as you're writing it all over again, just using your old
parameters (they could be added as hidden fields in the form if strictly
necessary).


> So, as I see it, the pagination links won't POST the form 
> variables. How do I pass the 'SELECT * FROM mytable WHERE 
> selection=option LIMIT start, range' 
> query to the called script?

You should try building a default query where you only add the parameters
given by the user. If you can't seem to recover that, add them to $_SESSION
and you'll be fine next time you want them (if you don't overwrite it =] ).

> George
Welcome and keep asking :)


[1] As long as you treat the user input properly, as other said.
 



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



RES: [PHP] mysql joins

2008-03-25 Thread Thiago Pojda
not sure how timestamps work in MySQL, but I've written this in Oracle:

CREATE TABLE USaR (
  UsID char(255) null,
  Firstname char(255) NULL,
  Surname char(255) NULL,
  Tel char(255) NULL,
  Cell char(255) NULL,
  Email char(255) NULL
)
/
CREATE TABLE Tracker(
  UsID  CHAR(255) NULL,
  Points CHAR(255) NULL
)
/
CREATE TABLE Winners(
  UsiD CHAR(255) NULL,
  DateTime DATE NULL
)
/

/* Inserted some values in those tables and then executed: */ 

select
  us.usid, --I couldn't get the Firstname as it's not a group by element (?)
  Sum(tr.points) 
from
  usar us, --in mysql you'll have to do 'usar as us'
  tracker tr, --tracker as tr
  winners wn --winners as wn
where
us.usid = tr.usid --here is the join magic
and us.usid = wn.usid --and here
AND wn.datetime < (SYSDATE - 14) --winner date has to be less than 14 days
from today
GROUP BY us.usid  --separate per user;


I hope this helps :)

This will *NOT* bring you users that never won or have no points (since they
don't have any record in winners table)

Regards,
Thiago

-Mensagem original-
De: Steven Macintyre [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 25 de março de 2008 09:21
Para: php-general@lists.php.net
Assunto: [PHP] mysql joins

 I have three tables, namely;

User
- UID
- Firstname
- Surname
- Tel
- Cell
- Email

Tracker
- UID
- Points

Winners
- UID
- Datetime (-00-00 00:00:00)

I need to get the following information from the above tables 
(in my logical sense)

All users from user with sum(points) as points and datetime > 
datetime + 14 days

In English, the all users must be selected, excluding the ones 
that have won in the last 14 days and return all the 
information and the sum of points

I suspect I would need to use joins here ... but have no clue 
how to do so ... I have read up a bit and can work out inner 
joins from three tables, but not coping with this problem above

Can someone help me out with this please?

Many thanks 

Steven



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



RES: [PHP] why won't my array work?

2008-03-28 Thread Thiago Pojda
That's because your loginpassWord is in another array.

try $chpwrow[0]['loginPassword'] 

-Mensagem original-
De: Jason Pruim [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 28 de março de 2008 13:29
Para: [php] PHP General List
Assunto: [PHP] why won't my array work?

Hi everyone :) Happy friday to all of you!

Here's my issues, I am attempting to echo the results of mysqli 
query out to my script just so I can make sure it's working 
right, what I'm hoping to do in the long run is compare what 
was typed in a text box to this info... It's for verifying a 
old password before changing to a new password... So here is my query:

$oldpasswordquery = "SELECT loginPassword, Record FROM current 
WHERE loginPassword='{$oldPassHash}' AND Record='{$Record}'"; 
$chpwold[] = mysqli_query($chpwpostlink, $oldpasswordquery) or 
die("Sorry read failed: ". mysqli_error($chpwpostlink)); 
$chpwresult = $chpwold[0]; $chpwrow[] = 
mysqli_fetch_assoc($chpwresult) or die('Sorry it didn\'t 
work' .mysqli_error($chpwpostlink)); echo 
$chpwrow['loginPassword']; print_r($chpwrow);


The echo and the print_r are for debugging and obviously wont' 
be in the final script... Here is the error that I am getting:

[Fri Mar 28 12:14:39 2008] [error] PHP Notice:  Undefined index:   
loginPassword in /Volumes/RAIDer/webserver/Documents/dev/OLDBv2/admin/
chpwpost.php on line 18


Line 18 is where the echo is...

the print_r though shows this:

Array ( [0] => Array ( [loginPassword] =>  
42205baa2581d3fcd8d8f9c6b9746a1f [Record] => 2 ) )

So why can't I access it via $chpwrow['loginPassword']?  I'm  
stumped Anyone that can help me has a free beer waiting for them  
the next time they are in my town! :)


--

Jason Pruim
Raoset Inc.
Technology Manager
MQC Specialist
3251 132nd ave
Holland, MI, 49424-9337
www.raoset.com
[EMAIL PROTECTED]





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



RES: [PHP] Memory usage very high under AMD64?

2008-04-03 Thread Thiago Pojda
Try those Internal lists.

You can check them out @ http://www.php.net/mailing-lists.php


Good luck! 

-Mensagem original-
De: Ed W [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 3 de abril de 2008 07:08
Para: Aschwin Wesselius
Cc: Robert Cummings; php-general@lists.php.net
Assunto: Re: [PHP] Memory usage very high under AMD64?

Aschwin Wesselius wrote:
> Ed W wrote:
>> RSS is staying approximately constant, ie the memory in use has not 
>> changed much
>>
>> VSZ, ie virtual memory has increased by more than 2x2=4.  If someone 
>> has some hard experience of both platforms then please add some 
>> experience to this - however, I'm looking for some hard debugging 
>> knowhow on this, not just some handwaving estimates please
>>
>> Ed W
>
> Maybe still some handwaving, but my colleague forwarded me this link:
>
> http://www.bit-tech.net/bits/2007/10/16/64-bit_more_than_just_the_ram/
> 1
>
> I hope that's still in your interest.
>

Interesting, but I think I have come to the wrong forum?  Where 
do the programmers who implement PHP hang out?  I really need 
to get under the bonnet on this and find out what's happening - 
I'm not after speculation (thanks to everyone who responded though)

Anyone got some hard details on how to debug this further - I'm 
looking for under the hood kind of thoughts please

Ed W


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



RES: [PHP] Why my mails are not received by Hotmail users?

2008-04-04 Thread Thiago Pojda
These emails hit even my M$ Outlook  spam filter (which is not very good at
this job)

Try sending something else, as Ryan said.

-Mensagem original-
De: Ryan Yagatich [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 4 de abril de 2008 11:31
Para: thomas Armstrong
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Why my mails are not received by Hotmail users?

thomas Armstrong wrote:
> Hi.
>
> I created this script to send emails:
> ---
> $mailFromEmail = "[EMAIL PROTECTED]";
> $mailFromName = "MYDOMAIN";
> $mailTo = "[EMAIL PROTECTED]";
>
> $mailHeaders =
> "From: $mailFromName <$mailFromEmail>\n"
> . "Content-Type: text/plain; "
> . "charset=UTF-8; format=flowed\n"
> . "MIME-Version: 1.0\n"
> . "Content-Transfer-Encoding: 8bit\n";
>
>   
Hi Thomas.

I really hope that $mailFromEmail/$mailFromName are either set just like you
have them, or are sanitized prior to input -- 
otherwise, your email has spammer written all over it!


> $mailSubject = "Hi! " . date('h:i:s A'); $mailMessage = "Hi,\n\nHow 
> are you?\n" . date('l dS \of F Y h:i:s A') . "\n";
>
>   
Your body looks like spam - with a spam subject. Try sending 
something that is a little more non-spammy :)




Regards,
Ryan Yagatich

--
Pantek, Inc. - http://www.pantek.com/ - [EMAIL PROTECTED]
+1-877-LINUX-FIX - Expert Open Source Technical Support



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



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



[PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
Guys,
 
Some users often open two different sessions in my application by opening a
new browser instance (not "Open in new window" {they all use IE}). 
 
This actually works better than expected, the two sessions are almost
indepedent.
 
The thing is: almost. Sometimes one session displays data from the other one
and things get messed up.
 
Does anyone know how to fix this? Add a hidden PHPSESSID field in every form
(instead of cookies) would solve my problem or is this a server-side thing?
 
Thanks!
 

Atenciosamente,


  www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

 


RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
De: Ryan Yagatich [mailto:[EMAIL PROTECTED] 


 you mean like session.use_trans_sid in php.ini?


Never heard of it, just RTFM'ed and it looks like the solution.

I'll be trying it and reply with the results. Thanks!


Thiago


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



RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
De: Ryan Yagatich [mailto:[EMAIL PROTECTED] 

you mean like session.use_trans_sid in php.ini?


How does this thing work anyway? As far as I read, it adds the session id to
every (default behavior) href and a hidden field in forms, right?

I *think* it just does that when you have cookies disabled. But I've
disabled my cookies and I can't pass the login screen. 

And also I did not see anything out of the ordinary in my forms :/

Am I missing something? I'm under PHP 4.3.4 (yeah, old)


Thanks,
Thiago


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



RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
De: Daniel Brown [mailto:[EMAIL PROTECTED] 

On Fri, Apr 4, 2008 at 2:37 PM, Thiago Pojda 
<[EMAIL PROTECTED]> wrote:
> De: Ryan Yagatich [mailto:[EMAIL PROTECTED]  
>
> you mean like session.use_trans_sid in php.ini?
>  
>
>  How does this thing work anyway? As far as I read, it adds the 
> session id to  every (default behavior) href and a hidden 
field in forms, right?

http://www.domain.com/script.php?".session_name()."=".session_id();
?>



I think it was supposed to add those stuff automagically...?

Not quite sure I understood. I found litle doc on that setting, most results
are people telling to not use it :)


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



RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
De: Daniel Brown [mailto:[EMAIL PROTECTED] 
Probably because of the fear of session hijacking and spoofing.
The thing is, a handwritten cookie is just as effective for 
that, by changing the PHPSESSID (or equivalent).  In any case, 
a 32-byte hexadecimal hash should be sufficient security for 
most sessions.




Yes, that's what they say. 

But anyway, adding that setting did not change a thing and I still can't see
my sessid anywhere in my code.

What will happen if I do it manually? Add the sessionid in a hidden input
field in every form (I don't feel like doing it, but if I have to...) will
do it?

Sorry to be asking too much, but I can't seem to be able to test it and the
docs are very poor for this.


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



RES: [PHP] Multi sessions - IE

2008-04-04 Thread Thiago Pojda
-Mensagem original-
De: Nitsan Bin-Nun [mailto:[EMAIL PROTECTED] 


The session.use_trans_sid setting automaticly adds

> sid=**(32-chars-sess-id)**
>
to the url's of the website,
it should solve your problem


ME -> I added "session.use_trans_sid = 1" to the beggining of my php.ini
file and I don't see that sid parameter in any $_GET value.

ME -> Nothing has changed, nothing. :/

ME -> Will I have to use url_rewrite()? Is that what Daniel was talking
about?

try to use it if you have an access to php.ini otherwise, my suggestion is
to forward a compiled (coded or something like
that)  you should 
forward an compiled string that contains some crap like a md5 
of the user and pass with some salt and check the string at 
each page (its can get hijacked quickly but this is out of discussion).

ME -> That sounds good, but too much effort to rebuild all hrefs. The system
is quite big for that.


sorry for going out of the topic

i wrote that without any attention so im sorry for anything 
that will misled you on the wrong direction, hope it helps,

Nitsan

ME-> That was not OT, and quite good to know :)


Thanks,
Thiago

{As of now, I'm only going to top post :)}

On 04/04/2008, Thiago Pojda <[EMAIL PROTECTED]> wrote:
>
> De: Daniel Brown [mailto:[EMAIL PROTECTED]
>Probably because of the fear of session hijacking and spoofing.
> The thing is, a handwritten cookie is just as effective for that, by 
> changing the PHPSESSID (or equivalent).  In any case, a 32-byte 
> hexadecimal hash should be sufficient security for most sessions.
>
> 
>
>
> Yes, that's what they say.
>
> But anyway, adding that setting did not change a thing and I still 
> can't see my sessid anywhere in my code.
>
> What will happen if I do it manually? Add the sessionid in a hidden 
> input field in every form (I don't feel like doing it, but if I have 
> to...) will do it?
>
> Sorry to be asking too much, but I can't seem to be able to test it 
> and the docs are very poor for this.
>
>
> --
> 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



RES: [PHP] string

2008-04-07 Thread Thiago Pojda
 0){ 
//you could use stripos for case insensitive search
echo "found";
}
?>

-Mensagem original-
De: John Taylor-Johnston [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 7 de abril de 2008 10:25
Para: PHP-General
Assunto: [PHP] string

$name = "John Taylor";
I want to verify if $name contains "john", if yes echo "found"; 
Cannot remember which to use:
http://ca.php.net/manual/en/ref.strings.php
Sorry,
John

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



RES: RES: [PHP] string

2008-04-07 Thread Thiago Pojda
Never late to learn new stuff, you're right Stut.

Thanks! 

-Mensagem original-
De: Stut [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 7 de abril de 2008 10:42
Para: Thiago Pojda
Cc: 'John Taylor-Johnston'; 'PHP-General'
Assunto: Re: RES: [PHP] string

Thiago Pojda wrote:
>  $name = "John Taylor";
>   if (strpos($name,'John') > 0){ 
>   //you could use stripos for case insensitive search
>   echo "found";
>   }
> ?>

This will not do what you expect it to. Since 'John' is the 
first thing in the string strpos will return 0 causing the 
condition to evaluate to false.

As per the documentation for strpos you should compare the value *and
type* of the variable returned by strpos against false to check 
for non-existance.

if (strpos($name, 'John') !== false) { ... }

-Stut

--
http://stut.net/

> -Mensagem original-
> De: John Taylor-Johnston [mailto:[EMAIL PROTECTED]
> Enviada em: segunda-feira, 7 de abril de 2008 10:25
> Para: PHP-General
> Assunto: [PHP] string
> 
> $name = "John Taylor";
> I want to verify if $name contains "john", if yes echo "found"; Cannot 
> remember which to use:
> http://ca.php.net/manual/en/ref.strings.php
> Sorry,
> John
> 
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe,
> visit: http://www.php.net/unsub.php
> 
> 
> 



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



[PHP] RES: [PHP-INSTALL] Can't enable use_trans_sid

2008-04-07 Thread Thiago Pojda
{sorry for top-posting, but outlook can't do better}

I executed "cat /usr/local/lib/php.ini | grep -i session" and found out that
there was already one entry for that conf option by default, and it was set
to 0.

It fixed it, sorry I was that dumb.

Just saw the source and it is adding the phpsessid hidden input field, now
have to find out why my app does not let me login :)


Another question:

Is there a way to make php use these fields instead of cookies for
session control? I still want to let cookies enabled for other stuff, but as
it's messing up with multiple sessions because of poor cookie handling.


Thanks!!

-Mensagem original-
De: Keith Roberts [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 7 de abril de 2008 17:38
Para: [EMAIL PROTECTED]
Assunto: Re: [PHP-INSTALL] Can't enable use_trans_sid

On Mon, 7 Apr 2008, Thiago Pojda wrote:

> To: [EMAIL PROTECTED]
> From: Thiago Pojda <[EMAIL PROTECTED]>
> Subject: [PHP-INSTALL] Can't enable use_trans_sid
> 
> Guys,
>
> I can't enable trans_sid, I've tried set these to php.ini :
>
> session.use_trans_sid = On [tried 1 also] url_rewriter.tags = 
> "a=href,area=href,frame=src,input=src,form=fakeentry,fieldset="
>
> Tried recompile it with --enable-trans-sid but still doesn't work. I 
> just realized that my phpinfo spits "session.use_trans_sid Off".
>
> Any hints?
>
> -- VERSIONS --
>
> PHP Version 4.4.8
>
>
> SystemLinux debian 2.6.18-6-486 #1 Sun Feb 10 
22:06:33 UTC 2008 i686
> Build DateApr 7 2008 10:46:06
> Configure Command './configure' '--with-apxs2=/usr/bin/apxs2'
> '--with-oci8-instant-client=/oracle/instantclient/' '--disable-zts'
> Server APIApache 2.0 Handler
> Virtual Directory Support enabled
> Configuration File (php.ini) Path /usr/local/lib/php.ini

Are you sure you are editing the correct php.ini file Thiago?

Can you also post the section from your php.ini that has all 
the session.* directives in it?

It maybe that there are other session.* configuration options 
that need to be set as well to enable you to use PHP sessions.

Kind Regards,

Keith Roberts

-
Websites:
http://www.php-debuggers.net
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with TMDA 
[http://tmda.net]
-




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



[PHP] RES: [PHP-INSTALL] Can't enable use_trans_sid

2008-04-08 Thread Thiago Pojda
De: Keith Roberts [mailto:[EMAIL PROTECTED] 

>> Another question:
>>
>> Is there a way to make php use these fields [hidden sessid] instead of
cookies for 
>> session control? I still want to let cookies enabled for other stuff, 
>> but as it's messing up with multiple sessions because of poor cookie 
>> handling.
>>

>As the browser cookies use a different mechanism for storing 
>and retrieving cookies independently of PHP, I cannot see how 
>browser cookies can be clashing with your PHP session_id cookies.

The problem I run into sometimes is:
A user opens a IE instance and logs in. The same user, on the same PC, opens
a new instance (not from "Open in new window..." but from iexplore.exe) and
logs in again.
Then he has two independent sessions until the data from both sessions get
mixed up, showing data from one session in another. I can't think of any
other problem but erroneous session_ids being sent.

> If you use a pre-built PHP application that also uses PHP 
> session_id's, then that can cause a problem with your own 
> website if that also wants to use PHP session_id cookies.

This is the only PHP app running, there are two more that sometimes run but
they're JSPs.

>I guess the obvious way would for PHP session_id's to allow 
>multiple session_id_name(s), so each PHP application can choose 
>it's own session_id to be know by. This would also imply that 
>PHP has the capability to pass those multiple session_id's 
>between the respective PHP applications that are running side 
>by side on the same website. Maybe this is in the pipeline for 
>a future release of PHP, or has it already been implemented?

Not sure what you mean, but I already can use two sessions for a while.
Perhaps I'm not getting through the language barrier, but I did not
understand you. :/

Thanks!



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



[PHP] RES: [PHP-INSTALL] ftp_put cannot upload a file.

2008-04-10 Thread Thiago Pojda
Tina,
 
Is there any error message in php logs?
 
Can you reproduce manually what you're trying to do with PHP? I mean,
connect and put that file.
 
Enable E_ALL in PHP and try again.
 
I'm copying PHP-GENERAL mailing list as this is not related to PHP-INSTALL
issues.
 
 
Regards,
Atenciosamente,


  www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


  _  

De: Tina [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 10 de abril de 2008 14:33
Para: [EMAIL PROTECTED]
Assunto: [PHP-INSTALL] ftp_put cannot upload a file.


Dear Sir/Madam
 
I have the following code section and it returns else statement.  A firefox
web browser 1.0.1 is used on a suse linux 2.6.11.4-20a-smp.  php 5 and
apache 2. 
 
---
$uploadfile = ftp_put($ftpconnect, $destinationfile, $sourcefile,
FTP_BINARY);
if ( $uploadfile ) {
echo "Uploaded file = $sourcefile to server name = $servername as file =
$destinationfile.";
} else {
echo "Upload is failed to upload file = $sourcefile to server name =
$servername.";
}
---
 
Would you let me know what causes this problem?
 
 
Ms (Tina) Thieu Van Hung



  _  

Yahoo! for Good helps you make
 a difference



RES: [PHP] SERVER_PORT always at 80 ?

2008-04-11 Thread Thiago Pojda
{Top posting} 

What shows your phpinfo() on both ports?

Is it really running your 5.3 in :81?


Regards,
Thiago

-Mensagem original-
De: Julien Pauli [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 11 de abril de 2008 09:28
Para: PHP General list
Assunto: [PHP] SERVER_PORT always at 80 ?

Hi all, I'm running Windows XP, and here is a piece of my 
apache (2.2.8) conf :

--- httpd.conf ---
... ... ...
Listen 81
Listen 80
Listen 8080
LoadModule php5_module "e:/php/php5apache2_2.dll"
LoadModule fastcgi_module modules/mod_fastcgi.dll AddType 
application/x-httpd-php .php ... ... ...

--- vhosts.conf 

NameVirtualHost 127.0.0.1:81


ServerName myserver
DocumentRoot e:/www
ScriptAlias /php/ "e:/php53/"
Action php5-fastcgi "/php/php-cgi.exe"
AddHandler php5-fastcgi .php


That's a configuration to be able to run both PHP 5.2 (as 
apache module), and PHP 5.3 (throught fast-cgi) on the same 
apache2 instance.
There are no apache rewrite rules in my stuff.

All works right, the only problem is that in both cases, 
$_SERVER["SERVER_PORT"] returns 80, even when I'm connected 
throught port 81.

Is it a fastcgi / Apache bug or does it come from PHP or even me :-) ?


Cheers
Julien.P



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



RES: [PHP] Quarters

2008-04-11 Thread Thiago Pojda
Same for me, I was like "hmm ok, checkboxes..."

Just tried IE, now I can see what you're talking about :) 

-Mensagem original-
De: Andrew Ballard [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 11 de abril de 2008 11:43
Para: PHP General list
Assunto: Re: [PHP] Quarters

On Fri, Apr 11, 2008 at 9:49 AM, tedd <[EMAIL PROTECTED]> wrote:
> Hi gang:
>
>  Check out my new game:
>
>  http://webbytedd.com/quarters/
>
>  What do you think?
>
>  Cheers,
>
>  tedd
>
>  PS: I originally wrote the game for the Mac over eight years ago.

Seems not to work in FF. (At least for me.) I had to (*gasp*) 
open it in IE to even see the quarter images instead of a 
couple rows of checkboxes.

Andrew

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



RES: [PHP] PHP Speech

2008-04-16 Thread Thiago Pojda
{Top Posting}

I don't know if I'm just lazy or stupid (or both).

I went into a similar issue few weeks ago and my solution was to add a
function to delete files created in the last X hours (mine was 24), and call
it on the same script that creates the files.

Which means it tries to clean up old files every time it creates a new one.

Is that any good for you guys?


Regards,
Thiago

-Mensagem original-
De: Daniel Brown [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 15 de abril de 2008 21:05
Para: tedd
Cc: php-general@lists.php.net
Assunto: Re: [PHP] PHP Speech

On Tue, Apr 15, 2008 at 7:04 PM, tedd <[EMAIL PROTECTED]> wrote:
>
>  Your hosting service provides the capability to turn html text to 
> speech, as I've done here:
[snip!]
>
>  But, how do we delete the file? The php script is history after 
> presenting the page and javascript can't touch the server, right? So, 
> how does one delete the wave file?
>
>  The only way I can see is to set up a cron job to delete all wave 
> files after a certain time, but that's kind-of lame. Is there 
another way?

Right, but unfortunately, because it's audio that needs to 
stream, it can't just be served like an image (think GD or 
imagemagick) and then destroyed.  There is no way to know how 
long it will be before the client receives the entire file, and 
it would prove to be too much to store in a reasonable buffer.

That's why I had to write it the way it is.  The drawback 
is that, yes, unless you're overwriting the file each time 
(which, with high-traffic sites, would corrupt larger files 
mid-download), you either have to have a script to unlink() the 
files or a cron to remove them (or resort to a manual removal).

I'm all ears, eyes, and cerebellum if you've got an idea on 
how to fix that though.  The next phase should have better 
speech, I'm just having a tough time with paid gigs now and 
find no time to focus on the fun stuff really.  I still don't 
know why no one ever told us the truth that, no matter how much 
we wanted to be Toys 'R' Us kids, the answer was unscrupulously 
the same: tough nuts.

--

Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ 
$19.99/mo., and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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





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



[PHP] Big companies that use PHP?

2008-04-23 Thread Thiago Pojda
Hey guys,

 

I've been asked this common question: What big companies use PHP in big
apps?

 

I don't know where to find this kind of stuff and, well. here I am :)

 

 

Do any of you know?

 

And what % of the web market share does PHP take?

 

 

Thanks,

Thiago Pojda



RES: [PHP] Big companies that use PHP?

2008-04-23 Thread Thiago Pojda
Just found out that Digg, Flickr, fotolog.com are among those. :)

 

  _  

De: Bastien Koert [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 23 de abril de 2008 15:32
Para: Thiago Pojda
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Big companies that use PHP?

 

 

On 4/23/08, Thiago Pojda <[EMAIL PROTECTED]> wrote: 

Hey guys,



I've been asked this common question: What big companies use PHP in big
apps?



I don't know where to find this kind of stuff and, well. here I am :)





Do any of you know?



And what % of the web market share does PHP take?





Thanks,

Thiago Pojda





Facebook, Wikimedia, Oracle, Yahoo are just a few

 


-- 

Bastien

Cat, the other other white meat 



RES: [PHP] Big companies that use PHP?

2008-04-23 Thread Thiago Pojda
Thanks everyone for replying, I think those names can change someone's mind
;)

-Mensagem original-
De: mike [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 23 de abril de 2008 15:48
Para: Thiago Pojda
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Big companies that use PHP?

We're using it at Intel on a handful of sites... I think my team is
the only one though :) The apps aren't really "big" but we are a "big"
company using it.

On 4/23/08, Thiago Pojda <[EMAIL PROTECTED]> wrote:
> Hey guys,
>
> I've been asked this common question: What big companies use PHP in big
> apps?




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



RES: [PHP] Big companies that use PHP?

2008-04-24 Thread Thiago Pojda
Actually I was at FISL (Free Software International Forum) last week and
Rasmus was there.

He was talking about Large Scale PHP (fair enough, huh?) and he said he
still works for Yahoo, it's been 6 years now.

There's a link for his talk: http://talks.php.net/show/fisl08


That just rang a bell: Rasmus+Yahoo+M$ != PHP?


I did not know Google used it, does anyone have any proof of that? I know
they make extense use of python, but not sure about PHP.

-Mensagem original-
De: Iñigo Medina García [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 24 de abril de 2008 04:37
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Big companies that use PHP?

Warren Vail wrote:
> How about Yahoo and Google, extensively, in fact, I believe Rasmus Lerdorf
> is still on staff at Yahoo, unless it's Micro Hoo by now ;-).

:-) I think he is in fact at Google.

  Iñigo


> Warren
> 
>> -Original Message-
>> From: Nathan Nobbe [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, April 23, 2008 1:50 PM
>> To: Thiago Pojda
>> Cc: php-general@lists.php.net
>> Subject: Re: [PHP] Big companies that use PHP?
>>
>> On Wed, Apr 23, 2008 at 2:26 PM, Thiago Pojda < 
>> [EMAIL PROTECTED]> wrote:
>>
>>> Thanks everyone for replying, I think those names can 
>> change someone's 
>>> mind
>>> ;)
>>
>> i know where youre coming from; i recall a certain manager 
>> once saying to me 'php doesnt scale when it goes OO'.  i 
>> wanted to take his head off, but instead i mentioned wikipedia.
>>
>> -nathan
>>
> 
> 


-- 

Iñigo Medina García 
Librería Díaz de Santos Madrid (Spain)
[EMAIL PROTECTED]   [EMAIL PROTECTED]

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





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



[PHP] set_error_handler help

2008-05-02 Thread Thiago Pojda
Hi guys,

 

I'm trying some custom error handling functions in order to get emails when
fatal errors come up in my production website. The thing is, I went to
phpclasses and there was a good one, but it was a class.

 

I'm very slow today, so I could not figure out how to get it working. So, I
just removed it from the classs and used the function part. Which worked,
but it got me confused:

 

Is there any way to use a class to handle errors? I've tried some stuff like
set_error_handler("Error_Handler::logError" and such, but with no luck.

 

 

Any hints?

 

Thanks! 



RES: [PHP] set_error_handler help

2008-05-05 Thread Thiago Pojda
Oh Yes this helped, thanks a lot :)

I was missing the callback part ;)

Regards,
Thiago

-Mensagem original-
De: Jim Lucas [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 2 de maio de 2008 15:26
Para: Thiago Pojda
Assunto: Re: [PHP] set_error_handler help

Thiago Pojda wrote:
> Hi guys,
> 
>  
> 
> I'm trying some custom error handling functions in order to get emails
when
> fatal errors come up in my production website. The thing is, I went to
> phpclasses and there was a good one, but it was a class.
> 
>  
> 
> I'm very slow today, so I could not figure out how to get it working. So,
I
> just removed it from the classs and used the function part. Which worked,
> but it got me confused:
> 
>  
> 
> Is there any way to use a class to handle errors? I've tried some stuff
like
> set_error_handler("Error_Handler::logError" and such, but with no luck.
> 
>  
> 
>  
> 
> Any hints?
> 
>  
> 
> Thanks! 
> 
> 

Go here

http://us2.php.net/set_error_handler

Notice that the first parameter can be a callback function.

Now click on call back and you will see how to setup an array with the 
object/method set so it will call a method within your object.

http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callba
ck

Hope that helps


-- 
Jim Lucas

"Some men are born to greatness, some achieve greatness,
and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
 by William Shakespeare





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



[PHP] RES: [PHP-DB] Shopping cart session handling

2008-05-05 Thread Thiago Pojda
Forwarding to the correct mailing list. You should get flames...*cough* I
mean, answers here :)

Regards,
Thiago

-Mensagem original-
De: Ron Piggott [mailto:[EMAIL PROTECTED] 
Enviada em: domingo, 4 de maio de 2008 19:35
Para: PHP DB
Assunto: [PHP-DB] Shopping cart session handling

I am writing a shopping cart.  I wanted some input on session handling
for a shopping cart that is secure.  

At this time I am not programming for credit card processing.  I am
going to forward onto PayPal for payment initially.  But I want to do a
good job with security.

Ron


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



RES: [PHP] strange behavior, when converting float to int

2008-05-06 Thread Thiago Pojda
There is a logical explanation.

"[...] you need to be aware that the float data type is not always
capable of representing numbers in the way you expect it to."

And then follows a example:
"Consider, for example this simple statement:
echo (int) ((0.1 + 0.7) * 10);
You would expect that the expression ((0.1 + 0.7) * 10) would evaluate to 8
(and, in fact, if you print it out without the integer conversion, it does).
However the statement above outputs 7 instead. This happens because the
result of this simple arithmetic expression is stored internally as 7.99
instead of 8; when the value is converted to int, PHP simply truncates away
the fractional part, resulting in a rather significant error (12.5%, to be
exact)." [manually typed]

Zend PHP5 Certification Guide 2nd Edition, Chapter 1 - PHP Basics, page
9-10. SHAFIK, D., RAMSEY, B. 
Ed. php|architect nanobooks


Not sure if this is what happening with you as I did not try to reproduce
your error, but looks like it. This book is good, a lot of gotchas. You
should get it :)

Regards,
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

-Mensagem original-
De: Philip Thompson [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 6 de maio de 2008 11:34
Para: PHP-General List
Assunto: Re: [PHP] strange behavior, when converting float to int

On May 6, 2008, at 1:38 AM, Maxim Antonov wrote:

> Hi, all!
>
> Is this a bug?
>
> [EMAIL PROTECTED]:~$ /usr/bin/php 1.php
> 45
> 45
> float(46)
>
>
> [EMAIL PROTECTED]:~$ /usr/bin/php -v
> PHP 5.3.0-dev (cli) (built: Apr  4 2008 11:37:33)
> Copyright (c) 1997-2008 The PHP Group
> Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies
>
>
> [EMAIL PROTECTED]:~$ cat 1.php
>  $i = 10.35 + 20.76 + 5.80 + 5.80 + 3.29;
> echo (int)$i;
> echo "\n";
> echo intval($i);
> echo "\n";
> var_dump($i);
>
> [EMAIL PROTECTED]:~$


I got the same results. I'm not exactly sure what's happening, but I'd  
be curious to see if there's anyone else who can shed some light.

PHP Version 5.2.4.

~Philip


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



RES: [PHP] How to determine if file is writable and deletable

2008-05-07 Thread Thiago Pojda
If it's not, what else can? I got curious.


Regards,
Thiago Henrique Pojda

-Mensagem original-
De: Al [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 7 de maio de 2008 12:25
Para: php-general@lists.php.net
Assunto: Re: [PHP] How to determine if file is writable and deletable

You are missing the point of my question. I don't have a problem reading the
permissions. They do 
not solely determine whether a file can be deleted.

Aschwin Wesselius wrote:
> Al wrote:
>> I need to determine if a file is truly deletable by a php script, 
>> Deleting permissions seem to be the same as writing, they probably 
>> have the same criteria.
>>
>> is_writable() seems to virtually useless in most cases. It doesn't 
>> take into account the directory ownership/permissions; which, best I 
>> can tell, is the real determining factor.
>>
>> I've resorted to having to determine the directory's ownership and 
>> then compare the directory's rights with the owner's and then the 
>> other ['world'].
>>
>> E.g., Assume my script was loaded with ftp, so it's ownership is the 
>> site-name, and I want the scrip to be able to determine if it can 
>> delete a file. Thus, the file in question must have its "other" 
>> permissions include write.
>>
>> Surely, there must be an easier way.
>>
>> Thanks, Al
>>
> Hi,
> 
> Maybe this is what you need:
> 
> http://nl.php.net/manual/en/function.fileperms.php

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





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



RES: [PHP] Odd performance problem

2008-05-09 Thread Thiago Pojda
My tests on PHP 4.4.8

Default files:

Run 1)
done at 100045

Time: 12.5804 Seconds

Run 2)
done at 100045

Time: 12.6775 Seconds

Run 3)
done at 100045

Time: 13.0696 Seconds

Now editing the file, removed the switch case 'a' part.

Run 1) 
done at 100045

Time: 12.6981 Seconds

Run 2)
done at 100045

Time: 12.8659 Seconds

Run 3)
done at 100045

Time: 12.7886 Seconds

As you can see, there's no really big difference here. It really does look
like it's slower, but .1 sec slower.


Hey Robert, this was just a semprom 3k... didn't know they were that dif



Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

-Mensagem original-
De: Robert Cummings [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 9 de maio de 2008 04:44
Para: Joeri Sebrechts
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Odd performance problem

On Wed, 2008-05-07 at 17:31 +0200, Joeri Sebrechts wrote:
> Hello,
> 
> While debugging a script that ran too slowly I came across something that
I 
> can't explain.
> 
> It is inactive code that when removed doubles the run time of the script.
> 
> Specifically, the issue is a switch statement, where one of the cases is 
> never reached. If I remove the case from the code, the run time of the 
> script goes from 6 seconds to 12 seconds.
> 
> To see this problem in action, you can download the problematic script
here:
> http://sebrechts.net/files/2008/phpperfissue.zip
> 
> Anyone have any ideas on how this is even possible? I'd like to improve
the 
> run time of the script, but if every part of code that I take out makes it

> run longer ...

Runs the same for me either way... under PHP4 and PHP5. You must have a
nice system, takes 22 seconds both ways on my Athlon 2400 :)

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


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





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



RES: [PHP] quick question

2008-05-09 Thread Thiago Pojda
What do you mean read a string as a date, a date object?

Atenciosamente,

www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Merca, Ansta Ltd [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 9 de maio de 2008 06:36
Para: php-general@lists.php.net
Assunto: [PHP] quick question

Hi

Ho to read date from HTML form ->
How to read $_POST['date']="dd/mm/" string variable as a date?

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



RES: [PHP] Get array as string --Help

2008-05-09 Thread Thiago Pojda
Depending on your needs you could also use implode() and then save it to a
file.


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Zoltán Németh [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 9 de maio de 2008 08:37
Para: Chetan Rane
Cc: 'Shelley'; 'PHP General list'
Assunto: RE: [PHP] Get array as string --Help

> Yet another option is use serialize(array())

or you could use var_export if you need php code
http://php.net/var_export

greets,
Zoltán Németh

>
> Chetan Dattaram Rane
> Software Engineer
>
>
>
> -Original Message-
> From: Shelley [mailto:[EMAIL PROTECTED]
> Sent: Friday, May 09, 2008 3:11 PM
> To: PHP General list
> Subject: [PHP] Get array as string --Help
>
> Hi all,
>
> If I have an array like this:
> $arr = array (
> 'c' => 'd',
> 'e' => 'f');
>
> How can I convert this array into a string? I want to write an array into
> a
> file.
>
> Thanks in advance.
>
> --
> Regards,
> Shelley
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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





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



RES: [PHP] php.ini

2008-05-09 Thread Thiago Pojda
phpinfo() should also tell you what php.ini is loaded. 

Did you check that?


Atenciosamente,

www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Michael Satterwhite [mailto:[EMAIL PROTECTED] 
Enviada em: sexta-feira, 9 de maio de 2008 13:47
Para: php-general@lists.php.net
Assunto: [PHP] php.ini

I'm trying to turn off magic quotes for a site. I've copied the php.ini 
from /etc/php5/apache2 to the web site directory. In this file, I've changed

magic_quotes_gpc to read
magic_quotes.gpc = Off

When I run phpinfo() from this directory, it still shows magic quotes as
being 
on. I'm guessing there is another configuration parameter (either in the 
Apache configuration or for php) that allows this to be processed. Would 
someone be so kind as to help me here; I admit ignorance. 

---Michael

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



RES: [PHP] Re: Scripts slowing down?

2008-05-13 Thread Thiago Pojda

I don't know... this looks like some mail server is greylisting¹ your
connections and you have to wait to deliver this message and make more
connections to it.

As Peter said, probably your mail server is looking like a spam engine.


1 - Greylisting puts your email in a queue and tells you have to ask again
to send it in X minutes. It's great for blocking spam, as they send only
once and forget about it. The amount of time to wait is configurable,
perhaps a admin set it too high.

Atenciosamente,

www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Peter Ford [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 13 de maio de 2008 07:42
Para: php-general@lists.php.net
Assunto: [PHP] Re: Scripts slowing down?

René Leboeuf wrote:
> Hi.
> 
> I'm running a large website. I have some mailing scripts that take days
> to run.
> 
> I noticed these scripts slow down with time, sometimes going to an
> almost complete stop (no mail sent for several minutes).
> 
> The source code is trivial and can't contain a loop. I monitored the
> memory usage and couldn't find a memory leak. Using APD, most of the
> time is reported to be spent in the fgets() function (script waiting for
> a sendmail reply). But sendmail still replies swiftly when this problem
> occurs.

By this, I guesss you mean that other connections to sendmail reply swiftly:
so 
the server is not just jamming up completely and refusing requests ?

It might depend on the exact implementation of 'sendmail': for example, the 
Courier mail system which I use replaces the program 'sendmail' with it's
own 
binary to do the job.
Courier also has a 'tar-pitting' feature which is triggered by behaviour
that 
looks like a spammer is trying to relay stuff: it atificially slows the
response 
to the send requests if there is an unreasonably high rate of requests
coming 
from a given source. At least that's how I understand the feature to work.
Other mail system may implement a similar feature - it might just be that
your 
mailing script looks like a spam engine to the mail server.


> 
> Restarting sendmail has no effect on these scripts. Restarting the
> scripts makes them run like hell for some hours, until the problem rises
> again.
> 
> I'm using PHP 5.2.5
> 
> I don't know where to look next for the source of this problem...

I think you need to provide some more detail - you could start by explaining

what method you use to send the messages. The next thing to do is to look at
the 
mail logs and see if there are any messages written around the time that
yourt 
script runs.
Don't always assume that it is your code that is wrong (that's what managers
are 
for)

-- 
Peter Ford  phone: 01580 89
Developer   fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

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



RES: [PHP] validating textarea using php

2008-05-13 Thread Thiago Pojda
> You really should use htmlspecialchars before showing any user 
> stipulated HTML to help prevent security holes. Also you can use short 
> tags (popular...) to make the HTML more readable. Eg:

> 

Just to add, short tags are not recommended for conflicts with XMLs. Use
 instead.


Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Richard Heyes [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 13 de maio de 2008 11:45
Para: Sudhakar
Cc: php-general@lists.php.net
Assunto: Re: [PHP] validating textarea using php

> i need to validate textarea of a html form using php
> 
>  echo($comments);?>

You really should use htmlspecialchars before showing any user 
stipulated HTML to help prevent security holes. Also you can use short 
tags (popular...) to make the HTML more readable. Eg:


 


> presently my php code to validate the text area is
> 
> if($comments == "" )

You should not rely on register_globals, and use either $_GET or $_POST 
instead depending on which methoed to send your form details back to the 
server. Eg:

if($_POST['comments'] == '' ) {
 ...
}

> with this code if a user hits the space bar once or couple of times as a
> matter of fact there are no characters entered by the user i do not want
> this to happen, if a user simply hits the spacebar and does not type
> anything i should be able to display an alert message.

You can use the trim() function to determine whether a variable is just 
whitespace.

$comments = trim($_POST['comments']);

if ($comments == '') {
// Show error message
}

-- 
Richard Heyes

++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++

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



RES: [PHP] Re: A Little Something.

2008-05-13 Thread Thiago Pojda
> Our neighbors all thought I had lost my mind

If they only knew you lost it long ago... ;)

Atenciosamente,

www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: tedd [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 13 de maio de 2008 15:03
Para: php-general@lists.php.net
Assunto: Re: [PHP] Re: A Little Something.

At 11:01 AM -0400 5/13/08, Daniel Brown wrote:
>On Tue, May 13, 2008 at 10:55 AM, Shawn McKenzie <[EMAIL PROTECTED]>
wrote:
>>  >
>>   My main pet peeve is when my wife leaves empty clothes hangers on door
>>  knobs throughout the house.
>
> Mine is when the pre-wife leaves her clothes on.  So we're pretty
similar.

I think I'll name my next pet "Peeve".

That reminds me that my daughter, when she was a teenager, named our 
cat "Meow". Our neighbors all thought I had lost my mind when I was 
outside calling the cat.

Cheers,

tedd

-- 
---
http://sperling.com  http://ancientstones.com  http://earthstones.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



RES: RES: [PHP] Re: A Little Something.

2008-05-13 Thread Thiago Pojda
Too bad I do not run that ;)

BTW it's in aspx... I'm not that insane.


Atenciosamente,

www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Robert Cummings [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 13 de maio de 2008 15:51
Para: Thiago Pojda
Cc: php-general@lists.php.net
Assunto: Re: RES: [PHP] Re: A Little Something.

On Tue, 2008-05-13 at 15:22 -0300, Thiago Pojda wrote:
> > Our neighbors all thought I had lost my mind
> 
> If they only knew you lost it long ago... ;)
> 
> Atenciosamente,
> 
> www.softpartech.com.br

I tried to hear your website... my screen reader had a lot of trouble :|

;)

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





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



RES: [PHP] $_SESSION NOT WORKING

2008-05-13 Thread Thiago Pojda

Actually his question was about why session.auto_start is not working on
Linux, I almost answered what you both did :)


Atenciosamente,

www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Daniel Brown [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 13 de maio de 2008 16:43
Para: Balpo
Cc: PHP General
Assunto: Re: [PHP] $_SESSION NOT WORKING

On Tue, May 13, 2008 at 2:38 PM, Balpo <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>  I'm having a problem moving my code to a linux computer.
>  I won't post the whole code here, but an accurate example that reproduces
> exactly the error.
[snip!]

Modify 2.php as follows:



You only missed instantiating the session.  The rest looks good.

-- 

Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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





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



[PHP] RES: $_SESSION NOT WORKING --SOLVED

2008-05-14 Thread Thiago Pojda

I never heard of such extension. You should report this bug :)

And you're welcome ;)



Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

-Mensagem original-
De: Balpo [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 13 de maio de 2008 23:09
Para: Thiago Pojda
Cc: 'Daniel Brown'; 'PHP General'
Assunto: Re: $_SESSION NOT WORKING --SOLVED
Prioridade: Alta

After an all-evening debugging I found out what the problem is.

Why? Please don't ask. I have no idea.

The problem was php's extension php-colorer

How I got to the problem. Eliminating every extension until I got the 
*bad* one.

Thank you: Daniel, Thiago,  Jens, Verny & Dmitri for your concern.

Balpo

Thiago Pojda wrote:
> Actually his question was about why session.auto_start is not working on
> Linux, I almost answered what you both did :)
>
>
> Atenciosamente,
>
> www.softpartech.com.br
>
>
> Thiago Henrique Pojda
> Desenvolvimento Web
> +55 41 3033-7676
> [EMAIL PROTECTED]
> Excelência em Softwares Financeiros
>
>
> -Mensagem original-
> De: Daniel Brown [mailto:[EMAIL PROTECTED] 
> Enviada em: terça-feira, 13 de maio de 2008 16:43
> Para: Balpo
> Cc: PHP General
> Assunto: Re: [PHP] $_SESSION NOT WORKING
>
> On Tue, May 13, 2008 at 2:38 PM, Balpo <[EMAIL PROTECTED]> wrote:
>   
>> Hi everyone,
>>  I'm having a problem moving my code to a linux computer.
>>  I won't post the whole code here, but an accurate example that
reproduces
>> exactly the error.
>> 
> [snip!]
>
> Modify 2.php as follows:
>
>  session_start();
> print_r($_SESSION);
> ?>
>
> You only missed instantiating the session.  The rest looks good.
>
>   




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



RES: [PHP] Threads PHP

2008-05-19 Thread Thiago Pojda
http://pecl.php.net/get/threads
File not found

;P

Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Per Jessen [mailto:[EMAIL PROTECTED] 
Enviada em: sábado, 17 de maio de 2008 11:13
Para: php-general@lists.php.net
Assunto: Re: [PHP] Threads PHP

Richard Heyes wrote:

> 
>  > Summary: experimental implementation of threads
> 
> The word "experimental" makes me shudder. 

"PHP" and "threads" in the same sentence make me shudder too.  There are
just some things you shouldn't do with an interpreted language IMHO. 


/Per Jessen, Zürich


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



RES: [PHP] Help Call Javascript Methods Inside PHP

2008-05-20 Thread Thiago Pojda
What Richard meant was:

/// FILE.PHP ///
 100){
?>
 alert('Bigger than 100'); 



/// EOF ///

That way you can conditionally send some JS to client, but running actual JS
in PHP is not possible.


(Not sure about Jscript [script runat=server] tho, I believe it only runs on
IIS)


Atenciosamente,

www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

-Mensagem original-
De: Richard Heyes [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 20 de maio de 2008 06:53
Para: Shelley
Cc: PHP General list
Assunto: Re: [PHP] Help Call Javascript Methods Inside PHP

Shelley wrote:
> Hi all,
> 
> How can I call a javascript method inside PHP?
> That is:
> Suppose there is a js file: http://someurl/somejs.js
> There are some js methods in that js file,
> I want to include that js into PHP and call its methods.
> 
> Is it possible?

No.


What you can do though is use PHP to send some HTML to the browser which 
calls Javascript methods.

-- 
   Richard Heyes

  In Cambridge? Employ me
 http://www.phpguru.org/cv

++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++

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



RES: [PHP] 0T - Request for quick test

2008-05-20 Thread Thiago Pojda

Your JS for email verification is annoying :P

Type something in email address field and then go to next field, and then
press shift+tab or alt+tab and see it going nuts :)


I second what Daniel said about that green arrow and, yeah it actually
worked here too. :D


Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Ryan S [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 20 de maio de 2008 01:01
Para: php php
Assunto: [PHP] 0T - Request for quick test

 Hey guys,

Just make a egreeting app and need people to just test the AJAXy upload that
i have on the form, if you have any problems please tell me.. if it goes
smooth please tell me... as usual, any comments and suggestions too would be
appreciated.

This is the form:
http://www.ezee.se/ezee-ecard-egreetings/step2_v2.php


All i want you to do is click the above link, click the file/browse button
and try to upload a .jpg/jpeg image... 



Thanks in advance!
Ryan
P.S section is not yet open & am still testing stuff so dont try to create
any egreetings right now :)



  

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



RES: [PHP] Help Call Javascript Methods Inside PHP

2008-05-20 Thread Thiago Pojda
Yeah, I just checked out and that runat=Server thingy is an asp thing.


Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Thiago Pojda [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 20 de maio de 2008 11:41
Para: [EMAIL PROTECTED]; 'Shelley'
Cc: 'PHP General list'
Assunto: RES: [PHP] Help Call Javascript Methods Inside PHP

What Richard meant was:

/// FILE.PHP ///
 100){
?>
 alert('Bigger than 100'); 



/// EOF ///

That way you can conditionally send some JS to client, but running actual JS
in PHP is not possible.


(Not sure about Jscript [script runat=server] tho, I believe it only runs on
IIS)


Atenciosamente,

www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

-Mensagem original-
De: Richard Heyes [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 20 de maio de 2008 06:53
Para: Shelley
Cc: PHP General list
Assunto: Re: [PHP] Help Call Javascript Methods Inside PHP

Shelley wrote:
> Hi all,
> 
> How can I call a javascript method inside PHP?
> That is:
> Suppose there is a js file: http://someurl/somejs.js
> There are some js methods in that js file,
> I want to include that js into PHP and call its methods.
> 
> Is it possible?

No.


What you can do though is use PHP to send some HTML to the browser which 
calls Javascript methods.

-- 
   Richard Heyes

  In Cambridge? Employ me
 http://www.phpguru.org/cv

++
| Access SSH with a Windows mapped drive |
|http://www.phpguru.org/sftpdrive|
++

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





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





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



RES: [PHP] Odd error

2008-05-21 Thread Thiago Pojda
Without more data and code, all I can tell is that this line should be be
read carefully:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user
'vesna'@'localhost' (using password: YES) in
/usr/home/vesna/html/pryvit/church_maps/data_genxml.php on line 13
Not connected : Access denied for user 'vesna'@'localhost' (using password:
YES)


Atenciosamente,

www.softpartech.com.br


Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: The Doctor [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 21 de maio de 2008 00:33
Para: php-general@lists.php.net
Assunto: [PHP] Odd error

A customer was woring on php5.2.6/mysql 5.1 and no problem
yet with php 5.2.5 / mysql 4.1 we get:

Warning: DOMDocument::__construct() [function.DOMDocument---construct]:
Malloc(88) in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on
line 5

Warning: DOMDocument::__construct() [function.DOMDocument---construct]:
Malloc(88) Ok in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on
line 5

Warning: DOMDocument::__construct() [function.DOMDocument---construct]:
Malloc(4) in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on line
5

Warning: DOMDocument::__construct() [function.DOMDocument---construct]:
Malloc(4) Ok in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on
line 5

Warning: DOMDocument::__construct() [function.DOMDocument---construct]:
Malloc(6) in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on line
5

Warning: DOMDocument::__construct() [function.DOMDocument---construct]:
Malloc(6) Ok in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on
line 5

Warning: DOMDocument::createElement() [function.DOMDocument-createElement]:
Malloc(60) in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on
line 7

Warning: DOMDocument::createElement() [function.DOMDocument-createElement]:
Malloc(60) Ok in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on
line 7

Warning: DOMDocument::createElement() [function.DOMDocument-createElement]:
Malloc(8) in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on line
7

Warning: DOMDocument::createElement() [function.DOMDocument-createElement]:
Malloc(8) Ok in /usr/home/vesna/html/pryvit/church_maps/data_genxml.php on
line 7

Warning: mysql_connect() [function.mysql-connect]: Access denied for user
'vesna'@'localhost' (using password: YES) in
/usr/home/vesna/html/pryvit/church_maps/data_genxml.php on line 13
Not connected : Access denied for user 'vesna'@'localhost' (using password:
YES)
Warning: Unknown: Freed(8) Ok in Unknown on line 0

Warning: Unknown: Freed(60) Ok in Unknown on line 0

Warning: Unknown: Freed(4) Ok in Unknown on line 0

Warning: Unknown: Freed(6) Ok in Unknown on line 0

Warning: Unknown: Freed(88) Ok in Unknown on line 0

Any reason for this?
-- 
Member - Liberal International  
This is [EMAIL PROTECTED]   Ici [EMAIL PROTECTED]
God, Queen and country! Beware Anti-Christ rising!  
USA petition for dissolution of your nation!

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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



RES: [PHP] page suck attack

2008-05-21 Thread Thiago Pojda
Perhaps someone is accessing your website with some prefetching tool?


I'm not sure, but I think Fasterfox does that.


Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros
-Mensagem original-
De: robert [mailto:[EMAIL PROTECTED] 
Enviada em: quarta-feira, 21 de maio de 2008 13:05
Para: PHP
Assunto: Re: [PHP] page suck attack

Not that i can tell. Yahoo and google have a signature: googlebot and  
slurp. both of them also check my site over a span of days. that's all  
good. The others come from regular isps as far as their IP tells me  
and the hits are within milliseconds.


On May 21, 2008, at 8:57 AM, Gavin M. Roy wrote:

> Search engines indexing your site?
> On Wed, May 21, 2008 at 11:54 AM, robert <[EMAIL PROTECTED]> wrote:
>
>> Hi
>> Every so often my site is "attacked" in which all URLS on my site are
>> retrieved in the span of minutes. What is this called?? I mean what  
>> do I
>> google for? I don't know where to begin.
>>
>> I'm not sure if I am going to implement such at thing but I would  
>> like to
>> be able to research it to know my options.
>>
>> thank you
>> robert
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>


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





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



RES: [PHP] question, about mysql query

2008-06-03 Thread Thiago Pojda
Didn't read everything but if you just don't want duplicates, can't select
distinct help you?


Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros

-Mensagem original-
De: LKSunny [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 2 de junho de 2008 22:20
Para: php-general@lists.php.net
Assunto: [PHP] question, about mysql query

two table, tablea and tableb
tablea
uid, col1, col2, col3
1,xx, xx, xx
2,xx, xx, xx
3,xx, xx, xx
tableb
id, uid, col1, firstdata
1, 1, xx, 1
2, 2, xx, 0
3, 2, xx, 0
4, 1, xx, 0

i want query tablea, and join tableb, uid is associate, ok "LEFT JOIN 
`tableb` b ON a.uid = b.uid", and than i want tableb firstdata=1 or tableb 
no associate uid "b.firstdata=1 OR b.uid IS NULL", by the time all ok, but i

want add one case, if tableb firstdata all is 0, result one row, like b.uid 
IS NULL, i don't know how to

i want result is all tablea data no double, tableb one case firstdata is 1 
(one uid in tableb just one row possible is firstdata=1), or no row in 
tableb, or all firstdata = 0

Thank You Very Much !!

This query can't
SELECT a.*, b.* FROM `tablea` a LEFT JOIN `tableb` b ON a.uid = b.uid WHERE 
(b.firstdata=1 OR b.firstdata=0 OR b.uid IS NULL) 



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



RES: [PHP] Execute php commands that are in an array

2008-06-05 Thread Thiago Pojda
I'm not sure I understand what you're trying to accomplish, but wouldn't
array_walk() help you out?


Atenciosamente,
www.softpartech.com.br
Thiago Henrique Pojda
Desenvolvimento Web
+55 41 3033-7676
[EMAIL PROTECTED]
Excelência em Softwares Financeiros


-Mensagem original-
De: Daniel Brown [mailto:[EMAIL PROTECTED] 
Enviada em: quinta-feira, 5 de junho de 2008 14:18
Para: Ryan S
Cc: php php
Assunto: Re: [PHP] Execute php commands that are in an array

On Thu, Jun 5, 2008 at 12:34 PM, Ryan S <[EMAIL PROTECTED]> wrote:
> Hey,
> its easier to start with code and then explain:
>
> $t_array[]='chr(rand(97,122))';
> echo $t_array[0];
>
> The above code outputs
> chr(rand(97,122))
>
> How can i execute that above code from the array instead of displaying it?

Try using create_function().



Note the manner in which the second parameter is laid-out.  You
must include what you want returned by the dynamic function, complete
with an ending semicolon.

-- 

Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

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