Re: [PHP] IF statement madness

2003-03-14 Thread Ernest E Vogelsinger
onents and mantissa). Workaround: don't use floats if you want to hit a certain value at the spot: $i - $target, By God, the are equal in value."); } else { echo ("$i - $target, Eternal Damnation, they aren't equal!"); } } ?> -- >O

Re: [PHP] OT Inactivity Timeout

2003-03-14 Thread Ernest E Vogelsinger
uot;interactive" action that would cause the timeout to be extended), the javascript reload will immediately transfer the user agent to the "you're outta here" page. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] can't get any string replacements to clean this

2003-03-14 Thread Ernest E Vogelsinger
Correction - "$to" should of course read "$repl" :-& -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] can't get any string replacements to clean this

2003-03-14 Thread Ernest E Vogelsinger
quot;); $repl = array("\n", "\n", "\n", null); $str_cleaned = preg_replace($from, $to, $str_uncleaned); This construction should convert the occurrence of one or more successive newline combinations with a single newline character, and remove control characters at large

Re: [PHP] http_session_vars

2003-03-13 Thread Ernest E Vogelsinger
default filename is sess_. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem with string comparison

2003-03-13 Thread Ernest E Vogelsinger
At 23:11 13.03.2003, Charles Kline said: [snip] >On Thursday, March 13, 2003, at 05:08 PM, Ernest E Vogelsinger wrote: > >> - if your query is exactly as you sent it here you're missing a comma >> after >> the closing brack

Re: [PHP] Please Help with the Code

2003-03-13 Thread Ernest E Vogelsinger
uot; . "mma=" . urlencode($MM_UserAuthorization)); (b) just more secure and elegant is simply handing over the session: header ("Location: $FF_redirectLoginSuccess?" . session_name() . '=' . session_id()); The latter of course will only wo

Re: [PHP] Problem with string comparison

2003-03-13 Thread Ernest E Vogelsinger
" - before constructing the query make sure $attributes['nametofind'] is formatted correctly, esp. correctly escaping single quotes - when using double quotes to construct a string you don't need to escape single quotes. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] If 1 IF fails, do the rest anyway...

2003-03-13 Thread Ernest E Vogelsinger
ucts. To allow _all_ expressions to be evaluated you need to run all 3 by themselves, later comparing the results: $x1 = test1(); $x2 = test2(); $x3 = test3(); if ($x1 && $x2 && $x3) ... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http:/

Re: [PHP] time() question

2003-03-13 Thread Ernest E Vogelsinger
ation out again how >do I make it look like 2003-03-13 or a variant of that? [snip] http://www.php.net/manual/en/function.date.php -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mai

Re: [PHP] pop-up problem

2003-03-13 Thread Ernest E Vogelsinger
-[snip] You might use here - however note that this won't do _anything_ if JS is disabled. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is there any reason...

2003-03-13 Thread Ernest E Vogelsinger
x27;s. My vote: leave it as-is, and use ReplyToAll if you want to. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can't seem to be able to do a get request

2003-03-13 Thread Ernest E Vogelsinger
ou should at least transmit these lines: GET /lang_fr/ index.php HTTP/1.1 [CRLF] Host: www.myhost.com [CRLF] Accept: */* [CRLF][CRLF] where [CR] is a _complete_ CarriageReturn/LineFeed sequence "\r\n". Of course you may add more headers to it. You might also wan

Re: [PHP] removing appended chars - please help, quite urgent

2003-03-13 Thread Ernest E Vogelsinger
this one, therefore >this record isn't updated. Do any1 know how I can check for spaces here, >and remove them if present [snip] have a look at trim() -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vog

Re: [PHP] Follow-up to Hacker problem

2003-03-13 Thread Ernest E Vogelsinger
---[snip] Check the archives - within the last 2 days there was a thread about breaking up long words to avoid inappropriate posts to clutter the page layout. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP

Re: [PHP] Force refresh of graphic - how?

2003-03-13 Thread Ernest E Vogelsinger
); } ... I prefer to add a string generated by uniqid(), such as uniqid() uses the entropy generated by the opsys random device (if available) in an attempt to make this truly random. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsin

Re: [PHP] php errors while displaying database fields

2003-03-13 Thread Ernest E Vogelsinger
ined. PHP will return null in this case. Workaround: if (array_key_exists('REMOTE_ADDR'))... "Undefined variable": the variable you're using has not been defined and never been assigned to. PHP will return null in this case. Workaround: if (isset($page))... -- >

Re: [PHP] Threading objects

2003-03-12 Thread Ernest E Vogelsinger
on job, would then read the DB (or the toto file) and perform actions necessary. When done it would update some kind of status flag. On your website yo could display something like "187322 addresses scheduled for validation - 123499 to go", or something like that, just by reading

Re: [PHP] Creating an Array from a Multi-line string (Help appreciated)

2003-03-12 Thread Ernest E Vogelsinger
n, so i can have a 'for' loop going? [snip] If you are certain that the lines are separated by a CR you could simply use $phonearray = explode("\n", $_REQUEST['phones']); -- >O Ernest E. Vogelsinger (\)ICQ #1339403

Re: [PHP] Random String Generation

2003-03-12 Thread Ernest E Vogelsinger
-[snip] you _do_ have a stationery for that, do you? *g* -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] session id generation

2003-03-12 Thread Ernest E Vogelsinger
current secs and usecs (system time) and a pseudo-random number (see php_combined_lcg() in standard/lcg.c). If an entropy file is available (usually on unix systems) it uses the entropy to further randomize the digest. In a final step the digest is converted to a hex string. -- >O Ernest

Re: [PHP] Little Problem :)

2003-03-11 Thread Ernest E Vogelsinger
approach (see my last post): wordwrap() counts the width for the while string, while my regex just scans for words that are too long, leaving everything else alone. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing

Re: [PHP] Little Problem :)

2003-03-11 Thread Ernest E Vogelsinger
here's no drawback in not using nl2br (not adding ''s) since the inserted newline character will be visible as whitespace and allow the user agent to properly reformat the text within the area. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pop-up problem

2003-03-11 Thread Ernest E Vogelsinger
de ... when the JIT is enabled. > >On browsers where the JIT is disabled, only HREF is executed. [snip] No - if the onClick handler returns false, nothing will happen. That's the original reason for the onClick handler to be there - it can take co

Re: [PHP] imagejpeg and downloading images

2003-03-11 Thread Ernest E Vogelsinger
ill save the image at the server - he wants the browser to present the "Save As" dialog... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] imagejpeg and downloading images

2003-03-11 Thread Ernest E Vogelsinger
= ob_get_contents(); ob_end_clean(); // continue as outlined above header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment;filename="myfile.jpg"'); header('Content-Length: ' . $image_size); echo $img

Re: [PHP] seperate streetname from number

2003-03-11 Thread Ernest E Vogelsinger
return false here if no number is available in $address. Leading and trailing spaces are trimmed from $address and $number, either by the regular expression, or by the trim() function in case of a no-match. Note also that this will fail for US-style addresses like "9th street", moving

Re: [PHP] ok now my sessions are *not* timing out

2003-03-11 Thread Ernest E Vogelsinger
At 14:38 11.03.2003, freaky deaky said: [snip] >the js looks like: > >

Re: [PHP] Reading files over SSL using fopen or fsockopen

2003-03-11 Thread Ernest E Vogelsinger
- there's a lot more to it that just changing ports. Have a look at cURL - this will get you the task done, without effort. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] pop top off a multi dimensional array

2003-03-11 Thread Ernest E Vogelsinger
3] => 4 ) >how do I take off the top elements so I will only have three providers and >three priorities left? >If I do array_shift, it takes off all of the providers. [snip] You need to handle all subarray separately. -- >O Ernest E.

Re: [PHP] newbie: contents will not output

2003-03-11 Thread Ernest E Vogelsinger
fclose($fh); } This will work perfectly (if url-fopen-wrapper is enabled in your build anyway). -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ob_start -- output buffer problem

2003-03-10 Thread Ernest E Vogelsinger
gt;// get around calling anything at the *end* of a script. > >//ob_end_flush(); > > >class test { > ...etc [snip] This won't work anyway since your class test is declared after using it - it should be the other way 'round:

Re: [PHP] array question

2003-03-10 Thread Ernest E Vogelsinger
--- Possibly using array_keys()? $keys = array_keys($doo); echo "First key is \"{$keys[0]}\""; array_keys() comes in handy if you want to have random access to an associtive array without knowing the keys. -- >O Ernest E. Vogelsinger (\)ICQ #13394035

Re: [PHP] Displaying a file

2003-03-10 Thread Ernest E Vogelsinger
ation in it how to serve any file under program control. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] true, false

2003-03-09 Thread Ernest E Vogelsinger
tion block after your if-statement doesn't get executed this construction works just as it should. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Syntax query

2003-03-09 Thread Ernest E Vogelsinger
--[snip] From the docs: pg_fetch_object() returns an object with properties that correspond to the fetched row. It returns FALSE if there are no more rows or error. The behaviour of your code is expected if you looped either past the returned records, or there are no records r

Re: [PHP] Variable Undefined, even when global?

2003-03-08 Thread Ernest E Vogelsinger
At 01:53 09.03.2003, Ron Biggs said: [snip] >You are a god among men, Ernest. THANK YOU! [snip] Bless you :) Nope. You're welcome, -- >O Ernest E. Vogelsinger (\)ICQ #13394035

Re: [PHP] Array - Newbie question

2003-03-08 Thread Ernest E Vogelsinger
;AN" => array("ERIC Number", "EricAN", "SelAN", "AN", "AN «Annotation»",), "TI" => array("Title", "EricTI", "SelTI", "BT", "BT «Book Title»",), ); Then you may reference an element within a subarray: echo $EricCodesArray['TI'][2]; //should display "SelTi" Note that non-numeric array indices (a.k.a. associative arrays) a) should always be quoted, and b) are case sensitive. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] phorm (PHPMail) script setup problem...

2003-03-08 Thread Ernest E Vogelsinger
y first sight of your post I thought "RCONFIG" would mean "remote config", and if set to "no" this would mean to use a local config? Just an idea of an absolute outsider... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.a

Re: [PHP] no phun intended!!!

2003-03-08 Thread Ernest E Vogelsinger
think it's hilarious though... [snip] Hmm. Quite nice girls I'd say. But I'm sure they have better things in mind than to fuck just mod_perl... Would like to have them round my office anyway (esp. the dark one in the background). *sigh* -- >O

Re: [PHP] Variable Undefined, even when global?

2003-03-08 Thread Ernest E Vogelsinger
lkID + 1; // Adding 1 turns makes the index correspond to the template number. // $aColLen = count($lkColor); //.length $aColLen = test; //sizeof($lkColor); //.length echo "xxx\n"; //first option is blank // KeepGoing: //PHP does not have a line-label statement. Set up a tri

Re: [PHP] save to file

2003-03-08 Thread Ernest E Vogelsinger
le_data . "\r\n"); >//close the file > fclose($fp); [snip] The implode statement will indeed create a single line, that's what you tell it to do... if you want a line per value, you need to specify the newline separator, such as implode("\

Re: [PHP] file_exists() question

2003-03-08 Thread Ernest E Vogelsinger
oc" <== will not work "cherpdocs/{$object->docname}.doc" <== will work Note that you should quote non-numeric array indices to allow PHP to recognize it's not a defined value. Omitting quotes for index data would trigger a warning (something like 'using unknown

Re: [PHP] Deleting Files

2003-03-08 Thread Ernest E Vogelsinger
-[snip] Sorry, just saw you wanted to DELETE the files... It's "unlink($filename);" Note you need to have write access to the directory (not only the file) to delete it. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http:

Re: [PHP] Deleting Files

2003-03-08 Thread Ernest E Vogelsinger
-[snip] file_exists($filename); -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Really simple question - /php directory above /web tree .htaccess contents

2003-03-08 Thread Ernest E Vogelsinger
ves read http://httpd.apache.org/docs/mod/directives.html. HTH, -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mining a file for data

2003-03-08 Thread Ernest E Vogelsinger
Dear Hugh, please don't use background colors. Black text on darkblue background is definetely hard to decipher. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

Re: [PHP] PHP removing data...

2003-03-08 Thread Ernest E Vogelsinger
le quotes - some user agents seem to require this although it's not required by RFC (RFC822, RFC2183). Since doing this it always works for me :) -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

php-general@lists.php.net

2003-03-08 Thread Ernest E Vogelsinger
left or right: << left shift ($a << $b means shift bits of $a $b-times to the left) e.g. 4 << 1 = 8 (0000 0100 << 1 = 0000 1000) >> right shift ($a >> $b means shift bits of $a $b-times to the right) e.g. 4 >> 1 = 2 (

php-general@lists.php.net

2003-03-08 Thread Ernest E Vogelsinger
p;& 2 yields true 5 & 2 yields 0 In your example we would need to know the value of INPUT - it is most certainly one of 1, 2, 4, 8, etc, denoting a single bit. So the expression $search->level & INPUT would yield nonzero (a.k.a. true) if the bit denoted by INPUT was set in $s

Re: [PHP] Executing PHP code in a database

2003-03-08 Thread Ernest E Vogelsinger
hp"); > >Is the $strContent variable then available from the include file? Yes. See http://www.vogelsinger.at/test.php for an example (will be available for 1-2 days). -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $PHPSESSID

2003-03-08 Thread Ernest E Vogelsinger
usually is PHPSESSIONID). For further information check out http://www.php.net/manual/en/ref.session.php. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] require_once adds a "1"

2003-03-07 Thread Ernest E Vogelsinger
"); > ?> >using the ob_methods? [snip] Rewrite this to just require_once('topten.php'); No need to echo here. Using output buffering the 1 would still appear, some microseconds later... -- >O Ernest E. Vogelsinger

Re: [PHP] require_once adds a "1"

2003-03-07 Thread Ernest E Vogelsinger
I run anyfile.php by itself there are no "1"s) [snip] This happens if the included file returns some value, in your case it seems to return "true". Remove the return statement (you may simply "return;" if necessary) and the 1 wi

Re: [PHP] attaching php-action to form-button

2003-03-07 Thread Ernest E Vogelsinger
>is there a way to do this? > >so it's not a user-defined but php-defined var, which i need to send through >the form [snip] use a hidden field: // input's etc -- >O Ernest E. Vogelsinger (\)ICQ #13394035

RE: [PHP] Search for keyword in txt file

2003-03-07 Thread Ernest E Vogelsinger
nt that line into a table row. > >I will probably need to do like a "for each" loopbut where do I >insert it ? [snip] In case you're _not_ in safe mode: $result = `grep -n started logs/*`; -- >O Erne

Re: [PHP] Dollar signs in values

2003-03-06 Thread Ernest E Vogelsinger
--- Escape them with a backslash: $text = "The amount is \$400.-"; -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Login via PHP: Protecting files and directories

2003-03-06 Thread Ernest E Vogelsinger
ly not found it serves a standard 404 error... Donated to the public domain :) For support just email me ... I'll try to answer questions whenever I have time. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List

Re: [PHP] print "$array[$i][0]" pukes

2003-03-06 Thread Ernest E Vogelsinger
in expression to clarify operator precedence: with brackets, you don't have to fear any performance impact and gain the clarity of the evaluation sequence; with curly quotes, you gain the correct result :-) -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.

Re: [PHP] Compiling PHP5 In Linux

2003-03-05 Thread Ernest E Vogelsinger
ntation of the tempnam() function where a race condition could occur. There are some interesting answers to this questions on google - search for "tempnam dangerous". -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Ma

Re: [PHP] file uploads

2003-03-04 Thread Ernest E Vogelsinger
file(), or when your script exits 3) n/a -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php forgetting variables very easily

2003-03-04 Thread Ernest E Vogelsinger
- in main.php, try to make $colour global: main.php new.php This seems to me like an inconsistency within PHP as to when variables are "automagically" available, and when you have to declare them global. However you should avoid using globals anyway... --

Re: [PHP] Doing a Multiple Search

2003-03-04 Thread Ernest E Vogelsinger
name']) ? "firstname = '{$array['firstname']}'" ; null); Note that you need to put curly braces around an array dereference if you have it in a quoted string. This doesn't work: $s = "Some $array[sample]"; But this works: $s = "Some {$a

Re: [PHP] PHP OOP design question

2003-03-04 Thread Ernest E Vogelsinger
al approach I'd create a public function to retrieve the database object: $hDB =& pos_getDB($dbid); where $dbid is a database identifier in case you need it. Just my 2c, -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Populate var with function output string?

2003-03-03 Thread Ernest E Vogelsinger
-[snip] You might use output buffering: ob_start; write_string(5); $my_string = ob_get_buffer(); ob_end_clean(); Output buffering is stackable, i.e. the above code will work even if you have ob turned on already. -- >O Ernest E. Vogelsinger (\)ICQ #1

Re: [PHP] eval help

2003-03-03 Thread Ernest E Vogelsinger
; Array derefs within quoted strings must be enclosed in curly quotes. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Ernest E Vogelsinger
-rewrite for your site to the configuration. They should do this without asking too much ... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem using extension.

2003-03-03 Thread Ernest E Vogelsinger
--[snip] Sounds as if there was some problem in the extensions initialization code. I'd try to put some debugging in there (write to a file, flush and close it) so you can see how far your extension executes until the segfault. -- >O

Re: [PHP] php as php3 perhaps with htaccess

2003-03-03 Thread Ernest E Vogelsinger
acy links to a site that has been developed in Python (*.py) to access the same URLs as PHP files. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem using extension.

2003-03-03 Thread Ernest E Vogelsinger
---[snip] Uh yes - we have problems too, sometimes. Care to tell us about _your_ problem? -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe

Re: [PHP] fread problem

2003-03-03 Thread Ernest E Vogelsinger
filesize ($filename)); >fclose ($handle); >echo $contents; [snip] You need to eval your code (not "exec"): eval($contents); Note that $contents need to be valid PHP for eval(). It must not start with "Some HTMLBlah you

Re: [PHP] heredoc problem

2003-03-02 Thread Ernest E Vogelsinger
> >I looked up T_SL and it is a token representing << so that means it just >doesn't get the <<<. Why not? I've tried all the combinations of spaces and >no space in that line that I can think of. [snip]---- The

Re: [PHP] php and html differences

2003-03-02 Thread Ernest E Vogelsinger
t's the HTML stuff. It's just composed by your application. Have a look at some template engines like Smarty to get an idea. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php and html differences

2003-03-02 Thread Ernest E Vogelsinger
t;or more pages built inside a php script? should the pages be called from the >script some way else? Boy - some of my applicatinos server a couple of hundred pages out of a single script (from the database, that is)... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^

Re: [PHP] browser uploading

2003-03-02 Thread Ernest E Vogelsinger
actually >possible but so far i haven't been able to figure out how.. [snip] check out move_uploaded_file(): http://www.php.net/manual/en/function.move-uploaded-file.php safe_mode is covered in the docs, too. -- >O Ernest E. Vogel

Re: [PHP] authentication question...

2003-03-02 Thread Ernest E Vogelsinger
ple: ob_start(); echo "some stuff"; // we decide to redirect the client ob_end_clean(); // clear the output buffer header('Location: http://somewhere.com'); HTH, -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] stripslashes()

2003-03-01 Thread Ernest E Vogelsinger
--- add this line vefore and after stripslashes() and see what you get: echo '', $poem, ''; If I type "I've set it up" it should read I\'ve set it up I've set it up or your stripslashes is not working. -- >O Ernest E. Vogelsin

Re: [PHP] stripslashes()

2003-03-01 Thread Ernest E Vogelsinger
t addslash'd all input read via fgets() So the solution here is to either add stripslashes() after your datfile read, or to use set_magic_quotes_runtime(0) (see http://www.php.net/manual/en/function.set-magic-quotes-runtime.php). -- >O Ernest E. Vogelsinger (\)ICQ #13394

Re: [PHP] stripslashes()

2003-03-01 Thread Ernest E Vogelsinger
7;', '', $var, '', ''; ?> You will notice the textarea transmits "Thank\'s" which is displayed in the first line, and stripslashes() removes the backslash and displays "Thank's". Note that you

Re: [PHP] stripslashes()

2003-03-01 Thread Ernest E Vogelsinger
ume you have a textarea where the user enters "Thank's", so PHP converts this to "Thank\'s" (assuming magic_quotes is set to on). Using stripslashes() here will get rid of these slashes. BTW - the sample you've sent will output "Thank's&quo

Re: [PHP] Re: Checking for HTTP:// at the start of a string and more ////

2003-03-01 Thread Ernest E Vogelsinger
/ref.pcre.php Chapter LXXXVIII (read 88), titled "Regular Expression Functions (Perl compatible)", which are my favorites... pay special attention on these chapters: "Pattern Syntax" (http://www.php.net/manual/en/pcre.pattern.syntax.php) "Pattern Modifiers&quo

Re: [PHP] A few questions...

2003-03-01 Thread Ernest E Vogelsinger
t been told about it by my friend Google (question was "Winword conversion Linux"). >Thats all the questions so far, any tips, comments, ideas, questions even >insults and flames are welcome! Nothing else? Ok, you got something to work on now I believe... *grin* >- Dani

Re: [PHP] Checking Access to a directory Via a PHP/MYSQL Databace.

2003-03-01 Thread Ernest E Vogelsinger
k if the request is for a hidden file: No => serve a general 404 Error message Yes => continue 2) Check authentication: Not authenticated => goto login (or return 401 Authenticate) Yes - readfile(requested_file) Hope this helps, -- >O Ernest E. Vogelsinger

Re: FW: [PHP] Constants and "Here Document" Interpolation

2003-03-01 Thread Ernest E Vogelsinger
At 19:28 01.03.2003, Daniel R. Hansen said: [snip] >Actually I did try it and couldn't think of a way to work around the matter. >Thanks for the suggestion. > >-Original Message----- >From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTE

Re: [PHP] Constants and "Here Document" Interpolation

2003-03-01 Thread Ernest E Vogelsinger
edocs - both of the examples below work correctly: define('A_CONSTANT', 1); $text1 = <<$text2"; Output: This heredoc text contains the constant A_CONSTANT (1) outside the heredoc construct... This quoted text contains the constant A_CONSTANT (1) outside the string quotes...

Re: [PHP] IS there a way.

2003-03-01 Thread Ernest E Vogelsinger
want to check for the existence of a webserver at the given address you should try to read some data from it. To check the return code you need a tool to return the HTTP headers - check out cUrl (also supports SSL), or go on your own using fsockopen(). -- >O Ernest E. Vogelsinger

Re: [PHP] Checking for HTTP:// at the start of a string and more ////

2003-03-01 Thread Ernest E Vogelsinger
, followed by a dot, followed by one or more characters that are not whitespace, and terminated with a slash. The terminating 'i' makes the search case insensitive. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mail

Re: [PHP] MySQL Query Result Question

2003-02-28 Thread Ernest E Vogelsinger
y($query)) die(mysql_error()); while($data=mysql_fetch_array($result)) { //SSLT } $result = null; // could also use // unset($result); -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] testing for < 0

2003-02-28 Thread Ernest E Vogelsinger
t as blank. I have tried !$timemb and >!is_numeric($timemb). [snip] How about some code? -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] How can I detetct if session cookies are enabled?

2003-02-28 Thread Ernest E Vogelsinger
o ahead else // issue a warning here Of course this only works after the first response of the client to the site where sessions are enabled. The SID will always contain the session key after starting the session for the very first time, thus the above code will always trigger the warning

Re: [PHP] strip http headers

2003-02-28 Thread Ernest E Vogelsinger
rrect newline sequence afaik is "\r\n". -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sorting a file

2003-02-28 Thread Ernest E Vogelsinger
use >of the way IE has interpreted it and that the entire line did actually get >read, but who knows. Try echoing using htmlentities(), IE (and all other browsers) will need to eat the "" parts - it's a valid html tag (even outside a form) -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] fsockopen() with SSL?

2003-02-28 Thread Ernest E Vogelsinger
At 14:11 28.02.2003, Michael Temeschinko said: [snip] >Hello, >is it possible to fetch a Website via SSL? [snip] Sure - have a look at cUrl... -- >O Ernest E. Vogelsinger (\)ICQ

Re: [PHP] Can't run PHP cli script from Cron

2003-02-28 Thread Ernest E Vogelsinger
id you try to run the php file interactively, from the shell prompt? You need at last this statement on top of your PHP files: #!/usr/local/php -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.

Re: [PHP] Read

2003-02-28 Thread Ernest E Vogelsinger
---[snip] Sure you can. The correct interpreter (script engine) is selected by the IIS from the document extension (.asp => ASP engine, .php => PHP interpreter). Check the server settings for IIS on your machine after installing PHP. Good luck with your studies! --

Re: [PHP] virtual() test

2003-02-28 Thread Ernest E Vogelsinger
est.php offers you the choice to either virtual() or readfile() an external file, passing URI parameters. As you can see when using virtual() the callee has the same environment as the caller, however using readfile() via HTTP everything works as expected. -- >O Ernes

RE: [PHP] Emacs?

2003-02-27 Thread Ernest E Vogelsinger
ease Date: 2/25/2003 > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php [snip] -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] including db content as part of script

2003-02-27 Thread Ernest E Vogelsinger
it were a PHP source file. You can even use such constructs: // do some stuff here ?>Hello from outside PHP O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] session_start

2003-02-26 Thread Ernest E Vogelsinger
ys at your webhost to move /tmp to another partition, or _at_least_ to have session.save_path point to a partition that doesn't get exhausted too quickly. God. What do these webhosts think... -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/

Re: [PHP] WebTV vs PHP

2003-02-26 Thread Ernest E Vogelsinger
you have url_rewrite enabled). The rest is a html or possibly css issue. If you need to get this sorted out you should try to work with a WebTV client appliance to see what's actually happening... -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PH

<    1   2   3   4   5   6   >