[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 13:4

[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 checkdnsrr

[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 200

[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 arr

[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

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

Re[2]: [PHP] config tests

2003-08-10 Thread Uros Gruber
e from this array. I use 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 Grube

[PHP] detaching

2003-07-08 Thread Uros Gruber
Hello! first my code #!/usr/local/bin/php -q 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 script with automatic detaching. But it does nothing than waiting this for to finish. What

[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

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] 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.

Re[2]: [PHP] ob_output

2002-11-22 Thread Uros Gruber
, 22 Nov 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 l

[PHP] ob_output

2002-11-22 Thread Uros Gruber
Hi! here is my test code "; 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 apache to send line by line to browser not everything

Re[2]: [PHP] DB speed

2002-10-10 Thread Uros Gruber
- something tells me there >> are other factors contributing.. >> Cheers >> Simon >> >> -Original Message- >> From: Uros Gruber [mailto:[EMAIL PROTECTED]] >> Sent: 10 October 2002 14:17 >> To: [EMAIL PROTECTED] >> Subject: [PHP] DB speed >

[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

[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 PROTECT

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 ana

[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 a

[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, id_

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 l

Re[2]: [PHP] BUG in recursion

2002-03-30 Thread Uros Gruber
-- bye, Urosmailto:[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; >

[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

[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 th

[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 is