Re: [PHP] session_regenerate_id() - Call to undefined function

2003-06-26 Thread Gerard Samuel
PHP 4 = 4.3.2 D. R. Hansen wrote: I am getting a Call to undefined function when invoking session_regenerate_id(). No typos -- I've checked. Fatal error: Call to undefined function: session_regenerate_id() in /path_to_my_script/resetsession.php3 on line 5 Running PHP 4.3.1 on RH 8.0 and

[PHP] Passing objects into methods or functions

2003-06-23 Thread Gerard Samuel
Im trying to pass an object into functions and class methods, and for some reason, Im unable to access the object's methods. When I var_dump() the object, its a valid object with the function or class method. When I check via get_class_methods, all the methods are there, from within the function

[PHP] When to escape slashes, and when not to???

2003-06-19 Thread Gerard Samuel
I have a class method that does one thing and one thing only. Escape characters before going to the DB. Part of it is - if (!get_magic_quotes_gpc()) { $string = pg_escape_string( $string ); } return ' . $string . '; In everyday get/post operation it seems to work flawlessly. I've come across a

Re: [PHP] php editor?

2003-06-14 Thread Gerard Samuel
Because some of us, work directly on the server, instead of modifying files, then uploading to the server to test :) electroteque wrote: boy how painfully dweebish is vi why make it harder for yourself :O -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] header() and mozilla - HELP!

2003-06-13 Thread Gerard Samuel
Im assuming you are running mozilla 1.3.x Its not a php issue but a mozilla bug, that I've experienced first hand http://bugzilla.mozilla.org/show_bug.cgi?id=202210 deno vichas wrote: i'm runnig into a random problem of having all the headers being displayed instead on the actual web page in

[PHP] Regex for Browser Versions

2003-06-06 Thread Gerard Samuel
Im trying to pull the Mozilla version and *possibly* the MSIE x.xx string out $_SERVER['HTTP_USER_AGENT'] If I did this correctly, (MSIE\s\d\.\d{1,2})? should mean that if its there pull it out, else move on, since its not there. When viewing this script via a windows browser, it doesn't match

Re: [PHP] Re: Regex for Browser Versions

2003-06-06 Thread Gerard Samuel
True, but since the code is being run by 3rd parties, I don't have a guarantee that the browsecap.ini file is available on the server. Monty wrote: Maybe it might be easier to just use the get_browser() function: http://www.php.net/manual/en/function.get-browser.php Monty -- PHP General

Re: [PHP] Making a PHP Script Very Cache Friendly

2003-06-03 Thread Gerard Samuel
Gerard Samuel wrote: Searching through the archives, most people are running away from caching php scripts. Im trying to do the opposite. I have a script that fetches css files. Im trying to add header() calls to it so that browsers can cache it like a normal css file. This is what I have

[PHP] Making a PHP Script Very Cache Friendly

2003-06-02 Thread Gerard Samuel
Searching through the archives, most people are running away from caching php scripts. Im trying to do the opposite. I have a script that fetches css files. Im trying to add header() calls to it so that browsers can cache it like a normal css file. This is what I have at the top of the file -

[PHP] Control over your Session

2003-03-10 Thread Gerard Samuel
-- Gerard Samuel http://www.trini0.org:81/ http://test1.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Control over your Session

2003-03-10 Thread Gerard Samuel
to session_unregister it. Gerard Samuel wrote: Got a problem thats baffling me. I have a form that includes a file that starts a session. Creating sessions are no problem, but deleting the session variable is not working as its supposed to. Sudo code - ?php include('some_file.php'); // This file starts

Re: [PHP] http benchmark tools

2003-03-04 Thread Gerard Samuel
request, but couldn't find one. Is there such a tool? Thanks, Arpi -- Gerard Samuel http://www.trini0.org:81/ http://test1.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] ob_gzhandler problems under 4.3.0???

2003-02-21 Thread Gerard Samuel
be a compressed page. /html body - Error reported - This should be a compressed page. Warning: (null)() [ref.outcontrol]: output handler 'ob_gzhandler' cannot be used twice in Unknown on line 0 -- Gerard Samuel http://www.trini0.org:81/ http://test1.trini0.org:81

Re: [PHP] ob_gzhandler problems under 4.3.0???

2003-02-21 Thread Gerard Samuel
is not already started. ?php // start output buffering if it is not already running if (0 == ob_get_level()) { ob_start('ob_gzhandler'); } ? You may want additional logic that checks to see if the output buffer hander is ob_gzhandler. Jsaon -- Gerard Samuel http

[PHP] Sessions and IP ports

2003-02-18 Thread Gerard Samuel
Has anyone noticed that different port numbers creates additional session ids? So if someone is browsing the site, and the remote port number changes, additional sessions are created... Is this the expected behaviour??? www.xxx.yyy.zz,3941 www.xxx.yyy.zz,3940 -- Gerard Samuel http://www.trini0

[PHP] session_cache_limiter with Internet Explorer

2003-02-05 Thread Gerard Samuel
it under php 4.2.3 and 4.3.0 on FreeBSD/Apache and WinXP/Apache. Any suggestions would be appreciated. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Internet Explorer cache friendly headers?

2003-02-05 Thread Gerard Samuel
? Are there any alternatives to using session_cache_limiter() that is friendly with all browsers? Any pointers would be appreciated. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] stripslashes and quoted material

2003-01-08 Thread Gerard Samuel
. Any idea as to why stripslashes would not remove the slashes in the string? Thanks for any input. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] stripslashes and quoted material

2003-01-08 Thread Gerard Samuel
I figured out the problem. magic_quotes_sybase was turned on, on the IIS box. All is well with stripslashes() again. Chris Wesley wrote: On Wed, 8 Jan 2003, Gerard Samuel wrote: a href=\http://www.apache.org/\; target=\_blank\ When trying to apply stripslashes, the slashes remained. So I

[PHP] Dynamic Regex

2003-01-08 Thread Gerard Samuel
= '#\[this\](.*?)that#'; The second syntax of $foo works. I was wondering on the meaning of # in the string?? Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Dynamic Regex

2003-01-08 Thread Gerard Samuel
= '/\[this\](.*?)that/'; the code you tried uses # as the delimiter instead of /, an option preg_* allows Take care, Greg -- phpDocumentor http://www.phpdoc.org Gerard Samuel [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The example doesn't have to make sense, but Im

Re: [PHP] Re: Dynamic Regex

2003-01-08 Thread Gerard Samuel
url\]/ as closing information, and probably giving an odd error about u not being appropriate that's why # worked, because there were no other # in the string. Hope that answers the question (properly this time!) Take care, Greg - Original Message - From: Gerard Samuel [EMAIL PROTECTED

Re: [PHP] session_destroy problem

2003-01-08 Thread Gerard Samuel
the session still hangs around. Is there something I don't know about sessions? I have read the documentation on the session_destroy function, I don't think that I am missing anything... Anyone have any suggestions? I am totally confused. Thanks Ken -- Gerard Samuel http://www.trini0.org:81

[PHP] Sessions and AOL

2003-01-03 Thread Gerard Samuel
I was wondering, if for example, an AOL user browses your site that uses php sessions, do the session ids change when they hop ip addresses? Im looking for a better way to counteract AOL's ip jumping. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General

Re: [PHP] Sessions and AOL

2003-01-03 Thread Gerard Samuel
experience, with the ip address jumping phenomena. Mark Charette wrote: From: Gerard Samuel [mailto:[EMAIL PROTECTED] I was wondering, if for example, an AOL user browses your site that uses php sessions, do the session ids change when they hop ip addresses? No. Sessions are not (or should

[PHP] Reject some?

2002-12-16 Thread Gerard Samuel
you may provide... -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to handle so called expired sessions??

2002-12-03 Thread Gerard Samuel
. If it's expired because you think it's too old, then you track your own timestamps and do your own cleanup. Is that what you're saying? ---John Holmes... -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] How to handle so called expired sessions??

2002-12-02 Thread Gerard Samuel
is still good, the next page load logs me back in. How do the people who use sessions handle this type of scenario?? Thanks for any insight you may provide... -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] How to handle so called expired sessions??

2002-12-02 Thread Gerard Samuel
insight you may provide... GS -- GS Gerard Samuel GS http://www.trini0.org:81/ GS http://dev.trini0.org:81/ Do your own session timing by storing a last access time in sessions and check the duration yourself, if it is over the timeout you want delete the session data and start again. That way

Re: [PHP] Logging out and session ids

2002-11-29 Thread Gerard Samuel
as the data associated with the old session is gone. If that is the case, then the setcookie() call to destroy the clien't cookie probably isn't neccessary. If you close the browser and start a fresh one you will get a new session id. -- Gerard Samuel http://www.trini0.org:81/ http

[PHP] Sessions not written to db on windows...

2002-11-29 Thread Gerard Samuel
expires after n minutes. session.cache_expire = 180 ; use transient sid support if enabled by compiling with --enable-trans-sid. session.use_trans_sid = 0 url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81

[PHP] Logging out and session ids

2002-11-28 Thread Gerard Samuel
name in /tmp and cookie manager in mozilla). My question is, even though the session contains no data after its destroyed, should the session id remain the same, after logging out, or should another be assigned when session_start() is called after the redirect??? Thanks -- Gerard Samuel http

[PHP] preg_replace wierdness

2002-11-22 Thread Gerard Samuel
(). But if I break $foo into multiple lines like - $foo = 'img src=images/php.png img src=images/apache.png'; It works... Any tips would be appreciated... Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] PHP and UTF-8

2002-11-12 Thread Gerard Samuel
List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Resource type numbers

2002-11-11 Thread Gerard Samuel
script is able to to recieve a +OK from the pop3 server but the other file is getting an empty string. Is there a difference between 1 and 38?? Thanks... --- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] Socket Connections Was: Re: [PHP] Resource type numbers

2002-11-11 Thread Gerard Samuel
to do, (I have no experience with this), is it correct to assume, that with each attempt to talk to the server, a new connection must be made to read data from it?? If you want more info, feel free to ask... Thanks Gerard Samuel wrote: Im debugging a script that opens a connection to a pop3

Re: [PHP] Re: Your opinion on globals/reference

2002-11-04 Thread Gerard Samuel
: www.depannekoekendekale.nl Gerard Samuel [EMAIL PROTECTED] schreef in bericht news:3DC54436.2090803;trini0.org... Something I just thought of about using global in a function. Mostly I global objects in a function like - function foo() { global $bar_object; $bar_object-do_something(); } Is it better, more

[PHP] Your opinion on globals/reference

2002-11-03 Thread Gerard Samuel
-do_something(); } Thanks for your thoughts... -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Geographic IP location

2002-11-03 Thread Gerard Samuel
look pretty decent. http://www.geobytes.com http://www.serviceobjects.com/products/dots_ipgeo.asp Thanks for any input, olinux __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- Gerard Samuel http://www.trini0

Re: [PHP] ^M at the end of each line when I use php to write file

2002-11-01 Thread Gerard Samuel
? Brandon Orther WebIntellects Design/Development Manager mailto:brandon;webintellects.com [EMAIL PROTECTED] 800-994-6364 http://www.webintellects.com/ www.webintellects.com -- Gerard Samuel http://www.trini0.org:81

[PHP] xml parser breaking on legal xml chars

2002-11-01 Thread Gerard Samuel
; } function character_handler($xmlparser, $data) { echo 'Data -- ' . $data . \n; } function close_Parser() { xml_parser_free($this-xmlparser); } } ? - Thanks for any input you may provide. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0

[PHP] My 2cents on xml/php

2002-11-01 Thread Gerard Samuel
This is not meant to put down the php/xml combo. Just putting down my 2 cents from my experience thus far, into the archive for anyone else looking for info. I just started getting deep into parsing xml yesterday, and the dust has just begun to settle. Im parsing rss files versions 0.91 - 2.0

[PHP] Regex Help

2002-10-29 Thread Gerard Samuel
-english type characters, or any workarounds to get a string into an array of words, where the string contains non english characters?? Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] running slow on Win2k

2002-10-07 Thread Gerard Samuel
a PIII-800 with 256MB RAM. It is otherwise a great machine, and fast. Any suggestions? Peter - - - - - - - - - - - - - - - - - - - - - Fourth Realm Solutions [EMAIL PROTECTED] http://www.fourthrealm.com Tel: 519-739-1652 - - - - - - - - - - - - - - - - - - - - - -- Gerard Samuel

Re: [PHP] form and php

2002-10-04 Thread Gerard Samuel
is Notice: Undefined variable: vartwo in c:\apache\htdocs\testphp1.php on line 9 the second variable is *** please help me, thank you -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing

[PHP] unlink() and IIS

2002-09-22 Thread Gerard Samuel
'] )) { if (!unlink($log)) { trigger_error('UNABLETORESETLOGFILE' , E_USER_WARNING ); } } Can anyone shed any light for me. Thanks for any insight you may provide. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http

Re: [PHP] Attack of the ghost double slash??

2002-09-21 Thread Gerard Samuel
this per script, because the slashes are added perior to the data being given to PHP, hence prior to your script's execution. Happy hacking. Chris Gerard Samuel wrote: A few months ago, I wrote a bit of code to stripslash() PATH_TRANSLATED on a w2k box, because, php was reporting

[PHP] Attack of the ghost double slash??

2002-09-20 Thread Gerard Samuel
know when paths contain double slashes on a w2k box, so that I can anticipate for them?? Thanks for any insight you may provide. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net

[PHP] Comments in code

2002-09-11 Thread Gerard Samuel
it. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Info into Class

2002-09-03 Thread Gerard Samuel
() { .. function outside_data($bar) { $this-bar = $bar; } .. } // class constructor here ... $class-outside_data($php); ? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] regex help

2002-09-01 Thread Gerard Samuel
); print($str); ? Any help would be appreciated. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Dumb Question

2002-08-31 Thread Gerard Samuel
And I feel foolish asking... What is meant by 'procedural code' ??? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dumb Question

2002-08-31 Thread Gerard Samuel
ogle. Type: "procedural code" You might want to check, "object-oriented" as well... I'm sure, you'll find helpful explanations... - E And I feel foolish asking... What is meant by 'procedural code' ??? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trin

Re: [PHP] Dumb Question

2002-08-31 Thread Gerard Samuel
/BeginSQL/beginSQL2_1.html and http://www.wdvl.com/Authoring/DB/SQL/BeginSQL/beginSQL2_2.html There may be other contexts that the term procedural could be used in, and if so it may have other meanings that I am not aware of -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org

Re: [PHP] flaking out on foreach

2002-08-27 Thread Gerard Samuel
; } ? Rendering only 6. That's it. Just 6. What am I missing here? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHPSESSID appended to URL on initial page load

2002-08-27 Thread Gerard Samuel
by compiling with --enable-trans-sid. session.use_trans_sid = 1 url_rewriter.tags = a=href,area=href,frame=src,input=src,form=fakeentry -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

[PHP] Output Compression output buffering..

2002-08-26 Thread Gerard Samuel
get an empty page, instead of the expected error page or the page hangs, depending on the browser. Has anyone gotten both forms of output control to work together without ill side effects?? Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing

Re: [PHP] Re: Output Compression output buffering..

2002-08-26 Thread Gerard Samuel
? regards Eric Gerard Samuel [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] In an included file, I have an error handler that is using the 'output buffering' trick to dump a page in progress to display the error page. I also happened to have a switch to turn on output

[PHP] Variable naming standards???

2002-08-13 Thread Gerard Samuel
A philosophical question Are there any standards to naming variables?? I was told that one should include a letter or combination of letters to describe a variable i.e. $sfoo = 'string'; // string $bfoo = true; // bool $nfoo = 10; // interger etc Thanks -- Gerard Samuel http

[PHP] Paying Job...

2002-07-25 Thread Gerard Samuel
may provide... -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Apache 2.0 + PHP

2002-07-15 Thread Gerard Samuel
PROTECTED] -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Development Tools

2002-07-10 Thread Gerard Samuel
(http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] HTTP1.1

2002-06-27 Thread Gerard Samuel
/a I briefly looked through through the specs, but it didn't say that links/urls shouldn't be formatted like the first example above... Any insight, would be grateful. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net

Re: [PHP] HTTP1.1

2002-06-27 Thread Gerard Samuel
be used. You can omit the http:// and the host name if you like. =C= * * Cal Evans * Journeyman Programmer * Techno-Mage * http://www.calevans.com * -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 12:40 PM To: php-gen Subject: [PHP

[PHP] base64_encode

2002-06-26 Thread Gerard Samuel
What other characters are possible from the output of base64_encode() except [A-Za-z0-9] ?? Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] base64_encode

2002-06-26 Thread Gerard Samuel
like + and /. 26+26+10+2=64 sounds right. HTH Andrew Braund -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Thursday, 27 June 2002 11:15 To: php-gen Subject: [PHP] base64_encode What other characters are possible from the output of base64_encode() except

Re: [PHP] closing a browser-window with php

2002-06-26 Thread Gerard Samuel
window at the correct location and the right size? thanks in advanced for your help!! nik crosina -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Stumped.

2002-06-24 Thread Gerard Samuel
on and there is no 'white space' before or after ?php ? Are there any other reasons why header() would fail while output buffering is off. Im running php 4.2.1 on FreeBSD 4.5-R p6 Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http

Re: [PHP] Stumped.

2002-06-24 Thread Gerard Samuel
or after ?php ? Maybe Im missing something. I think Ill put it aside and look at it when the brain is fresh... Thanks Erik Price wrote: On Monday, June 24, 2002, at 04:15 PM, Gerard Samuel wrote: Are there any other reasons why header() would fail while output buffering is off. Hm

[PHP] fsockopen

2002-06-24 Thread Gerard Samuel
with a HTTP/1.1 400 Bad Request Any help would be greatly appreciated. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fsockopen

2002-06-24 Thread Gerard Samuel
Worked perfectly. Thanks. Evan Nemerson wrote: Try fputs ($fp,GET .$url[path]. HTTP/1.0\r\nHost: . $url[host] . \r\n\r\n); Your old request looked like GET / HTTP/1.0\r\nHost:value_of_host/\r\n\r\n, hence the 400. On Monday 24 June 2002 17:40 pm, Gerard Samuel wrote: Im trying

[PHP] Escaping escaped chars

2002-06-20 Thread Gerard Samuel
('/\', '/\/\/\', $data); Im getting - Unexpected character in input: '\' (ASCII=92) state=1 I guess my str_replace() isn't correct. Am I going about the right way to double escape them. Thanks. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http

Re: [PHP] Escaping escaped chars

2002-06-20 Thread Gerard Samuel
up with one too many which is what the error is referring to. ..micahel.. On Thu, 2002-06-20 at 10:59, Gerard Samuel wrote: Im trying to move some binary strings from mysql to postgresql, and the binary strings has escape chars '\' in them. I was told to double escape them like so

[PHP] preg_replace

2002-06-16 Thread Gerard Samuel
' as it supposed to be. Any help would be appreciated. Thanks ?php define('_L_OL_HERE', 'here'); $foo = 'a href=there.com=_L_OL_HERE=/a'; $bar = preg_replace('/(=)([A-Z0-9_])(=)/e', ' . constant($2) . ', $foo); echo $bar; ? -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP

[PHP] printf()

2002-06-15 Thread Gerard Samuel
= 'should'; this('This %s work', $str); // work $str = 'is, a'; this('This %s just %s test', $str); // doesn't work So I guess, arguments passed to it has to be physical arguments, and not represented in a string. Am I banging my head on a wall with this?? Thanks -- Gerard Samuel http

Re: [PHP] printf()

2002-06-15 Thread Gerard Samuel
Well I figured out a solution. Using a combination of explode() to create an array from $bar, check to see if $bar is an array and feed the array to vprintf() Gerard Samuel wrote: Im trying to make a dynamic printf(). By that I mean - function this($foo, $bar) { if (strlen($bar

[PHP] regex

2002-06-11 Thread Gerard Samuel
. It is supposed to contain alpha numeric characters and '_' and '-'. Thanks for any input. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] regex

2002-06-11 Thread Gerard Samuel
Well Ive gotten (.*) and ([a-z]*[0-9]*_*-*) to work thus far as the first group. I would like to avoid option 1, and option 2 doesn't seem right Gerard Samuel wrote: Im expecting a string like foo.png. Im trying to replace 'foo' with another value that I have. Im trying this - $file

Re: [PHP] OO Question

2002-06-10 Thread Gerard Samuel
{ $this-two = new Two; $this-test = $this-two-test(); } } Can you do that? If so is that how you do it? Thanks. -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Date?

2002-06-09 Thread Gerard Samuel
: I added a comment to the FAQ: http://www.php.net/manual/en/function.date.php -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Date?

2002-06-09 Thread Gerard Samuel
will be in identifying where the user is. Probably the only truly reliable way is to ask them to tell you what their time zone is. Pretty much every other method will result in a percentage of inaccurate reporting - the degree of error will be dependant on the method chosen. CYA, Dave -- Gerard

[PHP] PEAR Benchmark other benchmark techniques??

2002-06-08 Thread Gerard Samuel
(Benchmark/Timer.php);| Warning: Failed opening 'Benchmark/Timer.php' for inclusion (include_path='.:/usr/local/lib/php') Also on a side note, I dont know much about benchmarking utilities, but what else is out there for windows/bsd?? Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0

[PHP] use of fsockopen

2002-06-05 Thread Gerard Samuel
(!feof($filehandle)) { $data .= fgets($filehandle, 1024); } } $cacheFile = fopen( _CACHEDIR. $cacheFile, w); fwrite($cacheFile, $data); fclose($cacheFile); fclose($filehandle); ? --- Does anyone see anything wrong with this code?? Thanks -- Gerard

Re: [PHP] use of fsockopen

2002-06-05 Thread Gerard Samuel
Oh I forgot to mention that its not writing any content to the cache file... Gerard Samuel wrote: Im trying to modify a script that fetches rss newfeeds. I was using fopen, but I decided to use fsockopen() for the timeout value. -- ?php $data = ''; $filehandle

[PHP] error handler

2002-06-04 Thread Gerard Samuel
/error.log'); if ($exit === TRUE) exit; } When I trigger and error with E_USER_ERROR, it executes error_display() but it continues to display the rest of the content for the page. I thought E_USER_ERROR stops execution of the script. Thanks for any input. -- Gerard Samuel http://www.trini0.org

Re: [PHP] displaying client IP address

2002-06-01 Thread Gerard Samuel
help would be much appreciated. Hugo -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Class/Objects

2002-05-31 Thread Gerard Samuel
-- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Class/Objects

2002-05-31 Thread Gerard Samuel
it makes more sense as you are passing a reference to $bar into $lcre - as long as your function is setup to accept this type of object and knows what to do with it. Mikey -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net

[PHP] php, javascript

2002-05-31 Thread Gerard Samuel
Just a general question. Is it possible to embed php in pure javascript/dhtml code?? I tried but it didn't work, not sure if it was me or its not possible. Thanks... -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net

[PHP] cache control and cookies...

2002-05-31 Thread Gerard Samuel
back. The cookie's lifetime is 1 month. Thanks -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Post 4.1.0 PHP

2002-05-30 Thread Gerard Samuel
been covered repeatedly, I've only just rejoined the list after a break from the relentless volume (of great, useful info). TIA Michael Hall [EMAIL PROTECTED] -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0

[PHP] Class/Objects

2002-05-30 Thread Gerard Samuel
); $bar-tpl_obj-do_this_for_me($bar); ? It works but was wondering if its 'legal' to use it like this - $lcre-db_obj-run_some_code($bar); $lcre-tpl_obj-do_this_for_me($bar); Im not extending the classes, just using them, so is what Im doing ok?? Thanks -- Gerard

Re: [PHP] File Upload

2002-05-29 Thread Gerard Samuel
set? Why doesn't this file get uploaded? Thanks! -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
I hope this makes sense to someone Im converting a script over to work with 4.1.x +. Im running php 4.1.2 on FreeBSD/Apache and I have 4.2.0 on w2k/IIS/Apache. I sent the script to a friend of mine who is running w2k/Apache with 4.2.0. He told me that the script isn't working for him but it

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
' are in $_POST. For some reason, this is working on my boxes with register_globals set to off. Martin Towell wrote: code snippets would be good, if possible -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 10:46 AM To: PHP Subject: [PHP] PHP new

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
to be with register_globals set to off. If its going to run on my box, it would be nice if it ran on everyone elses to. Lars Torben Wilson wrote: On Tue, 2002-05-28 at 18:05, Gerard Samuel wrote: Its a fairly long script but this is a basic rundown of the mechanics. some_page.php

Re: [PHP] PHP new super globals or something else??

2002-05-28 Thread Gerard Samuel
the database is set up to _dis_allow zero length strings... I'd suggest looking at the two database schemas to see if they're exactly to same -Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 29, 2002 11:30 AM To: PHP Subject: Re: [PHP] PHP new super

[PHP] image_create(), header.....

2002-05-24 Thread Gerard Samuel
Im trying to use dynamic buttons, and Im trying to figure out how to get around the header call. I figure use output buffering, but so far Ive only come up with errors. Anyone see a better way or any errors in my code. Thanks nb: Uncomment the echo() statement to get the error.

Re: [PHP] image_create(), header.....

2002-05-24 Thread Gerard Samuel
-Original Message- From: Gerard Samuel [mailto:[EMAIL PROTECTED]] Sent: Friday, May 24, 2002 2:37 PM To: PHP Subject: [PHP] image_create(), header. Im trying to use dynamic buttons, and Im trying to figure out how to get around the header call. I figure use output buffering

Re: [PHP] IMAGE CREATE() header problem

2002-05-24 Thread Gerard Samuel
Double check your file for the whitspace like the others have stated. I tried your example and had no problems with it... Dani wrote: Hi again, I have got this script : ?PHP //setup image $height = 200; $width = 200; $im = ImageCreate($width,$height); $white = ImageColorAllocate($im, 255,

<    1   2   3   4   >