Re: [PHP] PhpMyAdmin slow on windows but fast on linux

2007-04-22 Thread chris smith
On 4/23/07, Don Don <[EMAIL PROTECTED]> wrote: Hi all how can i make my phpmyadmin run fast on windows ? I installed phpmyadmin on a linux and windows machines, but the windows version runs (executes) too slow, i.e. it takes to long for a page to be loaded, while it take less that 3 secs for

RE: [PHP] should I be looking to eliminate all notices?

2007-04-22 Thread Buesching, Logan J
[snip] I don't really want to do a isset check for every index I have. [/snip] Premature optimization is the root of all evil. Checks like this will take nanoseconds to check. Find another way to optimize, like writing better SQL queries. -- PHP General Mailing List (http://www.php.net/) To un

RE: [PHP] echo date('Y-m-d', $mydata->timestamp);

2007-04-22 Thread Buesching, Logan J
You are misunderstanding what timestamp means. The value of a timestamp is from UNIX epoch http://en.wikipedia.org/wiki/Unix_time. It is calculated by the number of seconds after January 1st, 1970. Also note, that you are overflowing the integer, which is giving you a http://en.wikipedia.org/wik

RE: [PHP] Preventing SQL Injection/ Cross Site Scripting

2007-04-22 Thread Buesching, Logan J
There are many good resources out there, and one of my favorites for this type of information is from Chris Shiflett. http://shiflett.org/articles/sql-injection http://shiflett.org/articles/foiling-cross-site-attacks http://shiflett.org/blog/2007/mar/allowing-html-and-preventing-xss Those are a

Re: [PHP] Best practices to ensure compatibility with PHP 6

2007-04-22 Thread Davi
Em Domingo 22 Abril 2007 18:54, [EMAIL PROTECTED] escreveu: > Hi > > I'm would like to avoid PHP usages that are deprecated with > regard to PHP 6. I would also like to code according to > what is regarded as best practice. Are there any web > resources that I can read to keep up to date? > Have

RE: [PHP] Why do i get this error message?

2007-04-22 Thread Buesching, Logan J
Could you also send the code? Maybe 5 lines before and 5 lines after the line it is pointing to? It also means it tried to allocate 2KB of memory, which put you over your 8MB in whatever script you are running. You can set the maximum amount of memory a PHP script can use in your PHP.ini file. -

[PHP] Why do i get this error message?

2007-04-22 Thread H.T
I get this error message when i try to check my site on localhost running IIS and PHP 5.1.2 : Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 24576 bytes) in ... and it points to the line which is pure html code! What could be the cause of this problem? -- PHP Gen

[PHP] Why do i get this error message?

2007-04-22 Thread H.T
I get this error message when i try to check my site on localhost running IIS and PHP 5.1.2 : Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 24576 bytes) in ... and it points to the line which is pure html code! What could be the cause of this problem? -- PHP

[PHP] Best practices to ensure compatibility with PHP 6

2007-04-22 Thread ufan100
Hi I'm would like to avoid PHP usages that are deprecated with regard to PHP 6. I would also like to code according to what is regarded as best practice. Are there any web resources that I can read to keep up to date? For instance: 1) safe_mode is deprecated. (The PHP manual gives me the a

RE: [PHP] PhpMyAdmin slow on windows but fast on linux

2007-04-22 Thread Buesching, Logan J
You say they both have the same config, so do you mean that they both have the same version of PHP, same computer setup (Memory, CPU speed, HDD speed), both running the same version of Apache, and that both are running as either CGI or an apache module? -Logan -Original Message- From: Don

Re: [PHP] PhpMyAdmin slow on windows but fast on linux

2007-04-22 Thread Børge Holen
On Sunday 22 April 2007 22:33, Don Don wrote: > Hi all how can i make my phpmyadmin run fast on windows ? Why would you when you got linux up and running? > I installed > phpmyadmin on a linux and windows machines, but the windows version runs > (executes) too slow, i.e. it takes to long for a p

Re: [PHP] php seems to be inconsistent in its handling of backslashes ... maybe?

2007-04-22 Thread ufan100
Al wrote: The proper way to handle special control PCRE characters like "\" is to use the hex [e.g., \x5C] value. Then you won't have a problem. The engine knows you want the the object treated as a character and an a control. That works nicely, thank you. -- PHP General Mailing List (http

[PHP] PhpMyAdmin slow on windows but fast on linux

2007-04-22 Thread Don Don
Hi all how can i make my phpmyadmin run fast on windows ? I installed phpmyadmin on a linux and windows machines, but the windows version runs (executes) too slow, i.e. it takes to long for a page to be loaded, while it take less that 3 secs for the linux version. Both however run on the same

Re: [PHP] Re: how to detect type of image

2007-04-22 Thread Tijnema !
On 4/22/07, Myron Turner <[EMAIL PROTECTED]> wrote: Jonathan wrote: > Alain Roger wrote: >> Hi, >> >> In my web application, end user is able to load images (png, jpeg, >> gif,..) >> into database. >> I would like to know how can i detect automatically the type of image >> (pnd, >> jpeg,...) ? >>

Re: [PHP] Re: how to detect type of image

2007-04-22 Thread Børge Holen
On Sunday 22 April 2007 17:35, Jonathan wrote: > Alain Roger wrote: > > Hi, > > > > In my web application, end user is able to load images (png, jpeg, > > gif,..) into database. > > I would like to know how can i detect automatically the type of image > > (pnd, jpeg,...) ? > > i do not want to chec

[PHP] Re: how to detect type of image

2007-04-22 Thread Jonathan
Alain Roger wrote: Hi, In my web application, end user is able to load images (png, jpeg, gif,..) into database. I would like to know how can i detect automatically the type of image (pnd, jpeg,...) ? i do not want to check the extension because this is easily faked... just by renaming it. Do

Re: [PHP] Re: how to detect type of image

2007-04-22 Thread Myron Turner
Jonathan wrote: Alain Roger wrote: Hi, In my web application, end user is able to load images (png, jpeg, gif,..) into database. I would like to know how can i detect automatically the type of image (pnd, jpeg,...) ? i do not want to check the extension because this is easily faked... just

[PHP] Re: php seems to be inconsistent in its handling of backslashes ... maybe?

2007-04-22 Thread Al
The proper way to handle special control PCRE characters like "\" is to use the hex [e.g., \x5C] value. Then you won't have a problem. The engine knows you want the the object treated as a character and an a control. [EMAIL PROTECTED] wrote: -- or maybe it's just the PCRE extension -- or quit

[PHP] Re: show file creation date

2007-04-22 Thread Colin Guthrie
Richard Lynch wrote: > On Sat, April 21, 2007 1:18 pm, [EMAIL PROTECTED] wrote: >> Hi sorry not really a php question.. but using it in a php script :) >> >> I want to list the date and time a file was created so I want someting >> like.. >> >> Apr 21 18:57 monkey.txt >> >> Ive been playing around

Re: [PHP] show file creation date

2007-04-22 Thread tedd
At 7:18 PM +0100 4/21/07, <[EMAIL PROTECTED]> wrote: Hi sorry not really a php question.. but using it in a php script :) I want to list the date and time a file was created so I want someting like.. Apr 21 18:57 monkey.txt Ive been playing around with the LS options but I dont know what flags

Re: [PHP] echo date('Y-m-d', $mydata->timestamp);

2007-04-22 Thread Jochem Maas
John Taylor-Johnston wrote: > > It is actually a generated timestamp in MySQL. > timestamp(14) > Now what? I was hoping to avoid: > |echo substr(|$mydata->timestamp|, 0, 8); the simplest answer is actually yto make mySQL give you the data in unix timestamp format in the first place: SELECT UNIX_

Re: [PHP] retrieve POST body?

2007-04-22 Thread Myron Turner
Richard Lynch wrote: On Sat, April 21, 2007 10:56 pm, Myron Turner wrote: trick for you.You use the Perl script in the action attribute of your form. The Perl script saves the entire posted output to a file, then it sends back a page which uses Javascript to redirect back to the php scri

Re: [PHP] echo date('Y-m-d', $mydata->timestamp);

2007-04-22 Thread Børge Holen
On Sunday 22 April 2007 08:33, John Taylor-Johnston wrote: > It is actually a generated timestamp in MySQL. > timestamp(14) Well, then just use the query to decide how it should look like. Mysql timestamp is amazingly easy to work with. whatevertable,date_format(timestamp_table, 'what should it lo

Re: [PHP] php seems to be inconsistent in its handling of backslashes ... maybe?

2007-04-22 Thread ufan100
Richard Lynch wrote: warning This seemed strange: warnings with 2 and 6 backlashes For 2 backslashes, PHP "ate" the 2 backslashes, and handed PCRE #\#, and PCRE does not like that at all. Yet preg_match('#\\#','any-string'); does *not* throw a warning when I run the 2nd script - the on

Re: [PHP] retrieve POST body?

2007-04-22 Thread Tijnema !
On 4/22/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Sat, April 21, 2007 10:56 pm, Myron Turner wrote: > trick for you.You use the Perl script in the action attribute of > your form. The Perl script saves the entire posted output to a file, > then it sends back a page which uses Javascrip