Re: [PHP] Accessing cookies in PHP and Javascript

2007-02-15 Thread Jon Anderson
ent.cookie. Or how do I have to create a cookies so it's accessable as $_COOKIE["username"] document.cookie = "username=" + escape(username); You can add expiry, path, etc. with JavaScript, but you can google for that. jon -- PHP General Mailing List (htt

Re: [PHP] Deny processing of non included files

2007-02-15 Thread Jon Anderson
based on the old C header trick: #ifndef __SOME_FILE_H #define __SOME_FILE_H #endif jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] round to nearest 500?

2007-02-13 Thread Jon Anderson
to come up with things like "fee structures" or "pricing structures" that could take advantage of that scheme to force rounding errors to remain permanently in the person's favor. I certainly hope that PHP continues to use the standard technique, and not the &qu

Re: [PHP] round to nearest 500?

2007-02-12 Thread Jon Anderson
0*2 = 1600, round(1600,-3) = 2000, 2000/2 = 1000 jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] base64-encoding in cookies?

2007-02-10 Thread Jon Anderson
Myron Turner wrote: Jon Anderson wrote: Fletcher Mattox wrote: In terms of the behavior, I think it makes total sense. The only case where it would ever bite you is yours (which is rare because most people wouldn't mix perl and PHP in the same system). I'm not going to get into

Re: [PHP] base64-encoding in cookies?

2007-02-09 Thread Jon Anderson
want to argue what the behavior should be, try php-dev. (Making that kind of argument here is like yelling at your neighbor 'cause Vista sucks...assuming Bill Gates isn't your neighbor. :-) jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reflection API Questions

2007-02-09 Thread Jon Anderson
Check out the runkit extension to PHP (http://www.php.net/manual/en/ref.runkit.php). It should let you do all the class mucking you need to do. jon Jim Wilson wrote: Dear PHP Users, I have two questions regarding PHP 5's Reflection API (I apologize if this isn't the right list t

Re: [PHP] base64-encoding in cookies?

2007-02-08 Thread Jon Anderson
n do it manually as well with header('Set-Cookie: ...') and $_SERVER['HTTP_COOKIE'] on the other end - which I believe is what you decided on. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Jon Anderson
Jon Anderson wrote: ... item.focus(); } ** alert(onError); **return(false);* *} ... Sorry about the "*"s everywhere (there aren't supposed to be any). I pasted the code in, and Thunderbird thought it was supposed to be bold for some reason, then converted the bold te

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Jon Anderson
Dan Shirah wrote: Jon, Tried your method and still got: *Error: Object doesn't support this property or method. Code: 0* *I don't know what browser/platform you're using, but the following works for me on IE7/Windows, FF2/Linux, Opera9/Linux. jon function checkInputVal

Re: [PHP] Javascript and $_POST

2007-02-08 Thread Jon Anderson
I'm no JavaScript expert, but I could maybe suggest an alternate method: use document.getElementById() or document.getElementsByName() AFAIK, the direct document.xyz doesn't work exactly the same way accross browsers (if at all). e.g. (WARNING! TOTALLY UNTESTED CODE!) function checkInputValu

Re: [PHP] Javascript and $_POST

2007-02-07 Thread Jon Anderson
... If you submit "submitForm", nothing will get posted. You want to post "dataForm" in the above example. (Or whatever "inputForm" happens to be in your example.) jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Encoding problem

2007-02-05 Thread Jon Anderson
ing something that is actually UTF-8, you'll need to make sure that you've done these: header('Content-Type: text/html; charset=utf-8'); I believe that IE6 requires this one as well within your html head. If that doesn't work, then it could be that your character isn&

Re: [PHP] Who uses PHP

2007-02-01 Thread Jon Anderson
s it ASP's fault? No. It's the programmers who failed to recognize the hole in their protocol. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help wtih a query?

2007-01-30 Thread Jon Anderson
#x27;ll need to do the right JOINs in there for that to work. Personally, I think that implicit joins are sloppy, so I would suggest using JOIN with ON or USING...but I suppose that's a preference thing, and some (all?) might disagree with me. jon -- PHP General Mailing List (http://ww

Re: [PHP] Parsing mail file

2007-01-30 Thread Jon Anderson
The one ready-made solution that I'm aware of that will help you is the PECL mailparse package: http://pecl.php.net/package/mailparse Otherwise, #6 (and maybe #7) in your search results list should do it... If somebody uses a great function and want to share, I will please him... :-) Pl

Re: [PHP] which package to use for unzipping zipped files with PHP

2007-01-29 Thread Jon Anderson
I can tell it works reliably. :-) jon Angelo Zanetti wrote: Dear all. I have been googling to find out which is the best way to use PHP to unzip a zip file I have found the following: zziplib and pclzip but still can't really decide without doing alot of tests etc.. Can anyone give

Re: [PHP] memory_limit Setting?

2007-01-26 Thread Jon Anderson
before the line on which it fails to see how much memory is being used by your script. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SQL Readability.. (was Re: most powerful php editor)

2007-01-26 Thread Jon Anderson
($fields) VALUES($placeholders)"); $stmt->execute($data); With the added bonus that you can insert multiple rows quickly without having to rebuild any queries... $stmt->execute($data1); $stmt->execute($data2); ... $stmt->execute($dataN); (And PDO is super-fast compared to some

Re: [PHP] bit wise math? Is there a function to easily return the bits?

2007-01-25 Thread Jon Anderson
ted to see if I could write it in few LOC.) I wonder if there's a faster way... jon blackwater dev wrote: Is there a php function I can call to pass in a number and get the values returned? For example, pass in 7 and get 1,2,4 ? Thanks! -- PHP General Mailing List (http://www.php.

Re: [PHP] most powerful php editor

2007-01-24 Thread Jon Anderson
queries is like writing code like "if ($var) { statement; statement; statement; foreach ($var as $v) { statement; statement; statement; } statement; etc. }" jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] md5

2007-01-17 Thread Jon Anderson
poosible alternatives (mcrypt?) sha1 has also been cryptanalysed but should be more secure than md5. I think sha256 is believed to be secure. PHP 5.2 seems to have a 'hash' function that can generate many atypical hashes like sha256. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Script's length, echo, and execution speed

2006-12-23 Thread Jon Anderson
er built-in. You can use kcachegrind or wincachegrind to see some pretty mind-boggling detail about where your performance goes. It's much easier than inserting timing statements into existing code. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Count empty array

2006-12-21 Thread Jon Anderson
to think of a logical reason why the second doesn't return an empty array. I know I could do a IF $data == "[empty]" and then not count if its empty and just set it to 0, but am wondering if there was a better way. $array = empty($data) ? array() : explode(',',$data); /* That what you're looking for? */ jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Trying to insert a large number from php to mysql

2006-12-20 Thread Jon Anderson
ring "integer" into an integer field. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Byte order Mark (BOM, UTF-8, Header)

2006-12-06 Thread Jon Anderson
rter about UTF-8 output. When I use Windows (which is rarely), I use Notepad++, which gives you the option to save files as UTF-8 with or without the BOM. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Process of creating invoices requiring human thought!

2006-11-28 Thread Jon Anderson
Period['start']) // freebie Of course you can probably think of dozens of variations on that theme, but you get the idea. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] security question

2006-11-22 Thread Jon Anderson
g sensitive in a database, one-way hashed wherever possible. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Space in regex

2006-11-16 Thread Jon Anderson
t; [Test 1|Test 2] [1] => Test1 [2] => Test2 ) Alternately, I would use the following regex: /\[([^\|]+)\|([^\|]+)\]/ which is a little cryptic, but very flexible for what you mention above. It works for me as well... jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] cURL uses

2006-11-15 Thread Jon Anderson
to use curl, rather a reason to use curl will find you. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to output an MP3 file?

2006-11-15 Thread Jon Anderson
Brian Dunning wrote: header('Content-Type: application/octet-stream'); What should I change? I think you should use a content type more specific to MP3s. My install of firefox seems to think the appropriate content type for those is "audio/mpeg" - try that, and see

Re: [PHP] one click - two actions?

2006-11-14 Thread Jon Anderson
R->addAssign('logoDiv','innerHTML',''); $xR->addAssign('textDiv','innerHTML','Here is an explanation of the logo!'); return($xR->getXML()); } $xajaxInstance->registerFunction('twoActions'); Then the link: Logo jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP product licensing...

2006-11-12 Thread Jon Anderson
but make sure that commercial use is appropriately controlled at the same time. Please reply to the list only, no need to cc. Cheers, jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pdo and mysql 5

2006-11-10 Thread Jon Anderson
I haven't had any problems so far. A superficial look at the docs only says 3/4, but from experimental evidence, 5 seems fine. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] why so slow?

2006-11-03 Thread Jon Anderson
Richard Lynch wrote: On Fri, November 3, 2006 1:12 pm, Jon Anderson wrote: Or you can .htaccess "Deny From All" them out... That's my preferred solution. It keeps the include tree near the code that accompanies it without risking anything even if they're called *.p

Re: [PHP] why so slow?

2006-11-03 Thread Jon Anderson
lution. It keeps the include tree near the code that accompanies it without risking anything even if they're called *.php. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP & Memory Allocation (checked via TOP)

2006-10-31 Thread Jon Anderson
s showing you that it's allocating 19 megs...? Seems about right. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How does the Zend engine behave?

2006-10-25 Thread Jon Anderson
Take this with a grain of salt. I develop with PHP, but I am not an internals guy... [EMAIL PROTECTED] wrote: Are the include files only compiled when execution hits them, or are all include files compiled when the script is first compiled, which would mean a cascade through all statically lin

Re: [PHP] connectivity weirdness

2006-10-20 Thread Jon Anderson
For what it's worth, for me telnet php.net 80 (then GET ...) takes ~25 seconds, most of which seems to be the reverse lookup. If I just telnet directly to php.net's IP directly and do the same, it's instant. Doing file_get_contents takes less than 1s numerically or not. jon (R

Re: [PHP] What is the smallest, fastest web server to run PHP and SSL (on a soekris box)

2006-10-18 Thread Jon Anderson
ocesses appear to be using 36M. You could probably cut that down to however few processes you need. jon Daevid Vincent wrote: I need to run a httpd server that can serve up PHP, SQL Lite, and SSL on a little Soekris box (ie. a 486 with 32MB RAM and 32MB CF storage). Can anyone recommend some

Re: [PHP] PHP Denial of service

2006-10-13 Thread Jon Anderson
resources. (If your server is running on Linux, iptables should be able to do what you need, and there are more complicated solutions too.) jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Send process to background

2006-10-13 Thread Jon Anderson
nd deleted later. That isn't pretty though... jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Memory

2006-10-12 Thread Jon Anderson
Maybe I'm doing my math wrong here, but for 1 to 9, make a string 9 bytes long, 10 including terminating null. (And PHP probably includes a little extra for overhead)... 9 * 10 bytes = 90 bytes -> that's about 9 and a half gigs... jon Doug Fulton wrote

Re: [PHP] MySQLDump and master/slave Behavior

2006-10-03 Thread Jon Anderson
See above. I put my sql dump scripts into simple bash scripts that run from cron, but if you're more comfortable with PHP, I don't see any reason to switch nor to break it out. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Alternative to FCKeditor

2006-09-24 Thread Jon Anderson
ut if you can't use FCK, you could try it. http://tinymce.moxiecode.com/ jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Object to array conversion oddity

2006-09-23 Thread Jon Anderson
;getName(); $propArray[$name] = $this->$name; } } return($propArray); } And that'll do essentially what you're asking for. You could just call it toArray() too, and even check for isPublic/isPri

Re: [PHP] Object Memory Leakage...

2006-09-22 Thread Jon Anderson
nd is 32-bit. Cheers, jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Object Memory Leakage...

2006-09-22 Thread Jon Anderson
8608 bytes exhausted (tried to allocate 1 bytes) in /home/janderson/svn/memtest.php on line 44 Am I missing something? (Is there a force_garbage_collection() function somewhere that I'm missing?) Any suggestions/workarounds/anything would be most appreciated. Cheers, jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Frustrated trying to get help from your site

2006-09-18 Thread Jon Anderson
e. I honestly think that the PHP coders/documentors deserve a lot of gratitude for the immense effort that must have gone into documenting the immense list of built-in stuff that PHP has. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] security include from remote server

2006-09-15 Thread Jon Anderson
e any open-source encoders, but I wouldn't be surprised either way. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] security include from remote server

2006-09-14 Thread Jon Anderson
erver/code.php.txt)...Seems to me that you might be better off using an encoder of some kind so they don't get their hands on the source. Using what I suggested is in no way secure or fast. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Iteration through letter

2006-09-14 Thread Jon Anderson
1 is 'AA' Because of how string comparisons go, 'AA' is greater than 'Z' (strings are compared letter by letter), so the loop won't terminate at 'Z', like you'd expect. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] security include from remote server

2006-09-14 Thread Jon Anderson
nts('http://server/code.php.txt'); file_put_contents('/tmp/code.php',$src); include('/tmp/code.php'); unlink('/tmp/code.php'); But there are at least a few reasons why I wouldn't recommend doing that... jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question on explode and join.

2006-09-13 Thread Jon Anderson
t "you are a moron." won't. Any ideas? $filtered = str_ireplace(array('naughty','words'),array('*','*'),$_POST['input_string']); jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Newbie question about

2006-09-11 Thread Jon Anderson
D5/Linux 2.6.17.7/Apache 2.2.3/PHP 5.1.6/APC 3.0.12p2. Anyone else's results would probably vary widely. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Newbie question about

2006-09-10 Thread Jon Anderson
ect output: 582 requests a second Buffer var: 286 requests a second I believe the margin would get wider with real-world usage, as the buffer variable would increase in size. My test code is copied below. jon --- "Direct output": testecho.php --- style1 { a = 1; b = 2; c

Re: [PHP] Memcache function usage

2006-09-09 Thread Jon Anderson
try to and compress), what do I put for flags to allow me to use the extra expire parameter? Just pass NULL or 0 as the flags argument, and pass the expiry time as usual. E.g. $obj->add/set($var,$val,0,$expiry) jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] Re: How to add user to linux using php

2006-09-08 Thread Jon Anderson
Michelle Konzack wrote: Am 2006-09-05 08:36:21, schrieb Jon Anderson: Or create a simple shell/perl/php/whatever wrapper for adduser, and allow sudo for that wrapper by the web server user only. For example, you could create a wrapper that only allows one alphanumeric argument for the

Re: [PHP] Is this unsecure?

2006-09-05 Thread Jon Anderson
uot; that is the appended letters, by brute-forcing combinations of "1>". It seems to me that collisions don't help. Please correct me if I'm wrong - I'm definitely no cryptographer. ;-) jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to add user to linux using php

2006-09-05 Thread Jon Anderson
wrapper could use defaults like /home/webusers/, and /bin/false as the shell, etc, etc. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to add user to linux using php

2006-09-04 Thread Jon Anderson
useradd or your distribution's variant. Worst case, you can even make a wrapper around the command with shell script that'll do the multiline echo for you. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Texture and wrap

2006-08-31 Thread Jon Anderson
m a "3d-ish look"ing object...? I'm not familiar with any way of doing it, but: - http://pear.php.net/package/Image_3D might be a start - http://www.icarusindie.com/DoItYourSelf/rtsr/php3d/ has a pretty neat little writeup on how to do software 3D rendering in PHP. You could use t

Re: [PHP] Re: character set when sending emails with PHP

2006-08-30 Thread Jon Anderson
uivalent. The classes mentioned earlier probably accomplish this. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] S: function to remove & break URLs

2006-08-27 Thread Jon Anderson
is, but it's an interesting idea. Anyone want to share some spam-fighting success stories? jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mail reply-path

2006-08-15 Thread Jon Anderson
bob pilly wrote: Im trying to send emails using the mail() function but im having a problem. Because the box that the scripts sit on is a shared web-hosting package the Reply-path part of the header always comes up as [EMAIL PROTECTED] but i have set the from part of the header to [EMAIL PROTE

Re: [PHP] AES client side

2006-07-31 Thread Jon Anderson
t even have to alter the code. They can simply use the man-in-the-middle attack, and I don't think anyone would bother writing certificate handling functions in JavaScript to authenticate each party. :-) jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] AES client side

2006-07-31 Thread Jon Anderson
;t thought of, etc.) where you either can't or might not want to use SSL. Though as myself and others have said, SSL should clearly be the preferred option. The question isn't whether it should be done, but whether it could. ;-) jon -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] AES client side

2006-07-31 Thread Jon Anderson
ty listening in on the information is unable to trivially reconstruct the key. See: http://en.wikipedia.org/wiki/Diffie-Hellman jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] AES client side

2006-07-31 Thread Jon Anderson
Jay Blanchard wrote: This still leaves any Javascript exposed, doesn't it? Yes, but that shouldn't matter. The algorithms for RSA, AES, etc, etc are all publicly available, why bother hiding their JavaScript implementations? Only the data would be encrypted. jon -- PHP Gener

Re: [PHP] AES client side

2006-07-31 Thread Jon Anderson
client/server reversed. SSL is obviously the recommended, trusted, proven, and accepted way of sending secure data, but there could potentially be cases where someone would want to try something else. It's not that it can't be done, it's more that there's no reason to do i

Re: [PHP] AES client side

2006-07-31 Thread Jon Anderson
mplemented properly, encryption/decryption on the client could be secure, for example a diffie-hellman key exchange with AJAX, followed by encryption. jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] APC - problems with CLI & odd return values from apc_clear_cache()

2006-07-28 Thread Jon Anderson
on every CLI request, but for various test scenarios it is handy to be able to enable APC for the CLI version of APC easily. jon Jochem Maas wrote: hi people, PHP version:5.1.1 (last built: Dec 28 2005 16:03:22) APC version:3.8.10 Apache version: 2.0.54 (last built

Re: [PHP] APC + "Fatal error: Cannot redeclare class..."

2006-07-26 Thread jon
Thanks man... it turns out that I really was redeclaring the class, but it didn't throw an error until I added APC. Kinda weird, yeah? Anyway... it's all good now. -- jon Jochem Maas wrote: jon wrote: So... I've got some code that works just fine without APC, but die

[PHP] APC + "Fatal error: Cannot redeclare class..."

2006-07-26 Thread jon
n that box, but I'd love to try APC. Thanks... -- jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Error Reporting for file commands

2006-07-25 Thread Jon Anderson
You could try prefixing the unlink function call with an @: if (file_exists($fn)) { @unlink($fn); } The @ should suppress any errors. jon James Nunnerley wrote: We've created a file manager which allows users to access their web space on a server. It's working brilliantly, exce

Re: [PHP] captcha and blacklist

2006-07-25 Thread Jon Anderson
ock IPs without using a PHP solution, you could hack something together with your platform's native firewall utility (e.g. iptables/netfilter for Linux). It seems to me that DNS would be even more of a kludge. I believe that memcache or SQL would be a significantly cleaner solution. jon

Re: [PHP] UTF-8 With content-type text/xml problem.

2006-07-21 Thread Jon Anderson
\n"; print " " . mb_convert_encoding($_GET['test'],'UTF-8') . "\n"; print "\n"; I tried this with: 會意字/会意字, which I stole from Wikipedia. I don't have a clue what it means. jon Mathijs wrote: Hello ppl, I have a big prob. I have a

Re: [PHP] Setting cookie on one domain for an other domain

2006-07-20 Thread Jon Anderson
in2, which would be allowed to set the domain2 cookie by virtue of actually being domain2. jon Peter Lauri wrote: Best group member, When a user does a specific action on domain1.com I want a cookie to be set so that domain1.com and domain2.com can reach it. Ok, after reading the manual for

Re: [PHP] User defined function problem

2006-07-18 Thread Jon Anderson
Oh, and the other obvious thing that I omitted would be to try using either the include_once() and require_once() functions wherever you include() or require() config.php. jon Stephen Lake wrote: Hey Guys and Gals, I am having a small problem with a user defined function, I placed it in a

Re: [PHP] User defined function problem

2006-07-18 Thread Jon Anderson
This would be the simplest work-around I can think of. In your config script, wrap an if around your function call: if (!function_exists('clean_sql')) { function clean_sql() { ... } } jon Stephen Lake wrote: Hey Guys and Gals, I am having a small problem with a us

[PHP] Re: url obfuscation

2006-07-13 Thread Jon Drukman
Dan McCullough wrote: For me it doesnt matter I dont want Google in the section that I'm obfuscation. use nonsequential ids (as you do) and a robots.txt file to stop google (and any search engine that obeys robots.txt) http://www.robotstxt.org/wc/exclusion.html also google has a thing called

Re: [PHP] working on a template system...

2006-06-28 Thread Jon Anderson
elf in the foot with a PHP template. (Again, I have nothing against Smarty or other template systems. I use Smarty all the time, and I quite like it.) jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] working on a template system...

2006-06-28 Thread Jon Anderson
ssign('display_variable',$display_variable); ... {* template *} {foreach key=key item=var from=$display_variable} {$key}{$var} {/foreach} /* The PHP way */ $var) { ?> Is it really *that* bad? jon Martin Alterisio wrote: 2006/6/28, Robert Cummings <[EMAIL PROTECTED]>: O

Re: [PHP] templating

2006-06-22 Thread Jon Anderson
e recommend a simple one or should I tell him to just use str_replace() for tags like: {{menu_here}} {{header_here} etc? Something like SMARTY would be like using a nuke to kill a fly (IMHO) esp since this project will not expand to anything much bigger or complicated. Why kill performance when you don&

Re: [PHP] shutting down a web app for maintenance

2006-06-20 Thread Jon Anderson
ing like: Down for MaintenanceSite down for maintenance! (Or, to be sure, you could do both.) jon Ben Liu wrote: Hello All, I'm not sure this is strictly a PHP related question or perhaps a server admin question as well. What do you do when you are trying to shutdown a web applica

Re: [PHP] Still trying to figure this out...

2006-06-19 Thread Jon Anderson
John Nichel wrote: P I never close my option tags that way Bar :-p I didn't think this would compute as proper XHTML...Sure enough validator.w3c.org says: Error /Line 10 column 10/: character data is not allowed here. |*t*est| You have used character data somewhere it is not

Re: [PHP] File Download Headers

2006-06-15 Thread Jon Anderson
rong content type; if (IE 5.5) { use broken content disposition; } else { use normal content disposition; } } else { do things in a standard way; } jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using PHP/HTML effectivly

2006-06-14 Thread Jon Anderson
d both are readable. (Same result as what Smarty gives you, without needing Smarty.) Most pages look something like: And most templates look something like: ... ... Thanks for your interest in my data! jon Alex Major wrote: Hi List, I've been (very slowly) working my w

Re: [PHP] binary zero evaluates as true!?

2006-06-08 Thread Jon
Are you sure you are evaluating your binary '' properly as you claim? Send a sample code alrightey then. the binary data itself is actually stored in a mysql table. (mysql 5.1.9) the relevant part is the following column: ++- | Field | Type +---

[PHP] binary zero evaluates as true!?

2006-06-08 Thread Jon
Seriously guys... am I completely missing something important here? An empty array evaluates as false. The null character evaluates as false. The STRING "0" even evaluates as false yet a binary zero does not? Even better yet bindec() doesn't appear to be binary safe so it will work for a st

[PHP] Re: PHP/Dreamweaver CSS issue

2006-05-12 Thread Jon
The Doctor wrote: I am trying to modularize a Web Page using one of Dremweaver's CSSes. It works in Firefox but it falls about in IE. Is IE at fault or the modularization? It is neither Firefox's fault nor the concept of modularization. The fault is probably 55% IE's and 45% dreamweaver's.

Re: [PHP] php.dev, network timeout??

2006-05-12 Thread Jon
chris smith wrote: On 5/13/06, Jon <[EMAIL PROTECTED]> wrote: This isn't strictly a php question. Its actually a question about the mailing lists in general. I know I must be doing something really stupid but I seem to be having a lot of problems with network timeouts while b

[PHP] php.dev, network timeout??

2006-05-12 Thread Jon
et to successfully make a connection there. Can anyone give me some good advice on how to fix this problem? I'm using thunderbird to browse. Thanks in advance, ~jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with usort

2006-05-04 Thread Jon Earle
Rabin Vincent wrote: > You're missing the $ for ret_val on the return line. Clue-by-four to the head accepted. Thank you, it works well, now that it's written properly. Cheers! Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Problem with usort

2006-05-04 Thread Jon Earle
7;m not the most experienced PHP coder so perhaps some esoteric feature of the language has confounded me. Open to liberal use of the clue by four. :) Cheers! Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] permissions

2006-04-21 Thread Jon Anderson
,Deny Deny From All See: http://httpd.apache.org/docs/2.0/howto/htaccess.html, http://httpd.apache.org/docs/2.0/mod/core.html#files, and http://httpd.apache.org/docs/2.0/mod/core.html#filesmatch jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

Re: [PHP] proc_open and unix pty support

2006-04-04 Thread Jon
it's disabled. I removed the 0 >&& and recompiled, >after which the pty option works perfectly. Just a >note. except that it doesn't say WHERE in the source. I can't find it. #if 0 && shows up about a million times. anyone got any advice? I swear i

[PHP] Re: mysql_fecth_array() and function call as parameter

2006-04-03 Thread Jon Drukman
Paul Goepfert wrote: I included the or die function on the end of my query statement. When I tested this on my web page I got the following error Query2 Failed: You have an error in your SQL syntax near '(curdate())' at line 1 When this code executed: $query2 = mysql_query("SELECT dayNum FRO

[PHP] proc_open and unix pty support

2006-04-03 Thread Jon
Has anyone worked with ptys using proc_open? I want to try it out but it appears to be disabled at the source level and I don't know how to re-enable it. Any info at all is appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: mysql_fecth_array() and function call as parameter

2006-04-03 Thread Jon Drukman
Paul Goepfert wrote: function determineDay () { $return = ""; $query1 = mysql_query("SELECT months FROM Month WHERE m_id = month(curdate())"); $query2 = mysql_query("SELECT dayNum FROM Days WHERE dayNum = day(curdate())"); $

<    1   2   3   4   5   6   7   8   9   10   >