Re: [PHP] Is "gd" present?

2003-06-05 Thread Armand Turpel
This check if gd is installed and which version. if( $img = @imageCreate(1, 1) ) { // Check if GD version >= 2.0.1 // $img = @imageCreateTrueColor(1, 1); if (!$img) { echo 'gd < 2.0.1 installed';

RE: [PHP] Is "gd" present?

2003-06-05 Thread Svein Larsen
$gd_loaded = (extension_loaded('gd'))?1:0; Then you can use if ($gd_loaded) later in your code. - Svein > -Original Message- > From: Esteban Fernandez [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 04, 2003 17:09 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Is "gd" present? > > > A

Re: [PHP] Best method to detect Apache, IIS, or CLI?

2003-06-05 Thread Esteban Fernandez
That are Apache Variables, in IIS the variables are diferent. So i don't believe that answer the question. "Chris Hayes" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > dunno what's best, test on each server what values you can find in $_SERVER > (PHP>=4.10), > > maybe > $_SERV

Re: [PHP] pagenting logic to cut short

2003-06-05 Thread Haseeb Iqbal
hi, i made this script i think this will help all others as well i am not very good at PHP soo if you find anything that you things you can make better then plz do so and give me a copy as well so that i can also benefit. one problem this function was made for MSSQL will need some changes and will

Re: [PHP] Is "gd" present?

2003-06-05 Thread Esteban Fernandez
Everyday i learn some new :) "Svein Larsen" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] $gd_loaded = (extension_loaded('gd'))?1:0; Then you can use if ($gd_loaded) later in your code. - Svein > -Original Message- > From: Esteban Fernandez [mailto:[EMAIL PROTECTED]

[PHP] multi-part upload fails in some php environments but not others

2003-06-05 Thread Kendal
I authored an audio player/recorder that saves the audio data to a PHP server instead of to the local drive. See: http://www.freedomaudio.com/examples/recorder102/ Unfortunately the method does not work in some PHP environments. I am confident that the applet's audio upload functions reliably,

Re: [PHP] Best open source banner advertising application

2003-06-05 Thread John Wards
On Wednesday 04 Jun 2003 4:21 pm, esctoday.com | wouter van vliet wrote: > Does any of both (or any other) banner advertising applications support > langauge specific banners.. So that Greek visitors would get only the > banners you have said to be Greek? And for example maybe even if you don't > h

[PHP] Re: Using register_globals

2003-06-05 Thread Bobby Patel
If it's a preference it's a bad one. Have register globals set to ON is one way of leaving your script open to being exploitable. I would suggest that if you really need to use that code then either modify it or write something from scratch and use that code as a guide line. search php.net for r

RE: [PHP] Re: Using register_globals

2003-06-05 Thread Jay Blanchard
[snip] Have register globals set to ON is one way of leaving your script open to being exploitable. [/snip] Please explain this, how does it make it more exploitable? I think that this is only true if the code is sloppy. Thanks! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscrib

[PHP] Other error messages due to the migration

2003-06-05 Thread Øystein Håland
OK, thanks to Justins function (http://www.weberdev.com/get_example.php3?count=3639 ) I've got rid of somme errors. Now I have a new headache, my update script. The error message is Notice: Undefined index: PATH_TRANSLATED in D:\Apache2\htdocs\recycle\update.php on line 5 and the return from the sc

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Leif K-Brooks
It's true that register_globals being on only makes sloppy code more insecure. Most people aren't going to write perfect code, though. It's incredibly annoying to have to unset every variable that shouldn't be from an outside source. Even if you do so, it's very likely that you will forget o

RE: [PHP] Re: Using register_globals

2003-06-05 Thread Rasmus Lerdorf
On Wed, 4 Jun 2003, Jay Blanchard wrote: > [snip] > Have register globals set to ON is one way of leaving your script open > to being exploitable. > [/snip] > > Please explain this, how does it make it more exploitable? I think that > this is only true if the code is sloppy. Correct, if you proper

RE: [PHP] Re: Using register_globals

2003-06-05 Thread Jay Blanchard
[snip] On Wed, 4 Jun 2003, Jay Blanchard wrote: > [snip] > Have register globals set to ON is one way of leaving your script open > to being exploitable. [/snip] > > Please explain this, how does it make it more exploitable? I think > that this is only true if the code is sloppy. Correct, if you

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Rasmus Lerdorf
On Wed, 4 Jun 2003, Leif K-Brooks wrote: > It's true that register_globals being on only makes sloppy code more > insecure. Most people aren't going to write perfect code, though. It's > incredibly annoying to have to unset every variable that shouldn't be > from an outside source. Even if you d

RE: [PHP] Re: Using register_globals

2003-06-05 Thread Rasmus Lerdorf
On Wed, 4 Jun 2003, Jay Blanchard wrote: > [snip] > On Wed, 4 Jun 2003, Jay Blanchard wrote: > > [snip] > > Have register globals set to ON is one way of leaving your script open > > > to being exploitable. [/snip] > > > > Please explain this, how does it make it more exploitable? I think > > that

Re: [PHP] Compile 4.3.2 Errors.

2003-06-05 Thread Kent C. Kollasch
The build doesn't even get past the first program to compile. I used the defaults in configure and ran make an it fails immediately. Evan Nemerson wrote: Don't know about 4.3.2, but at the end of 5.0-dev make, the following message is output: Build complete. (It is safe to ignore warnings abou

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Armand Turpel
> On Wed, 4 Jun 2003, Jay Blanchard wrote: > > [snip] > > Have register globals set to ON is one way of leaving your script open > > to being exploitable. > > [/snip] > > > > Please explain this, how does it make it more exploitable? I think that > > this is only true if the code is sloppy. > > Cor

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Leif K-Brooks
True, it's not incredibly annoying in all cases. It is in some cases, however. For instance, if(user_is_authorized){ $explodenuke = 1; } ... if(!empty($explodenuke)){ //Explode a nuke! } The only reason there to initialize $explodenuke would be for security (register_globals), and there are ot

Re[2]: [PHP] Imgs in Database

2003-06-05 Thread Alexware
Hello Craig & All, As far I know, you can just echo it to a file and you will get the image file. Of course don't forget the extention. Just a simple "for" cycle can do it for you (inside a select). e.g.: $query = "select bin_data,filetype from binary_data"; $result = mysql_query($query);

[PHP] Re: multi-part upload fails in some php environments but not others

2003-06-05 Thread Esteban Fernandez
What is the error, Time Out ?, File too big?, or what ?... It will be help to us know it, to help you. "Kendal" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > I authored an audio player/recorder that saves the audio data to a PHP > server instead of to the local drive. > > Se

RE: [PHP] Re: Using register_globals

2003-06-05 Thread Jay Blanchard
[snip] The only reason there to initialize $explodenuke would be for security (register_globals), and there are other cases like this. I generally initialize variables before using them, but there's always going to be a time when someone forgets. That shouldn't present a security hazard, whic

Re: Re[2]: [PHP] Imgs in Database

2003-06-05 Thread Craig
Just for your info..I researched this a bit further..and with a little help from the manual, the following works a treat.: Cheers, Craig 0) { $result = mssql_fetch_array($sqry_img); Header ("Content-type: i

RE: [PHP] Re: Using register_globals [ note on multi-developer env ]

2003-06-05 Thread Johnson, Kirk
> -Original Message- > From: Jay Blanchard [mailto:[EMAIL PROTECTED] > In the corporate environment with multiple developers we have to > initialize every variable (it's a rule). We even scan code once a day > for variables that have not been declared. It's part of our > documentation. J

RE: [PHP] Re: Using register_globals [ note on multi-developer env ]

2003-06-05 Thread Jay Blanchard
[snip] > In the corporate environment with multiple developers we have to > initialize every variable (it's a rule). We even scan code once a day > for variables that have not been declared. It's part of our > documentation. Jay, is your "scan" something other than setting error reporting to E_

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Rouvas Stathis
Armand Turpel wrote: > > > On Wed, 4 Jun 2003, Jay Blanchard wrote: > > > [snip] > > > Have register globals set to ON is one way of leaving your script open > > > to being exploitable. > > > [/snip] > > > > > > Please explain this, how does it make it more exploitable? I think that > > > this is

Re: [PHP] Error capturing

2003-06-05 Thread Jason Wong
On Wednesday 04 June 2003 18:16, Svein Larsen wrote: > Anybody got a good solution for capturing errors in php scripts? > I can catch the errors by logging them to a log file (log_errors in > php.ini) My problem is that i'm running a lot of sites on my server and i > need to know wich site generat

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Bobby Patel
I agree that you can write secure scripts with register_globals set to ON. I usually think that alot of rookie PHP programmers (I just started PHP a year ago, myself) read the list, and the way I figure is that it is good to make readers of the list aware of the issues of register globals. Plus,

RE: [PHP] Error capturing

2003-06-05 Thread Svein Larsen
Yes, set_error_handler work for "soft" errors. But parse-errors doesnt get catched by the errorhandler. - Sveni > -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 04, 2003 19:43 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Error capturing > > > On

[PHP] Re: PHP and base32 encryption

2003-06-05 Thread Hugh Bothwell
"Cditty" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Someone has sent me a line of text that is base32 encrypted that I need to > decrypt. Does anyone know of a php module or snippet that can decrypt > this? I have searched on google and the php.net site, but was unable to > fin

Re: [PHP] Error capturing

2003-06-05 Thread Jason Wong
On Thursday 05 June 2003 02:00, Svein Larsen wrote: > Yes, set_error_handler work for "soft" errors. > But parse-errors doesnt get catched by the errorhandler. But surely you check that your pages actually parse before deploying them? *boggles* -- Jason Wong -> Gremlins Associates -> www.greml

RE: [PHP] Error capturing

2003-06-05 Thread Svein Larsen
Of course - but sometimes includes and other happenings make parse error. Even eval'ed code can cause parse error even if the page parse fine initially. - Svein > -Original Message- > From: Jason Wong [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 04, 2003 20:04 > To: [EMAIL PROTECTED

Re: [PHP] Re: Using register_globals

2003-06-05 Thread Jason Wong
On Thursday 05 June 2003 01:43, Rouvas Stathis wrote: > I strongly disagree with that. > Consider the following code (assuming $foo is 'external' variable): > > 1: if ($foo=='yes') transfer_money_to_me(); > > 2: if ($_GET['foo']=='yes']) transfer_money_to_me(); > > Why (2) is safer than (1)? Answe

Re: [PHP] Error capturing

2003-06-05 Thread Jason Wong
On Thursday 05 June 2003 02:08, Svein Larsen wrote: > Of course - but sometimes includes and other happenings make parse > error. > Even eval'ed code can cause parse error even if the page parse fine > initially. AFAIK there's nothing that will catch parse-errors at runtime. Maybe you can use the

[PHP] Migration once again

2003-06-05 Thread Øystein Håland
Now when I've learned that $_SERVER['PHP_SELF'] is correct and $_SERVER[PHP_SELF] is wrong I wonder why the following code