Re: [PHP] retrieve POST body?

2007-04-22 Thread Richard Lynch
On Sat, April 21, 2007 1:32 pm, Justin Frim wrote: I'm a little lost here though... how can it be possible to put data into the URI as well as the POST body? The request is originating from the user-agent, not the server. Regardless though, the real problem with this proposed hack is how,

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

2007-04-22 Thread John Taylor-Johnston
$mydata-timestamp = 20070419162123; echo date('Y-m-d', $mydata-timestamp); result: 2038-01-18 ?? What is wrong?? Should be 2007-04-19? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] retrieve POST body?

2007-04-22 Thread Richard Lynch
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 script, where you can

Re: [PHP] Re: first script

2007-04-22 Thread Richard Lynch
On Fri, April 20, 2007 5:38 pm, Thufir wrote: Richard Lynch ceo at l-i-e.com writes: On Fri, April 20, 2007 2:05 pm, Thufir wrote: Please tell me that's not your real name... [...] It's the name I use on the internet. That's fine. You can even go by that name in RL if you want... I

Re: [PHP] Find MAC Address in PHP

2007-04-22 Thread Richard Lynch
On Fri, April 20, 2007 3:00 pm, Nathaniel Hall wrote: I am attempting to find the MAC address of systems visiting my page from the local LAN. I have tried several things, but it appears it will not let me run system commands. For example, running ?php $MAC = system(arp 192.168.200.254);

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

2007-04-22 Thread Richard Lynch
On Sun, April 22, 2007 1:05 am, John Taylor-Johnston wrote: $mydata-timestamp = 20070419162123; echo date('Y-m-d', $mydata-timestamp); result: 2038-01-18 ?? What is wrong?? Should be 2007-04-19? date() takes a Unix timestamp as its input. Unix timestamps are measured as number of seconds

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

2007-04-22 Thread Richard Lynch
On Sun, April 22, 2007 12:54 am, [EMAIL PROTECTED] wrote: -- or maybe it's just the PCRE extension -- or quite likely I have got something wrong Hello members, I'm hoping you could enlighten me. Using error_reporting = E_ALL | E_STRICT, I tested the following statements: PHP interprets

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

2007-04-22 Thread John Taylor-Johnston
It is actually a generated timestamp in MySQL. timestamp(14) Now what? I was hoping to avoid: |echo substr(|$mydata-timestamp|, 0, 8); John |Richard Lynch wrote: On Sun, April 22, 2007 1:05 am, John Taylor-Johnston wrote: $mydata-timestamp = 20070419162123; echo date('Y-m-d',

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

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

2007-04-22 Thread ufan100
Richard Lynch wrote: ?php preg_match('#\\#','any-string'); = 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

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

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

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

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

[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 with the LS

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

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

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

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

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,...) ? i do not want to

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

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 page

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:

[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

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

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.

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 a

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

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

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