Re: [PHP] Re: Questions regarding limits of processes launched bysystem, exec,passthru ...

2008-10-01 Thread Valentin Schmid - ICSurselva AG
Hello Thodoris,

 
 Hello all again,

 It seems that Problem can only be solved by one of the following ways:

 1. Don't use mod_php; use CGI or FastCGI instead. Then it would be
possible to limit the resources via RLimitCPU / RLimitMEM.

 
 I haven't tried that but as I have noticed in the reference that
 probably mod_php's processes get limited too:
 
 This applies to processes forked off from Apache children servicing
 requests, not the Apache children themselves.
 This includes CGI scripts and SSI exec commands, but not any processes
 forked off from the Apache parent such as piped logs.
 
 It says that it includes CGI but it doesn't exclude necessarily mod_php.
 Does it ?
No, it doesn't.

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



[PHP] Re: Questions regarding limits of processes launched by system, exec,passthru ...

2008-09-29 Thread Valentin Schmid - ICSurselva AG

Hello all again,

It seems that Problem can only be solved by one of the following ways:

1. Don't use mod_php; use CGI or FastCGI instead. Then it would be
   possible to limit the resources via RLimitCPU / RLimitMEM.

2. Use one of the following apache core patch
http://archives.neohapsis.com/archives/openbsd/2005-12/1436.html
   or the following apache module:
http://www.ucc.asn.au/~dagobah/things/mod_rlimit.c
   (Unfortunately only for apache 1.3)

Thanks for all your answers.

Kind regards
valli

Valentin Schmid - ICSurselva AG wrote:

Hello all,

Is there a way to limit the memory consumption and / or the CPU
consumption of processes launched by the php functions system,
exec, passthru, proc_open and shell_exec?

We use mod_php with an apache (mpm-prefork) on Linux.

The following settings don't have any effect at all:
PHP:
  max_execution_time 30
  memory_limit 8M
Apache:
  RLimitCPU 30 30
  RLimitMEM 8388608 8388608

The limits above do have effect on php-scripts (without system calls)
and on CGIs (as well on processes launched by CGIs).

Any Ideas?

Kind Regards
valli


PS: I tested it with the following two scripts:
system_memorytest.php
=
html
head
  titlephp-systemcall-memory test/title
/head
body
  php-systemcall-memory testbr
  ... and here's the system call:br
  pre
?php
   $cmd = '/usr/bin/perl -e \'
  $| = 1;
  print start of the systemcallbr\n;
  $s = teststr_;
  while (1) {
 print len=.length($s).br\n;
 sleep(1);
 $s .= $s;
  }
   \'';
   print htmlspecialchars($cmd);
?
  /pre
?php
  ob_flush();
  flush();
  system($cmd);
?
/body
/html


system_timeouttest.php
==
html
head
  titlephp-systemcall-timeout test/title
/head
body
  php-systemcall-timeout testbr
  ... and here's the system call:br
  pre
?php
   $cmd = '/usr/bin/perl -e \'
  $| = 1;
  print start of the systemcallbr\n;
  $i = 0;
  while (1) {
 if (($i % 1000) == 0) {
print i=.$i.br\n;
 }
 $i += 1;
  }
   \'';
   print htmlspecialchars($cmd);
?
  /pre
?php
  ob_flush();
  flush();
  system($cmd);
?
/body
/html





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



[PHP] Questions regarding limits of processes launched by system, exec, passthru ...

2008-09-25 Thread Valentin Schmid - ICSurselva AG
Hello all,

Is there a way to limit the memory consumption and / or the CPU
consumption of processes launched by the php functions system,
exec, passthru, proc_open and shell_exec?

We use mod_php with an apache (mpm-prefork) on Linux.

The following settings don't have any effect at all:
PHP:
  max_execution_time 30
  memory_limit 8M
Apache:
  RLimitCPU 30 30
  RLimitMEM 8388608 8388608

The limits above do have effect on php-scripts (without system calls)
and on CGIs (as well on processes launched by CGIs).

Any Ideas?

Kind Regards
valli


PS: I tested it with the following two scripts:
system_memorytest.php
=
html
head
  titlephp-systemcall-memory test/title
/head
body
  php-systemcall-memory testbr
  ... and here's the system call:br
  pre
?php
   $cmd = '/usr/bin/perl -e \'
  $| = 1;
  print start of the systemcallbr\n;
  $s = teststr_;
  while (1) {
 print len=.length($s).br\n;
 sleep(1);
 $s .= $s;
  }
   \'';
   print htmlspecialchars($cmd);
?
  /pre
?php
  ob_flush();
  flush();
  system($cmd);
?
/body
/html


system_timeouttest.php
==
html
head
  titlephp-systemcall-timeout test/title
/head
body
  php-systemcall-timeout testbr
  ... and here's the system call:br
  pre
?php
   $cmd = '/usr/bin/perl -e \'
  $| = 1;
  print start of the systemcallbr\n;
  $i = 0;
  while (1) {
 if (($i % 1000) == 0) {
print i=.$i.br\n;
 }
 $i += 1;
  }
   \'';
   print htmlspecialchars($cmd);
?
  /pre
?php
  ob_flush();
  flush();
  system($cmd);
?
/body
/html




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



[PHP] Passing $Vars between 2 php pages

2003-07-16 Thread Valentin
Hi,
is any way to pass a $Var from one to other php pages without using FORM
and Cookies?

Thanks,




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



Re: [PHP] Passing $Vars between 2 php pages

2003-07-16 Thread Valentin
Thank you Robert!
But, I forgot to mention... and without URI



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



Re: [PHP] Passing $Vars between 2 php pages

2003-07-16 Thread Valentin
Thanks John!




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



[PHP] Re: General question...

2003-06-13 Thread Valentin
Thanks Bobby!



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



[PHP] General question...

2003-06-12 Thread Valentin
hi all,

is it possible with php:
first to pass request to another URL and after that to get the html responce
as a string and put it into php $variable?

best,



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



Re: [PHP] General question...

2003-06-12 Thread Valentin
hi Jason,
In my site I use a payment system, but unfortunately, there is a moment
when the client must enter his card data into the page owned by the
company that makes transactions (sorry for this descriptive bad english).
The problem is that the design of this page is quite different then mine and
I would like to get the html responce and redesign at run time by php and
display what I would like to be.



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



Re: [PHP] General question...

2003-06-12 Thread Valentin

Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Do you think the users will trust your site that much they will be
 willing to give you their credit card information? How would they know
 you won't keep this information?


I'm going to make only cosmetic changes like font size, alignments and
colours...
But I don't know... may be you are right... anyway.

Thank you



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



[PHP] Php and JavaScript

2003-03-02 Thread Valentin
Hi,
Is any way to write JavaScript code into PHP function or to send PHP's
variables values to the JScript variables?

Thanks,



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



[PHP] Php and JScript

2003-03-02 Thread Valentin
Hi,
Is any way to write JavaScript code into PHP function or to send PHP's
variables values to the JScript variables?

Thanks,




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



[PHP] Re: Php and JavaScript

2003-03-02 Thread Valentin
Thank you Vincent!




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



[PHP] PHP and Oracle

2003-01-23 Thread Christophe Valentin
Hello,

Does someone had a speed trouble when using PHP and Oracle with OCI ??
The trouble i have is that the php pages are slower and slower during the
day.
It looks that if I make an apache restart things restart in a good way.
I don't understand where the trouble come from.

Help !

Christophe


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




[PHP] Case insensitive str_replace

2002-01-10 Thread Valentin V. Petruchek

Hello list.

Need you help.

My aim is to str_replace ($word,b$word/b,$str). But: i want
str_replace not to differ uppers and lowers:

Rector = bRec/btor

after str_replace ('rec',brec/b,Rector) in other words.

It seemes to me ereg can help, but i'm still not good at it. Help please

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]




-- 
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 Forms

2002-01-02 Thread Valentin V. Petruchek

Mail() function works fine on win32, you need enter smtp server in your
php.ini and sendfrom address.
example:

SMTP = 10.1.25.1 ; for Win32 only
sendmail_from = [EMAIL PROTECTED]

Valentin Petruchek (aki Zliy Pes)
*** ??? ?? ***
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]
- Original Message -
From: Matt Obstgarten [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 02, 2002 3:48 PM
Subject: [PHP] PHP Forms


 Hello,
 I am new to PHP. I have PHP (cgi version) configured on my
 machine running XP Pro and IIS. It works fine. The first script I wanted
 to write was the ever-useful feedback form script where the contents of
 a form are e-mailed to the webmaster. I am sure that I have a working
 script but when I test on my machine I get a server error. I realize
 that this is most likely because I don't have any mail settings
 configured on IIS (new to this as well). I was wondering if someone
 could give me some advice on how to properly set this up so I can
 locally test mail scripts like this. Thanks,
 Matt


 --
 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 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] MsSQL from FreeBSD

2001-12-28 Thread Valentin V. Petruchek

 OK, we're talking about Linux, right?

No ;) FreeBsd 4.x don't know exactly about x

 I'll bet `cat /proc/sys/fs/file-max` gives you 4096

 Try upping the file descriptor limit in /proc/sys/fs/file-max. That
 may or may not solve the problem; worth a try. How much memory does
 the client machine (the one you `configure'd) have?





-- 
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] MsSQL from FreeBSD

2001-12-27 Thread Valentin V. Petruchek

Hello php-world!

I'm working on Apache 22, php 4.1.0 and try to work with MsSQL 2000.

PHP is configured
 './configure' '--with-apache=../apache_1.3.22' '--with-mysql'
'--with-sybase=/usr/local/freetds' '--enable-track-vars'

Everything works fine when using mssq-Functions, except extracting images
from db. There is limit on 4096 bytes when i extract data from image field.
I've changed php.ini - turned mssql_limits to 100 (instead of 4096),
restarted a[pache but problem doesn't seem to disappear.

On IIS i t works fine, but what do i miss???

Merry Christmas and Happy New Year,
Zliy Pes, http://zliypes.com.ua





-- 
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] MsSQL from FreeBSD

2001-12-27 Thread Valentin V. Petruchek

Yes, php.ini is there.

You see, there is no mssql section when phpinfo(), but mssql works!

As i understood php works with mssql  when sybase installed, but sybase has
no parameters need to change:


  Sybase Support enabled
  Allow Persistent Links Yes
  Persistent Links 0/unlimited
  Total Links 0/unlimited
  Application Name PHP 4.0
  Client API Version


- Original Message -
From: Brian Clark [EMAIL PROTECTED]
To: PHP is not a drug. [EMAIL PROTECTED]
Sent: Thursday, December 27, 2001 4:59 PM
Subject: Re: [PHP] MsSQL from FreeBSD


 * Valentin V. Petruchek ([EMAIL PROTECTED]) [Dec 27. 2001 05:55]:

  Hello php-world!

 Hello.

  PHP is configured
   './configure' '--with-apache=../apache_1.3.22' '--with-mysql'
  '--with-sybase=/usr/local/freetds' '--enable-track-vars'

  Everything works fine when using mssq-Functions, except extracting
images
  from db. There is limit on 4096 bytes when i extract data from image
field.
  I've changed php.ini - turned mssql_limits to 100 (instead of 4096),
  restarted a[pache but problem doesn't seem to disappear.

 In the output of phpinfo(), where it mentions your php.ini file, do you
 have it in that place?

  On IIS i t works fine, but what do i miss???

 --
 Brian Clark | Avoiding the general public since 1805!
 Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
 Why is abbreviation such a long word?


 --
 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 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] Looking for a function

2001-12-24 Thread Valentin V. Petruchek

Hello, cannot find function to convert all dangerous symbols (spaces,dots
etc) into %20 variant.

Is there any standard, or i have to develop my own?




-- 
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] Looking for a function

2001-12-24 Thread Valentin V. Petruchek

Thanks. Exactly what i need

Merry Christmas!
- Original Message -
From: James Cox [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; PHP [EMAIL PROTECTED]
Sent: Monday, December 24, 2001 6:15 PM
Subject: RE: [PHP] Looking for a function


 www.php.net/urlencode

 Merry Christmas!

 James Cox

  -Original Message-
  From: Valentin V. Petruchek [mailto:[EMAIL PROTECTED]]
  Sent: Monday, December 24, 2001 3:58 PM
  To: PHP
  Subject: [PHP] Looking for a function
 
 
  Hello, cannot find function to convert all dangerous symbols
(spaces,dots
  etc) into %20 variant.
 
  Is there any standard, or i have to develop my own?
 
 
 
 
  --
  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 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 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] How can i send eMail under Win32

2001-12-17 Thread Valentin V. Petruchek


Mail() function works fine on win32, you need enter smtp server in your
php.ini and sendfrom address.
example:

SMTP = 10.1.25.1 ; for Win32 only
sendmail_from = [EMAIL PROTECTED]

Zliy Pes, http://zliypes.com.ua

- Original Message -
From: William Sanchez Sanchez [EMAIL PROTECTED]
To: Php-General (E-mail) [EMAIL PROTECTED]
Sent: Monday, December 17, 2001 6:45 PM
Subject: [PHP] How can i send eMail under Win32



   I need to send eMail under Win32

   Regards..
 William

 --
 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 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] Logo proposal

2001-12-13 Thread Valentin V. Petruchek

Aunt is more similar very similar to PHP. Very industrious and powerful ;)

- Original Message -
From: PHPGalaxy.com [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Thursday, December 13, 2001 1:31 PM
Subject: Re: [PHP] Logo proposal


 Actually I heard it's 50 times it's weight, but I refuse to be anal about
it. =)

 Who's to say ants dont work just as hard in the winter? We can't se em..
unless
 it's because they're dormant in the winter, in which case I just made
myself look
 INCREDIBLY stupid =)







-- 
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] pictures width and height

2001-12-13 Thread Valentin V. Petruchek

?PHP
$size = getimagesize ($userfile);
echo pre;
print_r($size);
echo /pre;
?

userfile is file you want to get size of.

Zliy Pes, http://www.zliypes.com.ua
- Original Message -
From: Tommy Straetemans [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 13, 2001 4:32 PM
Subject: [PHP] pictures width and height


 Hi,
  I'am new in php and i have a question.
 Is there a way to check the height and width from a picture that I upload?


 Tommy Straetemans



 --
 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 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] Logo proposal - voting script!

2001-12-13 Thread Valentin V. Petruchek


AND WHAT ABOUT WOODPECKER! He started everything!

- Original Message -
From: Michael Cronström [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 13, 2001 7:55 PM
Subject: [PHP] Logo proposal - voting script!


 OK guys,

 a voting script!

 at: http://zoon.se/vote/logo.php

 try it :)

 Michael Cronstrom
 Web Inventor

 At 13:26 13/12/01, you wrote:
 I'd kind of ignored this whole thread thinking it was going on and on,
but
 in the end I have to say something :)
 
 None of the other animals really captured my attention, but having an
Ant
 would be quite cool.  Not because of the ant on its own, but it's usually
a
 whole bunch of ants that really really do achieve something (just
 remembering all those national geographic programs). It's a bunch of
people
 that have grown PHP into what it is and I think that fits.  I'd go for
the
 ant myself :)
 
 Someone put up a voting script !
 
 Ade
 
 --- i n o v i c a h o s t i n g . c o m --
 
 Powerful hosting from www.inovicahosting.com
 
 
 
   -Original Message-
   From: Valentin V. Petruchek [mailto:[EMAIL PROTECTED]]
   Sent: 13 December 2001 12:05
   To: PHP
   Subject: Re: [PHP] Logo proposal
  
  
   Aunt is more similar very similar to PHP. Very industrious and
powerful ;)
  
   - Original Message -
   From: PHPGalaxy.com [EMAIL PROTECTED]
   To: Php-General [EMAIL PROTECTED]
   Sent: Thursday, December 13, 2001 1:31 PM
   Subject: Re: [PHP] Logo proposal
  
  
Actually I heard it's 50 times it's weight, but I refuse to be
   anal about
   it. =)
   
Who's to say ants dont work just as hard in the winter? We can't se
em..
   unless
it's because they're dormant in the winter, in which case I just
made
   myself look
INCREDIBLY stupid =)
   
   
  
  
  
  
  
   --
   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 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 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 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] Logo proposal - voting script!

2001-12-13 Thread Valentin V. Petruchek

Warning: Cannot add header information - headers already sent by (output
started at /home/b1642/public_html/vote/logo.php:6) in
/home/b1642/public_html/vote/logo.php on line 49

Seemes to be a bug.
- Original Message -
From: Michael Cronström [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 13, 2001 7:55 PM
Subject: [PHP] Logo proposal - voting script!


 OK guys,

 a voting script!

 at: http://zoon.se/vote/logo.php

 try it :)

 Michael Cronstrom
 Web Inventor

 At 13:26 13/12/01, you wrote:
 I'd kind of ignored this whole thread thinking it was going on and on,
but
 in the end I have to say something :)
 
 None of the other animals really captured my attention, but having an
Ant
 would be quite cool.  Not because of the ant on its own, but it's usually
a
 whole bunch of ants that really really do achieve something (just
 remembering all those national geographic programs). It's a bunch of
people
 that have grown PHP into what it is and I think that fits.  I'd go for
the
 ant myself :)
 
 Someone put up a voting script !
 
 Ade
 
 --- i n o v i c a h o s t i n g . c o m --
 
 Powerful hosting from www.inovicahosting.com
 
 
 
   -Original Message-
   From: Valentin V. Petruchek [mailto:[EMAIL PROTECTED]]
   Sent: 13 December 2001 12:05
   To: PHP
   Subject: Re: [PHP] Logo proposal
  
  
   Aunt is more similar very similar to PHP. Very industrious and
powerful ;)
  
   - Original Message -
   From: PHPGalaxy.com [EMAIL PROTECTED]
   To: Php-General [EMAIL PROTECTED]
   Sent: Thursday, December 13, 2001 1:31 PM
   Subject: Re: [PHP] Logo proposal
  
  
Actually I heard it's 50 times it's weight, but I refuse to be
   anal about
   it. =)
   
Who's to say ants dont work just as hard in the winter? We can't se
em..
   unless
it's because they're dormant in the winter, in which case I just
made
   myself look
INCREDIBLY stupid =)
   
   
  
  
  
  
  
   --
   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 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 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 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] PHPhish Logo

2001-12-12 Thread Valentin V. Petruchek

As I started all these I propose to go to next stage of discuss: i.e.
drawing proposed logos.

We've got plenty of variants...

So if anyone has enough free time and ability to develop a GRAPHICAL logo -
lets post them!

Zliy Pes, www.zliypes.com.ua





-- 
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] login, and

2001-12-12 Thread Valentin V. Petruchek

Try cookies. They help me greatly ;)

What
- Original Message -
From: Ward, Mark [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 12, 2001 4:15 PM
Subject: [PHP] login, and


 I've got a question about how I should implement my logins with PHP..

 I'm working on a project that requires the user to login with their
 password. That's not a problem. My question is... how do I keep track of
the
 user once they go through the hierarchy of my site? Is it as simple as
 passing a hidden variable throughout, or are sessions the best, or
easiest,
 way of doing things?

 Mark Ward

 --
 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 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] file downlaod via http

2001-12-10 Thread Valentin V. Petruchek

Security, you know...
Browser will not allow you to save files on LOCAL drive

Otherwise Internet should be very dangerous thing
- Original Message -
From: Helmut Habiger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 5:57 PM
Subject: [PHP] file downlaod via http


 hi!

 is's such a simple question, but ...

 i'd like to download a picture.
 but instead of typing the URL into my browser, loading the page into the
 browser, then right-clicking to to get the save picture as menu, then
 entering the local path and press save,
 I'd like to write a litte script, where i enter the URL of the picture
 (example:http://www.picturesite.com/picture1.jpg;), the local storing
 path and all the rest for download is done by the script.

 any idea?

 thx helmut


 --
 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 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] Logo proposal

2001-12-10 Thread Valentin V. Petruchek

Hello world of php-programmers!

It seemes to me PHP is very powerful tool and very popular among
web-programmers, too. As for me I use php for solving web tasks for 2 years
and I'm very satisfied with it.

It seemes to me current PHP logo (can be found by
http://www.php.net/gifs/logo.gif) doesn't suite to PHP. It's common logo
without any idea except using title in it.

I propose to create and develop new PHP logo corresponding to its power.

My propose is WoodPecker (e.g. like Woody).

Other propositions?

Respectfully, Zliy Pes http://www.zliypes.com.ua






-- 
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] Returned error messages

2001-12-10 Thread Valentin V. Petruchek

My experince: MsSQL is keeping silence even freetds or sybase is not
installed at all...

- Original Message -
From: Dave Brotherstone [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 7:58 PM
Subject: [PHP] Returned error messages



 Has anyone got error messages working from MSSQL or Sybase (connecting
from
 a unix box)?

 Dave.


 --
 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 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] Setting Cookies

2001-12-10 Thread Valentin V. Petruchek

Not necessary on the top, but before any html begins

Zliy Pes, http://zliypes.com.ua

- Original Message -
From: Steve Osborne [EMAIL PROTECTED]
To: PHP-General (E-mail) [EMAIL PROTECTED]
Sent: Monday, December 10, 2001 9:39 PM
Subject: [PHP] Setting Cookies


 I am attempting to use the SetCookie command.  I receive the following
 error:

 Warning: Cannot add header information - headers already sent by
 (reference to current page)...

 At this point I have authenticated the user, and am trying to set the
cookie
 before redirecting them to the registered users section.  Should I be
 setting the cookie on the top of the page that I am sending them to?

 Any comments or suggestions would be greatly appreciated.

 Steve Osborne
 [EMAIL PROTECTED]



 --
 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 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] Costum Error Page

2001-12-08 Thread Valentin V. Petruchek

Use $QUERY_STRING instead


- Original Message -
From: Daniel Urstöger [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 08, 2001 1:51 PM
Subject: Re: [PHP] Costum Error Page


 Opps, sorry, I had a bug, now I have this problem:
 Browser is showing this URL:
 http://yourdomain.com/play/404.php
 and so the REQUEST_URI is:
 /play/404.php

 But I would need the requested file, before apache redirected to
 the 404.php
 Is this possible as well ?



 --
 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 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] fopen to check if file exists

2001-12-08 Thread Valentin V. Petruchek

I've tested given url..
If there is no image php script return file = '139'.
Check if file content is different from 139.

or try to get image size of file:
$size = GetImageSize
(http://waptopic.supereva.it/loghiesuonerie.it/LogoGen.php?id=1100;);

and check what happens if there is no image

Zliy PEs, http://www.zliypes.com.ua


- Original Message -
From: moe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 08, 2001 1:48 PM
Subject: [PHP] fopen to check if file exists


 I am using this function:

 function isAfile($url){
 $fp = @fopen($url,r);
 if ($fp)
   { //print The file exists!;
   return 1; }
 else
   { //print The file does not exist;
 return 0; }
  }

 to check if a remote file exists... now the problem is that the URL's i am
 trying to check are in this way:
 http://waptopic.supereva.it/loghiesuonerie.it/LogoGen.php?id=1100
 The problem is that LogoGen.php exists but depending on the ID the image
may
 exists or not.
 How can i actually check if the image exists?
 Thanks anyone!




 --
 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 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] Version To Version

2001-12-07 Thread Valentin V. Petruchek

Your problem is GD, not PHP.
Use gd library corresponding to PHP 4.0.6 and PNG will be ok (tested by
myself).

Zliy Pes

- Original Message -
From: Robert Covell [EMAIL PROTECTED]
To: Neil Freeman [EMAIL PROTECTED]; Php-General
[EMAIL PROTECTED]
Sent: Friday, December 07, 2001 7:08 PM
Subject: RE: [PHP] Version To Version


 Don't have the error handy anymore but it was something to the effect of:
 ImageCreatPNG is not supported in 4.0.6 or something like that.  When I
went
 back to 4.0.4pl it was fine.  Very weird.


 -Original Message-
 From: Neil Freeman [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 07, 2001 10:31 AM
 To: Php-General
 Subject: Re: [PHP] Version To Version


 I'm using gd png in 4.0.6 with no problems (Windows). What problems are
you
 having?

 Robert Covell wrote:

  A question about different release versions of PHP.
 
  Why do things like png from gd 1.8 work in 4.0.4p1 and stops working in
  4.0.6?  We had to go back to 4.0.4p1.  I have seen similar things with
 mysql
  support.  We used the same config script for each version.  Any ideas?
 
  --
  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]
 
  ***
   This message was virus checked with: SAVI 3.51
   last updated 26th November 2001
  ***

 --
 
  Email:  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 



 --
 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 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 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] Dynamic Document Creation

2001-12-07 Thread Valentin V. Petruchek

It's from manual do not remember it's chapter exactly:

// starting word
$word = new COM(word.application) or die(Unable to instanciate Word);
print Loaded Word, version {$word-Version}\n;

//bring it to front
$word-Visible = 1;

//open an empty document
$word-Documents-Add();

//do some weird stuff
$word-Selection-TypeText(This is a test...);
$word-Documents[1]-SaveAs(Useless test.doc);

//closing word
$word-Quit();

//free the object
$word-Release();
$word = null;
//--
-
So you can develop this example into powerful tool for generating Word %(
Documents. I advise you to find MS Word DOM Handbook to make your task
easier...

Zliy Pes, http://zliypes.com.ua


- Original Message -
From: [ rswfire ] [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 07, 2001 7:43 PM
Subject: [PHP] Dynamic Document Creation


 Hello,

 Does anyone have any scripts or know a location to point me to where I can
 dynamically create Microsoft Word documents using PHP.  I need to create
 some nicely formatted forms.  I could do this as text, however, this
 solution is not perfect because I don't know of an escape sequence for
 creating a new page.  I cannot do this using PDF because it's not
installed
 on the servers I am using.  I could possibly do this in other formats if
you
 know of any solutions.  Thank you.

 rswfire



 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


 --
 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 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] MsSQL question

2001-12-05 Thread Valentin V. Petruchek

Hello world!
I'm using php 4.0.6 to work with MsSQL (FreeBSD 4.4, Apache 1.3.20).
How should i compile php to enable mssql functions?

Thanks

Zliy pes, http://www.zliypes.com.ua




-- 
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] MsSQL question

2001-12-05 Thread Valentin V. Petruchek

Thanks, i've looked in previously downloaded manual and 've found nothing ;)
- Original Message -
From: Jon Farmer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; PHP [EMAIL PROTECTED]
Sent: Wednesday, December 05, 2001 11:55 AM
Subject: Re: [PHP] MsSQL question


  Hello world!
  I'm using php 4.0.6 to work with MsSQL (FreeBSD 4.4, Apache 1.3.20).
  How should i compile php to enable mssql functions?

 Exactly as described here:

 http://www.php.net/manual/en/ref.mssql.php

 RTFM

 --
 Jon Farmer
 Systems Programmer, Entanet www.enta.net
 Tel 01952 428969 Mob 07763 620378
 PGP Key available, send email with subject: Send PGP Key







 --
 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 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] header(Location:blah...) - passing variables

2001-12-04 Thread Valentin V. Petruchek

Set the form receiver to $PHP_SELF. When data is posted (use $HTPP_POST_VARS
to check if is) check it for correctness. If everything is ok, use
Header(Location: work_for_authorized.php) otherwise show the current (i.e.
login page) with $user, $pass available...

Zliy PEs, http://www.zliypes.com.ua

- Original Message -
From: Lee Philip Reilly [EMAIL PROTECTED]
To: PHP List [EMAIL PROTECTED]
Sent: Tuesday, December 04, 2001 7:46 PM
Subject: [PHP] header(Location:blah...) - passing variables


 Hi,

 I wonder if someone could tell me whether or not the following is
 possible?

 I have an HTML form which passes a username and password to a PHP script
 for validation. If either is not valid, I would like it to return to the
 previous page - carrying with it a variable plus the submitted form
 information...

 =-=-=-=-=-=-=-=-=
 if (strlen ($password1) 4 ) {
$err = Password must be more than 4 characters long;
header(Location:http://somelocation.php;);
// ^-- at the location, the $err and form variables will be available

exit;
 }
 =-=-=-=-=-=-=-=-=

 Is it possible to this without using an HTML form?

 Thanks very much in advance.

 - Best regards,

 Lee


 --
 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 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] phpinfo() returning Zero Sized Reply

2001-12-04 Thread Valentin V. Petruchek

phpinfo() is a function itself. It needn't echo:
?
phpinfo();
?

Zliy Pes, http://www.zliypes.com.ua
- Original Message -
From: Brian C. Doyle [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 04, 2001 8:07 PM
Subject: [PHP] phpinfo() returning Zero Sized Reply


 hello all,

 I have a script with
 ?
 echo phpinfo();
 ?
 and getting Zero Sized Reply

 i have increased my timeout in php.ini and no change.


 --
 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 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] mad .... again jpeg files...

2001-12-04 Thread Valentin V. Petruchek

Try to specify absolute path to the jpeg - possible php do not look up for
jpeg in current folder...
(or use './image.jpg')

Zliy Pes, http://zliypes.com.ua

- Original Message -
From: Miguel Loureiro [EMAIL PROTECTED]
To: php-gen [EMAIL PROTECTED]
Sent: Tuesday, December 04, 2001 8:46 PM
Subject: [PHP] mad  again jpeg files...


 Hello all,
 I still having problem when use jpeg functions...

 I got:   testout.jpg is not a valid JPEG file in .. , with follow
 code:
  Header(Content-type: image/jpeg);
  $img=ImageCreateFromJPEG(testout.jpg);
  ImageJPEG($img,a.jpg);
  ImageDestroy($img);

 testout.jpg was one image created by jpeg-6b after make test,   I see
 image directly in browser
 (machine_name/directory/where/have/code/testout.jpg) the image, my
 phpinfo gives me information that gd had support for jpeg enabled  I
 try with other *.jpeg files  I try this code:

 Header(Content-type: image/jpeg);
 $im=ImageCreate(400,200);
 $bcg  = ImageColorAllocate($im,240,240,240);
 $prt  = ImageColorAllocate($im,0,0,0);
 $rd   = ImageColorAllocate($im,255,0,0);
 ImageFill($im,400,200,$bcg);
 ImageLine($im,110,85,280,85,$rd);
 ImageString($im,5,130,90,--- OK ---,$prt);
 ImageLine($im,110,110,280,110,$rd);
 ImageJPEG($im,a.jpg);
 ImageDestroy($im);

 and the result was an empty a.jpg file .
 a.

 If anyone has any idea ...
 I already dont know what to do 
 T.Y.
 --
 Best Regards
 Miguel Joaquim Rodrigues Loureiro









 --
 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 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] Multiple database seeking

2001-12-03 Thread Valentin V. Petruchek

Use smth like this -
$need_prices = '01,02';
$prices = new Array();
$sql = select * from price_list where id in ($need_prices)
$result = mysql_query ($sql);

{//cycle while $result is not empty - for every record
$row = mysql_fetch_array($result);
$prices[$row[id]] = $row[price];
}

After this you'll get  array of prices $prices - indexes are id value. so u
can write

$new_price1 = 2*$prices[1] + $prices[2]

Zliy Pes, http://www.zliypes.com.ua


- Original Message -
From: Alen Nonkovi? [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 03, 2001 4:31 PM
Subject: [PHP] Multiple database seeking


Hello,

I am trying to make a something like a cooking recipe with some
calculations. My problem is too much database querying. Is it really a
problem???

Let's suppose there is a table with items and prices:
item1price1
item2price2
item3price3
...

Then I have to calculate some new indegrient price, which is a result of
calculating other prices:
(ex: $new_price1 = 2*$price1 + $price2 )

To get wanted prices I used standard query:


$result = mysql_query (SELECT  price from price_list where id = '01');
$row = mysql_fetch_array($result);
$price1 = $row[price];

$result = mysql_query (SELECT  price from price_list where id = '02');
$row = mysql_fetch_array($result);
$price2 = $row[price];

//...and so on for about 30 indegrients.

And on the end:
$new_price1 = 2*$price1 + $price2;
print $new_price1;

--

But, is there a quicker way to do this? Am I doing maybe the wholistic
mistake in process?
Or this is just OK?

Please, help cooking the soup ;)

regards,
Alen



-- 
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] ereg help

2001-12-03 Thread Valentin V. Petruchek


- Original Message -
From: Valentin V. Petruchek [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 03, 2001 6:35 PM
Subject: [PHP] ereg help


 I'm not new for php, but have no experience working with ereg functions.
My
 problem is the following:

 i have string.. for example
 $s=id {name,title,nick} [http://www.php.net];;
 i want to break it in several parts:
 $p[0]=id;
 $p[1][0] =name;
 $p[1][1] =title;
 $p[1][2] =nick;
 $p[2]=http://www.php.net;;

 The part in [] is not neccessary, count of {} elements is not less than 1
 I can do it with string fucntions, but it seemes to me it's better to use
 regular functions.

 Could anybody help me to solve this problem and advise resource for
studying
 regular expresions?

 Zliy Pes, http://zliypes.com.ua






-- 
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] Re: Something wrong with the file() command.

2001-12-03 Thread Valentin V. Petruchek

Try this:
?php
echo pre;
print_r ($temp);
echo /pre;
?
and look for $temp content.

Zliy Pes http://zliypes.com.ua

- Original Message -
From: Fred [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 03, 2001 7:58 PM
Subject: [PHP] Re: Something wrong with the file() command.


 When you attempt to print or echo an array the result is simply array.
 You have to iterate through the elements of the array to see what each
 element contains.  Read the array chapter in the manual for more
 information.

 Fred

 Jose [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I try to give it a value with a var, but it doesn't work.
 
  The code is something like this.
 
  $y=str_pad($y,5,.txt); \\ To give it a filename from a var that
contains
  only 1 number (with 1 digit)
  If in this step I do a echo $y, it shows the correct string. Suposing
it
 is
  2, it shows 2.txt
 
  $temp[]=file($y); \\ To load the file into the array.
 
  But after the file nothing happens, the array only contains Array.
 
  Sorry for my bad english.
  Jose.
 
  Olinet S.L.
 
 



 --
 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 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] Student need help

2001-11-30 Thread Valentin V. Petruchek

Hello everyone! sorry, but thing i'm asking for is interesting for Ru.Net
users only so i'm gonna write it in Russian:

çÏÓÐÏÄÁ ÄÅ×ÅÌÏÐÅÒÙ! ðÏÍÏÇÉÔÅ ÓÔÕÄÅÎÔÕ - ÐÒÉÍÉÔÅ ÕÞÁÓÔÉÅ × ÓÏÃÉÏÌÏÇÉÞÅÓËÏÍ
ÏÐÒÏÓÅ, ËÏÔÏÒÙÊ Ñ ÐÒÏ×ÏÖÕ × ÒÁÍËÁÈ ÉÚÕÞÁÅÍÏÇÏ ËÕÒÓÁ ÓÏÃÉÏÌÏÇÉÉ.

ïÐÒÏÓ ÐÒÏ×ÏÄÉÔÓÑ ÎÁ ÔÅÍÕ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÌÉÃÅÎÚÉÏÎÎÏÇÏ ðï.
íÏÖÎÏ ÓËÁÚÁÔØ, ÞÔÏ Ë ÄÁÎÎÏÍÕ ÌÉÓÔÕ ÏÎ ÉÍÅÅÔ ÏÔÎÏÛÅÎÉÅ - ÉÎÓÔÒÕÍÅÎÔÁÒÉÊ
ÒÁÚÒÁÂÏÔÁÎ ÎÁ PHP+MySQL.
ïÐÒÏÓ ÐÒÏ×ÏÄÉÔÓÑ ÐÏ ÁÄÒÅÓÕ http://www.zsu.zp.ua/val/socio

óÐÁÓÉÂÏ ×ÓÅÍ.

ó Õ×ÁÖÅÎÉÅÍ, úÌÉÊ ðÅÓ: http://www.zliypes.com.ua





-- 
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] HELP URGENT VARS !!!

2001-11-30 Thread Valentin V. Petruchek

?php
$name1 = 'value1';
$name2 = 'value2';
$name3 = 'value3';
for ($i=1;$i=3;$i++) {
 eval (\$val = \$name$i;);
 echo $val.'br';
 }
?

Zliy Pes, http://www.zliypes.com.ua




-- 
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] matches problem (preg_match)

2001-11-13 Thread Valentin V. Petruchek

Try this code:

$str=eins zwei drei vier fünf sechs;
$Wort = explode (' ',$str);

$n=count($Wort);
for($i=0;$i$n;$i++){echo $i: $Wort[$i]br;}

It should works

Zliy Pes [EMAIL PROTECTED]





-- 
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] Url Length Limitations?

2001-11-12 Thread Valentin V. Petruchek

Hi everyone!

Is there any limitation for length of url like this
accept.php?set=qwerty...

What is the maximum $set length i can pass to script as a parameter?

Zliy Pes: http://zliypes.com.ua
[EMAIL PROTECTED]





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




Re2: [PHP] Url Length Limitations?

2001-11-12 Thread Valentin V. Petruchek

You see, I call for php script from Delphi program...
I can do it with InternetOpen() so the only method available for me is GET -
i can use page url only

Or I'm mistaken and it's possible to use POST here? who knows?
- Original Message -
From: Christoph Starkmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 12, 2001 2:19 PM
Subject: RE: [PHP] Url Length Limitations?


 Hi!

  Is there any limitation for length of url like this
  accept.php?set=qwerty...

 Depends on the OS/Server, but you'll have to consider one to exist...

  What is the maximum $set length i can pass to script as a parameter?

 Why don't you use POST? With POST, there is not limitation...

 Cheers,

 Kiko

 -
 It's not a bug, it's a feature.
 christoph starkmann
 mailto:[EMAIL PROTECTED]
 http://www.fh-augsburg.de/~kiko
 ICQ: 100601600
 -

 --
 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 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] Some facts about MsSQL/ODBC

2001-11-01 Thread Valentin V. Petruchek

Hello everyone!
Here i'm not going to ask community about smth.
I would like to present results of one test speed.

i perform the same query to MsSQL directly (using mssql_...) and through
ODBC (odbc_...)
In first case (direct connection) php works SLOWER than through ODBC.

My server is on NT 5.1.

Can anyone explain me why ODBC is faster than direct connection?

Thnx, Valentin




-- 
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] Re: Parse Error

2001-10-29 Thread Valentin V. Petruchek

Try this:

var $VAL_ID;
var $VAL_TICKER;
var $VAL_ID_FEED;





-- 
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] Replace text

2001-10-27 Thread Valentin V. Petruchek

What if pass some parameters to function - i mean not use global $comment
but
do like function replace_text_smiley($comment)
- Original Message -
From: Daniel Harik [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, October 28, 2001 12:20 AM
Subject: [PHP] Replace text


 Hello guys

 function replace_text_smiley(){

 global $comment;
 // To add a relation between a text smiley a an image smiley do this:
 // $faces[text smiley here] = img tag to image smile here;

 $faces[:)] = IMG SRC=\emoticons/smile.gif\;
 $faces[:P] = IMG SRC=\emoticons/tongue.gif\;
 $faces[:D] = IMG SRC=\emoticons/happy.gif\;
 $faces[:(] = IMG SRC=\emoticons/mad.gif\;
 $faces[;)] = IMG SRC=\emoticons/wink.gif\;

 while(list($text,$image) = each($faces))
 {
 $comment = str_replace($text,$image,$comment);
 }

 return $comment;
 }

 this function replaces faces to smilies images

 then in a separete file i use this function and another one to replace
urls... the url replacement is ok but it doesn't
 change the text to smilies..

 any guesses?? :)

 Thnx in advance


 --
 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 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] HELP PLEASE!! Get query error when inserting into MySql

2001-10-27 Thread Valentin V. Petruchek

What if you single quotes like this:
'$REMOTE_ADDR'
???
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, October 27, 2001 3:20 PM
Subject: [PHP] HELP PLEASE!! Get query error when inserting into MySql


 Hi There,

 I have a query whenever I try to insert something into a mysql table. This
is
 the code I am using:
 ?

 $host1 = gethostbyaddr($REMOTE_ADDR);
 $date = date(Y-m-d h:i:s);
 $link = mysql_connect($host, $user, $passwd);
 mysql_select_db($database, $link);
 $sql = INSERT INTO vcstats VALUES('', $SCRIPT_NAME, $date,
$HTTP_USER_AGENT,
 $BName, $BVersion, $BPlatform, $REMOTE_ADDR, $host1);
 $result = mysql_query($sql) or die(query errorBr . mysql_error());
 mysql_close();

 ?

 Thanks,
 Robby

 -
 This message was sent using Endymion MailMan.
 http://www.endymion.com/products/mailman/



 --
 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 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] Re: regardnig receiving mails

2001-10-25 Thread Valentin V. Petruchek

Look in http://www.php.net/manual/en/ref.imap.php
- Original Message -
From: Nigam Chheda [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, October 25, 2001 12:41 PM
Subject: [PHP] regardnig receiving mails


 Hi
 For sending mail php has a function mail()
 But how to receive mails(i.ie. POP3 access)
 can anyone send some sample code

 Nigam





-- 
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] redirecting the browser

2001-10-24 Thread Valentin V. Petruchek

Use this:
?php
Header(Location: anypage.php);
exit(); //stopping the script
?
- Original Message -
From: Ozgur Demirtas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 9:47 AM
Subject: [PHP] redirecting the browser


 Hi all,

 I have a PHP script and at one point of the script I am trying to redirect
 my browser to a certaion page. I can't seem to find an easy way of doing
 this. header() call is so much of a problem. There is no such function
like
 redirect(...) as in ASP?

 PS: I am using PHP version 3.09 as an Apache module on Solaris.

 Thanks!
 Ozgur




 --
 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 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] Check mail user

2001-10-24 Thread Valentin V. Petruchek

If I understand you properly you need smth like this

function checkmail ($email) {
return (eregi(^[_\.0-9a-z-]+@([0-9a-z][-0-9a-z\.]+)\.([a-z]{2,3}$),
$email, $check));
}

- Original Message -
From: Rosen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 24, 2001 10:24 AM
Subject: [PHP] Check mail user


 Hi,
 can someone give me script for syntax check of username for mail server ?

 Thanks,
 Rosen



 --
 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 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] Update Query - Urgent

2001-10-23 Thread Valentin V. Petruchek

Send your codes to mailing list.
If they are not very secret :)
- Original Message -
From: Srinivasan Ranganathan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 23, 2001 3:21 PM
Subject: [PHP] Update Query - Urgent


 Hi

 I have a php script generate a sql update statement.
 when i query the database, the update dosent happen.
 but when i echo the sql string and copy and paste it
 in my mysql client window, the update happens like it
 should!

 what am i missing/doing wrong here?

 Thanks in advance
 Srinivasan Ranganthan

 
 *NEW*   Connect to Yahoo! Messenger through your mobile phone   *NEW*
Visit http://in.mobile.yahoo.com/smsmgr_signin.html

 --
 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 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] Update Query - Urgent

2001-10-23 Thread Valentin V. Petruchek

What if use mysql_select_db()?
- Original Message -
From: Srinivasan Ranganathan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 23, 2001 4:22 PM
Subject: [PHP] Update Query - Urgent -- Yes, Full Rights!


 Hi

 Yes, I do have full rights!



 
 *NEW*   Connect to Yahoo! Messenger through your mobile phone   *NEW*
Visit http://in.mobile.yahoo.com/smsmgr_signin.html

 --
 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 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] IMAP Question

2001-10-18 Thread Valentin V. Petruchek

Hello, Masters!
I'm sending a mail through with imap_mail() and want to save a copy of it in
Sent Items folders.
I can not find function which an do it.

It seemes to me it should look like saving letter to specified mailbox (e.g.
Drafts).

Thank you

Val.zp.ua.




-- 
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] class problems

2001-10-18 Thread Valentin V. Petruchek

Try to create an instant of the class like this:
?php
class test
{
var $table = val;

function showName()
{
return $this-table;
}

}
$test = new Test;
echo $test-showName();

?
- Original Message -
From: Matt Williams [EMAIL PROTECTED]
To: PHP General List [EMAIL PROTECTED]; PHP_UK@egroups.
[EMAIL PROTECTED]
Sent: Thursday, October 18, 2001 4:25 PM
Subject: [PHP] class problems


 Any ideas why this won't output anything

 ?php
 class test
 {
 var $table = matt;

 function showName()
 {
 return $this-table;
 }

 }

 echo test::showName();

 ?

 I have other classes along the similar lines but a lot bigger which work
 fine.
 I'm also using phplib which has a lot of this stuff going on...

 I remeber seeing something regarding it in the manual but i don't get how
 it's all worked before.

 I'm using php4.06 apache 1.3.19 on win2k.

 TIA

 M:


 --
 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 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] class problems

2001-10-18 Thread Valentin V. Petruchek

Sorry and thanks - have not use it before/
But i've tried this:

?php
class test
{

function showName()
{
$this-qtable = 'val';
return $this-qtable;
}

}

echo test::showName();

?

worked :)




-- 
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] IMAP Question

2001-10-18 Thread Valentin V. Petruchek

Is it possible to use imap_mail() on php 4.0.6 on NT machine?
Maybe anyone has dll  for this.

Thank you

Val.zp.ua




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