[PHP] Fwd: MMCache segmentation faults

2003-11-17 Thread Uros Gruber
Subject: MMCache segmentation faults ===8==Original message text=== Hello! I send this to [EMAIL PROTECTED] but It was returned. So I'll ask here if somebody have any idea. I upgrade my php and mmcache (php 4.3.4 and mmcache 2.4.6) and I have a lot of [Mon Nov 17

[PHP] Timeout and fsockopen

2003-09-16 Thread uros . gruber
Hello! I'm trying to find if some host is up or not. For example $fp = @fsockopen ('www.damirjosar.com', 80, $errno, $errstr, 1); because this url is expired it takes about 10 seconds to get response from DNS, but with fsockopne it take 62 seconds. but i set timeout to 1. I also try

[PHP] php+apache+accelerator

2003-08-14 Thread Uros Gruber
Hello! I installer php and apache on many computers. I also try some of accelerators (phpaccelerato and turckmmcache). And I found some strange bahaviour about apache server. I didn't find any solution yet. Here is the problem. Apache server gets core dump whenever I have any php_admin... stuff

[PHP] Image Header

2003-08-14 Thread Uros Gruber
Hi! I don't know if this is ok, so can somebody give me some explanation. I made some php script to get Header from http request. When I request some image header looks like: HTTP/1.1 200 OK Date: Mon, 11 Aug 2003 17:24:14 GMT Server: Apache/1.3.27 (Unix) PHP/4.3.1 Last-Modified: Fri, 25 Oct

[PHP] config tests

2003-08-14 Thread Uros Gruber
Hello! I just made some speed tests getting configuration from DB. For now I figured 2 ways doing this. 1. One value in each row id | name| val -- 1| name1 | value1 2. using serialize($config) and saving this in one row. $config is predefined

Re[2]: [PHP] Image Header

2003-08-11 Thread Uros Gruber
Hello, Monday, August 11, 2003, 10:42:58 PM, you wrote: CS --- Uros Gruber [EMAIL PROTECTED] wrote: I made some php script to get Header from http request. When I request some image header looks like: Content-Type: text/html CS Your instincts serve you well. You want the Content-Type header

Re[2]: [PHP] config tests

2003-08-10 Thread Uros Gruber
text to store this because there's no need to index this. I also make some script to easy add and remove config values. But I agree with you that 1st one is more flexible. -- Best regards, Uros Sunday, August 10, 2003, 10:32:13 AM, you wrote: JWH Uros Gruber wrote: Hello! I just made

[PHP] detaching

2003-07-08 Thread Uros Gruber
Hello! first my code #!/usr/local/bin/php -q ?php echo Detached: .posix_setsid().\n; for ($i=0;$i10;$i++) { sleep(3); } echo Done!\n; ? I read that posix_setsid return pid on succesfull detaching. But i get -1. I read man for setsid and this -1 mean error. What i want is that if i run this

[PHP] text parser

2002-12-20 Thread Uros Gruber
Hi! I wan't to know if there is any goor text parser around here written in php. I'm asking before i create my own. I would like extract some text msgs to words and i would also like take care of stop words, special characters etc... So to know if some word is regular word, or if is number, html

[PHP] Divide into words

2002-12-16 Thread Uros Gruber
Hi! For example i have some words: Today is very beautiful day and sun is shining What i want to get from this is array words [Today] = 0 [Is] = 6,30 [Very] = 8 [beautiful] = 12 .. Can somebody please help me with this. Those nubers are position of special word in above sentence. If

Re[2]: [PHP] Divide into words

2002-12-16 Thread Uros Gruber
Hi! I have dome almost the same $input = 'Today is a very beautiful day and the sun is shining'; $output = array(); $words = explode(' ',$input); $cur_pos = 0; foreach($words as $word) { if(!empty($output[$word])){ $output[$word] .= ','.$cur_pos; } else { $output[$word]

[PHP] ob_output

2002-11-22 Thread Uros Gruber
Hi! here is my test code ?php ob_start(); for ($n=1;$n10;$n++) { echo testbr; ob_end_flush(); sleep(2); } ? I can make this work on php and apache. I always get output in one shot not line by line. If i try this code with php and iis it works. What am i doing wrong. Do i have to tell

Re[2]: [PHP] ob_output

2002-11-22 Thread Uros Gruber
2002, Uros Gruber wrote: ob_end_flush(); CW This turns off output buffering after flushing, the first time it gets CW called in the first iteration of your for() loop. I can make this work on php and apache. I always get output in one shot not line by line. If i try this code with php and iis

[PHP] DB speed

2002-10-10 Thread Uros Gruber
Hi! I'm making some testing over DB.php (PEAR) And i wan't to know if this is normal. I've made some script where I connect do SQL server and execute one simple (1row) query. I use pgsql and mysql. tables and indexes are same for both servers. So test table is identical Whe i execute

Re[2]: [PHP] DB speed

2002-10-10 Thread Uros Gruber
.. Cheers Simon -Original Message- From: Uros Gruber [mailto:[EMAIL PROTECTED]] Sent: 10 October 2002 14:17 To: [EMAIL PROTECTED] Subject: [PHP] DB speed Hi! I'm making some testing over DB.php (PEAR) And i wan't to know if this is normal. I've made some script where I

[PHP] What to use for multilanguage

2002-09-30 Thread Uros Gruber
Hi! I'm developing some CMS engine and right now i'm at designing multilanguage feature. I nee some advices what is the best way to solve this. What is with memory because if i have some big language files etc. What to use, pure php, db, gettext. What about speed. Any ideas would be good.

Re: [PHP] Whos online at the moment in PHP

2002-06-23 Thread Uros Gruber
Hi, I've ma some atuh system to do such thing beside other special functions, u have to store some session ids in some db and then refresh timestamp for those session wich is still active other delete after 30min or some other time. -- bye, Urosmailto:[EMAIL

Re[2]: [PHP] Very slow pg access

2002-06-22 Thread Uros Gruber
Hi! Sunday, June 23, 2002, 1:21:07 AM, you wrote: F I find it impossible that PHP should be slow. PHP's Pg functions are - F and shouldn't be - nothing more or else than a frontend to the Pg API. F The problem is most likely that you are not comparing the same values. I F think the analyze

[PHP] Very slow pg access

2002-06-21 Thread Uros Gruber
Hi! i made some benchmarks because my script is somehow very slow. In this script i execute 3 queries to PostgreSQL server and one connect string. I connect to socket. I check this queries in pg with explain analyze and i have result 1.18ms so i add a little and let say that for those 3 queries

Re: [PHP] Speed tests? RAM usage displays?

2002-06-20 Thread Uros Gruber
Hi! Thursday, June 20, 2002, 10:56:40 PM, you wrote: PS Is there any way to determine script's memory usage? When you configure and compile you have some option --with-memory-limit something like that and then add \%{mod_php_memory_usage}n\ in you http.conf of Apache where you define how

[PHP] help with some class problem

2002-06-19 Thread Uros Gruber
Hi! i'm making some modular aplication. I have one base class for example: class Main { function loadmod($name,$mod) { $mod = new $name; // load module } } In module class i want to use some properties from main module, but i don't know how to solve this. But i don't want extend

[PHP] directory browsing

2002-05-01 Thread Uros Gruber
Hi! I wan't to make directory browsing like yahoo or google over categories. For example look on http://www.google.com/dirhp I have made myself 2 diferent ways. One is quicker but more complex and oher is slower but easy to read and understand. In my table i have this colums id_cat, name,

[PHP] BUG in recursion

2002-03-30 Thread Uros Gruber
Hi! This is a code function Test() { static $count = 0; $count++; echo $count; if ($count 10) { Test (); } echo j; } test(); Output is 12345678910jj Why is there 10 j at the and. If this would work it can be only one. If $count is grater than 10 it

Re[2]: [PHP] BUG in recursion

2002-03-30 Thread Uros Gruber
mailto:[EMAIL PROTECTED] Sunday, March 31, 2002, 1:10:30 AM, you wrote: LTW On Sat, 2002-03-30 at 15:59, Uros Gruber wrote: Hi! This is a code function Test() { static $count = 0; $count++; echo $count; if ($count 10) { Test (); } echo

Re[4]: [PHP] BUG in recursion

2002-03-30 Thread Uros Gruber
] Sunday, March 31, 2002, 1:34:20 AM, you wrote: LTW On Sat, 2002-03-30 at 16:16, Uros Gruber wrote: Hi! This I simply don't understand why this code executes that way. So there is only inportant to put return after recursive call and it works like i wan't. I sometimes write small C programs

[PHP] SQL and PHP (socket vs TCP)

2002-02-26 Thread Uros Gruber
Hi! Yesterday i noticed some strange thing with connection PHP to postgreSQL. I have some script to tell me how long does it take to generate some page. And i noticed that this time is longer if i connect to socket. Isn't this a little strange. I know that connection to socket must be quicker

[PHP] Localization support

2002-02-24 Thread Uros Gruber
Hi! I hope this is right address to get some help about this. I tried many ways to get working locales, but nothing works. My OS is FreeBSD 4.5 and php i use is 4.1.1. I want to get slovenian locale working If I set LC_ALL in my environment and if i type date for example in shell everything