[PHP] quick PHP question on unset()

2001-01-22 Thread indrek siitan

Hi,

i've got a $var1 that's referencing to a $var2 ($var1=&$var2;) ..

now, when i do unset($var1) it just unlinks the reference, instead
of "clearing" both variables (arrays) like i would want it to do..

any ideas how to get around that? as a bonus, the actual name of 
$var2 is not known at the point where unset() is done.


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==--  

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] quick PHP question on unset()

2001-01-22 Thread indrek siitan

Hi,

> i've got a $var1 that's referencing to a $var2 ($var1=&$var2;) ..
> 
> now, when i do unset($var1) it just unlinks the reference, instead
> of "clearing" both variables (arrays) like i would want it to do..
> 
> any ideas how to get around that? as a bonus, the actual name of 
> $var2 is not known at the point where unset() is done.

ask myself, answer myself :)

$var1=array() did the trick.


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==--  

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] eval() to string???

2001-01-24 Thread indrek siitan

Hi,

> I want to evaluate the code in $php_code to *another* string...

you have to do it through output buffering:

  ob_start();
  eval($php_code);
  $another_string=ob_get_contents();
  ob_end_clean();


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] filenames on file download

2001-02-22 Thread indrek siitan

Hi,

I'm storing files in DB. basically (what's important in this case),
I have two columns:

  file_name  -  contains the original filename
  file_src   -  blob which contains the actual file


now the user clicks on a link something like download.php?file_id=123
and the php script will spit out the file. is there any way (some
header magic) to make the user browser to offer the file to be
saved as "file_name" ?


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] bug or feature?

2001-03-14 Thread indrek siitan

Hi,



output: Value is NULL!


is it a bug or expected behaviour? tested it on 4.0.4pl1.
i got around it by using strcasecmp(), but just wondering. :)


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] enabling PHP functions only on specific virtual hosts

2001-04-16 Thread indrek siitan

Hi,

I'm running a small web hosting server on my machine and offering
PHP+MySQL to virtual hosting clients.

I've coded an additional PHP module, which I want to be a paid
add-on feature to the clients. Is there a way to disable the 
module or functions (it contains 2 functions) globally and then 
specifically enable them to certain virtual hosts?


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] enabling PHP functions only on specific virtual hosts

2001-04-16 Thread indrek siitan

Hi,

> you can globally disable function with:
> 
> | disable_functions   = 

ok, got to that point, too.

but is there an enable_functions keyword to explicitly enable
those functions in httpd.conf (this should be possible with
the php_value keyword, as far as I understood from the manual).


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Site Structure

2001-04-23 Thread indrek siitan

Hi,

> Also, it's not a good idea to use the .inc extension unless you've
> associated it with PHP. The reason is if I type the URL directly to
> /includes/header.inc I will get the source code for that file in text
> format. 

you don't have to keep your .inc files in the web server document
root folder at all...


Rgds,
  Tfr

 --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia >==--  

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP Graph class/library anywhere?

2001-05-01 Thread indrek siitan

Hi,

is there a PHP class/library available anywhere, that supports
dynamic creation of different graphs? I need 2D bar graph and
pie graph support.

i found the VH Graph (http://www.vhconsultants.com/graph/graph.htm),
but they want $100 for their 2.x version. i'd prefer a free one
(i'm sure there must be a couple floating around) :)


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Domino db

2001-05-10 Thread indrek siitan

Hi,

> 1. Is it simple to connect to a database like that by using php
> (or perl), compared to a mysql connection ?

PHP, as far as I know, doesn't support Domino directly. but you
should be able to connect to Domino via ODBC (ODBC support on
Windows PHP binaries is built in, for Unix it might be a bit
tricky).


Rgds,
  Tfr

 --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia >==--  

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problems with PHP / Progress / ODBC

2001-05-08 Thread indrek siitan

Hi,

I'm trying to write a PHP app that accesses a Progress database.

version info:
 - Windows 2000 Pro + Apache 1.3.14
 - PHP 4.0.4pl1 (4.0.5 just wouldn't work on my machine)
 - Progress 8.3.B
 - Merant Progress ODBC drivers v 3.50

the ODBC drivers seem to be fine - I made a MS Access database
and linked a bunch of Progress tables in there with Get External
Data / Link tables. I can view/query them just fine.

now, I tried a simple PHP app:

 --- 8< ---

 ".odbc_result($sth,"Trkoodi")." - ".odbc_result($sth,"Trnimi");
  }
  odbc_close($DBH);
?>

 --- 8< ---

The odbc_exec() query seems to be fine (when i do "echo $sth" after
the exec, i get "Resource id #2"). but the odbc_fetch_row() really
acts weird - it always returns true so it ends up in endless loop.
the odbc_result() calls return empty strings.

I've tried the odbc_connect() with all the possible cursor types,
doesn't help.

I've tried something like that:

 --- 8< ---

$i=1;
while(1)
 {
  if (!odbc_fetch_row($sth,$i)) break;
  echo " ".odbc_result($sth,"Trkoodi")." - ".odbc_result($sth,"Trnimi");
  $i++;
 }

 --- 8< ---

didn't work either. :(


as a really stoopid thing, I tried creating an ODBC source for the
Access database I created before (with the Progress tables linked
in via ODBC). now I connected to the Access database via ODBC in
PHP and tried to query the Progress tables linked into the Access.
everything worked fine - I could access all the information in
Progress.


any other ideas?


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Failing to get the semaphore

2002-02-28 Thread indrek siitan

Hi,

Has anyone any idea, what the following error might mean:
Warning: semget() failed for key 0x219c: No space left on device

What space am I out of?

FreeBSD 4.4-STABLE, PHP 4.1.1.


Rgds,
Indrek

--
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Indrek Siitan <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Tallinn, Estonia
   <___/   www.mysql.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP and Unicode

2001-10-20 Thread indrek siitan

Hi,

has anyone seen any Unicode support routines available anywhere for PHP?

the manual only documents utf8_encode() and utf8_decode(), that by
the documentation convert ISO-8859-1 strings to UTF8 and back.
but i also need support for other codepages (ISO-8859-*, KOI8-R
and others). I only need xx > UTF-8 encoding.



Rgds,
Indrek

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /    Indrek Siitan <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Tallinn, Estonia
   <___/   www.mysql.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP and Unicode

2001-10-20 Thread indrek siitan

Hi,

> has anyone seen any Unicode support routines available anywhere for PHP?

disregard the question. found iconv support right after sending this mail :)


Rgds,
Indrek

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /    Indrek Siitan <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Tallinn, Estonia
   <___/   www.mysql.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] mysql , postgres

2001-08-19 Thread indrek siitan

Hi,

> Well just my opinion but I think that Postgresql development is
> advancing quicker. With Red Hat joining in development and no
> infighting bewteen Postgresql developers  things are looking
> good for the future.

just to clear one issue - there has never been a "fight between mysql
developers".

the thing you're probably referring to above is the MySQL-vs-NuSphere fight.
NuSphere was to add their Gemini table handler (MySQL has an abstraction table
handler layer, so you can add many different table handlers) to MySQL. it has
not and won't affect the general development of MySQL.


Rgds,
Indrek

--
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Indrek Siitan <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Tallinn, Estonia
   <___/   www.mysql.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] echo $PHP_SELF doesn't work in an include

2001-09-06 Thread indrek siitan

Hi,

> I include another script-file with include_once. Now the output
> of my PHP-Vars ($PHP_SELF, $REQUEST_URI,
> $DOCUMENT_ROOT) is empty. In my parent-scripts the
> output works fine, but in the include is neither outputs the
> parent-data nor the include-data.

try echo $GLOBALS["PHP_SELF"]. if that works, then you must
have a scope problem.


Rgds,
Indrek

-- 
For technical support contracts, goto https://order.mysql.com/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Indrek Siitan <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, The Web Guru
/_/  /_/\_, /___/\___\_\___/   Tallinn, Estonia
   <___/   www.mysql.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Trouble with calling an external program in PHP

2004-06-29 Thread Indrek Siitan
Hi,

I'm writing a small image stock application that stores EPS files (that's
what the client is using for their work).

Since GD doesn't support EPS, the only alternative I've found to create
thumbnails is to use the 'convert' utility from ImageMagick.

When testing it on the command line and from a .php script run from shell,
everything works okay - running 'convert infile.eps outfile.jpg' generates a
JPG thumbnail in outfile.jpg.

But when that same piece of code is run from a .php script under Apache,
things get really weird.

What the actual script does is that it goes through a "dropbox" directory,
creates two thumbnail versions of each EPS (200px, 600px) and moves them to
the appropriate location. I've been running the latest tests with a set of
eight EPS files, ca 7-10mb each. The thumbnails should become ~25kb for the
200px version, ~50-60kb for the 600px one.

Here's the "ls" output of the directory after a try at running the script (I
commented out moving the thumbnails for testing):

--- 8< ---

-rw-r--r--   1 wwwwheel 0 Jun 30 03:27
Allahindlus.eps-832-lthumb.jpg
-rw-r--r--   1 wwwwheel 0 Jun 30 03:27
Allahindlus.eps-832-sthumb.jpg
-rw-r--r--   1 wwwwheel  8192 Jun 30 03:27
Palmolive-seebid-2.eps-832-lthumb.jpg
-rw-r--r--   1 wwwwheel  8192 Jun 30 03:27
Palmolive-seebid-2.eps-832-sthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
Palmolive_2.eps-832-lthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
Palmolive_2.eps-832-sthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
SEEMNESAI.eps-832-lthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
SEEMNESAI.eps-832-sthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
SULETEKK.eps-832-lthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
SULETEKK.eps-832-sthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
SULETEKK_2.eps-832-lthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
SULETEKK_2.eps-832-sthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
VIINISAI.eps-832-lthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
VIINISAI.eps-832-sthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
ZOTARELLA.eps-832-lthumb.jpg
-rw-r--r--   1 wwwwheel 16384 Jun 30 03:27
ZOTARELLA.eps-832-sthumb.jpg

--- 8< ---

Weird, isn't it - the first two files are 0 bytes, the next ones are 8K, and
the remaining are 16KB. A quick look tells that for those >0kb, the
beginning of the file is correct, it's just cut off at either 8 or 16K.

Following the suggestions on #php, I've tried all the possible methods
(exec, system, passthru, shell_exec, backticks) with and without all the
optional parameters (that trigger (a)synchronous running on some of those).
Same results.

I'm really at a loss (and at a deadline) here. Any ideas ... ?

The server is running FreeBSD 5.2.1, Apache 1.3, PHP 4.3.6. ImageMagick
version 6.0.2 if that matters.


PS. I'll try to watch for replies on lists.php.net, but since I'm not
subscribed, I would really appreciate CC:-ing me on the reply.


-- 
Indrek

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP configure commandline

2001-02-02 Thread indrek siitan

Hi,

is there a way to find out what configure command-line was used to
compile the PHP module, if the apache is not running? if it was
running, phpinfo() would show that.

but currently the case is to try to re-compile the PHP with same
settings and see if it would start working. :)


Rgds,
  Tfr

  --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]