php-general Digest 19 Jan 2010 15:12:03 -0000 Issue 6546

2010-01-19 Thread php-general-digest-help
php-general Digest 19 Jan 2010 15:12:03 - Issue 6546 Topics (messages 301202 through 301216): Re: integrating shipping with shopping cart site - OT 301202 by: Jochem Maas 64 bit date in 32 bit php ?? 301203 by: Michael A. Peters 301209 by: Ashley Sheridan

[PHP] Re: Casting objects.

2010-01-19 Thread Richard Quadling
2010/1/18 Shawn McKenzie nos...@mckenzies.net: Shawn McKenzie wrote: Never mind, that was stupid. I saw that somewhere before, but obviously it doesn't work. I found some code, maybe I redeem myself? static public function cast($object, $class=__CLASS__){        if(class_exists($class))

[PHP] Cookies sessions

2010-01-19 Thread clancy_1
I am trying for the first time to use cookies. The manual contains the statement Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to the browser. When I first started using sessions, I was alarmed to read a very similar statement about sessions, but

Re: [PHP] Cookies sessions

2010-01-19 Thread Bruno Fajardo
2010/1/19 clanc...@cybec.com.au: I am trying for the first time to use cookies. The manual contains the statement Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to the browser. When I first started using sessions, I was alarmed to read a very

Re: [PHP] Cookies sessions

2010-01-19 Thread kranthi
When I first started using sessions, I was alarmed to read a very similar statement about sessions, but I soon found that if I started my program with the statement session_start(); I could then set up, access, modify or clear any session variable at any time in my program. This is

Re: [PHP] Cookies sessions

2010-01-19 Thread Richard
Hi, However I have almost immediately found that while I appear to be able to read cookies at any time, I cannot set them when I would like to. Is there any similar trick which will work with cookies? Keep in mind that cookies are set by sending an HTTP header as part of the response, so

Re: [PHP] 64 bit date in 32 bit php ??

2010-01-19 Thread Ashley Sheridan
On Mon, 2010-01-18 at 22:46 -0800, Michael A. Peters wrote: php 5.2.12 running in CentOS 5.x Unfortunately, both my server (xen linode) and my test server (crappy old dell I found in a field) are 32-bit. I need to work with some dates earlier than 1901 and I would really prefer to store

Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-19 Thread Richard Quadling
2010/1/19 edward...@ita.org.mo: 引述 Richard Quadling rquadl...@googlemail.com: 1 - Can you confirm that the ini file you are editing is the one that is reported in phpinfo() as the file being used? Yes, BUT there is no MSSQL info of it... 2 - At a command prompt, change directory to your

Re: [PHP] Cookies sessions

2010-01-19 Thread Phpster
Be aware that there is a limit of 20 cookies per domain Bastien Sent from my iPod On Jan 19, 2010, at 6:12 AM, Bruno Fajardo bsfaja...@gmail.com wrote: 2010/1/19 clanc...@cybec.com.au: I am trying for the first time to use cookies. The manual contains the statement Cookies are part of the

Re: [PHP] 64 bit date in 32 bit php ??

2010-01-19 Thread Richard Quadling
2010/1/19 Ashley Sheridan a...@ashleysheridan.co.uk: On Mon, 2010-01-18 at 22:46 -0800, Michael A. Peters wrote: php 5.2.12 running in CentOS 5.x Unfortunately, both my server (xen linode) and my test server (crappy old dell I found in a field) are 32-bit. I need to work with some dates

Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-19 Thread Edward S.P. Leong
Richard Quadling wrote: But having said all of that, the php_mssql.dll uses a very old library which may give you issues. For the time being, using ODBC (php_odbc is built in for PHP on Windows) is a much safer solution. You can also use the latest SQL Native Client driver so you can talk to

Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-19 Thread Richard Quadling
But having said all of that, the php_mssql.dll uses a very old library which may give you issues. For the time being, using ODBC (php_odbc is built in for PHP on Windows) is a much safer solution. You can also use the latest SQL Native Client driver so you can talk to SQL7, 2000, 2005, 2008. If

Re: [PHP] 64 Bit IIS 6 ( 32 Bit mode ) + 32Bit php connect with MS-SQL Server

2010-01-19 Thread Richard Quadling
2010/1/19 Edward S.P. Leong edward...@ita.org.mo: Richard Quadling wrote: But having said all of that, the php_mssql.dll uses a very old library which may give you issues. For the time being, using ODBC (php_odbc is built in for PHP on Windows) is a much safer solution. You can also use the

[PHP] Object Oriented Programming question

2010-01-19 Thread Ben Stones
Hi, I've been learning about object oriented programming for the past few weeks and I've understood it pretty well, but I have one question. Usually with PHP scripts I make, all the functionality for a specific page is in the actual PHP file, and I'd use PHP functions in a separate directory

RE: [PHP] Object Oriented Programming question

2010-01-19 Thread Bob McConnell
From: Ben Stones I've been learning about object oriented programming for the past few weeks and I've understood it pretty well, but I have one question. Usually with PHP scripts I make, all the functionality for a specific page is in the actual PHP file, and I'd use PHP functions in a

Re: [PHP] Object Oriented Programming question

2010-01-19 Thread Ashley Sheridan
On Tue, 2010-01-19 at 12:30 -0500, Paul M Foster wrote: On Tue, Jan 19, 2010 at 03:11:56PM +, Ben Stones wrote: Hi, I've been learning about object oriented programming for the past few weeks and I've understood it pretty well, but I have one question. Usually with PHP scripts I

RE: [PHP] order by ASC

2010-01-19 Thread Ashley Sheridan
On Tue, 2010-01-19 at 16:16 -0800, Daevid Vincent wrote: http://www.webdeveloper.com/forum/showthread.php?t=101174 You could do it like this too... ORDER BY `rollnumber` + 0 ASC And if you just got the data out in mysql (no ORDER BY -- which can be slow in mysql), you could use PHP's

RE: [PHP] order by ASC

2010-01-19 Thread Daevid Vincent
http://lmgtfy.com/?q=mysql+order+by+slow it's notoriously slow to use ORDER BY with large tables. Mainly b/c mySQL has to use a hash/temp table to re-sort AFAIK. I wasn't thinking of sorting the whole set, only the list of numbers as the OP only talked about sorting a single column...

RE: [PHP] order by ASC

2010-01-19 Thread Ashley Sheridan
On Tue, 2010-01-19 at 17:11 -0800, Daevid Vincent wrote: http://lmgtfy.com/?q=mysql+order+by+slow it's notoriously slow to use ORDER BY with large tables. Mainly b/c mySQL has to use a hash/temp table to re-sort AFAIK. I wasn't thinking of sorting the whole set, only the list of numbers

Re: [PHP] Cookies sessions

2010-01-19 Thread clancy_1
On Tue, 19 Jan 2010 09:12:17 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote: 2010/1/19 clanc...@cybec.com.au: I am trying for the first time to use cookies. The manual contains the statement Cookies are part of the HTTP header, so setcookie() must be called before any output is sent to

Re: [PHP] Cookies sessions

2010-01-19 Thread Phpster
The first setcookie call is empty which produces the errors that cause the second cookie to fail. Bastien Sent from my iPod On Jan 19, 2010, at 10:16 PM, clanc...@cybec.com.au wrote: On Tue, 19 Jan 2010 09:12:17 -0200, bsfaja...@gmail.com (Bruno Fajardo) wrote: 2010/1/19

Re: [PHP] Cookies sessions

2010-01-19 Thread clancy_1
On Tue, 19 Jan 2010 16:45:37 +0530, kranthi...@gmail.com (kranthi) wrote: When I first started using sessions, I was alarmed to read a very similar statement about sessions, but I soon found that if I started my program with the statement session_start(); I could then set up, access, modify

[PHP] how to retrieve a dom from innerHTML......

2010-01-19 Thread I am on the top of the world! Borlange University
hello, i can obnot retrieve a select ject from div innerHTML. what i want to do is that when a page is loaded, first selector,say #1, would be shown in the first div by sending a request.then i choose one option from #1, fire change event of #1, the second selector #2 will be shown in div two,

Re: [PHP] Cookies sessions

2010-01-19 Thread clancy_1
On Tue, 19 Jan 2010 22:45:14 -0500, phps...@gmail.com (Phpster) wrote: The first setcookie call is empty which produces the errors that cause the second cookie to fail. I'm afraid not. I modified the program started to read: ?php //;V;;; Cypalda/Index.php Printed:

[PHP] How do I remove unused GET parameters from the URL?

2010-01-19 Thread Daevid Vincent
I have an HTML form with a hundred or so elements on it, used for searching a database. When the user submits the form (via GET) the URL is loaded with ALL of these fields, and many of them are not even actually used in the search criteria.

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-19 Thread Michael A. Peters
Daevid Vincent wrote: *snip* The problem as I see it, is that this magic happens when the user hits Submit, so not sure PHP has any way to intercept at that point. Javascript might be able to do something on the onClick event or onSubmit I suspect. But this seems like something that someone

Re: [PHP] How do I remove unused GET parameters from the URL?

2010-01-19 Thread Michael A. Peters
Daevid Vincent wrote: I guess I could always redirect to some 'scrubber' page that strips them out and redirects on to the refering page again, but that seems klunky. BTW, I want to use GET so that the page can be bookmarked for future searches of the same data (or modified easily with

Re: [PHP] 304 Not Modified header not working within a class

2010-01-19 Thread Camilo Sperberg
On Wed, Jan 20, 2010 at 02:33, Rene Veerman rene7...@gmail.com wrote: if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) AND strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) == $last_modified) { shouldn't that be strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) = $last_modified) ? Now that I

Re: [PHP] PHP and javascript

2010-01-19 Thread Rene Veerman
To do what you want that new httpd server should at least be able to call up PHP via cli / whatever, and retrieve the output. It also needs to provide what's in php called $_GET and $_POST. Assuming you got that covered, then yes, you could route the calls via ajax (i recommend jquery.com for

Re: [PHP] PHP and javascript

2010-01-19 Thread Rene Veerman
oh, and if you're going to use ajax-non-phphttpd-php-andback, then check if your dear non-php httpd abuses the CPU while waiting for PHP to return the results... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] 304 Not Modified header not working within a class

2010-01-19 Thread Rene Veerman
ok, you might wanna re-ask on an apache list in that case.. On Wed, Jan 20, 2010 at 6:48 AM, Camilo Sperberg unrea...@gmail.com wrote: On Wed, Jan 20, 2010 at 02:33, Rene Veerman rene7...@gmail.com wrote: if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) AND

Re: [PHP] 304 Not Modified header not working within a class

2010-01-19 Thread richard gray
Camilo Sperberg wrote: Hi list, my first message here :) To the point: I'm programming a class that takes several CSS files, parses, compresses and saves into a cache file. However, I would like to go a step further and also use the browser cache, handling the 304 and 200 header types myself.