[PHP] Off Subject / Feedback Needed

2009-07-06 Thread Karl James
Team, http://www.theufl.com/css/corners.css http://www.theufl.com/indexb.htm I am trying to get the rounded corners to show in the first row in the HTML table. Can someone review the code for me? I think it has something to do with the images, but I corrected the path and uploaded images. K

[PHP] Re: Call to object function, want to PHP interpret returned string

2009-07-06 Thread David Robley
John Allsopp wrote: > Hi > > At the top of a webpage I have: > > include_once("furniture.php"); > $myFurniture = new furniture(); > echo $myFurniture->getTop("my company title"); > ?> > > to deliver the first lines of HTML, everything in HEAD and the first > bits of page furniture (menu, etc).

[PHP] Object type determined at runtime

2009-07-06 Thread James Colannino
Hey everyone. I have a question. Hopefully it's clear, because I'm not sure quite how to ask it. Basically, I have a variety of different objects that a variable can be instantiated as in the same block of code, its type being determined at runtime. I want to be able to do something like this:

[PHP] How to authnticate and use contents from ${HOME}

2009-07-06 Thread schneider . chantale
Hello, My name ich Chantale, I am 15years old and in a german Lycee. I like to study Informatic in two years and now try to code my first applications. I am new to php and like to code my own Intranet Web-Interface which should run on my FileServer at home. I have installed suPHP, but it seems

Re: [PHP] Object type determined at runtime

2009-07-06 Thread David Otton
2009/7/6 James Colannino > Hey everyone.  I have a question.  Hopefully it's clear, because I'm not > sure quite how to ask it.  Basically, I have a variety of different > objects that a variable can be instantiated as in the same block of > code, its type being determined at runtime.  I want to

Re: [PHP] Object type determined at runtime

2009-07-06 Thread James Colannino
Ah, thanks very much. That was very helpful! James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Function parameter passed by reference with default value to null

2009-07-06 Thread Lupus Michaelis
Hi, I would like to know if I am alone to be shoked by this : == 8< == function foo(& $bar = null) { } foo() ; // runs foo(null) ; // raise an error == >8 == Why the default value to null for a reference is allowed ? Is it a bug, a feature ? Thanks ! -- Mickaël Wolff aka Lupus Micha

Re: [PHP] Re: Call to object function, want to PHP interpret returned string

2009-07-06 Thread John Allsopp
David Robley wrote: John Allsopp wrote: Hi At the top of a webpage I have: getTop("my company title"); ?> to deliver the first lines of HTML, everything in HEAD and the first bits of page furniture (menu, etc). In the furniture object in getTop(), I want to return a string that includes

Re: [PHP] Function parameter passed by reference with default value to null

2009-07-06 Thread Stuart
2009/7/6 Lupus Michaelis : >  Hi, > >  I would like to know if I am alone to be shoked by this : > > == 8< == > function foo(& $bar = null) > { > } > > foo() ; // runs > foo(null) ; // raise an error > == >8 == > >  Why the default value to null for a reference is allowed ? Is it a bug, a > feature

Re: [PHP] Function parameter passed by reference with default value to null

2009-07-06 Thread Lupus Michaelis
Stuart a écrit : You appear to be using the definition of null that comes from the world of C. I didn't. The point is I'm allowed to set a default value to null for a referenced parameter (what I can do in C for a pointer, so I knew it). I'm happy PHP raises an error on foo(null) ; I'

Re: [PHP] Re: Call to object function, want to PHP interpret returned string

2009-07-06 Thread Stuart
2009/7/6 John Allsopp : > David Robley wrote: >> >> John Allsopp wrote: >> >> >>> >>> Hi >>> >>> At the top of a webpage I have: >>> >>> >> include_once("furniture.php"); >>> $myFurniture = new furniture(); >>> echo $myFurniture->getTop("my company title"); >>> ?> >>> >>> to deliver the first lines

Re: [PHP] Re: Call to object function, want to PHP interpret returned string

2009-07-06 Thread David Robley
John Allsopp wrote: > David Robley wrote: >> John Allsopp wrote: >> >> >>> Hi >>> >>> At the top of a webpage I have: >>> >>> >> include_once("furniture.php"); >>> $myFurniture = new furniture(); >>> echo $myFurniture->getTop("my company title"); >>> ?> >>> >>> to deliver the first lines of HTM

Re: [PHP] Function parameter passed by reference with default value to null

2009-07-06 Thread Stuart
2009/7/6 Lupus Michaelis : > Stuart a écrit : > >> You appear to be using the definition of null that comes from the >> world of C. > >  I didn't. The point is I'm allowed to set a default value to null for a > referenced parameter (what I can do in C for a pointer, so I knew it). > >  I'm happy PH

Re: [PHP] Function parameter passed by reference with default value to null

2009-07-06 Thread Lupus Michaelis
Stuart a écrit : The whole point of default arguments is for it to use that argument if none is passed. It is not the point too. What makes you think not passing an argument to that function should raise an error? Maybe because in my example, the provided value is not a valuable value fo

Re: [PHP] Function parameter passed by reference with default value to null

2009-07-06 Thread David Otton
2009/7/6 Lupus Michaelis : >  I'm happy PHP raises an error on foo(null) ; >  I'm in trouble when foo() doesn't. > >  The actual question is : why PHP doesn't raise an error ? This functionality (default values for passed-by-reference parameters) was added in PHP5. The problem is that you can't

Re: [PHP] 64 bit binary ?

2009-07-06 Thread loki
no "Daniel Brown" wrote in message news:ab5568160907051350x530f4efbw96ffc356c15...@mail.gmail.com... On Sun, Jul 5, 2009 at 15:43, loki wrote: Hello Is it plane to release 64 bit binary for php on windows ? Pierre? -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.

Re: [PHP] Function parameter passed by reference with default value to null

2009-07-06 Thread David Otton
2009/7/6 Lupus Michaelis : > > David Otton a écrit : > >> So there's some serious impedance mismatch going on there to make both >> features to work together. Just think of the default value as >> "something I can overwrite", eg: > >  Thanks for this smart explanation. It shines my day. np. On ref

Re: [PHP] Function parameter passed by reference with default value to null

2009-07-06 Thread Lupus Michaelis
David Otton a écrit : So there's some serious impedance mismatch going on there to make both features to work together. Just think of the default value as "something I can overwrite", eg: Thanks for this smart explanation. It shines my day. -- Mickaël Wolff aka Lupus Michaelis http://lupusm

[PHP] Advise on starting a web store site

2009-07-06 Thread Matthew Croud
Hi, I'm going to start my first e commerce website for a small web shoe store. I think I know enough PHP to keep my head above water, I'm using an add on shopping cart package to deal with the transactions. My question is, what's the best way to design a site where each product appears to

Re: [PHP] 64 bit binary ?

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 06:21, loki wrote: > no Not you. ;-P Note that I forwarded the message to the appropriate list --- the php-windows@ mailing list --- where Pierre Joye hangs out. He'd be the one to help you. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.n

Re: [PHP] Off Subject / Feedback Needed

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 03:03, Karl James wrote: > Team, > > http://www.theufl.com/css/corners.css > > http://www.theufl.com/indexb.htm > > I am trying to get the rounded corners to show in the first row in the HTML > table. > Can someone review the code for me? No, Karl, and please don't ask s

Re: [PHP] Advise on starting a web store site

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 08:15, Matthew Croud wrote: [snip!] > > Is there a way to create the site *without* having each product have a > physical separate page ? > > Is there a method of web design which makes creating new pages simple if > they all follow the same pattern. i.e thumbnail, descriptio

Re: [PHP] Simple login form with cookies

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 02:19, Jason Carson wrote: >> > ok, I have two sets of scripts here. One uses setcookie() for logging into > the admin panel and the other uses session_start(). Both are working fine, > is one more secure than the other? $_COOKIE data is written to a file that is readabl

Re: [PHP] Lookup domain in directories VS database

2009-07-06 Thread Daniel Brown
2009/7/5 Martin Zvarík : > Imagine you are hosting 10.000 subdomains. Consider it done. [snip!] > > Everytime visitor hits the page you do: > > @include('t/test-subdomain.freehosting.com/conf.php') > > if (!isset($CONF)) die('such a subdomain does not exist'); vs > Everytime vi

Re: [PHP] How to authnticate and use contents from ${HOME}

2009-07-06 Thread Bastien Koert
Try xamp or one of the preconfigured packages bastien On Sunday, July 5, 2009, wrote: > Hello, > > My name ich Chantale, I am 15years old and in a german Lycee. I like to study > Informatic in two years and now try to code my first applications. I am new > to php and like to code my own Intra

[PHP] Resources for unit tests

2009-07-06 Thread Bob McConnell
I am using Mike Lively's test-harness.php with test-more.php from Apache::Test for my unit test framework. I have also begun writing stubs for PostgreSQL functions to run behind that. These tests will be run on our function libraries as part of the

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Kim N. Lesmer
On Sun, 5 Jul 2009 14:33:07 -0600 Govinda wrote: > I am confusing myself reading the docs just now. > > i.e.: > include_path > basename() > and dirname() > > I had thought from many months ago that > > would include > somefile.php > living in > somedir > regardless from where in the site str

[PHP] What is this called?

2009-07-06 Thread Miller, Terion
Ok, say you have a database with 16000 records in it, but you only want to call out say 2000 records at a time as the search/query is performed, then store the first 2000 in a session and then retrieve the next 2000 etc etc as a way to minimize server strain? (I'm tasked to do this and ) 1. do

Re: [PHP] What is this called?

2009-07-06 Thread Stuart
2009/7/6 Miller, Terion : > Ok, say you have a database with 16000 records in it, but you only want to > call out say 2000 records at a time as the search/query is performed, then > store the first 2000 in a session and then retrieve the next 2000 etc etc as > a way to minimize server strain? > > (

[PHP] Re: What is this called?

2009-07-06 Thread Shawn McKenzie
Miller, Terion wrote: > Ok, say you have a database with 16000 records in it, but you only want to > call out say 2000 records at a time as the search/query is performed, then > store the first 2000 in a session and then retrieve the next 2000 etc etc as > a way to minimize server strain? > > (I'm

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Govinda
On Jul 5, 2009, at 4:42 PM, Kim N. Lesmer wrote: Like Michael said there is more than one way to deal with this. I personally prefer to use this: require_once ($_SERVER['DOCUMENT_ROOT'] . "/incl/myfile.php"); Unless the file needs to be kept outside of where the webserver serves files. Kim,

Re: [PHP] What is this called?

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 10:48, Miller, Terion wrote: > Ok, say you have a database with 16000 records in it, but you only want to > call out say 2000 records at a time as the search/query is performed, then > store the first 2000 in a session and then retrieve the next 2000 etc etc as > a way to min

Re: [PHP] What is this called?

2009-07-06 Thread Wolf
"Miller wrote: > Ok, say you have a database with 16000 records in it, but you only want to > call out say 2000 records at a time as the search/query is performed, then > store the first 2000 in a session and then retrieve the next 2000 etc etc as > a way to minimize server strain? > > (I'm

Re: [PHP] What is this called?

2009-07-06 Thread Miller, Terion
On 7/6/09 10:07 AM, "Daniel Brown" wrote: On Mon, Jul 6, 2009 at 10:48, Miller, Terion wrote: > Ok, say you have a database with 16000 records in it, but you only want to > call out say 2000 records at a time as the search/query is performed, then > store the first 2000 in a session and then r

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 11:04, Govinda wrote: > > Kim, this is exactly what I was looking for.  I had been over $_SERVER in > the docs..  but somehow missed that basic obvious param.  Thanks! And now I'll throw a monkey wrench into the gears and tell you that, yes, it works, but don't always re

Re: [PHP] What is this called?

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 11:15, Miller, Terion wrote: > > It seems like Pagination except I already have that in place for all records, > so maybe I'm just looking for a way to page the search results... > Boss kept referring to "partitioning results" By definition, yes, but if you use the term

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Michael Shadle
On Mon, Jul 6, 2009 at 8:24 AM, Daniel Brown wrote: >    Conversely, using the code example from above (and building upon > it), we know that __FILE__ remains static regardless of the point of > the call.  Thus, it's a better and more reliable method, and is usable > even if $_SERVER data is not a

Re: [PHP] preg_replace with UTF-8

2009-07-06 Thread Georgi Alexandrov
On Mon, Jul 6, 2009 at 4:54 AM, SleePy wrote: > I seem to be having a minor issue with preg_replace not working as expected > when using UTF-8 strings. So far I have found out that \w doesn't seem to be > detecting UTF-8 strings. > > This is my test php file: > $data = 'ooo';

Re: [PHP] preg_replace with UTF-8

2009-07-06 Thread Andrew Ballard
On Sun, Jul 5, 2009 at 9:54 PM, SleePy wrote: > I seem to be having a minor issue with preg_replace not working as expected > when using UTF-8 strings. So far I have found out that \w doesn't seem to be > detecting UTF-8 strings. > > This is my test php file: > $data = 'ooo'; >

[PHP] porting C code to php

2009-07-06 Thread Steve Hanselman
Hi, I've some C code that processes files, I want to port this to PHP and am trying to decide the best way to port the structs and unions over so as to still be readable? The files are multi-line files with differing layouts depending on the data contained within them, so at present unions of

[PHP] un-de-re-deprecation

2009-07-06 Thread Christoph Boget
http://us.php.net/manual/en/language.operators.type.php The instanceof operator was introduced in PHP 5. Before this time is_a() was used but is_a() has since been deprecated in favor of instanceof. Note that as of PHP 5.3.0, is_a() is no longer deprecated. http://us.php.net/manual/en/function.is-

Re: [PHP] un-de-re-deprecation

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 13:29, Christoph Boget wrote: [snip="facts"] > > Ok, so I'm curious, why was is_a() added back in when it was tossed > out on it's head in 5.0? This is just how things operate with the core folks. In actuality, that's not just PHP that does it: most projects (and indeed

Re: [PHP] preg_replace with UTF-8

2009-07-06 Thread SleePy
Thank you Andrew, That seems to break up UTF-8 strings. So from there I will play with it. On Jul 6, 2009, at 8:50 AM, Andrew Ballard wrote: On Sun, Jul 5, 2009 at 9:54 PM, SleePy wrote: I seem to be having a minor issue with preg_replace not working as expected when using UTF-8 strings. So

Re: [PHP] Simple login form with cookies

2009-07-06 Thread Jason Carson
> On Mon, Jul 6, 2009 at 02:19, Jason Carson wrote: >>> >> ok, I have two sets of scripts here. One uses setcookie() for logging >> into >> the admin panel and the other uses session_start(). Both are working >> fine, >> is one more secure than the other? > > $_COOKIE data is written to a file

RE: [PHP] What is this called?

2009-07-06 Thread Daevid Vincent
> -Original Message- > From: Wolf [mailto:lonew...@nc.rr.com] > Sent: Monday, July 06, 2009 8:10 AM > > If you are running MySQL, go get a 486, put Fedora on it and > use it for the heavy queries. You didn't seriously just tell someone to use an ancient-ass __80486__ PC for their "hea

RE: [PHP] LIMIT and SESSION WAS: What is this called?

2009-07-06 Thread Daevid Vincent
> -Original Message- > From: Wolf [mailto:lonew...@nc.rr.com] > Sent: Monday, July 06, 2009 8:10 AM > > Basically, go smack whomever told you to load all that stuff > into a session. It's a paging query that you want to do, but > I'd not recommend doing it to store it in a session. > >

Re: [PHP] Simple login form with cookies

2009-07-06 Thread PJ
Jason Carson wrote: >> On Mon, Jul 6, 2009 at 02:19, Jason Carson wrote: >> >>> ok, I have two sets of scripts here. One uses setcookie() for logging >>> into >>> the admin panel and the other uses session_start(). Both are working >>> fine, >>> is one more secure than the other? >>> >>

[PHP] How to stop E_DEPRECATED messages in the PHP log?

2009-07-06 Thread Jeff Weinberger
Hi: I am hoping someone can help me figure this out I've just upgraded my PHP installation to 5.3.0. Now I am receiving thousands of log messages of the form "PHP Deprecated: ...". I know I have a number of scripts that use now-deprecated functions, etc. and I now know what those are,

Re: [PHP] Simple login form with cookies

2009-07-06 Thread Jason Carson
> Jason Carson wrote: >>> On Mon, Jul 6, 2009 at 02:19, Jason Carson wrote: >>> ok, I have two sets of scripts here. One uses setcookie() for logging into the admin panel and the other uses session_start(). Both are working fine, is one more secure than the other? >>>

Re: [PHP] How to authnticate and use contents from ${HOME}

2009-07-06 Thread Isaac Dover
Hi Chantale, as Bastien mentioned, a preconfigured package might be the best way to go. Wikipedia has more information: http://en.wikipedia.org/wiki/List_of_LAMP_Packages What are you wanting to build in your interface? - Isaac On Mon, Jul 6, 2009 at 9:14 AM, Bastien Koert wrote: > Try xamp

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Govinda
On Jul 6, 2009, at 9:24 AM, Daniel Brown wrote: On Mon, Jul 6, 2009 at 11:04, Govinda wrote: Kim, this is exactly what I was looking for. I had been over $_SERVER in the docs.. but somehow missed that basic obvious param. Thanks! And now I'll throw a monkey wrench into the gears an

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Kim N. Lesmer
On Mon, 6 Jul 2009 16:16:55 -0600 Govinda wrote: > I do not really understand why > $_SERVER['DOCUMENT_ROOT'] > should return the right data at one time and not at another. (?) In general it will always provide the right data, but as the manual says: "The entries in this array ($_SERVER) are cr

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Daniel Brown
On Mon, Jul 6, 2009 at 18:16, Govinda wrote: > > this is great, but then I still do not have a solution that will work for > any level deep of dir/ . > I.e. this- > dirname(dirname(__FILE__)) > gives the correct first part of the path to document root like > $_SERVER['DOCUMENT_ROOT'] does > only wh

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Govinda
I want something that will work for calling an include from any file that lives n levels deep. That's where you have to define a variable (or constant) that tells the system where the web root is located, and then use that to determine where you are in relation to that. For example:

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Paul M Foster
On Mon, Jul 06, 2009 at 07:15:03PM -0600, Govinda wrote: > > Dan I love to see smart hacks in action! ..and I believe I get what > you are doing. > I am just amazed that there is not a SIMPLE (one-liner) reliable way > of just saying "document root" without a complex function like that. > I mea

Re: [PHP] Advise on starting a web store site

2009-07-06 Thread Paul M Foster
On Mon, Jul 06, 2009 at 01:15:10PM +0100, Matthew Croud wrote: > Hi, > > I'm going to start my first e commerce website for a small web shoe > store. > I think I know enough PHP to keep my head above water, I'm using an > add on shopping cart package to deal with the transactions. > > My question

Re: [PHP] porting C code to php

2009-07-06 Thread Paul M Foster
On Mon, Jul 06, 2009 at 05:24:32PM +0100, Steve Hanselman wrote: > Hi, > > I've some C code that processes files, I want to port this to PHP and am > trying to decide the best way to port the structs and unions over so as to > still be readable? > > The files are multi-line files with differin

Re: [PHP] How to stop E_DEPRECATED messages in the PHP log?

2009-07-06 Thread Paul M Foster
On Mon, Jul 06, 2009 at 02:16:09PM -0700, Jeff Weinberger wrote: > Hi: > > I am hoping someone can help me figure this out > > I've just upgraded my PHP installation to 5.3.0. Now I am receiving > thousands of log messages of the form "PHP Deprecated: ...". > > I know I have a number of script

[PHP] Re: best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Clancy
On Sun, 5 Jul 2009 14:33:07 -0600, govinda.webdnat...@gmail.com (Govinda) wrote: >I am confusing myself reading the docs just now. > >i.e.: >include_path >basename() >and dirname() > > I had thought from many months ago that > >would include >somefile.php >living in >somedir >regardless from wher

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Govinda
I'm not sure how this could be made simpler. $site_root = realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR; Call that in any file in the root of *your* web directories, and you have what is essentially the "document root" for *your* site. Presumably, you know the *relative* directories of all y

Re: [PHP] How to stop E_DEPRECATED messages in the PHP log?

2009-07-06 Thread Jeff Weinberger
On Jul 6, 2009, at 7:47 PM, Paul M Foster wrote: On Mon, Jul 06, 2009 at 02:16:09PM -0700, Jeff Weinberger wrote: Hi: I am hoping someone can help me figure this out I've just upgraded my PHP installation to 5.3.0. Now I am receiving thousands of log messages of the form "PHP Deprecated:

Re: [PHP] What is this called?

2009-07-06 Thread Michael A. Peters
and throw your favorite Linux distro on it (I'm not touching that holy war with a 10' eth0 cord) I'll touch it. It shouldn't be Fedora - Fedora has too short of a lifetime before major version update is necessary to get patches. The main advantages of Fedora are how new and shiny the deskt

Re: [PHP] best way to properly build an include path *regardless* from where I am calling the include?

2009-07-06 Thread Michael A. Peters
Govinda wrote: I want something that will work for calling an include from any file that lives n levels deep. That's where you have to define a variable (or constant) that tells the system where the web root is located, and then use that to determine where you are in relation to that. For