Re: [PHP] Listing a few words from one sentence ??

2002-11-08 Thread Ernest E Vogelsinger
At 23:29 07.11.2002, conbud said: [snip] Say I have a sentence that contains 8 words, how do I get PHP to list just 4 of those 8 words ? [snip] Let's assume your words are delimited by one or more blanks, so you

[PHP] Help w/ 4.2.3 Problem

2002-11-08 Thread Jack Sasportas
I have been running 4.1.2 fine, but decided to compile in the latest version 4.2.3. When I run some existing code that works perfect under 4.1.2, not only does the code not run properly, but there are no error messages in the error_log ( apache file ). also in php.ini I added log_errors = On,

Re: Re[6]: [PHP] Trouble with php-4.2.3, apache-1.3.27, sablotron 0.96

2002-11-08 Thread Evan Nemerson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 IT WORKS!!! Hahah yeah! It may have been a pain in the butt for _me_ to install, but it was worth it- this is really cool! Thanks Tom, I really owe you one. - -Evan On Thursday 07 November 2002 02:18 am, you wrote: Hi, Thursday, November 7,

Re: [PHP] PHP fopen() bug + solution

2002-11-08 Thread Ernest E Vogelsinger
At 00:51 08.11.2002, Charles Wiltgen said: [snip] Example: while(!file_exists(index.php) { clearstatcache(); } while(filesize(index.php 10) { clearstatcache(); } [snip] To be more effective, and to

[PHP] Re: Help w/ 4.2.3 Problem

2002-11-08 Thread Erwin
Jack Sasportas wrote: I have been running 4.1.2 fine, but decided to compile in the latest version 4.2.3. When I run some existing code that works perfect under 4.1.2, not only does the code not run properly, but there are no error messages in the error_log ( apache file ). also in php.ini I

Re: [PHP] WAP resources for PHP

2002-11-08 Thread Ernest E Vogelsinger
At 03:06 08.11.2002, Research and Development said: [snip] I need to make a site WAP ready in less than a month. What books or internet resources do you recommend for development of WAP in PHP. [snip] Do a Google

Re: [PHP] Weird behaviour with references to objects...

2002-11-08 Thread Ernest E Vogelsinger
At 03:36 08.11.2002, Tim Molendijk said: [snip] begin first code snippet ?php /* New Container object created. At the same time it sets a Child object in its $child attribute. (This is indicated by passing TRUE.) */

Re: [PHP] Graphics question

2002-11-08 Thread Ernest E Vogelsinger
At 05:38 08.11.2002, Mike Mannakee said: [snip] Jeez, this is simple. The browser is caching the image. There's no real way to fix that. There are some headers that may encourage the browser to not cache, but there is no sure way to control whether the

Re: [PHP] publishing php mysql website on cd-rom

2002-11-08 Thread Krzysztof Dziekiewicz
My organization has a need to publish some of our web content on a CD-ROM. I'm in search of suggestions on how to publish our dynamic content (php/mysql templates) in some sort of runtime configuration that would let users browse the site from cd. What's involved with this? Is there such a

[PHP] Cookie error after 4.2.3 upgrade

2002-11-08 Thread Jack Sasportas
I get the following error when using a previously working cookie function: expects parameter 3 to be long Code is below... I just don't see the difference then the way the doc uses: time() - 3600 -vs- the way I did it below... Thanks ! function

Re: [PHP] Help w/ 4.2.3 Problem

2002-11-08 Thread Marco Tabini
Most likely a register_globals settings problem. Try checking the manual in the php.ini settings page for more info. Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Fri, 2002-11-08 at 03:11, Jack Sasportas

Re: [PHP] File locking problem

2002-11-08 Thread Krzysztof Dziekiewicz
I'm having file locking problems. I'm using fopen() to write a file via FTP. At the end, I'm doing... fflush($fp); fclose($fp); ...and then I include it immediately after. But many times I only get part of what I wrote to the file, which suggests that it wasn't really flushed

[PHP] Re: Cookie error after 4.2.3 upgrade

2002-11-08 Thread Erwin
Jack Sasportas wrote: I get the following error when using a previously working cookie function: expects parameter 3 to be long Code is below... I just don't see the difference then the way the doc uses: time() - 3600 -vs- the way I did it below... Thanks ! function

Re: [PHP] Convert GIF to JPG with or without GD

2002-11-08 Thread Krzysztof Dziekiewicz
The GD library bundled with PHP 4.3 can read gif images (but not write them) And imagejpeg allows to create the jpeg file. -- Krzysztof Dziekiewicz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] XML in PHP on Apache (RH 7.3)

2002-11-08 Thread Pelek
Hello its urgent problem! I need apache server with php supporting XML, i have read the manual and some posts how-to compile it ( http://www.php.net/manual/en/ref.xml.php ) i have download sources of expat and doing step-by-step instructions given in one of the posts ( *pfreet at

Re: [PHP] Convert GIF to JPG with or without GD

2002-11-08 Thread BAROILLER Pierre-Emmanuel
Yes... I've tried Image Magic , it's good for my work :) Now, I can resize/resample/reformat any kind of picture... thanks for all! :) Krzysztof Dziekiewicz [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] The GD library bundled with PHP 4.3 can read gif images (but not

[PHP] Cookies and Sessions

2002-11-08 Thread kevin
Allo, I seem to have run into a couple of problems with a project I am currently working on. First one is that the project has a login feature that tracks the user using cookies. The client alas has a desire to have multiple sites and have the login to other sites in his group seamless (in as

Re: [PHP] Reading unknown number of form variables -? need a hint/help..

2002-11-08 Thread Marek Kilimajer
Its something like: $res=mysql_query(select item_id, quantity from carts where customer_id='$customer_id'); // you might want to join with another table to get item names and others you need while(list($item_id,$quantity)=mysql_fetch_row($res)) { echo input name=\quantity[$item_id]\

Re: [PHP] sockets

2002-11-08 Thread Marek Kilimajer
This is how sockets work, if you close the process holding the socket, the conection is closed. There is no function reopen_the_old_conection. You are not clear about what you are trying to achive, but maybe you should rethink your design. Gareth Thomas wrote: Hi, I am running 4.3.0pre2 on RH

[PHP] For ... = max($myArray) vs For ... = $max

2002-11-08 Thread Daevid Vincent
Is PHP smart enough to optimize loops? That is, are these two 'for...loops' equivalent or is one slower than the other? $max = max($myArray); for( $x = 1; $x = $length; $x++ ) {} -- OR -- for( $x = 1; $x = max($myArray); $x++ ) {} My gut instinct tells me since PHP is interpreted, that the

[PHP] problem with memory_limit and php 4.2.3

2002-11-08 Thread Dirk Schmidt
Hi all, the httpd - Process on my linux-box exits (no segfault) when executing the following simple script with php 4.2.3. I don't get the expected error message ( something like 'Allowed memory size of 512000 bytes exhausted'). =[test Script]=== ? ini_set (memory_limit, 512000);

[PHP] What am I missing with this code?

2002-11-08 Thread John Meyer
for($i=1;$i13;$i++) { ? lia href=categoryresult.php?condition=?=urlencode(where month(UserDOB)= . $i)??=jdmonthname($i,0)?nbsp;(?=$i?)/a/li ?php } ? All it's printing out is November

RE: [PHP] Most current non-beta version, and bcc

2002-11-08 Thread Ford, Mike [LSS]
-Original Message- From: Rick Widmer [mailto:php3;developersdesk.com] Sent: 08 November 2002 04:16 To: Jill S; [EMAIL PROTECTED] Subject: Re: [PHP] Most current non-beta version, and bcc At 02:38 PM 11/7/02 -0600, Jill S wrote: so again I'll ask - Are the 4.2.3 downloads at the

RE: [PHP] Quick question

2002-11-08 Thread Ford, Mike [LSS]
-Original Message- From: Martin Towell [mailto:martin.towell;world.net] Sent: 08 November 2002 06:23 what is the technical difference between using else if Well, technically this starts a new block structure level... and elseif ... and this doesn't. But to all

[PHP] Re: fgetcsv and end of line in values

2002-11-08 Thread achillex
i solved my prob with the latest stable snap. php 4.2.4. [EMAIL PROTECTED] wrote in news:20021107092154.13278.qmail;pb1.pair.com: greetings, i have problems using fgetcsv to explode a .csv file. some values consist of line-breaks. although these values are enclosed by quotes, php

RE: [PHP] Re: Cookie error after 4.2.3 upgrade

2002-11-08 Thread Ford, Mike [LSS]
-Original Message- From: Erwin [mailto:erwin;isiz.com] Sent: 08 November 2002 08:55 Jack Sasportas wrote: I get the following error when using a previously working cookie function: expects parameter 3 to be long Code is below... I just don't see the difference then the way

RE: [PHP] For ... = max($myArray) vs For ... = $max

2002-11-08 Thread Ford, Mike [LSS]
-Original Message- From: Daevid Vincent [mailto:daevid;daevid.com] Sent: 08 November 2002 11:13 Is PHP smart enough to optimize loops? That is, are these two 'for...loops' equivalent or is one slower than the other? $max = max($myArray); for( $x = 1; $x = $length; $x++ ) {}

[PHP] HTTP POST FILE UPLOAD HELP

2002-11-08 Thread @ Darwin
Ok, I have a problem with my file upload. When I upload a file, say $img, only $img is available and when I echo $img to the screen it gives the full path of the temporary image supposedly created by PHP. Echoing $_FILE['img']['tmp_name'], or any of the other $_FILE array elements, doesn't give

Re: [PHP] HTTP POST FILE UPLOAD HELP

2002-11-08 Thread Justin French
Hi, Simple question first: There is a perfect working example of file uploads available on the PHP website in the manual. Can you get that example to work? Justin on 08/11/02 10:05 PM, @ Darwin ([EMAIL PROTECTED]) wrote: Ok, I have a problem with my file upload. When I upload a file, say

Re: [PHP] For ... = max($myArray) vs For ... = $max

2002-11-08 Thread Marek Kilimajer
As max($myArray) may potentionaly change, it is evalueted everytime (you may do $myArray[]=$big_number in your loop). So if you know it is not going to change, use the first way. Daevid Vincent wrote: Is PHP smart enough to optimize loops? That is, are these two 'for...loops' equivalent or is

RE: [PHP] What am I missing with this code?

2002-11-08 Thread Ford, Mike [LSS]
-Original Message- From: John Meyer [mailto:johnmeyer_1978;yahoo.com] Sent: 08 November 2002 11:45 for($i=1;$i13;$i++) { ? lia href=categoryresult.php?condition=?=urlencode(where month(UserDOB)= .

Re: [PHP] Re: Cookie error after 4.2.3 upgrade

2002-11-08 Thread Erwin
change your code to: $l_cookie_expireN = (int) date('r', time() - 4000 ); $l_cookie_expire = (int) date('r', time() + 400 ); $l_cookie_expire2 = (int) date('r', time() + 400*30*12 ); No, that's even worse!! Try this: $l_cookie_expireN = time() - 4000; $l_cookie_expire = time() +

Re: [PHP] HTTP POST FILE UPLOAD HELP

2002-11-08 Thread Ernest E Vogelsinger
At 13:05 08.11.2002, Darwin spoke out and said: [snip] is the info from my php.ini file: ; Temporary directory for HTTP uploaded files (will use system default if not ;

Re: [PHP] For ... = max($myArray) vs For ... = $max

2002-11-08 Thread Maxim Maletsky
The first one is better, and, besides that - it is the most correct way - there might be something making the array change while inside the loop - thus you have to do some extremely high calculations to understand the array does not change runtime, which makes it useless. Simply do the

Re: [PHP] Cookies and Sessions

2002-11-08 Thread Maxim Maletsky
kevin [EMAIL PROTECTED] wrote... : Allo, I seem to have run into a couple of problems with a project I am currently working on. First one is that the project has a login feature that tracks the user using cookies. The client alas has a desire to have multiple sites and have the login

Re: [PHP] How to echo the end marker '?'

2002-11-08 Thread Petre Agenbag
I'm just curious. Why do you want to echo within an echo? echo 'form action='.$PHP_SELF.''; will do the trick won't it? Unless I miss the point, I cannot see why you need to open new php tags for this? On Fri, 2002-11-08 at 14:25, Ernest E Vogelsinger wrote: At 12:15 08.11.2002, Philipp

[PHP] string to array

2002-11-08 Thread Marek Kilimajer
Hi all, has anyone an elegant (and faster) way of converting 'string' to array('s','t','r','i','n','g'), other then for($i=0; $istrlen($string); $i++) $array[$i]=$string[$i]; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] string to array

2002-11-08 Thread Timothy Hitchens (HiTCHO)
Quick and Dirty: ?php $string = 'hello how are you today'; $new_string = preg_split(/[\s]?/, $string); print_r($new_string); ? Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] If you need PHP hosting with an experienced support team 24/7 then email me today. On Fri, 8 Nov 2002, Marek

Re: [PHP] string to array

2002-11-08 Thread Tom Rogers
Hi, Friday, November 8, 2002, 10:43:10 PM, you wrote: MK Hi all, MK has anyone an elegant (and faster) way of converting 'string' to MK array('s','t','r','i','n','g'), other then MK for($i=0; $istrlen($string); $i++) $array[$i]=$string[$i]; A string is already an array of chars $string =

Re: [PHP] string to array

2002-11-08 Thread Erwin
Tom Rogers wrote: Hi, Friday, November 8, 2002, 10:43:10 PM, you wrote: Hi all, has anyone an elegant (and faster) way of converting 'string' to array('s','t','r','i','n','g'), other then for($i=0; $istrlen($string); $i++) $array[$i]=$string[$i]; A string is already an array of chars

Re: [PHP] string to array

2002-11-08 Thread Timothy Hitchens (HiTCHO)
That won't work.. empty delimiter errors always.. you will have to use my preg one from earlier... Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] If you need PHP hosting with an experienced support team 24/7 then email me today. On Fri, 8 Nov 2002, Erwin wrote: Tom Rogers wrote: Hi,

Re: [PHP] string to array

2002-11-08 Thread Maxim Maletsky
String IS an array. Basically, you could do this: $str = 'The Dummy String'; for($i=0; $istrlen($str); $i++) { echo $str[$i] . ':'; } and you sould get the output: T:h:e: :D:u:m:m:y: :S:t:r:i:n:g: As of actually converting it you could do that very loop and have an: $atr_arr[] =

Re: [PHP] Weird behaviour with references to objects...

2002-11-08 Thread Maxim Maletsky
with the reference you simply are re-refering the old internal values of the class. No, it is not reccomened to do so, unless, of course, you have a very good reason to. -- Maxim Maletsky [EMAIL PROTECTED] Martin Towell [EMAIL PROTECTED] wrote... : I remember reading somewhere (can't

Re: [PHP] string to array

2002-11-08 Thread Maxim Maletsky
Erwin [EMAIL PROTECTED] wrote... : A string is already an array of chars $string = 'string'; echo $string[0]; // will echo 's' True, but that's different than the array type. Sometimes you'll just need an array instead of a string. Try using $string = explode( '', 'string' );

Re: [PHP] string to array

2002-11-08 Thread @ Edwin
Hello, Maxim Maletsky [EMAIL PROTECTED] wrote: [snip] As of actually converting it you could do that very loop and have an: $atr_arr[] = $str[$i] in it, or, even more elegantly by using split() function or ...chunk.. something function(), don't remember right now. [/snip] Perhaps, this

Re: [PHP] string to array

2002-11-08 Thread Erwin
$string = explode( '', 'string' ); Timothy Hitchens wrote: That won't work.. empty delimiter errors always.. Your right, I didn't know. you will have to use my preg one from earlier... But your preg thingy will only split at spaces, so that'll have to change to ? $string = 'test';

Re: [PHP] How to echo the end marker '?'

2002-11-08 Thread @ Edwin
Hello, (B (B"Petre Agenbag" [EMAIL PROTECTED] wrote: (B I'm just curious. (B (BMe, too. :) (B (B Why do you want to echo within an echo? (B echo 'form action="'.$PHP_SELF.'"'; (B will do the trick won't it? (B (BTrue. (B (B Unless I miss the point, I cannot see why you need to open

Re: [PHP] string to array

2002-11-08 Thread Marek Kilimajer
This is working great, thank you. Timothy's expression output one empty element at the start and the end, but otherwise worked ( and I don't know why :-( Erwin wrote: $string = explode( '', 'string' ); Timothy Hitchens wrote: That won't work.. empty delimiter errors always..

Re: [PHP] string to array

2002-11-08 Thread Maxim Maletsky
Guys, not to confuse you, but I think there is a more elegant way doing it that. I had the same issue once long ago (2-3 years ago?) and had put it up on the mailing lists too. Gotta remember what it was and for what project then find the code in my libraries. I really think i accomplished it

Re: [PHP] Convince teh boss

2002-11-08 Thread @ Edwin
Very interesting! Thanks! I'm sure the list will be very useful. ;) BTW, perhaps you can add apple.com to your list. (Apache, Linux--should be BSD...) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Unable to execute c++ .exe file from php

2002-11-08 Thread Ladan Pickering
I am unable to execute my c++ program from within PHP when it runs as a cgi in Apache. I am able to run: $cmd=dir c:\abc system ($cmd, $errCode); and see the content of the directory, but I don't seem to be able to run a simple hello.exe (c++) file. $cmd = c:\abc\hello.exe; system ($cmd,

[PHP] Wildcard search

2002-11-08 Thread Mako Shark
I've tried doing a search for this problem on the web, but haven't found anything, nor have I found any solution on the php.net documentation. Does anyone know if it's possible to do a file search with a wildcard character? I need to find if there are any HTML files in a certain directory,

Re: [PHP] Wildcard search

2002-11-08 Thread Marco Tabini
How about: $a = explode (' ', shell_exec (ls $foldername/*.html)); This should return an array that contains the name of all the *.html files in the folder $foldername, if any. Hope this helps. Cheers, Marco - php|architect -- The Monthly Magazine For PHP Professionals Come

Re: [PHP] ob_gzhandler

2002-11-08 Thread Serge Paquin
I get no output at all. All DoCache does is write $buffer to a file then return $buffer since I use this for some other serverside caching to save on database hits. I have other areas that I call ob_start(ob_gzhandler) and that works fine but when I call in via DoCache it breaks. I much prefer

Re: [PHP] Unable to execute c++ .exe file from php

2002-11-08 Thread Marek Kilimajer
escape your backslashes: $cmd = c:\\abc\\hello.exe; Ladan Pickering wrote: I am unable to execute my c++ program from within PHP when it runs as a cgi in Apache. I am able to run: $cmd=dir c:\abc system ($cmd, $errCode); and see the content of the directory, but I don't seem to be able to

Re: [PHP] Unable to execute c++ .exe file from php

2002-11-08 Thread Ernest E Vogelsinger
At 15:30 08.11.2002, Ladan Pickering spoke out and said: [snip] I am unable to execute my c++ program from within PHP when it runs as a cgi in Apache. I am able to run: $cmd=dir c:\abc system ($cmd, $errCode); and see the content of the directory, but I

RE: [PHP] Wildcard search

2002-11-08 Thread Mark Charette
-Original Message- From: Mako Shark [mailto:phpman2000;yahoo.com] do I have to do a readdir() and read the filename of every file until I find an HTML or until all files have been read. This is what the shell expression supplied by Marco Tabini actually does; doing it in PHP

Re: [PHP] ob_gzhandler

2002-11-08 Thread Serge Paquin
I just realized that mod_deflate is for Apache 2. I am still on the Apache 1.3 tree so I don't beleive I can take advantage. - Original Message - From: Ernest E Vogelsinger [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 08, 2002 4:00 AM Subject: Re: [PHP] ob_gzhandler

Re: [PHP] ob_gzhandler

2002-11-08 Thread Ernest E Vogelsinger
At 15:48 08.11.2002, Serge Paquin spoke out and said: [snip] I get no output at all. All DoCache does is write $buffer to a file then return $buffer since I use this for some other serverside caching to save on database hits. I have other areas that I call

Re: [PHP] ob_gzhandler

2002-11-08 Thread Serge Paquin
Yes their is always output. Also the way my system works if it finds a current cache file then it just does readfile and no database connection. On that output I use ob_start(ob_gzhandler) and it outputs compressed without an error so it seems that ob_gzhandler is working fine that's the part

Re: [PHP] ob_gzhandler

2002-11-08 Thread Ernest E Vogelsinger
At 16:08 08.11.2002, Serge Paquin spoke out and said: [snip] Yes their is always output. Also the way my system works if it finds a current cache file then it just does readfile and no database connection. On that output I use ob_start(ob_gzhandler) and

[PHP] How to echo the end marker '?'

2002-11-08 Thread Philipp Bolliger
Hi everyone, subject's allready my question ! I want to echo something like : form action = \,?php echo $PHP_SELF ? \ so that the action becomes ? echo $PHP_SELF ? !! But I can't figure out how to escape ? so that the interpreter doesn't take it as the end of the script ! Any idea ? cheers,

Re: [PHP] How to echo the end marker '?'

2002-11-08 Thread Ernest E Vogelsinger
At 12:15 08.11.2002, Philipp Bolliger spoke out and said: [snip] subject's allready my question ! I want to echo something like : form action = \,?php echo $PHP_SELF ? \ so that the action becomes ? echo $PHP_SELF ? !! But I can't figure out how to escape

[PHP] Other Notice problem...

2002-11-08 Thread R B
This is not the same question i asked yesterday. When i set error_reporting = E_ALL and display_errors = On in my php.ini, i get the next message: Notice: Undefined variable: varname in . How can i fix this problem without setting error_reporting = E_ALL ~E_NOTICE and/or

Re: [PHP] Other Notice problem...

2002-11-08 Thread Marco Tabini
This usually means that you're using a variable without having initialized it. For example $a = $b + 1; will give you that warning if no value is assigned to $b prior to this line. It's PHP's way of telling you that you might be doing something wrong. Perhaps if you post some of your code we

Re: [PHP] Other Notice problem...

2002-11-08 Thread Ernest E Vogelsinger
At 16:31 08.11.2002, R B spoke out and said: [snip] This is not the same question i asked yesterday. When i set error_reporting = E_ALL and display_errors = On in my php.ini, i get the next message: Notice: Undefined variable: varname in . How can

Re: [PHP] Weird behaviour with references to objects...

2002-11-08 Thread Tim Molendijk
Ernest E Vogelsinger [EMAIL PROTECTED] wrote in message news:5.1.1.6.2.20021108092657.02befe20;mail.vogelsinger.at... At 03:36 08.11.2002, Tim Molendijk said: [snip] Ahh - culprit 1: You said the container is creating a child instance - I assume it's

Re: [PHP] File locking problem

2002-11-08 Thread Charles Wiltgen
Krzysztof Dziekiewicz wrote... Do you use include or require. In such situation you should not use include. I tried require() too, but it made no difference. I later learned that if you fopen(), write some stuff, fflush() and ffclose(), that doesn't mean the file is complete (or that it even

Re: [PHP] Weird behaviour with references to objects...

2002-11-08 Thread Ernest E Vogelsinger
At 16:48 08.11.2002, Tim Molendijk spoke out and said: [snip] The problem is solved and I completely understand why now. This last thing is thanks to you Ernest. [snip] Glad it works - you're very welcome :) --

Re: [PHP] Weird behaviour with references to objects...

2002-11-08 Thread Ernest E Vogelsinger
One more: At 16:48 08.11.2002, Tim Molendijk spoke out and said: [snip] This is not true in my case, because instead of doing: function add($child) { ... } I do: function add($child) { ... } and then call it with: $this-add($child); This has the same

Re: [PHP] PHP fopen() bug + solution

2002-11-08 Thread Charles Wiltgen
Ernest, To be more effective, and to allow the OS to do something else while you're waiting at the file, your script should sleep for some microseconds... An excellent suggestion, thanks very much! :^) -- Charles Wiltgen -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] File locking problem

2002-11-08 Thread Ernest E Vogelsinger
At 16:50 08.11.2002, Charles Wiltgen spoke out and said: [snip] I tried require() too, but it made no difference. I later learned that if you fopen(), write some stuff, fflush() and ffclose(), that doesn't mean the file is complete (or that it even exists).

Re: [PHP] For ... = max($myArray) vs For ... = $max

2002-11-08 Thread Kjartan Mannes
Friday, November 8, 2002, 12:13:01 PM, Daevid Vincent wrote: $max = max($myArray); for( $x = 1; $x = $length; $x++ ) {} -- OR -- for( $x = 1; $x = max($myArray); $x++ ) {} My gut instinct tells me since PHP is interpreted, that the top one is the better way to go, but with the Zend

Re: [PHP] Weird behaviour with references to objects...

2002-11-08 Thread Tim Molendijk
Ernest E Vogelsinger [EMAIL PROTECTED] wrote in message news:5.1.1.6.2.20021108165218.03238948;mail.vogelsinger.at... One more: True for now, but this is officially deprecated. Functions or methods accepting a reference are required to be prototyped that way - this helps you not to forget to

Re: [PHP] Other Notice problem...

2002-11-08 Thread R B
My code is: ?php some code. if ($status == ADD) { some code ... ... ... } ? The message is: Notice: Undefined variable: status in I'm going to explain how my script work. I have an php page (addProduct.php) with an input form. I have 2 buttons (add and cancel)

Re: [PHP] Weird behaviour with references to objects...

2002-11-08 Thread Ernest E Vogelsinger
At 17:04 08.11.2002, Tim Molendijk spoke out and said: [snip] Yes I know it is poor programming habits to do like I did... But I have a reason for it. I have quite a lot methods that accept objects *optional*. So f.e.: --- class Product { var $language;

Re: [PHP] Other Notice problem...

2002-11-08 Thread Marco Tabini
Try if (isset ($status) $status == 'ADD') instead... this should take care of the error--IF you're sure that the fact that the $status variable is not set at that point is ok. Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at

Re: [PHP] Other Notice problem...

2002-11-08 Thread Ernest E Vogelsinger
At 17:04 08.11.2002, R B spoke out and said: [snip] I'm going to explain how my script work. I have an php page (addProduct.php) with an input form. I have 2 buttons (add and cancel) and a hidden control with name=status. If i press the add button, the

Re: [PHP] Wildcard search

2002-11-08 Thread Mako Shark
$a = explode (' ', shell_exec (ls $foldername/*.html)); Didn't know of shell_exec() until now. It works, though. Thanks! Is there any reason why it wouldn't work? If I changed servers, say, and there were some ports blocked and etc. etc., is there a risk that I should know?

Re: [PHP] Wildcard search

2002-11-08 Thread Marco Tabini
Well, as a general rule, it won't work if you're not using a UNIX o/s or if PHP has been set up with safe mode on, or if you don't have the right permission to see that folder. That's probably a non-inclusive list, but there should be ways around each of these problems (depending on the degree of

[PHP] registering object in session - Object to string notice error?

2002-11-08 Thread Paul
I have a simple object/class: Class MainData { Var items =array(); ...some other functions but nothing to initialize it } in a code when I do : $somevar= new MainData(); session_register($somevar); I get notice type of error: Notice: Object to string conversion in

Re: [PHP] Other Notice problem...

2002-11-08 Thread R B
The array_key_exists or isset is a good solution. About your comment, i have the register_globals=on. I have 2 questions: 1.- What's the relation to have register_globals=off with this notice message? 2.- I read the security comment about register_globals=on in the php.ini, but i set to on

Re: [PHP] Other Notice problem...

2002-11-08 Thread Ernest E Vogelsinger
At 17:27 08.11.2002, R B spoke out and said: [snip] The array_key_exists or isset is a good solution. About your comment, i have the register_globals=on. I have 2 questions: 1.- What's the relation to have register_globals=off with this notice message? If

[PHP] php/html debug

2002-11-08 Thread Anna Gyor
Hi, is there any software on the market with I can test my html/php based web portal? I mean for example the data flow between html forms and php files/scripts. For Example a login form on html site and a check with an other php site and I want begin the test on the html site and check weather

Re: [PHP] Weird behaviour with references to objects...

2002-11-08 Thread Tim Molendijk
Ernest E Vogelsinger [EMAIL PROTECTED] wrote in message news:5.1.1.6.2.20021108170633.00b8cb60;mail.vogelsinger.at... You might always simply omit the parameter when calling the function (you'll get a notice about that if enabled). You just cannot pass constants: function Product($language)

Re: [PHP] Other Notice problem...

2002-11-08 Thread R B
About your comment 1: if i have register_globals=on, why $status is not be set by PHP? About your comment 2: if i have 2 pages: p01.php and p02.php, with p01.php code: ... ... a href=p02.php?pp=2link/a ... ... and p02.php code: ... ... echo $pp; ... ... If i have register_globals=off, then

[PHP] problem compiling php

2002-11-08 Thread dk1eng
hi there again, here's the problem: I compiled apache using --enable-modules=so What do i need to do now in order to compile and install php on my machine? Furthermore, how do i add mysql support to apache? Is there a --with-mysql switch? Kind regards, dimitris -- PHP General Mailing List

Re: [PHP] Other Notice problem...

2002-11-08 Thread Stuart
On Friday, Nov 8, 2002, at 16:44 Europe/London, R B wrote: if i have 2 pages: p01.php and p02.php, with p01.php code: ... ... a href=p02.php?pp=2link/a ... ... and p02.php code: ... ... echo $pp; ... ... If i have register_globals=off, then when i click the link, in p02.php page, the echo

Re: [PHP] Other Notice problem...

2002-11-08 Thread R B
And without using the $_GET[] array. From: Stuart [EMAIL PROTECTED] To: R B [EMAIL PROTECTED] CC: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP] Other Notice problem... Date: Fri, 8 Nov 2002 16:52:50 + On Friday, Nov 8, 2002, at 16:44 Europe/London, R B

Re: [PHP] Weird behaviour with references to objects...

2002-11-08 Thread Ernest E Vogelsinger
At 17:32 08.11.2002, Tim Molendijk spoke out and said: [snip] why do you think it won't be supported by future versions? all i do is passing an object by reference. because in this case this function always should accept its argument as a reference and

Re: [PHP] Other Notice problem...

2002-11-08 Thread Stuart
On Friday, Nov 8, 2002, at 16:56 Europe/London, R B wrote: And without using the $_GET[] array. Why don't you want to use the $_GET array? If you really don't want to use it you can use the extract function but if you're going to do that you might as well have register_globals on. --

[PHP] ftp file exists

2002-11-08 Thread Fifield, Mike
How do you check if a file exists a remote ftp site.

Re: [PHP] problem compiling php

2002-11-08 Thread Jason Wong
On Saturday 09 November 2002 00:52, dk1eng wrote: hi there again, here's the problem: I compiled apache using --enable-modules=so What do i need to do now in order to compile and install php on my machine? The manual says it all. Basically: ./configure --with-apxs=/usr/local/apache/bin/apxs

Re: [PHP] problem compiling php

2002-11-08 Thread .: B i g D o g :.
i would always make sure you check the manuals for the information first... http://www.php.net/manual/en/install.apache.php On Fri, 2002-11-08 at 16:52, dk1eng wrote: hi there again, here's the problem: I compiled apache using --enable-modules=so What do i need to do now in order to compile

Re: [PHP] ftp file exists

2002-11-08 Thread Marco Tabini
Try $f = fopen ('ftp://server/filename', 'r'); if $f is null, the file doesn't exist. Otherwise, it exists and you have to fclose ($f). FTP support has to be compiled into your version of PHP for this to work. Marco - php|architect -- The Monthly Magazine For PHP Professionals

Re: [PHP] Other Notice problem...

2002-11-08 Thread Ernest E Vogelsinger
At 17:44 08.11.2002, R B spoke out and said: [snip] About your comment 1: if i have register_globals=on, why $status is not be set by PHP? well _then_ we have 2 possibilities: 1) your form input field isn't named status but rather Status or STATUS - take

Re: [PHP] php/html debug

2002-11-08 Thread .: B i g D o g :.
I have used nusphere PHPEd and it works okay...but i do not know what you are really trying to do here... On Fri, 2002-11-08 at 16:31, Anna Gyor wrote: Hi, is there any software on the market with I can test my html/php based web portal? I mean for example the data flow between html forms

Re: [PHP] Other Notice problem...

2002-11-08 Thread Jason Wong
On Saturday 09 November 2002 00:52, Stuart wrote: How can i run the script without problems having register_globals=off? p02.php code: ... ... echo $_GET['pp']; ... ... Yes. And try reading the manual, or the archives. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open

Re: [PHP] Other Notice problem...

2002-11-08 Thread Jason Wong
On Saturday 09 November 2002 00:56, R B wrote: And without using the $_GET[] array. Probably by using black magic instead -- or maybe use $_REQUEST, but I don't think you want to use that either :) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems

Re: [PHP] ftp file exists

2002-11-08 Thread Jule Slootbeek
if there's no function to check (which i can;t find real quick) do soething like this: if (!ftp_mdtm($conn_id, $file) { echo File doesn't exist; } else { echo File exist; } On Friday, Nov 8, 2002, at 12:01 US/Eastern, Fifield, Mike wrote: How do you check if a file exists a remote ftp site.

  1   2   3   >