Re: [PHP] flock problem

2004-02-28 Thread Armand Turpel
. !?! Why?? - Original Message - From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> To: "Armand Turpel" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, February 28, 2004 8:04 PM Subject: Re: [PHP] flock problem > Is the file on an N

[PHP] flock problem

2004-02-28 Thread Armand Turpel
Hi, flock($_fp, LOCK_EX ); return always false. I'm relativily shure that the file to flock is not flocked elsewhere. php 4.3.3 is running as cgi on linux. What is going wrong? thanks for an answer.

[PHP] type casting problem

2004-02-22 Thread Armand Turpel
Hi, Is it possible that some functions in different php versions (4.1 . 4.1.2 ) has problems with type castings so that the following script has different results in different php versions? "; if(FALSE == is_file('a')) echo "is_file == no file"; if(FALSE === file_exists('a

Re: [PHP] crc32

2004-02-22 Thread Armand Turpel
rom: "Armand Turpel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 22, 2004 12:21 PM Subject: [PHP] crc32 Hi, Currently I'm working on a search engine for a website. A mysql table on which searching should be done was created which contains Words of w

[PHP] crc32

2004-02-22 Thread Armand Turpel
Hi, Currently I'm working on a search engine for a website. A mysql table on which searching should be done was created which contains Words of website articles: CREATE TABLE docs_words ( crc32_word int(11) NOT NULL default '0', id_doc int(11) NOT NULL default '0'); As you can see not the r

Re: [PHP] preg_replace question

2003-09-20 Thread Armand Turpel
Finaly I got the solution. Replace all line breaks by but not after a html headline (..) $text = preg_replace("/(?)\r\n/","\\1",$text); - Original Message - From: "Armand Turpel" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, Se

Re: [PHP] preg_replace question

2003-09-20 Thread Armand Turpel
Hi Jim , The problem with your proposition is that the preg_replace do not replace \r\n to thats good, but also not this: testh4>\r\n and thats not what I expect from. atur - Original Message - From: "Jim Lucas" <[EMAIL PROTECTED]> To: "Armand T

[PHP] preg_replace question

2003-09-20 Thread Armand Turpel
I need the following replace function: Replace all line breaks to but not if a line break comes after an or or Currently I use this preg_replace but it's not good enough for all situations. $text = preg_replace("/([^\<][^\/][^h][^1-9].{1})\r\n/","\\1",$text); Thanks -- PHP Ge

Re: [PHP] PREG-pattern, help needed

2003-09-09 Thread Armand Turpel
Hi, What about: $string = preg_replace("/(]*/","\\1 id={$counter}",$string); atur - Original Message - From: "Tobias Talltorp" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 09, 2003 6:35 PM Subject: [PHP] PREG-pattern, help needed > I need help with a preg-pat

Re: [PHP] allow_call_time_pass_reference?

2003-08-30 Thread Armand Turpel
Thanks for this clarification! atu - Original Message - From: "Curt Zirzow" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 30, 2003 6:10 PM Subject: Re: [PHP] allow_call_time_pass_reference? > * Thus wrote Armand Turpel ([E

[PHP] allow_call_time_pass_reference?

2003-08-30 Thread Armand Turpel
Hi, Why allow_call_time_pass_reference is deprecated? I mean it should be the choice of the programmer to make use of pass by reference or not. Example: $this_string = $is_really_big // lets say 500 kb function ($this_string){} // Here the function takes a copy of $this_string (500 kb) -> in

[PHP] regex - delimiter problem

2003-06-19 Thread Armand Turpel
Some delimiters chars don't work under windows. Ex.: "°[a-z]?°" works on linux but on windows you get a warning: Warning: Unknown modifier '?' in on line xx "/[a-z]?/" works on both systems So my question is: Are there similar problems in other functions or circumstances where such chars

[PHP] preg_match warning under windows

2003-06-18 Thread Armand Turpel
Hi, The following preg_match work fine under linux but under windows I get a warning. Why? preg_match("[EMAIL PROTECTED]:space:]]?connect[[:space:]]?\([[:space:]]?[\'\"]([[:graph:]]*)[\'\"][[:space:]]?,[[:space:]]?[\'\"]([[:graph:]]*)[\'\"][[:space:]]?,[[:space:]]?[\'\"]([[:graph:]]*)[\'\"]

[PHP] fgets() problem

2003-06-13 Thread Armand Turpel
It seems that some php versions have difficulties with the fgets() function. On php 4.3.2 it works fine, but other versions report warnings. fgets($f); Warning: Wrong parameter count for fgets() in /var/www/Xprotector/include/base.inc.php on line 70 If I change fgets to fgets($f, 4096); it w

Re: [PHP] Sort of a multidimensional array

2003-06-11 Thread Armand Turpel
Thanks for your reply. But it is impossible to arrange the array as you suggest, in this case. - Original Message - From: "Chris Hayes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 11, 2003 11:49 AM Subject: Re: [PHP] Sort of a multidimensional array > At 11:18 11-6

[PHP] Sort of a multidimensional array

2003-06-11 Thread Armand Turpel
Hi, Is there a simple way to sort the following array structure by the array cell 'title'=>'TXx'? $x[0][0] = array(array('id'=>1,'title'=>'TXx'),array('id'=>2,'title'=>'T2')); $x[0][1] = array('id'=>10,'title'=>'Test1'); $x[1][0] = array(array('id'=>3,'title'=>'TXx'),array('id'=>6,'ti

Re: [PHP] project users manual howto

2003-06-08 Thread Armand Turpel
With phpdoc you can also make user level docs. Read the manual. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 08, 2003 11:38 AM Subject: [PHP] project users manual howto > hi there i have nearly completed a project in php and need to find > d

[PHP] MYSQL_CLIENT_COMPRESS

2003-06-06 Thread Armand Turpel
Hi, Is there any body who have experience with the flags in mysql_connect() in php >= 4.3 . Especially the MYSQL_CLIENT_COMPRESS flag. Give it sense, to use this feature if both, apache/php and the mysql server reside on the same machine? Thanks, Armand -- PHP General Mailing List (http://ww

Re: [PHP] Creating alphabetical index links

2003-06-06 Thread Armand Turpel
This should solve your problem. '.$prev_letter.'] '; } else return false; } $your_word_list = array('apple','bread','cornflakes','doughnut','egg'); foreach($your_word_list as $w) { $link = build_link($w); if(!empty($link)) echo $link; } ?> atur __

[PHP] recursive displaying tree structure

2003-06-06 Thread Armand Turpel
Hi, May this can help you: $value) { $tmp[$key] = $value; } $tmp['indent'] = $indent; $ret_tree[] = $tmp; tree($tmp['id'], $indent+1); } }

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Armand Turpel
>> But how you know, if you have a few tausends of php code lines, which part >> have some sloppy code. Nobody is perfect. In my opinion you should turn >> register_globals to off if it's possible. It's much more secure. >Rouvas Stathis wrote: >I strongly disagree with that. >Consider the followi

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Armand Turpel
> On Wed, 4 Jun 2003, Jay Blanchard wrote: > > [snip] > > Have register globals set to ON is one way of leaving your script open > > to being exploitable. > > [/snip] > > > > Please explain this, how does it make it more exploitable? I think that > > this is only true if the code is sloppy. > > Cor

Re: [PHP] Is "gd" present?

2003-06-05 Thread Armand Turpel
This check if gd is installed and which version. if( $img = @imageCreate(1, 1) ) { // Check if GD version >= 2.0.1 // $img = @imageCreateTrueColor(1, 1); if (!$img) { echo 'gd < 2.0.1 installed';

[PHP] Resources consumption

2003-06-02 Thread Armand Turpel
Hi, How can I find out the resources consumption (memory waste) of a script? Thanks, Armand -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysql_connect() -- flags

2003-06-01 Thread Armand Turpel
Hi, Is there any body who have experience with the flags in mysql_connect() in php >= 4.3 . Especially the MYSQL_CLIENT_COMPRESS flag. I dont know if it works or not. I cant make any difference. Should php must be compiled with a special flag to get work this? Thanks Armand -- PHP General Mai

[PHP] mysq_connect - flags

2003-05-28 Thread Armand Turpel
Hi, Is there any body who have experience with the flags in mysql_connect() in php >= 4.3 . Especially the MYSQL_CLIENT_COMPRESS flag. I dont know if it works or not. I cant make any difference. Should php must be compiled with a special flag to get work this? atur -- PHP General Mailing Lis