Re: [PHP] how to get time cost for MySQL query
Try doing an explain $query query. I *think* MySQL might cache the query/results enough that you'd get an accurate estimate... You could also turn MySQL Logging on. Or, rather crudely, time it in PHP: $query_start_time = microtime(); $result = mysql_query($query); $query_end_time = microtime(); It's not going to be 100% accurate, of course, as the overhead from PHP to MySQL is there, and if you get a *TON* of data in the query, then there's maybe a LOT of overhead there... But maybe you're better off including that anyway. On Mon, July 11, 2005 10:23 am, x said: I did checked both of them and it seems they do not provide such info... thanks Philip Hallstrom [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Is there any MySQL lib function which can provide time cost for last query? Maybe... http://us2.php.net/manual/en/function.mysql-info.php http://us2.php.net/manual/en/function.mysql-stat.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] libssl.so.0.9.7
Check if you've got leftover 0.9.7 library sitting around. Perhaps you put 0.9.8 in /usr/local/lib, but 0.9.7 is still in /usr/lib If you have locate you can just do: locate libssl.so and see what turns up On Mon, July 11, 2005 10:09 am, [EMAIL PROTECTED] said: Hello, I've upgraded to OpenSSL 0.9.8 and PHP 4.4.0 and get the following error durring compilation. chmod 755 /var/tmp/php-4.4.0-root/usr/lib/httpd/modules/libphp4.so Installing PHP CLI binary:/var/tmp/php-4.4.0-root/usr/bin/ Installing PHP CLI man page: /var/tmp/php-4.4.0-root/usr/share/man/man1/ Installing shared extensions: /var/tmp/php-4.4.0-root/usr/lib/php4/ Installing PEAR environment: /var/tmp/php-4.4.0-root/usr/share/pear/ /usr/src/openna/BUILD/php-4.4.0/sapi/cli/php: error while loading shared libraries: libssl.so.0.9.7: cannot open shared object file: No such file or directory make[1]: *** [install-pear-installer] Error 127 make: *** [install-pear] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.70944 (%install) Look like PHP still check for version 0.9.7 even if 0.9.8 is now installed. Does someone on this list have a patch or information to fix this problem? Thanks. Gerhard, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] constructors in PHP
On Mon, July 11, 2005 10:04 am, Alessandro Rosa said: As far as I know, its not a security issue, but a structure/design issue. The issue is that in php you can't definitely say what type a variable is , whereas in c++ you can say this variable is a string, this one a int, . But, right because PHP is weakly typed, multiple constructors could be handled easier, I suppose ... isn't true? It wouldn't be any easier/harder, really... Your method/function definition would still have specific data types it expected to receive. Your function call would still know what data types it is dealing with, and would call the right one. Actually, it's a bit harder in weakly-typed languages, as the interpreter has to do more work at the instant the function is called, to determine what types are used. In C++, you're the compiler *KNOWS* what the types are at compile time. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] still trying to cURL.
Try closing your cURL handle and making a new one before you get the page that's giving you trouble. Sometimes cURL maintains state that it shouldn't. You'll maybe need to get the Cookies by hand from the header and send them back as headers -- Not sure a Cookie Jar can survive a new handle. On Mon, July 11, 2005 9:59 am, Jon said: I have minimal experience with cURL but have had some success with it. I am trying to download some invoices that are posted every month. I am able to get a login to the https: and get the first few pages but when I try to get the invoices I get an error page with this content. HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.NullPointerException .. 39 lines of error messages Everything seems to work fine up to the point that I am given a jsessionID on the third page that is curled. It seems to be writing the info to the cookie file but I don't know if I am handling it incorrectly or if that has anything to do with it. I have downloaded LiveHTTPHeaders version 0.10 available here http://livehttpheaders.mozdev.org/index.html to see if I was missing any of the information that has been passed and having compared the log file I can say that I am passing the same information as the mozilla browser. does anyone have any suggestions. and an RTFM is fine but I have been over several of the links posted http://curl.haxx.se/docs/ so if you tell me RTFM please send my idiot self to the correct page. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] constructors in PHP
On Mon, July 11, 2005 9:53 am, Psystorm said: Burhan Khalid wrote: Alessandro Rosa wrote: Thanks to all for clear responses! So just a question now, why have not multiple constructors been implemented? Are there some security issues related to them ? As far as I know, its not a security issue, but a structure/design issue. The issue is that in php you can't definitely say what type a variable is , whereas in c++ you can say this variable is a string, this one a int, . That's guaranteed not the issue -- unless the performance would suck too badly... Lisp has loosely-typed data, and had multiple constructors log before C++ was a gleam in Strousap's (sp?) eye. The real issue, most likely, is not making PHP so [bleep] complex nobody normal wants to use it :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Quidelines for Site visitor counter
On Mon, July 11, 2005 10:58 pm, William Stokes said: I would like to add a visitor counter to my site. I know that there are plenty of free and nice applications/scripts for this avalable but I would like to write my own. I'm at the moment thinking either to make graphical or text based user interface for this statistics counter. So I'm asking your advice on how to draw those nice graphs with PHP? Any online manuals or books that can help since I've never done anything like this before. The server supports drawing graphical stats with PHP. Here's a link that shows roughly what I'm looking for: http://bbclone.de/demo/show_time.php?lng=en If you want a fancy graph, use JPGraph (?) -- Google for PHP Graph it will turn up. If you just want to draw some numbers in an image: http://php.net/gd -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Plz, help
Hi, I have a line: $sql=select u.*, p.name_lt as pareiga from nese_users u left join nese_pareigos p on p.id=u.pareiga order by data desc; As I understand there are 2 tables: nese_users and nese_pareigos I need to know what atributes belong to what table form that line. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Building on AMD64 centos 4.1
Hello everybody! I've problems to build php 4 on Centos 4.1 @AMD64. Problem seems to be in lib64 dir which is ignored by configure script. For example libjpeg is in /usr/lib64 and configure script is: for i in $PHP_JPEG_DIR /usr/local /usr; do test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a GD_JPEG_DIR=$i break done that seems to be wrong ... Has anybody same problems? -- Mirek Novak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Number of users
Hello all, I have some questions and I hope someone could answer them 1. Is there a way to find out how many users currently browsing pages at my web site? 2. If I write down the IP of a user that log on my web site, can I check later if the IP still browsing pages at my web site or if he had left my website? Thanks yaron
Re: [PHP] CASE Tool For PHP OO Programming
DIA with the estension xml2php5 Le Mon, 11 Jul 2005 15:22:32 +0200, Pascual De Ruvo [EMAIL PROTECTED] a écrit: Hi, Can someone suggest a free CASE Tool for UML modelling that generates PHP 5 code? Thanks in advance, Pascual De Ruvo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Number of users
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello all, I have some questions and I hope someone could answer them 1. Is there a way to find out how many users currently browsing pages at my web site? 2. If I write down the IP of a user that log on my web site, can I check later if the IP still browsing pages at my web site or if he had left my website? -- There are various ways to achieve this. You could use session variables, cookies or store the information in a database and pass the lookup value around in a querystring. Which you choose will depend a little on how robust you want it to be, and how your website is set up. You should probably start off by reading up on sessions - there is plenty to dip into here: http://www.google.co.uk/search?q=php+sessionsourceid=mozilla-searchstart=0 start=0ie=utf-8oe=utf-8client=firefox-arls=org.mozilla:en-GB:official Thanks yaron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Two websites need to share part of onedatabase,suggestions please
Chris W. Parker wrote: Robert Cummings mailto:[EMAIL PROTECTED] on Friday, July 08, 2005 5:25 PM said: Thus siteMask should have one of the following values: (1 1) == 2 // only site1 can use the product. (1 2) == 4 // only site2 can use the product. ((1 1) | (1 2)) == 6 // both sites can use the product. Thanks for the example. But I'm still at a loss as to what strategy I should take regarding tables. Should I create two databases where one database has the product information and the other does not? Or should I create one giant database with duplicate tables? That is, one database with 'customers' and 'customers_two'? I think this would be a great candidate for a webservice. You could write methods that restrict access to only the particular tables that the other site requries, and then track access by logging requests to the service. So all the other site needs to know is getCustomers(), and you can code whatever SQL is necessary to fetch the information. As far as the database structure itself, I think a view (if supported) could be used here. Hope this helps, Burhan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to delete lines in a txt file using php.
Thanks george, But i want to read for multiple such files and i have many other keywords match which should be deleted.The array of keywords are ([,TYP,P_MPP,I_MPP,V_MPP,T=,FIT,INTENSITAET); and i aslo want to write back the reamaining lines after deleting into the same file but not in a different file. George Pitcher [EMAIL PROTECTED] wrote: Hi, Do you just want to delete the lines containing '[' or 'TYP', or '[' AND 'TYP'? So your block would read: SUBSTRATNAME=S112 PIXEL=5 OPERATOR=Zi KOMMENTAR=dunkel INTENSITAET=1000.00 DATUM=03.01.2005 UHRZEIT=11:22 MESSUNG=SWEEP_UI correct??? I would do the following: $filename=myfile.txt; $target=myfile2.txt; $handle = fopen ($filename, r); while (!feof ($handle)) { $buffer = fgets($handle, 8192); if (substr($buffer,0,1)!=='[' substr($buffer,0,3)!=='TYP'){ $hf = fopen($target, 'a'); fwrite($hf, $buffer); fclose($hf); } } fclose ($handle); That should do the trick. George -Original Message- From: babu [mailto:[EMAIL PROTECTED] Sent: 12 July 2005 12:13 am To: php-general@lists.php.net Subject: [PHP] how to delete lines in a txt file using php. Hi i have a txt file like [SUBSTRAT] TYP=25x25_10 SUBSTRATNAME=S112 PIXEL=5 OPERATOR=Zi KOMMENTAR=dunkel INTENSITAET=1000.00 [MESSUNG] DATUM=03.01.2005 UHRZEIT=11:22 MESSUNG=SWEEP_UI i want to delete lines which start with '[' and 'TYP'. i have multiple such files.i have used strstr method. i have written code for it, but it results in deletion of complete data from files. Can anyone check where the logic goes wrong. here is my file. $del_lines=array([,TYP,P_MPP,I_MPP,V_MPP,T=,FIT,INT ENSITAET); $dir=getcwd(); $handle = opendir($dir); while (false !== ($file = readdir($handle))) { if ((preg_match('/^2005\d{4}_\d{4}\.txt$/', $file))||(preg_match('/^2005\d{4}_\d{4}\_01_01\.txt$/',$file))){ $fc=file($file); $f=fopen($file,w); foreach($fc as $line){ $bool=TRUE; for($i=0;$i if(!strstr($line,$del_lines[$i])){ $bool=FALSE;} break; //fputs($f,$line); } //if($bool){fputs($f,$line);} } if($bool){fputs($f,$line);} fclose($f); } } closedir($handle); ? - Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail - How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos. Get Yahoo! Photos
[PHP] Re: how to delete lines in a txt file using php.
babu wrote: Hi i have a txt file like [SUBSTRAT] TYP=25x25_10 SUBSTRATNAME=S112 PIXEL=5 OPERATOR=Zi KOMMENTAR=dunkel INTENSITAET=1000.00 [MESSUNG] DATUM=03.01.2005 UHRZEIT=11:22 MESSUNG=SWEEP_UI i want to delete lines which start with '[' and 'TYP'. i have multiple such files.i have used strstr method. i have written code for it, but it results in deletion of complete data from files. Can anyone check where the logic goes wrong. here is my file. ? $del_lines=array([,TYP,P_MPP,I_MPP,V_MPP,T=,FIT,INTENSITAET); $dir=getcwd(); $handle = opendir($dir); while (false !== ($file = readdir($handle))) { if ((preg_match('/^2005\d{4}_\d{4}\.txt$/', $file))||(preg_match('/^2005\d{4}_\d{4}\_01_01\.txt$/',$file))){ $fc=file($file); $f=fopen($file,w); foreach($fc as $line){ $bool=TRUE; for($i=0;$isizeof($del_lines);$i++){ if(!strstr($line,$del_lines[$i])){ $bool=FALSE;} break; //fputs($f,$line); } //if($bool){fputs($f,$line);} } if($bool){fputs($f,$line);} fclose($f); } } closedir($handle); ? - Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail wouldn't something like this work (faster): ?php $deleteLines = array([,TYP,P_MPP,I_MPP,V_MPP,T=,FIT,INTENSITAET); if($handle = opendir('.')) { while(($file = readdir($handle)) !== false) { // init vars $contents = ''; if (!(preg_match('/^2005\d{4}_\d{4}\.txt$/', $file) || preg_match('/^2005\d{4}_\d{4}\_01_01\.txt$/',$file))){ // the filename has been rejected; move on to the next one continue; } // right, we need to open the file now so we can delete the lines $contents = file($file); $stream = fopen($file, 'w'); // loop trough the file, examining each line foreach($contents as $line=data) { foreach($deleteLines as $delete) { if(0 !== strpos($data, $delete)) { // string does not start with one of the ToBeDeleted parts // this (combines strpos() !== false || strpos() 0) // // so, let's write it back to the file fwrite($stream, $data, strlen($data)); } } } fclose($stream); } } closedir($handle); ? I'm assuming here you want to only delete lines STARTING with the part given in the array. - tul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] zlib.output_compression
LacaK wrote: I see contents using Network Monitor, so I se response header and contents andthey are uncompressed, so somresion does not uccured. It's likely the browser is uncomressing it before you ever see it. I would telnet to port 80 and make an HTTP request to see for sure. To turn it on: ob_start('ob_gzhandler'); To turn it off: while(@ob_end_clean()); header('Content-Encoding: identity'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Plz, help
adolfas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I have a line: $sql=select u.*, p.name_lt as pareiga from nese_users u left join nese_pareigos p on p.id=u.pareiga order by data desc; As I understand there are 2 tables: nese_users and nese_pareigos I need to know what atributes belong to what table form that line. Thanks I hope this is what you mean. Try this for further reading if so http://www.w3schools.com/sql/default.asp Breaking it down: select --retrieve the following fields u.*, --* means all fields from this table (u) p.name_lt as pareiga -- and name_lt (renamed to pareiga) from table (p) from nese_users u --(this is table u, as in u.*) left join --retrieve all of the rows from table u, as well as all the rows in the next table where the ON condition is true nese_pareigos p --this is table p, as in p.name_lt on p.id=u.pareiga --this restricts the rows retrieved from table p order by data desc --means that the rows returned are ordered in this way -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] zlib.output_compression
Thank you, I know this technique : ob_start('ob_gzhandler'); but I am interesting on : ini_set('zlib.output_compression', true); /this is preffered method as stated in manual : Also note that using ini.zlib.output_compression is preferred over ob_gzhandler(). / And I do not understand, why it does not works ? I have reported it as a bug ... LacaK. Jasper Bryant-Greene wrote: To turn it on: ob_start('ob_gzhandler'); To turn it off: while(@ob_end_clean()); header('Content-Encoding: identity'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how to delete lines in a txt file using php.
M. Sokolewicz wrote: babu wrote: Hi i have a txt file like [SUBSTRAT] TYP=25x25_10 SUBSTRATNAME=S112 PIXEL=5 OPERATOR=Zi KOMMENTAR=dunkel INTENSITAET=1000.00 [MESSUNG] DATUM=03.01.2005 UHRZEIT=11:22 MESSUNG=SWEEP_UI i want to delete lines which start with '[' and 'TYP'. i have multiple such files.i have used strstr method. i have written code for it, but it results in deletion of complete data from files. Can anyone check where the logic goes wrong. here is my file. ? $del_lines=array([,TYP,P_MPP,I_MPP,V_MPP,T=,FIT,INTENSITAET); $dir=getcwd(); $handle = opendir($dir); while (false !== ($file = readdir($handle))) { if ((preg_match('/^2005\d{4}_\d{4}\.txt$/', $file))||(preg_match('/^2005\d{4}_\d{4}\_01_01\.txt$/',$file))){ $fc=file($file); $f=fopen($file,w); foreach($fc as $line){ $bool=TRUE; for($i=0;$isizeof($del_lines);$i++){ if(!strstr($line,$del_lines[$i])){ $bool=FALSE;} break; //fputs($f,$line); } //if($bool){fputs($f,$line);} } if($bool){fputs($f,$line);} fclose($f); } } closedir($handle); ? - Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail wouldn't something like this work (faster): ?php $deleteLines = [...] Actually, I see I've made a small mistake in that script, here's an updated one: ?php $deleteLines = array([,TYP,P_MPP,I_MPP,V_MPP,T=,FIT,INTENSITAET); if($handle = opendir('.')) { while(($file = readdir($handle)) !== false) { // init vars $contents = ''; if (!(preg_match('/^2005\d{4}_\d{4}\.txt$/', $file) || preg_match('/^2005\d{4}_\d{4}\_01_01\.txt$/',$file))){ // the filename has been rejected; move on to the next one continue; } // right, we need to open the file now so we can delete the lines $contents= file($file); $stream= fopen($file, 'w'); // loop trough the file, examining each line foreach($contents as $line=data) { $clearLine = false; foreach($deleteLines as $delete) { if(0 === strpos($data, $delete)) { // string starts with one of the ToBeDeleted parts $clearLine = true; } } if(!$clearLine) { fwrite($stream, $data, strlen($data)); } } fclose($stream); } } closedir($handle); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] zlib.output_compression
Is your browser sending an accept-encoding header containing gzip? (eg. Accept-Encoding: gzip,deflate). If not, then PHP will reason it should not send gzip-encoded content because the browser won't understand. - tul LacaK wrote: Thank you, I know this technique : ob_start('ob_gzhandler'); but I am interesting on : ini_set('zlib.output_compression', true); /this is preffered method as stated in manual : Also note that using ini.zlib.output_compression is preferred over ob_gzhandler(). / And I do not understand, why it does not works ? I have reported it as a bug ... LacaK. Jasper Bryant-Greene wrote: To turn it on: ob_start('ob_gzhandler'); To turn it off: while(@ob_end_clean()); header('Content-Encoding: identity'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Oracle Interface
Hi guys!! I'm just getting back into harness after 4 months off work following major surgery, so I'm well behind on all the PHP groups. It's nice to be back! Forgive me for responding to this one over a month later, but I haven't seen anybody else pointing this out: On 13 June 2005 13:30, Shane Presley wrote: On 6/10/05, Richard Lynch [EMAIL PROTECTED] wrote: On Fri, June 10, 2005 8:48 am, Shane Presley said: Where can I find some info on integrating Oracle and PHP? http://php.net/oracle pretty much covers it. Actually, no it doesn't. If you're using Oracle 8i or later, you should be using the OCI extension (http://php.net/oci8). The Oracle extension uses an older protocol for versions up to Oracle 7, and is now pretty much obsolete -- whilst it will work, more or less, with later versions, it's less efficient and doesn't support many of the features that OCI does. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] zlib.output_compression
Yes, my browser send Accept-Encoding: gzip,deflate When I alter : zlib.output_compression=on in php.ini it works fine ! Only runtime alter : ini_set('zlib.output_compression', true); does not work !? LacaK. M. Sokolewicz wrote: Is your browser sending an accept-encoding header containing gzip? (eg. Accept-Encoding: gzip,deflate). If not, then PHP will reason it should not send gzip-encoded content because the browser won't understand. - tul LacaK wrote: Thank you, I know this technique : ob_start('ob_gzhandler'); but I am interesting on : ini_set('zlib.output_compression', true); /this is preffered method as stated in manual : Also note that using ini.zlib.output_compression is preferred over ob_gzhandler(). / And I do not understand, why it does not works ? I have reported it as a bug ... LacaK. Jasper Bryant-Greene wrote: To turn it on: ob_start('ob_gzhandler'); To turn it off: while(@ob_end_clean()); header('Content-Encoding: identity'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Arrays
Hi, How can i destroy an array? I mean i have a loop and for each new value in the loop i want to destroy the array. Something like that: while($row = mysql_fetch_array($result)) { $product[] = $product_id; // some code here } I've tried this but doesn't work while($row = mysql_fetch_array($result)) { $product = array(); $product[] = $product_id; // some code here } Any help would be appreciated !!
[PHP] PHP and undelivered mail
HI all. Is it possible to determine if a mail was sent successfully or not delivered using PHP? Obviously using PHP to send the emails. thanks in advance ANgelo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Arrays
Hello, You may try unset($product) in your loop if you want to delete this var. Your code $product=array(); must work too... Another way, must be to use something like this $product[id]=$product_id; But i dont think it's your real goal?! Could you give some more information about that? Olivier Ps: documentation for unset : http://www.php.net/manual/en/function.unset.php Le Mardi 12 Juillet 2005 13:34, [EMAIL PROTECTED] a écrit : Hi, How can i destroy an array? I mean i have a loop and for each new value in the loop i want to destroy the array. Something like that: while($row = mysql_fetch_array($result)) { $product[] = $product_id; // some code here } I've tried this but doesn't work while($row = mysql_fetch_array($result)) { $product = array(); $product[] = $product_id; // some code here } Any help would be appreciated !! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] zlib.output_compression
do not forget to remove ob_start, also you'll make double compression regards Le Tue, 12 Jul 2005 12:29:02 +0200, LacaK [EMAIL PROTECTED] a écrit: Thank you, I know this technique : ob_start('ob_gzhandler'); but I am interesting on : ini_set('zlib.output_compression', true); /this is preffered method as stated in manual : Also note that using ini.zlib.output_compression is preferred over ob_gzhandler(). / And I do not understand, why it does not works ? I have reported it as a bug ... LacaK. Jasper Bryant-Greene wrote: To turn it on: ob_start('ob_gzhandler'); To turn it off: while(@ob_end_clean()); header('Content-Encoding: identity'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Strange notation to create object
On 24 June 2005 15:03, Jason Barnett wrote: Robert Cummings wrote: ... There's a difference between a reference to a reference and a copy of a reference *hehehe*. Cheers, Rob. Dear diary: jackpot! Now that makes sense. And am I correctly filling in the blanks when I guess that $foo3 = $aObj is merely copying the reference instead of referencing the reference? I probably could have written that more clearly, but I think you get what I'm saying. When the new PHP 5 behaviour was first being touted around, I remember it being explained that PHP 5 would use object _handles_ where PHP4 used the objects themselves. This is sort of analogous to (database) resource handles, or file handles, where what you get is a proxy for the actual thing. So Rob's statement would end up talking about a reference to a handle and a copy of a handle, which may help to make more sense out of what's going on! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Arrays
On 12/07/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, How can i destroy an array? I mean i have a loop and for each new value in the loop i want to destroy the array. Something like that: while($row = mysql_fetch_array($result)) { $product[] = $product_id; // some code here } I've tried this but doesn't work while($row = mysql_fetch_array($result)) { $product = array(); $product[] = $product_id; // some code here } To destroy an array? First of all, where does $product_id come from? You gave us no code that gives us that. Second, if you're trying to make an array populated with a feild from each row returned, your first example will work, but not the second. The second example will empty the array, and start a new one (which doesn't make sense to me why you would do that--because in the end, you're only going to have the array with the last row returned). But if you're trying to destroy an array doing either: unset($an_array) or $an_array = array(); will do the job. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to read PHP variables.
Hi you all! That's my problem: I have a configuration files with the following structure... $vars['varname'] = 'varvalue'; And I would like to have a module to change those parameters, but I don't know how to write a pattern to match it... Thanks in advance... Best Regards, Bruno B B Magalhaes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] zlib.output_compression
of course I have removed ob_start(...) david forums wrote: do not forget to remove ob_start, also you'll make double compression regards Le Tue, 12 Jul 2005 12:29:02 +0200, LacaK [EMAIL PROTECTED] a écrit: Thank you, I know this technique : ob_start('ob_gzhandler'); but I am interesting on : ini_set('zlib.output_compression', true); /this is preffered method as stated in manual : Also note that using ini.zlib.output_compression is preferred over ob_gzhandler(). / And I do not understand, why it does not works ? I have reported it as a bug ... LacaK. Jasper Bryant-Greene wrote: To turn it on: ob_start('ob_gzhandler'); To turn it off: while(@ob_end_clean()); header('Content-Encoding: identity'); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and undelivered mail
hi, This looks like imposible. Because generaly, SMTP is running asyncron mode. Maybe you can do it mail's return-path's mailbox checking. But this will not be syncron too. Best Regards. -Cafer Angelo Zanetti [EMAIL PROTECTED] writes: HI all. Is it possible to determine if a mail was sent successfully or not delivered using PHP? Obviously using PHP to send the emails. thanks in advance ANgelo -- 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
Re: [PHP] Re: Security, Late Nights and Overall Paranoia
Richard Davey wrote: I gave several valid good usability reasons, that I've yet to see anyone provide a coherent reason not to use. The usability arguments in favor of BBCode are fine. I'm not interested in that debate. I just don't want more people thinking that allowing BBCode somehow protects against XSS. As far as allowing [red] goes, you can just as easily add red to the list of available tags and not have to come up with a replacement for every other HTML tag that already exists. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session problems
I am having a problem with sessions. For some reason it keeps creating a new session for every page link you click and not using the original session created when session_start() gets called. Below is the code I am testing with. [one.php] ?php $SessionID = md5( uniqid( rand () ) ); session_start(); if( ( !session_is_registered( 'hash' ) ) || ( $_SESSION['hash'] != $_SESSION['chkhash'] ) ) { session_name( 'prostarinventory' ); session_register( 'hash' ); session_register( 'chkhash' ); session_register( 'count' ); $_SESSION['hash'] = $SessionID; $_SESSION['chkhash'] = $SessionID; $_SESSION['count'] = 1; } else { $_SESSION['count']++; } print_r( $_SESSION ); ? [/one.php] [test1.php] ?PHP include 'one.php'; print_r( $_SESSION ); ? form action=test.php method=postinput name=test type=textinput name= type=submit/form [/test1.php] [test.php] ?php include 'one.php'; echo SESSIONS: ; print_r( $_SESSION ); echo BRPOSTS: ; print_r( $_POST ); echo BRGETS: ; print_r( $_GET ); ? [/test.php] Any help is appreciated, so far I have found that if I use the include_once 'one.php'; and simply refresh the page sessions work fine, but if you call the test1.php then submit the form the session variables aren't found in the old session and a new one is being created on the server. -- Jason G. In my opinion anyone interested in improving themselves should not rule out becoming pure energy. ~Jack Handley, The New Mexican, 1988. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Security, Late Nights and Overall Paranoia
Evert|Rooftop wrote: If you for example only allow iu and b doing this with bbcode would require extra cpu-cycles to convert [i] to i I don't really agree with this, because I think escaping the html + replacing bbcode would require less cpu cycles then scanning the string for invalid html and escaping them. Maybe someone has the time to benchmark this? Performance aside, that's a dangerous way of allowing a restricted set of HTML. You want to escape the entire string. The only difference is that you can convert some HTML entities back to their original form if you want to allow them to be interpreted. In other words, these approaches are almost identical, which is why BBCode has very little value. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using SAML in PHP
Hi, I believe SOAP can be used inside of PHP. Can I use SAML in SOAP, which is in PHP? If yes, where can I find docs/info for that? If no, is there a SAML mailing list that I can join to get help on SAML? Thanks, Joe Sell on Yahoo! Auctions no fees. Bid on great items. http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: how to delete lines in a txt file using php.
hi sokolewicz, i get this error, wehn i try to run the file Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in C:\apachefriends\xampp\htdocs\fmf\IV-test-files\200501t\dirread2.php on line 21 M. Sokolewicz [EMAIL PROTECTED] wrote: babu wrote: Hi i have a txt file like [SUBSTRAT] TYP=25x25_10 SUBSTRATNAME=S112 PIXEL=5 OPERATOR=Zi KOMMENTAR=dunkel INTENSITAET=1000.00 [MESSUNG] DATUM=03.01.2005 UHRZEIT=11:22 MESSUNG=SWEEP_UI i want to delete lines which start with '[' and 'TYP'. i have multiple such files.i have used strstr method. i have written code for it, but it results in deletion of complete data from files. Can anyone check where the logic goes wrong. here is my file. $del_lines=array([,TYP,P_MPP,I_MPP,V_MPP,T=,FIT,INTENSITAET); $dir=getcwd(); $handle = opendir($dir); while (false !== ($file = readdir($handle))) { if ((preg_match('/^2005\d{4}_\d{4}\.txt$/', $file))||(preg_match('/^2005\d{4}_\d{4}\_01_01\.txt$/',$file))){ $fc=file($file); $f=fopen($file,w); foreach($fc as $line){ $bool=TRUE; for($i=0;$i if(!strstr($line,$del_lines[$i])){ $bool=FALSE;} break; //fputs($f,$line); } //if($bool){fputs($f,$line);} } if($bool){fputs($f,$line);} fclose($f); } } closedir($handle); ? - Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail wouldn't something like this work (faster): $deleteLines = array([,TYP,P_MPP,I_MPP,V_MPP,T=,FIT,INTENSITAET); if($handle = opendir('.')) { while(($file = readdir($handle)) !== false) { // init vars $contents = ''; if (!(preg_match('/^2005\d{4}_\d{4}\.txt$/', $file) || preg_match('/^2005\d{4}_\d{4}\_01_01\.txt$/',$file))){ // the filename has been rejected; move on to the next one continue; } // right, we need to open the file now so we can delete the lines $contents = file($file); $stream = fopen($file, 'w'); // loop trough the file, examining each line foreach($contents as $line=data) { foreach($deleteLines as $delete) { if(0 !== strpos($data, $delete)) { // string does not start with one of the ToBeDeleted parts // this (combines strpos() !== false || strpos() 0) // // so, let's write it back to the file fwrite($stream, $data, strlen($data)); } } } fclose($stream); } } closedir($handle); ? I'm assuming here you want to only delete lines STARTING with the part given in the array. - tul - Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail
RE: [PHP] Problem installing in Win2003 Server SP1
I can see the .htm/.html file just fine. So, what settings should I be looking at for the problems with PHP? Steve -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 12:12 AM To: Grosz, Steve (IPG IT) Subject: Re: [PHP] Problem installing in Win2003 Server SP1 On Mon, July 11, 2005 9:46 am, Grosz, Steve (IPG IT) said: I have been trying for several days to get PHP 4.x installed on my Win2003 SP1 server. I am doing the manual (isapi) install. I modified my php.ini file, I think correctly. And added the extension into IIS6, pointing to the \php directory and the php4isapi.dll file. When I try to view a php file, even one that returns the basics showing if PHP is running or not, I get a 'page can't be found' Can anyone tell me what I might be doing wrong? Put an .html file in that same directory. Surf to it. Can you find it? If not, PHP isn't the problem -- IIS configuration is. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sockets
On 7/12/05, daro [EMAIL PROTECTED] wrote: I don't know where should I put this script to be able to receive all datas and respond with proper strings. You would run the script as a shell script from the command line. On windows you can just save the code as a regular php script then start it up from a DOS prompt like: c:\PHP\php.exe -f yoursocketfile.php or if you are using a *nix setup run it just as it is, making sure the first line points to your php binary, for example mine is /usr/bin/php. Chmod it so it's executable. -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sockets
On Tue, 2005-07-12 at 16:49 +0200, daro wrote: Hi. I'm writing a TCP/IP server and client. On your website I found ready php script http://pl2.php.net/sockets but I have a question. For TCP/IP server the example script from your website has to be put on server as index.php file and the access to it could be f.e. http://192.168.1.11/index.php ? I don't know where should I put this script to be able to receive all datas and respond with proper strings. Your sincerely Dariusz Chorążewicz - Rozwiązania sms www.statsms.net, www.smscenter.pl GG: 346444 Tel: 696 061 543 You have to run your script from the command-line. Don't depend on apache to have it running. Also remember to set_time_limit(0) ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sockets
You should use/run it via PHP-CLI. It is a shell script. Ex: /usr/local/bin/php socket.php (on linux) or C:\PHP\php.exe socket.php (on windooz/M$-dos) Good luck. Hidayet Dogan On Tue, 12 Jul 2005, daro wrote: Hi. I'm writing a TCP/IP server and client. On your website I found ready php script http://pl2.php.net/sockets but I have a question. For TCP/IP server the example script from your website has to be put on server as index.php file and the access to it could be f.e. http://192.168.1.11/index.php ? I don't know where should I put this script to be able to receive all datas and respond with proper strings. Your sincerely Dariusz Chor??ewicz - Rozwi?zania sms www.statsms.net, www.smscenter.pl GG: 346444 Tel: 696 061 543 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sockets
On Tue, 2005-07-12 at 09:58 -0500, Greg Donald wrote: On 7/12/05, daro [EMAIL PROTECTED] wrote: I don't know where should I put this script to be able to receive all datas and respond with proper strings. You would run the script as a shell script from the command line. On windows you can just save the code as a regular php script then start it up from a DOS prompt like: c:\PHP\php.exe -f yoursocketfile.php or if you are using a *nix setup run it just as it is, making sure the first line points to your php binary, for example mine is /usr/bin/php. Chmod it so it's executable. -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ More specificlly, --8- #!/usr/bin/php ?php // your script here ? --8- And then $ chmod +x socket.php $ ./socket.php OR $ /usr/bin/php -q socket.php If your on *NIX, remember the last to put the process on the background. Not sure how one would go on windows tho :( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] max_file_size
Each time i try setting MAX_FILE_SIZE in a form and using the upload error code to check if the file is large it always uploads the entire file before showing the error that the file is too big.. either the manual is incorrect or this does not work as every method i've tried always waits for the file to be uploaded before it errors. eg: form enctype=multipart/form-data method=post input type=hidden name=MAX_FILE_SIZE value=1048576 / input type=file name=userfile size=29 / input type=submit name=submit value=Upload / /form switch($_FILES['userfile']['error']) { case 1: $message[] = 'Error #1 - ...'; break; case 2: $message[] = 'Error #2 - File is too big'; break; case 3: $message[] = 'Error #3 - File was partially uploaded'; break; } --snip -- IF no error then start upload... --snip yet it waits for file to upload before error. I've been using php for serveral years and i cant remember ever getting this to work like the manual states. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to get time cost for MySQL query
On 7/11/05, x [EMAIL PROTECTED] wrote: Since we can see the time cost each time we query MySQL through MySQL console (such as 75 rows in set (0.01 sec)), so I am wondering there is already an existing function which will return the value... I think you are confusing two things: mysql server and mysql command-line client. The time cost is calculated at the client side in mysql command-line client. It's not retrieved from the server but rather calculated with the help of three functions defined in mysql.cc: start_timer, end_timer, mysql_end_time (all are internal functions that don't have anything to do with the server). It's done more or less the way you would normally do it in php: (1) take down current time (2) do the query (3) take down time again and calculate the difference. -ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max_file_size
Sebastian wrote: Each time i try setting MAX_FILE_SIZE in a form and using the upload error code to check if the file is large it always uploads the entire file before showing the error that the file is too big.. either the manual is incorrect or this does not work as every method i've tried always waits for the file to be uploaded before it errors. eg: form enctype=multipart/form-data method=post input type=hidden name=MAX_FILE_SIZE value=1048576 / input type=file name=userfile size=29 / input type=submit name=submit value=Upload / /form switch($_FILES['userfile']['error']) { case 1: $message[] = 'Error #1 - ...'; break; case 2: $message[] = 'Error #2 - File is too big'; break; case 3: $message[] = 'Error #3 - File was partially uploaded'; break; } --snip -- IF no error then start upload... --snip yet it waits for file to upload before error. I've been using php for serveral years and i cant remember ever getting this to work like the manual states. From the manual: The MAX_FILE_SIZE hidden field (measured in bytes) must precede the file input field, and its value is the maximum filesize accepted. This is an advisory to the browser, PHP also checks it. Fooling this setting on the browser side is quite easy, so never rely on files with a greater size being blocked by this feature. The PHP settings for maximum-size, however, cannot be fooled. This form element should always be used as it saves users the trouble of waiting for a big file being transferred only to find that it was too big and the transfer failed. From my understanding of this paragraph, MAX_FILE_SIZE is checked by PHP but I dont see how you can infer that PHP is able to do this on the client. If any client side intervention is to be performed then it should be done by the browser. If you also look at the upload errors generated by PHP (http://uk.php.net/manual/en/features.file-upload.errors.php) you can see that these can only be generated on the server, and therefore *after* the file has been posted. I think it is your browser that you need to be investigating... HTH, Mikey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max_file_size
On Tue, 2005-07-12 at 11:35 -0400, Sebastian wrote: Each time i try setting MAX_FILE_SIZE in a form and using the upload error code to check if the file is large it always uploads the entire file before showing the error that the file is too big.. either the manual is incorrect or this does not work as every method i've tried always waits for the file to be uploaded before it errors. eg: form enctype=multipart/form-data method=post input type=hidden name=MAX_FILE_SIZE value=1048576 / input type=file name=userfile size=29 / input type=submit name=submit value=Upload / /form switch($_FILES['userfile']['error']) { case 1: $message[] = 'Error #1 - ...'; break; case 2: $message[] = 'Error #2 - File is too big'; break; case 3: $message[] = 'Error #3 - File was partially uploaded'; break; } --snip -- IF no error then start upload... --snip yet it waits for file to upload before error. I've been using php for serveral years and i cant remember ever getting this to work like the manual states. There is no way for you to check the file's size before it gets fully uploaded. This happens because Apache only checks the filesize when it's on the server's temporary files. The client doesn't send any info about the file except it's name and it's contents. Even if you want to turn to javascript, I don't think there's a way to do what you want to do. File input fields can only be read from my experience, and through javascript there isn't any way to access a file's properties through the client-side unless you have some sort of ActiveX control or somesuch. The only thing I saw that would do that was a Java applet :) Good luck! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] parsing a text file into columns and rows
Hi all, i have a text file as shown below, which contains records like varaiable, value pairs seperated by '=' .there are many such records, each record is starts with first variable 'SUBSTRATNAME'. SUBSTRATNAME=S112 -- PIXEL=5 OPERATOR=Zi KOMMENTAR=dunkel DATUM=03.01.2005 UHRZEIT=11:22 MESSUNG=SWEEP_UI I_SC=-57.3496E-12 V_OC=1.0103E+0 FF=-1.3303E+0 WIRKUNGSGRAD=14.4220E-9 SUBSTRATNAME=E07 -- PIXEL=1 OPERATOR=MN KOMMENTAR=Au/PEDOTCPP105D/Au DATUM=03.01.2005 UHRZEIT=11:52 MESSUNG=SWEEP_UI I_SC=-50.4506E-12 V_OC=1.0103E+0 FF=-1.5353E+0 WIRKUNGSGRAD=14.6421E-9 SUBSTRATNAME=E07 -- PIXEL=1 OPERATOR=Zi KOMMENTAR=Au/PEDOTCPP105D/Au DATUM=03.01.2005 UHRZEIT=11:54 MESSUNG=SWEEP_UI I_SC=NaN V_OC=0.E+0 FF=NaN WIRKUNGSGRAD=NaN i want to parse this file as shown below each column shud be seperated by tab space or comma. SUBSTRATNAME PIXEL OPERATOR KOMMENTAR...WIRKUNGSGRAD s112 5 zidunkel 14.4220E-9 likes this i want all the values. thanks for help - Yahoo! Messenger NEW - crystal clear PC to PCcalling worldwide with voicemail
Re: [PHP] max_file_size
Ahmed Saad wrote: hi Sebastain, On 7/12/05, Sebastian [EMAIL PROTECTED] wrote: yet it waits for file to upload before error. I've been using php for serveral years and i cant remember ever getting this to work like the manual states. Quoting the *php manual* The MAX_FILE_SIZE hidden field (measured in bytes) must precede the file input field, and its value is the maximum filesize accepted. (((This is an advisory to the browser))), PHP also checks it. Fooling this setting on the browser side is quite easy, so never rely on files with a greater size being blocked by this feature. The PHP settings for maximum-size, however, cannot be fooled. This form element should always be used as it saves users the trouble of waiting for a big file being transferred only to find that it was too big and the transfer failed. In a nut-shell, it's just a hint to the browser that may or may NOT consider it. -ahmed it doesnt seem to work on IE or Firefox.. two of the most popular browsers.. this shoudn't even be in the manual then because if it doesnt work for these two browsers then i would consider it pointless to use. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sockets
Please, PLEASE Reply to All! Yes, you have to add something like --8- while(true) { // code here if( $someConditionThatWillMakeMeExit ) { break; } sleep(1); // to prevent excessive processor usage } --8- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max_file_size
Sebastian wrote: snip it doesnt seem to work on IE or Firefox.. two of the most popular browsers.. this shoudn't even be in the manual then because if it doesnt work for these two browsers then i would consider it pointless to use. /snip It may not be your browser that it's not working with...it may be your system's security settings, or your firewall (if you're behind one) not allowing the information thru. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max_file_size
On Tue, 2005-07-12 at 12:38 -0400, John Nichel wrote: Sebastian wrote: snip it doesnt seem to work on IE or Firefox.. two of the most popular browsers.. this shoudn't even be in the manual then because if it doesnt work for these two browsers then i would consider it pointless to use. /snip It may not be your browser that it's not working with...it may be your system's security settings, or your firewall (if you're behind one) not allowing the information thru. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] Sure, it could be that. But, in this sittuation, the error says that the file is too big. Even it the firewall didn't let the file go through (wich I doubt, because a firewall won't parse HTTP requests and make those checks, unless you have a request max size or something), you'd just get an error page saying that the request didn't go through. DO NOT trust the browsers to do something. If all of them complied 100% to standards, we would live in a (almost) perfect world :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Arrays
I guess your purpose is to just save the row data from the mysql to the array each unit. So may be the result that you expected is sth like: $product[0] = 1; $product[1] = 2; $product[2] = 3; .. If you just loop for each new value in the loop and to destroy the array, you second example is okey. Best regards, Shiqi Yang -Original Message- From: Justin Gruenberg [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 7:43 PM To: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Arrays On 12/07/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, How can i destroy an array? I mean i have a loop and for each new value in the loop i want to destroy the array. Something like that: while($row = mysql_fetch_array($result)) { $product[] = $product_id; // some code here } I've tried this but doesn't work while($row = mysql_fetch_array($result)) { $product = array(); $product[] = $product_id; // some code here } To destroy an array? First of all, where does $product_id come from? You gave us no code that gives us that. Second, if you're trying to make an array populated with a feild from each row returned, your first example will work, but not the second. The second example will empty the array, and start a new one (which doesn't make sense to me why you would do that--because in the end, you're only going to have the array with the last row returned). But if you're trying to destroy an array doing either: unset($an_array) or $an_array = array(); will do the job. -- 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
RE: [PHP] back slashes
Yeah, mysql_escape_string() will help you. Best regards, Shiqi Yang -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Monday, July 11, 2005 9:42 AM To: Daniel Baughman Cc: php-general@lists.php.net Subject: RE: [PHP] back slashes On Fri, July 8, 2005 12:48 pm, Jay Blanchard said: [snip] Lets say I have a string: c:\www\test I want to insert it into a database, but what ends up getting inserted is: PHP3 and earlier: http://php.net/addslashes PHP4 (?) and later: http://php.net/myqsl_escape_string c:wwwtest I can not get php to double the back slashes no matter what I do! $string = str_replace(\\, , $string); This should have worked, for \, but there are other characters to worry about... So you must have made a typo or something when you tried this. -- Like Music? http://l-i-e.com/artists.htm -- 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
Re: [PHP] sockets
hi all, On Tue, 2005-07-12 at 16:49 +0200, daro wrote: Also remember to set_time_limit(0) ;) PHP ENTER CONFUSION The *CLI* version of php has no max execution time by default (0) - Where's the php CLI version in php4? [PHP_HOME]/cli/php.exe and it reads a php.ini if it was in the SAME directory or as specified using -c [DIRECTORY] (but apparently ignoring the max_execution_time value even it was specified in php.ini) - Oh and what's the $PHP_HOME/php.exe in a typical php4 distribution? it's the CGI executable (according to the accompanying READM) - And what's the CLI one in php5? [PHP_HOME]/php.exe and it reads php-cli.ini!! (note that this was the CGI one in php4) - Oh la la and where's CGI one in php5? [PHP_HOME]/php-cgi.exe Can i ini_set() the value of max_execution_time during runtime when using the cli versions? YES!! I've done some personal experimentation to confirm all the above. Tested with PHP/4.3.9 and PHP/5.0.2 -ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how to get time cost for MySQL query
Yes, mysql will cache your same query every time. So what you need is to just test the microtime before and after your query script. If you just want to know how about the efficiency about your sql script, you can use the mysql_command line and explain it. Otherwise, I think trying to catch the query time by mysql in php script is useless as there are many other factors can affect you. Best regards, Shiqi Yang -Original Message- From: Ahmed Saad [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 11:43 PM To: php-general@lists.php.net Subject: [PHP] how to get time cost for MySQL query On 7/11/05, x [EMAIL PROTECTED] wrote: Since we can see the time cost each time we query MySQL through MySQL console (such as 75 rows in set (0.01 sec)), so I am wondering there is already an existing function which will return the value... I think you are confusing two things: mysql server and mysql command-line client. The time cost is calculated at the client side in mysql command-line client. It's not retrieved from the server but rather calculated with the help of three functions defined in mysql.cc: start_timer, end_timer, mysql_end_time (all are internal functions that don't have anything to do with the server). It's done more or less the way you would normally do it in php: (1) take down current time (2) do the query (3) take down time again and calculate the difference. -ahmed -- 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
RE: [PHP] How to read PHP variables.
Firstly, I don't know why you want to change your configuration in real time? Then if you just keep your configuration in an array, then when you want to change and use it in your script, you can just $vars['varname'] = sth else. So pls give us more detail. Best regards, Shiqi Yang -Original Message- From: Bruno B B Magalhães [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 8:21 PM To: php-general@lists.php.net Subject: [PHP] How to read PHP variables. Hi you all! That's my problem: I have a configuration files with the following structure... $vars['varname'] = 'varvalue'; And I would like to have a module to change those parameters, but I don't know how to write a pattern to match it... Thanks in advance... Best Regards, Bruno B B Magalhaes -- 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
Re: [PHP] sockets
Since there was no reference to that on the PHP manual, I thought about mentioning it just to be safe. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Number of users
The current users' num is actually not exactly and it's just an estimated one. You can save your users' data in an array, and every time receive a request from a browser you should modify your array and then you can get how many users are online. And also there need another function to clean up the expired users. Best regards, Shiqi Yang -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 4:26 PM To: php-general@lists.php.net Subject: [PHP] Number of users Hello all, I have some questions and I hope someone could answer them 1. Is there a way to find out how many users currently browsing pages at my web site? 2. If I write down the IP of a user that log on my web site, can I check later if the IP still browsing pages at my web site or if he had left my website? Thanks yaron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Plz, help
You can use select u.a as u.a, v.a as v.a .. Best regards, Shiqi Yang -Original Message- From: adolfas [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 12, 2005 2:42 PM To: php-general@lists.php.net Subject: [PHP] Plz, help Hi, I have a line: $sql=select u.*, p.name_lt as pareiga from nese_users u left join nese_pareigos p on p.id=u.pareiga order by data desc; As I understand there are 2 tables: nese_users and nese_pareigos I need to know what atributes belong to what table form that line. Thanks -- 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
Re: [PHP] Number of users
On 7/12/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 2. If I write down the IP of a user that log on my web site, can I check later if the IP still browsing pages at my web site or if he had left my website? Don't assume that every IP maps to only ONE user. IPs are often masqueraded so many many users can share a single IP. Session IDs are the key to what you want. -ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] explain select
Explain select will only explain how mysql is going to use different keys and indexes to optimize query not actually give you a time estimate. The actual time it takes to handle indexes and such, especially if you are using joins, has to do with the Key_buffer and join_buffer values in your my.cnf or my.ini. If you raise these values then it might be faster because there will need to be less disk seeks when doing querry. The speed of a database depends on how much disk accessing need be done on any querry, as I'm sure you know. So check these values if you really need to speed up queries that use a lot of indexes to generate your results. C. Try doing an explain $query query. I *think* MySQL might cache the query/results enough that you'd get an accurate estimate... You could also turn MySQL Logging on. Or, rather crudely, time it in PHP: $query_start_time = microtime(); $result = mysql_query($query); $query_end_time = microtime(); It's not going to be 100% accurate, of course, as the overhead from PHP to MySQL is there, and if you get a *TON* of data in the query, then there's maybe a LOT of overhead there... But maybe you're better off including that anyway. On Mon, July 11, 2005 10:23 am, x said: I did checked both of them and it seems they do not provide such info... thanks Philip Hallstrom [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Is there any MySQL lib function which can provide time cost for last query? Maybe... http://us2.php.net/manual/en/function.mysql-info.php http://us2.php.net/manual/en/function.mysql-sta Carl Furst [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] max_file_size
André Medeiros wrote: On Tue, 2005-07-12 at 12:38 -0400, John Nichel wrote: Sebastian wrote: snip it doesnt seem to work on IE or Firefox.. two of the most popular browsers.. this shoudn't even be in the manual then because if it doesnt work for these two browsers then i would consider it pointless to use. /snip It may not be your browser that it's not working with...it may be your system's security settings, or your firewall (if you're behind one) not allowing the information thru. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] Sure, it could be that. But, in this sittuation, the error says that the file is too big. Even it the firewall didn't let the file go through (wich I doubt, because a firewall won't parse HTTP requests and make those checks, unless you have a request max size or something), you'd just get an error page saying that the request didn't go through. DO NOT trust the browsers to do something. If all of them complied 100% to standards, we would live in a (almost) perfect world :) I'm experiencing this problem as well. The manual seems to imply that using MAX_FILE_SIZE will enable the browser to recognize the fact that a user is trying to upload a file that is too large and will, therefore, be able to give the user a warning to prevent the uploading of a file that the server will not accept. I've found no evidence of this anywhere. A rather extensive websearch on the subject revealed a multiude of people just rehashing what it says in the manual, nothing original. I couldn't find documentation in any browser that said there was any way for the browser to do this. I did find some people saying that 'it worked' with no further elaboration, but the pessimist in me is saying that it didn't work from the client-side at all, just the server side, and they didn't realize it. So, to sum up, The manual seems to imply that it can, under some circumstances, work client-side, but I've found no other information to support that it has worked on any browser, anywhere at anytime. I am still looking for a client-side solution and haven't completely discounted this yet. By the way, I have no delusions that a client-side solution is secure, I'm handling the security server-side. I just don't want the user to have to upload 375 MB file over a dial-up connection, jsut to find out that the server won't accept anything larger than 350 MB. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Two websites need to share part of onedatabase,suggestions please
On Mon, 2005-07-11 at 14:29, Chris W. Parker wrote: Robert Cummings mailto:[EMAIL PROTECTED] on Friday, July 08, 2005 5:25 PM said: Thus siteMask should have one of the following values: (1 1) == 2 // only site1 can use the product. (1 2) == 4 // only site2 can use the product. ((1 1) | (1 2)) == 6 // both sites can use the product. Thanks for the example. But I'm still at a loss as to what strategy I should take regarding tables. Should I create two databases where one database has the product information and the other does not? Or should I create one giant database with duplicate tables? That is, one database with 'customers' and 'customers_two'? Sorry to respond so late, my free time these days is sporadic :) My example suggested one database to host all products for both sites. The bitmask is used as a filter to determine which sites can access the product information. In this way you keep your products centralized while providing easy access for either site 1 or site 2 customers. I also mentioned when I first suggested it, and as another response mentioned, that you could go with a separate table that provides site to product relationships and that would be scalable to many more sites. My suggestion was merely for increased efficiency based on your mention that you only have two sites in the equation. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Two websites need to share part ofonedatabase,suggestions please
Robert Cummings mailto:[EMAIL PROTECTED] on Tuesday, July 12, 2005 11:47 AM said: Sorry to respond so late, my free time these days is sporadic :) No problem. My example suggested one database to host all products for both sites. The bitmask is used as a filter to determine which sites can access the product information. In this way you keep your products centralized while providing easy access for either site 1 or site 2 customers. Oh I see. And I guess the same technique would be applied to the other tables like 'customers', 'coupons', 'orders', etc. I also mentioned when I first suggested it, and as another response mentioned, that you could go with a separate table that provides site to product relationships and that would be scalable to many more sites. I think I'm going to do something like this. Thanks, Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Missing or wrong reply-to headers in this mailing list
Hi all, I've been around this list for a month or something but i just discovered today that all my replies weren't sent to the list but instead to the individual who sent the message. I haven't administered any list systems before but at Apache for example it appends a reply-to header pointing to the mailing list posting addresss (php-general@lists.php.net, in our case). You hit reply and type the message. I think it rather confusing as we have to add php-general@lists.php.net in CC or TO fields and it results in duplicate messages. Can the list administators can fix this? (appending the correct reply-to header) And please anybody who got my messages foreward it to the list just to share ideas. Thanks for your help. -ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Two websites need to share part ofonedatabase,suggestions please
On Tue, 2005-07-12 at 14:50, Chris W. Parker wrote: Robert Cummings mailto:[EMAIL PROTECTED] on Tuesday, July 12, 2005 11:47 AM said: Sorry to respond so late, my free time these days is sporadic :) No problem. My example suggested one database to host all products for both sites. The bitmask is used as a filter to determine which sites can access the product information. In this way you keep your products centralized while providing easy access for either site 1 or site 2 customers. Oh I see. And I guess the same technique would be applied to the other tables like 'customers', 'coupons', 'orders', etc. Absolutely. I also mentioned when I first suggested it, and as another response mentioned, that you could go with a separate table that provides site to product relationships and that would be scalable to many more sites. I think I'm going to do something like this. Cool :) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Missing or wrong reply-to headers in this mailing list
Ahmed Saad wrote: Hi all, I've been around this list for a month or something but i just discovered today that all my replies weren't sent to the list but instead to the individual who sent the message. I haven't administered any list systems before but at Apache for example it appends a reply-to header pointing to the mailing list posting addresss (php-general@lists.php.net, in our case). You hit reply and type the message. I think it rather confusing as we have to add php-general@lists.php.net in CC or TO fields and it results in duplicate messages. Can the list administators can fix this? (appending the correct reply-to header) And please anybody who got my messages foreward it to the list just to share ideas. Thanks for your help. Can of Worms Status : Open -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CASE Tool For PHP OO Programming
I have been using Sparx Systems Enterprise Architect. david forums [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] DIA with the estension xml2php5 Le Mon, 11 Jul 2005 15:22:32 +0200, Pascual De Ruvo [EMAIL PROTECTED] a écrit: Hi, Can someone suggest a free CASE Tool for UML modelling that generates PHP 5 code? Thanks in advance, Pascual De Ruvo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Missing or wrong reply-to headers in this mailing list
Ahmed Saad mailto:[EMAIL PROTECTED] on Tuesday, July 12, 2005 11:24 AM said: Can the list administators can fix this? (appending the correct reply-to header) This has come up many times in the past and so far it has not changed. Just hit the Reply to All button and you'll be fine. Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Missing or wrong reply-to headers in this mailing list
Hi Chris On 7/12/05, Chris W. Parker [EMAIL PROTECTED] wrote: This has come up many times in the past and so far it has not changed. Just hit the Reply to All button and you'll be fine. thanks for pointing that out -ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Missing or wrong reply-to headers in this mailing list
On 7/12/05, John Nichel [EMAIL PROTECTED] wrote: Can of Worms Status : Open oh yeah sure -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT - Fonts
I am trying to use a font on my webpage that I have on my system only after a friend sent it to me. But its a neat little font that I want to use in a couple place on my site, like some of the headers. So I have two options I think one is to find a way to have the font download and work on the persons browser, this is the one I would like to get working. The second would be to make a php function that creates an image of the text then post the image inline. Any howtos or help that I might be able to get on the first one would be great. I think this is the first time I am trying not to use php. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Missing or wrong reply-to headers in this mailing list
Chris W. Parker wrote: This has come up many times in the past and so far it has not changed. Just hit the Reply to All button and you'll be fine. The problem with that is that people then get a personal message *and *a list message. Why can't this group be set up properly so reply goes to the list as with virtually every other mailing list I am part of? Alan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Missing or wrong reply-to headers in this mailing list
Alan Milnes wrote: Chris W. Parker wrote: This has come up many times in the past and so far it has not changed. Just hit the Reply to All button and you'll be fine. The problem with that is that people then get a personal message *and *a list message. Why can't this group be set up properly so reply goes to the list as with virtually every other mailing list I am part of? Please search the archives for the complete and authoritative answer to that. The short version is that munging the reply-to header is technically incorrect and from a usability point of view it errors on the side of exposing someone's potentially private email. It's easy to resend a message that was mailed privately by mistake. It is very hard to fix a private message that was sent to the list by mistake. And with a decent MTA you can remove duplicates. With procmail you do this: :0 Whc: msgid.lock | formail -D 16384 msgid.cache :0 a: duplicates Or dev/null it if you prefer. Just because all the other lists you are on do it that way doesn't necessarily make them right. Probably just means the lists aren't very technical. Most of the lists I am on get it right. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to read PHP variables.
Hi Bruno, On 7/12/05, Bruno B B Magalhães [EMAIL PROTECTED] wrote: Hi you all! $vars['varname'] = 'varvalue'; And I would like to have a module to change those parameters, but I don't know how to write a pattern to match it... i think you mean an API to help you manage and persist your application settings (something more or less like the Preferences API in java) and your format have to be much simpler like .ini format (key = value) or some variation take a look at phpclasses.org search results for ini http://www.google.com/custom?domains=www.phpclasses.orgq=inisa=Searchsitesearch=www.phpclasses.orgclient=pub-2951707118576741forid=1channel=5742870948ie=ISO-8859-1oe=ISO-8859-1cof=GALT%3A%23663399%3BGL%3A1%3BDIV%3A%2322%3BVLC%3A663399%3BAH%3Acenter%3BBGC%3AA3C5CC%3BLBGC%3AA3C5CC%3BALC%3AFF%3BLC%3AFF%3BT%3A00%3BGFNT%3AFF%3BGIMP%3AFF%3BLH%3A50%3BLW%3A256%3BL%3Ahttp%3A%2F%2Ffiles.phpclasses.org%2Fgraphics%2Fgooglesearch.jpg%3BS%3Ahttp%3A%2F%2Fwww.phpclasses.org%2Fsearch.html%3BFORID%3A1%3Bhl=en an alternative way is using XML to store your settings and use the PHP XML support for parsing/manipulating these files. -ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] zlib.output_compression
LacaK wrote: Yes, my browser send Accept-Encoding: gzip,deflate When I alter : zlib.output_compression=on in php.ini it works fine ! Only runtime alter : ini_set('zlib.output_compression', true); does not work !? LacaK. I'm pretty sure this behaviour is by design -- it doesn't make sense to allow setting it at runtime as some output could already have been made. Be interesting to see what the bug report digs up, though -- can we have a link? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sockets
Hi André, On 7/12/05, André Medeiros [EMAIL PROTECTED] wrote: Since there was no reference to that on the PHP manual, I thought about mentioning it just to be safe. yeah the manual is completely drak when it comes to php CLI binary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sockets
On 7/12/05, Ahmed Saad [EMAIL PROTECTED] wrote: yeah the manual is completely drak when it comes to php CLI binary `php -h` tells you all the command line options.. and all the basic fuctionality is covered in the manual online. Seems complete to me. -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sockets
On 7/13/05, Greg Donald [EMAIL PROTECTED] wrote: `php -h` tells you all the command line options.. and all the basic fuctionality is covered in the manual online. Seems complete to me. ehmm you weren't refering to the CLI version but anyways, I'd be grateful to anyone who points me to more information about other differences between the CGI and CLI versions (besides max_exection_times and configuration files). thanks -ahmed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Missing or wrong reply-to headers in this mailing list
Alan Milnes mailto:[EMAIL PROTECTED] on Tuesday, July 12, 2005 1:28 PM said: Chris W. Parker wrote: This has come up many times in the past and so far it has not changed. Just hit the Reply to All button and you'll be fine. The problem with that is that people then get a personal message *and *a list message. Why can't this group be set up properly so reply goes to the list as with virtually every other mailing list I am part of? Alan I've been doing that forever and I've never had anyone complain? Did you get this message twice? Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Missing or wrong reply-to headers in this mailing list
On 7/13/05, Chris W. Parker [EMAIL PROTECTED] wrote: I've been doing that forever and I've never had anyone complain? Did you get this message twice? i fell it my inbox though normally the filter would just skip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Missing or wrong reply-to headers in this mailing list
On 7/13/05, Ahmed Saad [EMAIL PROTECTED] wrote: i fell it my inbox though normally the filter would just skip sorry i meant it fell in my inbox where my gmail filters would normally skip te inbox step and just apply the label -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] connecting to MySQL from a Mac
Hello, I am trying to add a PHP search to my site and the read me file says to: 2. In the server, create a database in MySQL to hold Sphider data. a) at command prompt type (to log into MySQL): mysql -u your username -p Enter your password when prompted. b) in MySQL, type: CREATE DATABASE sphider_db; trouble is I am on a mac, so there is no command prompt. What are mac users supposed to do??? Of course you can use some other name for database instead of sphider_db. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] connecting to MySQL from a Mac
Bruce Gilbert wrote: Hello, I am trying to add a PHP search to my site and the read me file says to: 2. In the server, create a database in MySQL to hold Sphider data. a) at command prompt type (to log into MySQL): mysql -u your username -p Enter your password when prompted. b) in MySQL, type: CREATE DATABASE sphider_db; trouble is I am on a mac, so there is no command prompt. What are mac users supposed to do??? Sure you have a command prompt :) Mac = FreeBSD = Unix (well it's a little more complicated, but you get the idea) Try to find 'terminal' in your applications folder in Finder grt, Evert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] zlib.output_compression
Thanks for reply, In documentation is stated, than zlib.output_compression is changeable at PHP_INI_ALL. If there is no possibility to change it in script, why it is not PHP_INI_SYSTEM|PHP_INI_PERDIR ? And at second : When I set zlib.output_compression=on in php.ini, then I CAN turn it off in script using ini_set('zlib.output_compression', false); /*this works !*/ Why does not work ini_set('zlib.output_compression', true); ? /*this is a first line in script, so no output is already send*/ BUG No. is 33653 http://bugs.php.net/bug.php?id=33653 , but [EMAIL PROTECTED] market is as Bogus I still think, that it does not work as expected. LacaK. Jasper Bryant-Greene wrote: LacaK wrote: Yes, my browser send Accept-Encoding: gzip,deflate When I alter : zlib.output_compression=on in php.ini it works fine ! Only runtime alter : ini_set('zlib.output_compression', true); does not work !? LacaK. I'm pretty sure this behaviour is by design -- it doesn't make sense to allow setting it at runtime as some output could already have been made. Be interesting to see what the bug report digs up, though -- can we have a link? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php