[PHP] Printing

2001-04-22 Thread Dmitry

Hello, all!

Do you know, can I print some page using PHP or
JavaScript?

  Dmitry.
 [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] checking url

2001-04-24 Thread Dmitry

Hello all.
Can you tell me, how can I check url address?
Also I want to know error, which return.
 Dmitry



-- 
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] Method argument context resolution syntax

2011-11-25 Thread Dmitry
Hello, everybody.

What do you think about this? https://bugs.php.net/bug.php?id=60372


[PHP] Classes and parents.

2005-01-21 Thread Dmitry
Greetings.

If i run this code (php5):
--
class a {
 function say() { echo "A"; }
 function run() { $this->say(); }
}
class b extends a {
 function say() { echo "B"; }
 function run() { parent::run(); }
}

$obj = new b;
$obj->run();
---

I will get "B", but how i may get "A"? 

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



[PHP] gzip functions and error

2005-01-22 Thread Dmitry
Hello!
How disable error messages when i send incorrect data into gzip* "extract" 
functions, such as gzinflate or gzuncompress?

For example:

function _pack($data) {
 $data = serialize($data);
 $data = gzdeflate($data,9);
 $data = base64_encode($data);
 $data = urlencode($data);
 return $data;
} # _pack()

function _unpack($data) {
 $data = urldecode($data);
 $data = base64_decode($data);
 $data = gzinflate($data);
 $data = unserialize($data);
 return $data;
} # _unpack()

$s = _pack("123"); //  K7YytlIyNDJWsgYA
$s = _unpack("K7YytlIyNDJWsgYA"); // 123
$s = _unpack("123"); //  Warning: gzinflate() [function.gzinflate]: data 
error

How disable this warnings? error_reporting(0) or @ operators does not help 
me.
But I dont want use error_handler functions.

Thanks. 

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



[PHP] Re: Classes and parents.

2005-01-22 Thread Dmitry
Thanks,
but I think that this code more easy.

class a {
 function say() { echo "A"; }
 function run() { $this->say(); }
}
class b {
 function say() { echo "B"; }
 function run() {
$a = new a;
$a->run();
}
}

$obj = new b;
$obj->run();

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



[PHP] Get full url

2005-01-24 Thread Dmitry
How?

Dont tell me about simple solutions such as
$_SERVER["HTTPS"] .
$_SERVER["REMOTE_ADDR"] .
$_SERVER["SERVER_PORT"] .
$_SERVER["PHP_SELF"] .
$_SERVER["QUERY_STRING"]

I want get really good solution.

Thanks. 

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



[PHP] lstdc++ problem

2002-12-29 Thread Dmitry Demczuk
Hi there,

I'm trying to get PHP 4.3.0 compiled on a SuSE Linux 8.0 box.
./configure goes well but when I try the make command, I get the following 
error message: php /usr/i486-suse-linux/bin/ld: cannot find -lstdc++, and 
the installation fails. The lstdc++ is in the library libstdc, which is 
under /usr/lib.

Does anyone knows how to solve this?

Thanks and cheers
-- 
Dmitry

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




[PHP] session.save_path problem again

2002-08-09 Thread Dmitry Beransky

Hi,

I'm sorry, I know this is a commonly asked question, but I've checked every
suggestion offered here and in other groups/lists.  Yet, I still get "Failed
to write session data (user). Please verify that the current setting of
session.save_path is correct (/tmp/php)"

I have save_path set to "/tmp/php" in php.ini.  This directory exists and is
owner/group/world writable.  There is even a single session file already
present in the directory (I suspect it was created when I tried turning on
session.auto_start; unfortunately postnuke didn't want to work with that
setting on).

I'm running PHP 4.1.2/Apache 1.3.26 on MacOSX 10.1.5 Server.

Any thoughts?

Thanks
Dmitry



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




[PHP] XMLRPC issue

2010-03-03 Thread Dmitry Ruban

Hi all,

I was upgrading php from 5.6 to 5.11 and came across one odd issue. Hope 
someone could point out what is the problem.


Following code demonstrates it:

$xml = 'encoding="UTF-8"?><Test/>';


echo xmlrpc_decode($xml);

I suspect to get "" as a result, but for some reason < and > are 
cut out and i'm getting "Test/". So basically all entities are dropped 
from response.


I have 2nd server running same OS (CentOS 5) which has been upgraded 
first and it works as i suspect, code above shows "".


Any advice will be much appreciated.

Currently I have temporary workaround for this:

$xml = str_replace(array('<','>'), array('<','>'), $xml);

but would like to fix xmlrpc somehow.

Regards,
Dmitry Ruban




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



Re: [PHP] Division by 0

2010-03-10 Thread Dmitry Ruban

Hi Jochem,

Jochem Maas wrote:

Op 3/10/10 6:23 PM, Joseph Thayne schreef:

Looks to me like you are closing your form before you put anything in
it.  Therefore, the loan_amount is not set making the value 0.  Follow
the math, and you are dividing by 1-1.

Change this line:



to:




this is a XSS waiting to happen. I can put something like the following in
the request uri:

index.php?" onsubmit="evil()">http://www.evil.com/evi.js"</a>;>

Apparently it's not going to work. PHP_SELF does not include query 
string. So it is safe to use it this way.


Regards,
Dmitry


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



Re: [PHP] php-cli

2010-03-14 Thread Dmitry Ruban

Rick Pasotto wrote:

On Sun, Mar 14, 2010 at 08:40:51PM +, Ashley Sheridan wrote:

On Sun, 2010-03-14 at 16:41 -0400, Rick Pasotto wrote:


On Sun, Mar 14, 2010 at 06:13:24PM +, Ashley Sheridan wrote:

On Sun, 2010-03-14 at 14:15 -0400, Rick Pasotto wrote:


Has cli php changed recently?

I've got a php script (script1) that creates a php script (script2) by
opening a file and then writing to it. When I try to run it from the
command line script1 is simply copied to stdout. When I run it from the
browser it works as expected. The directory has 777 permissions so that
should not be the problem.

Any ideas?

How are you running it from the command line?

Is there more than one way? I suppose with and without the -f could
count as two ways, but the man page says without defaults to with so
they're really the same.

Well you havn't given an example, and just say you're calling the script
from command line and it's outputting the script there. Are you maybe
just calling the php file without calling php first?


Of course not. php scripts are not executable. If I had tried to execute
it directly the shell would have told me that. If I had then set the
executable bit the shell would have tried to execute the contents of the
file and the shell would have given several error messages.

I repeat: is there more than one way to run a php script from the cli?



On *nix, you can add "#!/usr/bin/php" as first line and make file 
executable (chmod +x).


--
Dmitry

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



Re: [PHP] php-cli

2010-03-14 Thread Dmitry Ruban

Rick Pasotto wrote:

On Mon, Mar 15, 2010 at 01:32:24PM +1300, Dmitry Ruban wrote:

Rick Pasotto wrote:

I repeat: is there more than one way to run a php script from the cli?


On *nix, you can add "#!/usr/bin/php" as first line and make file
executable (chmod +x).


Functionally the same. php is still interpreting the script. The script
is still not an executable.

And, of course, the results are the same.

The problem is that php is *not* interpreting the script. It's acting
like 'cat'.



It sounds like you may use short tags "your cli php.ini


What does it show:

php -r 'phpinfo();' | grep short

--
Dmitry

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



[PHP] sessions handling

2004-06-02 Thread Dmitry Ruban
Hi folks,

We have two instances of apache/mod_php running on 80 and 443 ports
accordingly. For both mod_php we have the same dir (/tmp) to store session
information. Is it possible to mix sessions data up if user switches between
80 and 443 ports? I mean what if when user surfs over 80 port and has
already sessionID in this mod_php context(PHPSESSID stores in cookie), then
he jumps to 443 instance, would that mod_php correctly find proper session
file? Is it possible that PHPSESSID in 443 context hasn't been initialized
and mod_php won't get proper file?

Regards,
Dima Ruban

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