Re: [PHP] Re: More include issues

2007-06-06 Thread Jared Farrish
On 6/6/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2007-06-06 at 20:26 -0500, Jared Farrish wrote: > On 6/6/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > On Wed, 2007-06-06 at 17:21 -0500, Jared Farrish wrote: > > > I feel ya brotha! I

Re: [PHP] Re: More include issues

2007-06-06 Thread Jared Farrish
On 6/6/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2007-06-06 at 17:21 -0500, Jared Farrish wrote: > I feel ya brotha! I think Stut might be having a bad day... Bad day?? Did you read the same posts I read? Cheers, Rob. Sure I did. Let's not take this too

[PHP] Re: More include issues

2007-06-06 Thread Jared Farrish
ults may vary, and may not work on all servers (IIS, for instance) or some Apache installations (I guess). Try creating a test page and play around with it using echo and so on to see what it outputs. You can contact me directly if the forum mungs it up on the line-wrap. Also try: echo '&#

[PHP] Re: Re: Re: Re: preg_match() returns false but no documentation why

2007-05-31 Thread Jared Farrish
it 'Full Stop' when it doesn't seem to actually correlate to the regex meaning it identifies, don't you think? Maybe to a Brit or someone who understands Commonwealth English would know (I was aware of what it meant in CE, I just woudn't have imagined to apply it here, since it

[PHP] Re: local v remote

2007-05-31 Thread Jared Farrish
Do database stuff that needs a connection } IMPORTANT: Do not use mysql_pconnect() without first reading about it: - http://us2.php.net/manual/en/features.persistent-connections.php - http://us2.php.net/manual/en/function.mysql-connect.php - http://us2.php.net/manual/en/function.mysql-query.php - htt

[PHP] Re: Re: Re: preg_match() returns false but no documentation why

2007-05-30 Thread Jared Farrish
definition doesn't make any kind of sense to me, ie, practical usage. Does it mean match anything that, say, *starts* with a pattern but ends with "whatever" (.)??? Thanks! -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Re: preg_match() returns false but no documentation why

2007-05-30 Thread Jared Farrish
ifiers.php "i (PCRE_CASELESS) "If this modifier is set, letters in the pattern match both upper and lower case letters." How do you test regex's against any known variants? I suppose I need to build a test function to make arbitrary strings and then test and print the

Re: [PHP] Re: find (matching) person in other table

2007-05-30 Thread Jared Farrish
On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: email has to match "in total". [EMAIL PROTECTED] and [EMAIL PROTECTED] are NOT the same in my case. thanks jared, If you can match a person by their email, why not just SELECT by email only (and return the persons information

[PHP] Re: preg_match() returns false but no documentation why

2007-05-30 Thread Jared Farrish
ce.html Also, why are you allowing for uppercase letters when the RFC's don't allow them? I hadn't gotten far enough to strtolower(), but that's a good point, I hadn't actually considered it yet. Just my thoughts Hey, I appreciate it! -- Jared Farrish Intermediate

Re: [PHP] Re: find (matching) person in other table

2007-05-30 Thread Jared Farrish
g is weighting it by email address, which you can add to the SELECT I posted (although you need to think about how you use your wildcards for email addresses, such as maybe matching the beginning OR the end, for instance). It's even better if the person has to activate the account with an email link to activate, since then you'd know the email address existed (although it doesn't mean it isn't someone in the database that isn't already in there). -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

Re: [PHP] preg_match() returns false but no documentation why

2007-05-30 Thread Jared Farrish
etty color syntax highlighting of the target string and your regex to show you what's going on, as well as a slow-motion instant replay to "step" through it piece by piece. Oooh, pretty colors! Stepping through sounds interesting. I'll have to check it out. Thanks! -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: find (matching) person in other table

2007-05-30 Thread Jared Farrish
On 5/30/07, Jared Farrish <[EMAIL PROTECTED]> wrote: $lastname = strpos('Rogers',0,2); $firstname = strpos('Timothy',0,2); $select = "SELECT `uid`,`LastName`,`FirstName` FROM `users` WHERE LastName='$lastname%'

[PHP] Re: find (matching) person in other table

2007-05-30 Thread Jared Farrish
sted that, but I think it would work. You would need to work on a way to LIMIT the matches effectively. If that doesn't work, hey, this is a PHP list... -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

Re: [PHP] preg_match() returns false but no documentation why

2007-05-30 Thread Jared Farrish
s saying was that "false" is not the stated return value if it's not found. If it's not printing a zero, shouldn't that mean it's returning false? preg_match("/^ldap(s)?:\/\/([a-zA-Z0-9-])+\.[a-zA-Z.]{2,5}$/",$this->server) Now when I add the slashes, I g

Re: [PHP] preg_match() returns false but no documentation why

2007-05-30 Thread Jared Farrish
On 5/30/07, Richard Lynch <[EMAIL PROTECTED]> wrote: On Wed, May 30, 2007 12:33 pm, Jared Farrish wrote: > > preg_match("^ldap(s)?://[a-zA-Z0-9-]+\.[a-zA-Z.]{2,5}$",$this->server) You are missing the start/end delimiters is your first problem... Which ones? I'

Re: [PHP] Re: a question on session ID and security

2007-05-30 Thread Jared Farrish
On 5/30/07, Richard Lynch <[EMAIL PROTECTED]> wrote:> If they can get the first cookie, they can get the second just as easily. I thought this said "just as weasily" at first, and I thought, "Ain't that the truth..." -- Jared Farrish Intermediate Web Develop

[PHP] preg_match() returns false but no documentation why

2007-05-30 Thread Jared Farrish
ttp://www.sitepoint.com/article/regular-expressions-php). Thanks! -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: RE: Return or not to return, that is the question

2007-05-30 Thread Jared Farrish
I think in a lot of cases using surrogates is a better, scalable solution, but that only matters if you need a "better, scalable solution." Depends on coding style, preference, and the situational need. -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: RE: Return or not to return, that is the question

2007-05-30 Thread Jared Farrish
Hi Jared, Hi Rich! If you do put a return; at the end of all of your functions, I'm curious as to why? If a function doesn't actually return a value (which is highly possible) then it isn't /required/, but that doesn't stop me from doing it. I *do* put 'return;

[PHP] Re: scheduling a script to check a directory for files

2007-05-30 Thread Jared Farrish
to handle the call, though. http://en.wikipedia.org/wiki/Lynx_(web_browser) -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] RE: Return or not to return, that is the question

2007-05-30 Thread Jared Farrish
moot question anyways. PHP's soft-typing complicates this further (0 == false == null == '' == ??). This makes a whole lot more sense in C++ or something other strong-typed language. Thus, code to what you need, but have high standards (by knowing what you need)! -- Jared Farrish Interm

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
than yours? Of course not. Mind telling me again?! :D I appreciate that you posted the historical information on sessions and cookies. Whether it's accurate to reality, I don't know, but it makes sense, not lemons, so for now, it's good enough for me! p.s. Maybe everyone wasn't around when that history occurred... -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
On 5/29/07, Jared Farrish <[EMAIL PROTECTED]> wrote: I do think the stated best practice of SESSIONS, at this point, probably does need to be described to be further useful as a topic of discussion. I've been a little unclear in some things, so I get the feeling we've got the sa

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
That's not what I'm saying. My basic question is why send the "secondary hash key" to the client when it doesn't need it? Use the authentication key to identify the users data, then get the "secondary hash key" from that data. The browser never needs to see the hash, and from a purist security poi

Fwd: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
ut browser bickering, OS wars, and all the other "dispassionate" discourse currently "enlightening" the internet. At least with security, there's some known benefit to discussing it! -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only too

Re: [PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
was a reliable way to add security to sessions don't you think that one of the multitude of web development languages out there would have done it, including PHP? I certainly don't think you're implying I thought I had given some new, "better" way of doing sessions that nobody h

[PHP] Re: a question on session ID and security

2007-05-29 Thread Jared Farrish
ld that into your session validation. Well, if you use COOKIES, you can pass a secondary hash key that can be used to validate the actual key against a footprint for a visitor (from $_SERVER). Salt in a date/timestamp and SHA1 or other, and I feel like that's a pretty good way to check aga

[PHP] Re: a question on session ID and security

2007-05-28 Thread Jared Farrish
session is destroyed and the temp file where it is stored is deleted from the harddrive. Do not store sensitive information or use a SESSION id to authenticate a user. -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see eve

[PHP] Re: Web Application Design Literature

2007-05-28 Thread Jared Farrish
ogramming techniques, keep in mind PHP is quite a bit different from other languages (such as C#) in the way it implements some details of objects, and that PHP4 and PHP5 are quite significantly different versions, vis-a-vis objects and classes. Good luck! -- Jared Farrish Intermediate Web Developer

[PHP] Re: Unknown number of check boxes?

2007-05-28 Thread Jared Farrish
On 5/28/07, Jared Farrish <[EMAIL PROTECTED]> wrote: $tr = $i % 5 === 0 ? Array('','') : Array('',''); Ignore this line, it was from an earlier iteration of that function. -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham

[PHP] Re: Unknown number of check boxes?

2007-05-28 Thread Jared Farrish
ot;; } return $str; } echo(getCheckBoxes()); ?> Consuming of form post An example of inverting a posted checkbox array to support $checked[45] === true behavior, making it easier to access and test the posted content Please select some random checkboxes above' . '

[PHP] Re: Upload a ppt file

2007-05-28 Thread Jared Farrish
Does any have any references or an example to show me? Well, I think we need a description of the error or the invalid response you're having. It could be a file-size issue (your php.ini configuration won't allow file sizes > 8mb's, for instance). Have you googled it?

[PHP] Tracking exit links with php?

2007-05-28 Thread Jared Farrish
). What you want is access to their redirect page log. You also might look into Urchin and the ISP's that support it. -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: PHP5 oop question...

2007-05-28 Thread Jared Farrish
when in scope to an instantiated object should work), and/or make it work entirely on it's own without $this. -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: $_GET strings seperation

2007-05-26 Thread Jared Farrish
'curly'; $array[] 'larry'; // Is equivalent to ~ $array = Array(); array_push($array, 'moe'); array_push($array, 'curly'); array_push($array, 'larry'); When you add a numerical array in php, it is added to the stack as a new item, or push. Essenti

[PHP] Re: Too many records to display in one web page

2007-05-26 Thread Jared Farrish
is is called pagination, and is well-discussed and documented on the web: http://www.google.com/search?q=php+pagination -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: $_GET strings seperation

2007-05-26 Thread Jared Farrish
alues that are not replaced ($query=Array('cID'=>51,'doesnotexistyet'=>'completelynewvalue'), for instance). Also, the above is an example; there are certainly many other ways to do what is done above (such as replacing the last foreach loop with an implode(

[PHP] Re: installing error

2007-05-26 Thread Jared Farrish
h would be the best for me WAMPP makes apache and php installation stupid easy (MySQL too, but you don't seem to need it). Maybe, you might install WAMPP, uninstall MySQL, and install PostgreSQL... Never done it, but with some fiddling, it should work. -- Jared Farrish Intermediate Web Devel

[PHP] Re: PHP debugger

2007-05-26 Thread Jared Farrish
an/JS/lem.json.js -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Using PHP to retrieve and display file from MySQL database

2007-05-25 Thread Jared Farrish
Is there a valid $id being passed through a query ($_GET) variable, like so?: http://www.filecircus.com/somewhere/outthere/gimme.php?id=badphoto103 What happens when you click on that? -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have

Re: [PHP] Re: Check if Record was Entered Today.

2007-05-25 Thread Jared Farrish
whatnot, and is then used as an include() file. This way, the data is rebuilt each go around, but the overhead is pushed to another machine, similar to a SOAP service (which is another...). Pass a variable id to the CLI script... -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslo

[PHP] Re: Protecting MySQL Injection from PHP form

2007-05-25 Thread Jared Farrish
box to show up so I can delete multiple people at one time :) But I'm still learning about that. I sure hope you're testing on test data, and not live data... -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Re: help with multi dimensional arrays

2007-05-25 Thread Jared Farrish
effort on this list in the past. Please start a new thread with a more appropriate title. Thanks! -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: help with multi dimensional arrays

2007-05-24 Thread Jared Farrish
omma. Well, I got a chuckle. :D -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Uploading Files into MySQL

2007-05-24 Thread Jared Farrish
e php script upload file mysql database You can thank me later. *snap* -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Scalable Site Architecture

2007-05-24 Thread Jared Farrish
ent animals, but knowing how each works at least superficially can help later. What I suspect you need is a book on LAMP (www.oreilly.com). -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Include???

2007-05-24 Thread Jared Farrish
introspection. Useful for $_GET, $_COOKIE, $GLOBALS, $_SERVER, etc... p.s.: Could you use descriptive subjects; include doesn't really say much... -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Jared Farrish
file permissions extended through primary processes (such as Apache using an executable)... The whole apache GUID mess seems like cryptic middle ages eye gouging... -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Developer / Client Documents

2007-05-24 Thread Jared Farrish
webdbapps2/ This will give you most of what you're looking for. Think XAMPP for a localhost install to run tests, and MySQL for a database backend (part of XAMPP): http://www.apachefriends.org/en/xampp.html It will take time. Good luck! -- Jared Farrish Intermediate Web Developer Denton, Tx

[PHP] Re: Check if Record was Entered Today.

2007-05-24 Thread Jared Farrish
= Incidentally, does this mean you solved the file access problems from this thread: http://news.php.net/php.general/255542 -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: php hosting-mediatemple/dreamhost

2007-05-24 Thread Jared Farrish
get off the shared server. Shawn Inman is a modestly-famous web designer/developer who uses MediaTemple for his website: http://www.shauninman.com/ -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Protecting MySQL Injection from PHP form

2007-05-24 Thread Jared Farrish
ybe you manage that... On 5/24/07, Jared Farrish <[EMAIL PROTECTED]> wrote: I'm not sure exactly what kind of sanitization you think you're doing, but if all you do is check to see if it's empty (empty() implements isset(), empty() checks to see if it's set, then if it e

[PHP] Re: Protecting MySQL Injection from PHP form

2007-05-24 Thread Jared Farrish
off wrapping your SQL commands into a class or at least a series of functions, so that you can implement your sanitization once and use it for all database interactions. Google: http://www.google.com/search?q=php+sanitize+sql+statement PHP.net: http://www.php.net/manual/en/security.database.sql-inj

Re: [PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Jared Farrish
they are not reliable for programming purposes, IMHO. For the advanced PHP gurus on the list, is it accurate to characterize PHP as relying on Apache for file manipulation? Is it accurately described as: Process Request->PHP->Apache->[File System Poof!]->Apache->PHP->Process

[PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Jared Farrish
ped addresses, since a mapping is just a localized version of a resource name alias. If, after determing that Apache is running with the right permissions for the owned processes to connect to and use a network shared resource, then it's probably an Apache UID conflict (is PHP in safe mode?)

[PHP] Re: RE: Cannot access file on Network Drive (Windows 2003)

2007-05-24 Thread Jared Farrish
Win machines, I would think, would be a MAJOR headache if you've never done it before. One essentially speaks Polish, while the other speaks Italian. -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

Re: [PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Jared Farrish
ions related issue and I'm doubting it is a permissions issue. I have Full Control given to the system all this is on. -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Jared Farrish
Oh yeah, and tijnema has a good point: \\compname-x\\offsite\\db\\test.dbf Btw, what does top post mean? On 5/23/07, Jared Farrish <[EMAIL PROTECTED]> wrote: Other than permissions, you might be referencing the folder by the local network mapping drive initial, instead of the actual pa

[PHP] RE: Cannot access file on Network Drive (Windows 2003)

2007-05-23 Thread Jared Farrish
chines to be known. It's probably a permissions thing, though. FWIW -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: problems in WHERE statment

2007-05-23 Thread Jared Farrish
st2'; var $c = '$a$b'; var $d = "$a$b"; var $e = $a.$b; $e is equivalent to $d, where c would print literally $a$b, since you told the parser using the single quotes to leave the string alone. Likewise, var $f = $a."-$b$c-".'$e'; would print test-test2

[PHP] Re: Form Validation Issues

2007-05-23 Thread Jared Farrish
Also, Indiana and Connecticut were misspelled. -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: Form Validation Issues

2007-05-23 Thread Jared Farrish
x27;=>true,'ut'=>true, 'vermont'=>true,'vt'=>true, 'virginia'=>true,'va'=>true, 'washington'=>true,'wa'=>true, 'west virginia'=>true,'wv'=>true, 'wisconsin'=>true,'wi'=>true, 'wyoming'=>true,'wy'=>true ); function States() { } function isValid($str,$suggest) { if ($this->states[strtolower($str)] === true) { $this->suggest = null; return true; } elseif ($suggest === true && strlen($str) > 3) { $this->doSuggest($str); return false; } else { $this->suggest = null; return false; } } function doSuggest($str) { foreach ($this->states as $state => $val) { similar_text(strtolower($state),strtolower($str),$result); if ($result > 85) { $this->suggest = $state; } } if (empty($this->suggest)) { $this->suggest = null; } } function isSuggested() { return $this->suggest; } } $states = new States(); $state = 'Hawii'; if ($states->isValid($state,true) === true) { echo("$state is a state."); } elseif ($suggest = $states->isSuggested()) { echo("May we suggest $suggest?"); } else { echo("State not found."); } ?> -- Jared Farrish Intermediate Web Developer Denton, Tx Abraham Maslow: "If the only tool you have is a hammer, you tend to see every problem as a nail." $$

[PHP] Re: [PEAR] PHP5 Static functions called through __call() that don't exist... yet

2007-05-22 Thread Jared Farrish
27;string'; $_test = 'string'; break; } foreach (TypeAssert::getTypesObject() as $type => $v) { echo("is_$type($_test) === ". (TypeAssert::$assert->$type($test)? 'true': 'false'

[PHP] Re: PHP5 Static functions called through __call() that don't exist... yet

2007-05-18 Thread Jared Farrish
self::$types); $i++) { $obj->{self::$types[$i]} = (bool) false; } return $obj; } } } echo(''); echo(TypeAssert::string('test')); echo(''); I don't think this is possible (see http://marc.info/?l=php-gener

[PHP] PHP5 Static functions called through __call() that don't exist... yet

2007-05-18 Thread Jared Farrish
} return $obj; } } } echo(''); echo(TypeAssert::string('test')); echo(''); I don't think this is possible (see http://marc.info/?l=php-general&m=114558851102060&w=2 ). But I would LIKE for it to work (currently, the above code does

[PHP] validating ereg patterns

2006-03-29 Thread Jared Nedzel
re no matches or if an error occurred. I need to distinguish between no matches and an error, so I can present a meaningful message to the user. Any suggestions on how to do this? Thanks, Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Creating a unique index ID

2006-03-13 Thread Jared Williams
rement & auto_increment_offset. Each server gets its own unique auto_increment_offset, and auto_increment_increment is set to the number of servers you have. Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] class constants

2006-03-07 Thread Jared Williams
Hi, ReflectionClass getConstant getConstants hasConstant http://www.ren.dotgeek.org/classbrowser/class.php?class=ReflectionClass Jared > -Original Message- > From: Arnaldo Gandol [mailto:[EMAIL PROTECTED] > Sent: 07 March 2006 21:03 > To: php-general@lists.php.net >

RE: [PHP] output Today's date

2006-03-06 Thread Jared Williams
and simpliest method would be to use some > javascript to detect the timezone. Or let the user specify > which one he wants to use. Hi, Javascripts' Date object has a getTimezoneOffset() method, which returns the difference between local time and universal time in minutes. J

RE: [PHP] PDO Changes from 5.0.x To 5.1.x

2006-03-01 Thread Jared Williams
Hi, Only way I know is to import them into the global scope with define() If (!defined(PDO_FETCH_ASSOC)) define('PDO_FETCH_ASSOC', PDO::FETCH_ASSOC); As for further differences, I'm not aware of any. Jared > > According to documentation, PDO globals constants in 5.0.

RE: [PHP] $_POST to function?

2006-02-24 Thread Jared Williams
> > Why are you passing the POST array? As it's superglobal why > not just work directly on it within the function? > Passing it has distinct advantages, like being able to test the function. Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

RE: [PHP] base64_encode, forward slashes and mod_rewrite

2006-02-24 Thread Jared Williams
There are variants of base64, which replace the + / characters with something less likely to cause problems. http://en.wikipedia.org/wiki/Base64 Jared > > sorry Ive done it again, for anyones interest, you might have > to urlencode the string twice for mod_rewrite to accept &g

RE: [PHP] encrypted urls, mcrypt and mod_rewrite

2006-02-23 Thread Jared Williams
> like so it > > wont find a regex match properly with this rule > > > > RewriteRule ^feeds/(.*)$ refer.php?$1 [L,QSA] > > > > Any ideas what it could be doing ? The strings are also > quite random, > > so it will work sometimes for a particular ur

RE: [PHP] "Nested Set Model" or "modified preorder tree traversal"

2006-02-22 Thread Jared Williams
Hi, As your using MySQL5, I'd recommend putting all the Nested Set code in stored procedures, that way the client doesn't need to know about anything about the method, and the left, right columns never need to be retrieved. Jared > I've been searching the we

RE: [PHP] Debugging custom streams

2006-02-10 Thread Jared Williams
a malformed zip would be created. As only when a stream is closed that you can determine the size and crc, to write to zip headers. Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Debugging custom streams

2006-02-10 Thread Jared Williams
Ahha, after some rethinking, I've dropped the append custom stream, as its not really required. And instead of using a custom in memory stream for handling the central directory stream, just using tmpfile(), the application error has disappeared. Jared > > >>Jar

RE: [PHP] Debugging custom streams

2006-02-10 Thread Jared Williams
> > > >>-Original Message- > >>From: Jochem Maas [mailto:[EMAIL PROTECTED] > >>Sent: 10 February 2006 14:17 > >>To: [EMAIL PROTECTED] > >>Cc: php-general@lists.php.net > >>Subject: Re: [PHP] Debugging custom streams > >&

RE: [PHP] Debugging custom streams

2006-02-10 Thread Jared Williams
> -Original Message- > From: Jochem Maas [mailto:[EMAIL PROTECTED] > Sent: 10 February 2006 14:17 > To: [EMAIL PROTECTED] > Cc: php-general@lists.php.net > Subject: Re: [PHP] Debugging custom streams > > Jared Williams wrote: > > > > Hi, > &

[PHP] Debugging custom streams

2006-02-10 Thread Jared Williams
27;); $stream = $zip->create('digits.txt'); fputs($stream, '1234567890'); fclose($stream); $stream = $zip->create('alpha.txt'); fputs($stream, 'abcdefghijklmnopqrstuvwxyz'); fclose($stream); $zip->close(); unset($zip); I get an applicati

RE: [PHP] Advanced PHP Chat

2006-02-08 Thread Jared Williams
Sitepoints' PAD http://www.sitepoint.com/forums/forumdisplay.php?f=147 Jared > > What would be the definitive PHP chat community to join for > someone who likes to discuss how things *should* be done, or > would be done > *properly* as opposed to the ol' "H

RE: [PHP] Remove atribute from links

2006-01-08 Thread Jared Williams
m really bogged down with studies and simply cannot devote > a full day to this 'trivial' excercise. I'd forget regexps and use SAX style parser. Trivial then to remove unwanted attributes. Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] load testing tools

2005-12-27 Thread Jared Williams
> Anyone have any opinions or suggestions on cheap/free load > testing tools for dynamic sites? Microsoft WAST http://www.microsoft.com/technet/archive/itsolutions/intranet/downloads/webstres.mspx Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

RE: [PHP] High load Forum?

2005-12-22 Thread Jared Williams
Take a look at http://www.big-boards.com/ Jared > Hi, > > Im looking for a good forum thats supports high load. (Now > between 300-2.000 active sessions, much more in next 2 years) > > I have heard about vBulletin and PhpBB. At the moment I think > vBulletin is the b

RE: [PHP] Random Images with no duplicates?

2005-12-16 Thread Jared Williams
Hi, Just unset the ones you've picked "; unset($openFile[$r]); } ?> Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] XmlReader & DOC_TYPE

2005-12-15 Thread Jared Williams
w.w3.org/1999/xhtml"; xml:lang="en" lang="en"> Template Test Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] XmlReader & XInclude

2005-12-14 Thread Jared Williams
Hi, Does PHPs XmlReader support Xinclude ? Seems libxml does reading this post http://mail.gnome.org/archives/xml/2004-February/msg00190.html , but the corresponding constant seems missing in PHP Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

RE: [PHP] IE6 not returning POST data from a textarea

2005-12-12 Thread Jared Williams
> Anyone know to get IE6 to return POST data from a textarea > when the text is pasted in? > > Works fine for Mozilla, etc. > > print_r($_POST) shows several and > values just fine. > If it doesn't have a name attribute, or is disabled IE won't includ

RE: [PHP] Re: XmlWriter::writeDTD bug...

2005-12-07 Thread Jared Williams
> > Jared Williams wrote: > > > > PS. > > Yeah, thought it was libxml, hence didn't file a pecl > bug report. But > > there does seem a problem with this method as can't just have a > > publicId or a systemId, libxml function uses NULL as

RE: [PHP] Re: XmlWriter::writeDTD bug...

2005-12-07 Thread Jared Williams
> Jared Williams wrote: > > Hi, > > > > $writer = new XmlWriter(); > > ... > > > > $writer->writeDtd('html', '-//W3C//DTD XHTML 1.0 Strict//EN', > > 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#x

[PHP] RE: XmlWriter::writeDTD bug...

2005-12-07 Thread Jared Williams
> -Original Message- > From: Rob Richards [mailto:[EMAIL PROTECTED] > Sent: 07 December 2005 04:21 > To: [EMAIL PROTECTED] > Cc: php-general@lists.php.net > Subject: Re: XmlWriter::writeDTD bug... > > Jared Williams wrote: > > Hi, > &

[PHP] XmlWriter::writeDTD bug...

2005-12-06 Thread Jared Williams
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> Has anyone got a workaround for this problem? Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Unnecessary if statement? Programming technique

2005-12-06 Thread Jared Williams
Hi, Why not for ($i = 0; $i < 100/100; ++$i) { for ($j = 0; $j < 100; ++$j) { // do something standard } // do something special for this occurence } Jared > -Original Message- > From: Steve McGill [mailto:[EMAIL PROTECTED] > Sent: 06 D

RE: [PHP] PHP6, UTF & strlen

2005-11-28 Thread Jared Williams
> > Jared Williams wrote: > > Hi, > > Just been looking over some code, and saw > > > > if (strlen($data) !== file_put_contents($filename, $data)) > > > > > > where $data is UTF8, so wondering if this is going to >

[PHP] PHP6, UTF & strlen

2005-11-28 Thread Jared Williams
Hi, Just been looking over some code, and saw if (strlen($data) !== file_put_contents($filename, $data)) where $data is UTF8, so wondering if this is going to break in PHP6, if so what should be the equivalent code? Jared -- PHP General Mailing

[PHP] RecursiveDirectoryIterator & RecursiveFilterIterator

2005-11-26 Thread Jared Williams
lter shouldn't be doing anything, according to my understanding, but its filtering out all files in any of the subdirectories. Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How to build a XML DTD on "the fly"?

2005-11-18 Thread Jared Williams
> > Jared Williams wrote: > > > > There is no real standard for creating DTDs on the fly, and > therefore libxml/DOM doesn't have any methods afaik. > > > > The one method DOMElement::setIDAttribute() should work I > think, but > > whilst

RE: [PHP] How to build a XML DTD on "the fly"?

2005-11-18 Thread Jared Williams
; > // Retrieve and print the document > echo $oDom->saveXML() . "\n"; > > echo "TagName: " . $oDom->getElementById('123')->tagName; > ?> > > Now the code produces the following result: > > > test > > TagName: >

RE: [PHP] APC caching keys.

2005-11-18 Thread Jared Williams
w of a good reason (including performance > reasons) for not using a hash in such a way? Wouldn't apc_fetch($qry) do much the same thing? Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] recursive queries-tree view implementation

2005-11-18 Thread Jared Williams
operations take longer, but retrieving the tree and rendering into a nested list only takes 1 query. http://dev.mysql.com/tech-resources/articles/hierarchical-data.html for details. Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Multiple inserts as a single string?

2005-06-02 Thread Jared Williams
at make any difference? Inserting multiple rows with one INSERT statement is part of the SQL standard (IIRC), and MySQL supports it. INSERT INTO table(a,b) VALUES (1,1), (2,2), (3,3), ... ,(n, n) Jared -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   >