Re: [PHP] PhP 4.2.1 (and various)

2002-05-15 Thread Olav Bringedal

 --- Analysis & Solutions
<[EMAIL PROTECTED]> wrote: > Olav:

> Perhaps because you're ignoring what I said.
 
> This will generate an error message if there's no
> player variable in the 
> request string and you have error reporting set high
> enough.  Evaluate 
> for "empty($_GET['player'])"
> 
> 
> 
> Why are you testing for playername again?  You
> already know it's there 
> because your'e in the else after the "if
> (!$playername)" statement.
> 
> 
> Hmm...  You're sticking playername into the Session
> array.  I haven't
> used PHP's session handling, but some things seem
> odd here.  Where did
> you start the session?  Also, how is your relocated
> page going to know 
> about the session?  I don't see any code here that
> performs those tasks.
> 
> Enjoy,
> 
> --Dan
> 
> -- 


>From the manual:
With $_SESSION or  $HTTP_SESSION_VARS, there is no
need to use
session_register()/session_unregister()/session_is_registered()
functions. Users can access session variable like a
normal variable. 

I'm pretty sure the sessioning works perfectly. And it
is not the problem. The problem is Header(), which
fails without any error or other output. You can only
look at the other mails posted on this subject, that
it is a major problem in v 4.2.1. Until it is solved,
I'll work on something else...

Thanks for your time.


=
Olav Bringedal
jaggu.org

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




Re: [PHP] class and error handling

2002-05-15 Thread Gerard Samuel

I modified my example against user comment dated "01-Mar-2002 11:52" and 
I got the desired output.
Thanks


Martin Towell wrote:

>Have a look at this page
>
>http://www.php.net/manual/en/function.set-error-handler.php
>
>and at the user comments dated: "09-Sep-2001 03:16" and "01-Mar-2002 11:52"
>
>these might help you
>
>Martin
>
>
>-Original Message-
>From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, May 16, 2002 3:52 PM
>To: PHP
>Subject: [PHP] class and error handling
>
>
>2 things that are foriegn to me.  Im trying to construct a class to 
>handle errors.
>I started out trying to make it recognise errors in the first place and 
>then expand, but Im having difficulty.
>
>class.php
>
>class eh
>{
>function eh()
>{
>error_reporting (E_ERROR | E_WARNING | E_PARSE);
>set_error_handler($this->errorhandler);
>}
>
>function errorhandler($type, $str, $file, $line)
>{
>switch ($type)
>{
>case E_ERROR:
>echo 'ERROR OCCURED';
>break;
>
>case E_WARNING:
>echo 'YOUR WARNING!';
>break;
>}
>}
>}
>
>?>
>---
>test.php
>
>require_once('./class.php');
>$eh = new eh();
>
>join (':', $next);
>
>?>
>
>Whenever I run test.php, I get the regular php error page instead 'ERROR 
>OCCURED'.  Im not sure if I can feed set_error_handler the way I did.
>Does anyone see anything wrong with this piece of code?
>Thanks
>
>
>  
>



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




RE: [PHP] class and error handling

2002-05-15 Thread Martin Towell

Have a look at this page

http://www.php.net/manual/en/function.set-error-handler.php

and at the user comments dated: "09-Sep-2001 03:16" and "01-Mar-2002 11:52"

these might help you

Martin


-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 16, 2002 3:52 PM
To: PHP
Subject: [PHP] class and error handling


2 things that are foriegn to me.  Im trying to construct a class to 
handle errors.
I started out trying to make it recognise errors in the first place and 
then expand, but Im having difficulty.

class.php
errorhandler);
}

function errorhandler($type, $str, $file, $line)
{
switch ($type)
{
case E_ERROR:
echo 'ERROR OCCURED';
break;

case E_WARNING:
echo 'YOUR WARNING!';
break;
}
}
}

?>
---
test.php


Whenever I run test.php, I get the regular php error page instead 'ERROR 
OCCURED'.  Im not sure if I can feed set_error_handler the way I did.
Does anyone see anything wrong with this piece of code?
Thanks


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

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




[PHP] class and error handling

2002-05-15 Thread Gerard Samuel

2 things that are foriegn to me.  Im trying to construct a class to 
handle errors.
I started out trying to make it recognise errors in the first place and 
then expand, but Im having difficulty.

class.php
errorhandler);
}

function errorhandler($type, $str, $file, $line)
{
switch ($type)
{
case E_ERROR:
echo 'ERROR OCCURED';
break;

case E_WARNING:
echo 'YOUR WARNING!';
break;
}
}
}

?>
---
test.php


Whenever I run test.php, I get the regular php error page instead 'ERROR 
OCCURED'.  Im not sure if I can feed set_error_handler the way I did.
Does anyone see anything wrong with this piece of code?
Thanks


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




[PHP] Re: Generate every possible combination

2002-05-15 Thread Austin Marshall

Austin Marshall wrote:
> Evan Nemerson wrote:
> 
>> I need to generate every possible combination of the the values in an 
>> array. For example, if...
>>
>> $array = Array("A", "B", "C");
>>
>> I want to be able to do something like
>>
>> print_r(magic_function($array));
>>
>> which would output
>>
>> Array
>> (
>> [0] => "ABC"
>> [1] => "ACB"
>> [2] => "BAC"
>> [3] => "BCA"
>> [4] => "CAB"
>> [5] => "CBA"
>> )
>>
>> I really have no idea where to begin. The best lead I can think of is 
>> that there are going to be n! elements in the output array, where n is 
>> the size of the input array.
>>
>> Any help would be greatly appreciated.
>>
>>
>> Evan
>>
>>
>>
> 
> for ($x=ord("A");$x<=ord("Z");$x++)
> { for($y=ord("A");$y<=ord("Z");$y++)
>   { for($z=ord("A");$z<=ord("Z");$z++)
> { $array[]=chr($x).chr($y).char($z);
> }
>   }
> }
> 
> is a quick suggestion.  Haven't tested it.
> 
> 

never mind, wasn't paying attention.


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




[PHP] Re: Generate every possible combination

2002-05-15 Thread Austin Marshall

Evan Nemerson wrote:
> I need to generate every possible combination of the the values in an array. 
> For example, if...
> 
> $array = Array("A", "B", "C");
> 
> I want to be able to do something like
> 
> print_r(magic_function($array));
> 
> which would output
> 
> Array
> (
>   [0] => "ABC"
>   [1] => "ACB"
>   [2] => "BAC"
>   [3] => "BCA"
>   [4] => "CAB"
>   [5] => "CBA"
> )
> 
> I really have no idea where to begin. The best lead I can think of is that 
> there are going to be n! elements in the output array, where n is the size of 
> the input array.
> 
> Any help would be greatly appreciated.
> 
> 
> Evan
> 
> 
> 

for ($x=ord("A");$x<=ord("Z");$x++)
{ for($y=ord("A");$y<=ord("Z");$y++)
   { for($z=ord("A");$z<=ord("Z");$z++)
 { $array[]=chr($x).chr($y).char($z);
 }
   }
}

is a quick suggestion.  Haven't tested it.



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




Re: [PHP] Uploading JPEG's - Security Issues?

2002-05-15 Thread Tom Rogers

Hi
What I do is use the function GetImageSize(), if that returns x and/or y = 
0 it probably isn't an image file and dump it.
Tom

At 05:06 AM 16/05/2002, you wrote:
>On Wed, 15 May 2002, Andre Dubuc wrote:
> > Actually, I figured out how to do it: a combination of  checking:
> > if ( $_REQUEST['pix']['type'] == "image/jpeg")}  blah, blah, blah
>
>I'm pretty certain that the 'type' that appears here is just derived from
>the file name, and therefore is not trustworthy. Someone please correct me
>if I'm wrong (as if that's ever a problem...)
>
>miguel
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




RE: [PHP] Generate every possible combination

2002-05-15 Thread Martin Towell

recursive function, passing back in the array, minus the current position
and current combination. when array is empty, use current combination.

um... something like (but not tested)

function comby($arr, $comb = "")
{
  $num = count($arr);
  if ($num == 0)
  {
echo $comb;
return;
  }

  for ($i = 0; $i < $num; $i++)
  {
$tmp_comb = $comb . $arr[$i];
$tmp_arr = $arr;
array_splice($arr, $i, 1);
comby($tmp_arr, $comb);
  }
}

$array = Array("A", "B", "C");
comby($array);

-Original Message-
From: Evan Nemerson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 16, 2002 2:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Generate every possible combination


I need to generate every possible combination of the the values in an array.

For example, if...

$array = Array("A", "B", "C");

I want to be able to do something like

print_r(magic_function($array));

which would output

Array
(
[0] => "ABC"
[1] => "ACB"
[2] => "BAC"
[3] => "BCA"
[4] => "CAB"
[5] => "CBA"
)

I really have no idea where to begin. The best lead I can think of is that 
there are going to be n! elements in the output array, where n is the size
of 
the input array.

Any help would be greatly appreciated.


Evan



-- 
Think not those faithful who praise all thy words and actions, but those who

kindly reprove thy faults.

Socrates


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

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




RE: [PHP] newbie bigtime

2002-05-15 Thread Craig Vincent

> /* This page receives and handles the data generated
> by "form.html". */
> print "Your first name is $FirstName.\n";
> print "Your last name is $LastName.\n";
> print "Your E-mail Address is $Email.\n";
> print "This is what you had to say:\n
> $Comments\n";

More than likely you're using 4.2.0 which had global variables turned off by
default.  You're not the first one to experience this problem and probably
won't be the last.

You'll need to call the files using a global arraysince you're using the
post method

$_POST['$FirstName']

would be the correct variable to use to get the FirstName data from the
form.
Or an easier approach would be

$_REQUEST['$FirstName']

which will provide you with the results no matter what method you use to
post the form.

> And the book suggested POST instead of GET because it
> is stated that Post is secure and GET is not.

hehehahaha =)  The book is dead wrong.  Both formats are insecure, the main
difference is that the GET method displays the variables in the url string
whereas post caches the variable values in the browser.  There are
advantages and disadvantages to both but neither of which have the advantage
of security.  IMO POST is better to use generally since it presents much
cleaner URLs to the end user, but I find the GET method much better when
debugging a script designed to process a form submission.

Sincerely,

Craig Vincent



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




Re: [PHP] Plz dont hate me for this

2002-05-15 Thread Liam MacKenzie

nononononon

www.vectorstar.net

EXCELLENT hosting and it's free!



- Original Message -
From: "Salman Ahmed" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 12:05 PM
Subject: [PHP] Plz dont hate me for this


Hi,

I am also PHP lover plz dont hate me for this but I really need to know any
free perl hosting company where I can host my perl script. Only
circumstances has made this that I programming in perl. I have no idea where
to put my question, as I always did programming in php and asked this list.
So I am asking this question here to, plz tell me about free CGI hosting
site.

Asking for the help and forgiveness
Statbat




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




[PHP] Generate every possible combination

2002-05-15 Thread Evan Nemerson

I need to generate every possible combination of the the values in an array. 
For example, if...

$array = Array("A", "B", "C");

I want to be able to do something like

print_r(magic_function($array));

which would output

Array
(
[0] => "ABC"
[1] => "ACB"
[2] => "BAC"
[3] => "BCA"
[4] => "CAB"
[5] => "CBA"
)

I really have no idea where to begin. The best lead I can think of is that 
there are going to be n! elements in the output array, where n is the size of 
the input array.

Any help would be greatly appreciated.


Evan



-- 
Think not those faithful who praise all thy words and actions, but those who 
kindly reprove thy faults.

Socrates


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




[PHP] Re: textarea problem

2002-05-15 Thread Jason Morehouse

Are you using post or get?  I imagine you'd run into some limitations
using get.

On Tue, 14 May 2002 12:33:22 +1200, Enrique Vadillo wrote:

> Hi,
> 
> I'm not sure if this is purely a PHP problem but here it goes:
> 
> i have a form that sends text data to a PHP script, i have some textarea
> field which goes like this:
> 
> 
> 
> everytime i POST this, $mynote is truncated to 1867 bytes, i have
> repeatedly tried to submit text 2500 bytes long but it's always
> truncated to that size -btw there is no javascript or anything in the
> middle that might modify the size- my questions is: do i have to setup
> anything special in my php.ini? i have this in my php.ini:
> 
> post_max_size = 30M
> 
> I have also noticed that Hotmail has no problem sending textarea input
> 2500 bytes long or more using exactly the same tags.. what's wrong then?
> I use Apache 1.3.23 and PHP 4.1.1 (on RedHat 7.1)
> 
> if anyone has encountered this problem b4, i'd appreciate some help.
> 
> Enrique-
> 
> 
> 
> _ Únase
> con MSN Hotmail al servicio de correo electrónico más grande del mundo.
> http://www.hotmail.com

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




Re: [PHP] newbie bigtime

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, k spellman wrote:
> /* This page receives and handles the data generated
> by "form.html". */
> print "Your first name is $FirstName.\n";
> print "Your last name is $LastName.\n";
> print "Your E-mail Address is $Email.\n";
> print "This is what you had to say:\n
> $Comments\n";

With newer installations of PHP, form data does not by default show up in 
eponymous variables. This has been discussed at great length here - just 
check the archives for any random day in the past month or so. 

For best results, write the print statement like this:

   print "Your first name is {$_REQUEST['FirstName']}.\n";

and you'll get the results you're after.

> And the book suggested POST instead of GET because it
> is stated that Post is secure and GET is not.

That's ridiculous. Buy a new book.

miguel


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




Re: [PHP] newbie bigtime

2002-05-15 Thread k spellman

The code for form.html is



HTML Form



First Name 
Last Name 
E-mail Address 
Comments 






and the code for the HandleForm.php is 



Form Results


\n";
print "Your last name is $LastName.\n";
print "Your E-mail Address is $Email.\n";
print "This is what you had to say:\n
$Comments\n";

?>



And the book suggested POST instead of GET because it
is stated that Post is secure and GET is not.

Thanks,
spellman

--- Justin French <[EMAIL PROTECTED]> wrote:
> Show us the code for processing the form!
> 
> My guess is your book uses code with $firstname
> rather than
> $_POST['firstname']... given that your version of
> PHP is probably new
> (4.2.x), register_globals is prolly OFF in your
> php.ini config file.
> 
> Justin
> 
> 
> 
> on 16/05/02 12:13 PM, k spellman
> ([EMAIL PROTECTED]) wrote:
> 
> > Just opened a "How to" book today on PHP. Already
> > having problems and wouldn't mind an extra set of
> > eyes. My basic form does not produce results.Any
> > thoughts on this one?
> > 
> > http://www.hermengoode.com/php/form.html
> > 
> > Thanks!
> > spellman
> > 
> > __
> > Do You Yahoo!?
> > LAUNCH - Your Yahoo! Music Experience
> > http://launch.yahoo.com
> 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP] newbie bigtime

2002-05-15 Thread k spellman

The code for form.html is



HTML Form



First Name 
Last Name 
E-mail Address 
Comments 






and the code for the HandleForm.php is 



Form Results


\n";
print "Your last name is $LastName.\n";
print "Your E-mail Address is $Email.\n";
print "This is what you had to say:\n
$Comments\n";

?>



And the book suggested POST instead of GET because it
is stated that Post is secure and GET is not.

Thanks,
spellman


--- Miguel Cruz <[EMAIL PROTECTED]> wrote:
> On Wed, 15 May 2002, k spellman wrote:
> > Just opened a "How to" book today on PHP. Already
> > having problems and wouldn't mind an extra set of
> > eyes. My basic form does not produce results.Any
> > thoughts on this one?
> > 
> > http://www.hermengoode.com/php/form.html
> 
> Well, you don't show your source code, but if I had
> to guess I'd say you
> have a newish install of PHP and an oldish book, and
> you're trying to get
> the value of $LastName rather than
> $_GET['LastName'].
> 
> miguel
> 


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP] newbie bigtime

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, k spellman wrote:
> Just opened a "How to" book today on PHP. Already
> having problems and wouldn't mind an extra set of
> eyes. My basic form does not produce results.Any
> thoughts on this one?
> 
> http://www.hermengoode.com/php/form.html

Well, you don't show your source code, but if I had to guess I'd say you
have a newish install of PHP and an oldish book, and you're trying to get
the value of $LastName rather than $_GET['LastName'].

miguel


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




[PHP] newbie bigtime

2002-05-15 Thread k spellman

Just opened a "How to" book today on PHP. Already
having problems and wouldn't mind an extra set of
eyes. My basic form does not produce results.Any
thoughts on this one?

http://www.hermengoode.com/php/form.html

Thanks!
spellman

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




Re: [PHP] method=post problem

2002-05-15 Thread Analysis & Solutions

On Wed, May 15, 2002 at 09:27:55PM -0400, Jule wrote:
> 
> 
> 
> when it comes back and goes into the loop. Only the first name from 
> $quiz[owner_name] is left, so where it used to be John Doe, is now only Joe.

You're missing quotes around the attribute values.  Thus, the system is
assuming only the first thing following the value is the value.  Write
your HTML up to spec and you'll be fine.

 echo '';

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] method=post problem

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, Jule wrote:
> 
> 
> but now here's the problem: 
> when it comes back and goes into the loop. Only the first name from 
> $quiz[owner_name] is left, so where it used to be John Doe, is now only Joe.
> how do i fix this?

Your HTML is invalid. You have to quote non-numeric values.

  

Otherwise it ends up looking like:

  

and it thinks "Doe" is some other attribute to the input tag.

miguel


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




Re: [PHP] method=post problem

2002-05-15 Thread Janet Valade

You need double quotes around the value. E.g.,



- Original Message -
From: "Jule" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 6:27 PM
Subject: [PHP] method=post problem


Hey guys and gals,

i have a form with method=post which sends







to the same page, and  picks it up in an
if ($submitted) {} loop.

but now here's the problem:
when it comes back and goes into the loop. Only the first name from
$quiz[owner_name] is left, so where it used to be John Doe, is now only Joe.
how do i fix this?

thanks

Jule
--
|\/\__/\/|
|   Jule Slootbeek |
|   [EMAIL PROTECTED] |
|   http://blindtheory.cjb.net |
|   __ |
|/\/   \/\|

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




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




[PHP] Re: Plz dont hate me for this

2002-05-15 Thread Vinod Palan

hey ,
there is one that I have used.
http://free4sure.com/free-hosting.html
you can give a try here..

Vinod

--
Vinod Palan A
Calypso Technology, Inc.
[EMAIL PROTECTED]
(415) 817-2463 Phone



"Salman Ahmed" <[EMAIL PROTECTED]> wrote in message
001c01c1fc7e$1bb35160$4a8305ca@home">news:001c01c1fc7e$1bb35160$4a8305ca@home...
Hi,

I am also PHP lover plz dont hate me for this but I really need to know any
free perl hosting company where I can host my perl script. Only
circumstances has made this that I programming in perl. I have no idea where
to put my question, as I always did programming in php and asked this list.
So I am asking this question here to, plz tell me about free CGI hosting
site.

Asking for the help and forgiveness
Statbat




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




RE: [PHP] method=post problem

2002-05-15 Thread John Holmes

Use quotes and a little common sense.



How do you expect HTML to know that you mean John Doe to be the entire
value? Computers only do what you tell them.



So what's the value there? Is it 'John', 'John Doe', 'John Doe crap=foo'
or what??

Hope you see the point...



---John Holmes...

> -Original Message-
> From: Jule [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 15, 2002 9:28 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] method=post problem
> 
> Hey guys and gals,
> 
> i have a form with method=post which sends
> 
> 
> 
> 
> 
> 
> 
> to the same page, and  picks it up in an
> if ($submitted) {} loop.
> 
> but now here's the problem:
> when it comes back and goes into the loop. Only the first name from
> $quiz[owner_name] is left, so where it used to be John Doe, is now
only
> Joe.
> how do i fix this?
> 
> thanks
> 
> Jule
> --
> |\/\__/\/|
> |   Jule Slootbeek |
> |   [EMAIL PROTECTED]  |
> |   http://blindtheory.cjb.net |
> |   __ |
> |/\/\/\|
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] Re: PHP editor (win)

2002-05-15 Thread Vinod Palan

Hi,
I am using Editplus and I feel satisfied while using it.
you can give a try..
Vinod

--
Vinod Palan A
Calypso Technology, Inc.
[EMAIL PROTECTED]
(415) 817-2463 Phone



"Juan Pablo Aqueveque" <[EMAIL PROTECTED]> wrote in message
5.1.0.14.2.20020515102655.00a86040@www2">news:5.1.0.14.2.20020515102655.00a86040@www2...
Hi guys

I know this question it's very recurrent but the problem of Jon Yates make
me think again this stuff.

Somebody knows a quick editor, simply and with highlight?

:) Jp

I have tried : PHPEdit, DevPad



Juan Pablo Aqueveque <[EMAIL PROTECTED]>
Ingeniero de Sistemas
Departamento de Redes y Comunicaciones http://www.drc.uct.cl
Universidad Católica de Temuco.
Tel:(5645) 205 630 Fax:(5645) 205 628






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




RE: [PHP] fopen failing to connect

2002-05-15 Thread Vail, Warren

Based on the parts of this thread that I have read, I didn't see anything
about the failing platform. What is the OS, Webserver, etc.?  Does it have
to function thru a gateway or proxy server to get to URL you are trying to
open, perhaps security is tighter on this machine?  Are tcp/ip connections
to port 80 from this machine blocked in any way?

The "bad file number" message could be a clue.  Does this platform return -1
when the file does not exist (or is blocked)?

Using a browser, you get a series of numbers (mostly floats).  Perhaps if
you were to exercise a browser on this machine against the same URL, you
might get a few more clues.

just a few thoughts,

Warren Vail
Tools, Metrics & Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658


-Original Message-
From: Jennifer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 15, 2002 4:49 PM
To: Miguel Cruz
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] fopen failing to connect


i looked at the php.ini file and f wrapper is configured. thanks for the
suggestion. i am still looking for any suggestions anyone has. thanks.

-jennifer

Miguel Cruz wrote:

> Sounds like maybe the fopen url wrapper is not installed. I've never taken
> any particular steps to install it, so I'm not sure how that would come
> about.
>
> miguel
>
> On Wed, 15 May 2002, jennifer jefferson wrote:
> > thanks for looking. my guess is that it could be a
> > server configuration issue. i am really not sure. the
> > actual script works just not on the server i need
> > it to work on. maybe it has something to do with the
> > .ini file or the installation. i am not very familiar
> > with that. does this sound likely as a problem?
> > thanks.
> >
> > -jennifer
> >
> > --- Kevin Stone <[EMAIL PROTECTED]> wrote:
> > > Jennifer, works just fine here..
> > >
> > > -
> > > $fp =
> > >
> >
fopen("http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfe
> > > ed","r");
> > > if ($fp !== FALSE)
> > >  echo "The file exists!";
> > > else
> > > echo "The file does not exist";
> > > -
> > >
> > > This prints "The file exists!" so it may be
> > > something else in your code
> > > cuasing the problem.  And when I read the file it
> > > displays a bunch of
> > > numbers.  Don't know what you could be doing wrong
> > > but if you continue to
> > > experiece problems post some more of your code and
> > > maybe we can decipher the
> > > error from that.
> > >
> > > -Kevin
> >
> > __
> > Do You Yahoo!?
> > LAUNCH - Your Yahoo! Music Experience
> > http://launch.yahoo.com
> >
> >


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

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




[PHP] method=post problem

2002-05-15 Thread Jule

Hey guys and gals,

i have a form with method=post which sends 







to the same page, and  picks it up in an 
if ($submitted) {} loop.

but now here's the problem: 
when it comes back and goes into the loop. Only the first name from 
$quiz[owner_name] is left, so where it used to be John Doe, is now only Joe.
how do i fix this?

thanks

Jule
-- 
|\/\__/\/|
|   Jule Slootbeek   |
|   [EMAIL PROTECTED]|
|   http://blindtheory.cjb.net   |
|   __   |
|/\/  \/\|

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




Re: [PHP] phpmysqladmin ? still viable?

2002-05-15 Thread Erik Gilchrist

Well, let's just say that my host is not a server farm and my hosting fees 
are incredibly hard to pass up on many levels (work that comes my way and 
theirs..) and the simple fact that i can actually email and get a quick 
response (or dare I say PHONE!) to Q's and exceptional service is one of my 
strong longings in any industry.

I am happy so far, but will forgo switching hosts for now.  It has simply 
worked up until now, and this is nothing more than a minor "blip" in the 
radar.

I do know exactly what you're talking bout tho...  appreciate the concern.  
I have had to mediate host v. client v. coder v. designer all too often.  
Maybe I should be in arbitrage.   LOL   (well, maybe not, but I will consult 
;-)

Still DIGEST dealyed, CC: prefered 
erik
(Sorry for the double post Jeff...)

>From: "Jeff Lewis" <[EMAIL PROTECTED]>
>Reply-To: "Jeff Lewis" <[EMAIL PROTECTED]>
>To: "Erik Gilchrist" <[EMAIL PROTECTED]>
>Subject: Re: [PHP] phpmysqladmin ? still viable?
>Date: Wed, 15 May 2002 20:58:23 -0400
>
>Eek, was scares me is that your host didn't know about phpmyadmin :)
>
>Jeff
>- Original Message -
>From: "Erik Gilchrist" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Cc: <[EMAIL PROTECTED]>
>Sent: Wednesday, May 15, 2002 8:26 PM
>Subject: Re: [PHP] phpmysqladmin ? still viable?
>
>
> > Damian,
> >
> > Yes, I sent that to him, but who knows...  well, at least I don't know.
>PHP
> > is new to me.  SQL?  Even newer.
> >
> > I created an account like that on L33T.ca last week, and just sent my 
>host
> > an email on that before posting here.  I just figured that phpmysqladmin
>was
> > a different thing.
> >
> > These are the same things. eh?
> >
> > (DIGEST delayed - please CC:)
> > erik
> >
> > >From: Damian Harouff <[EMAIL PROTECTED]>
> > >Reply-To: Damian Harouff <[EMAIL PROTECTED]>
> > >To: "Erik Gilchrist" <[EMAIL PROTECTED]>
> > >CC: [EMAIL PROTECTED]
> > >Subject: Re: [PHP] phpmysqladmin ?  still viable?
> > >Date: Wed, 15 May 2002 19:18:57 -0500
> > >
> > >Are you sure you don't mean "phpmyadmin"?
> > >
> > >http://phpmyadmin.sourceforge.net/
> > >
> > >EG> First off, I am a total newbie to php and DB stuff.  Pardon the
> > >intrusion on
> > >EG> your busy schedules.  Really.
> > >
> > >EG> My host is having a hard time finding phpmysqladmin and he touted
>this
> > >as a
> > >EG> solution to my wanting to get into the DB arena as well as php.
> > >...   



_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




[PHP] Plz dont hate me for this

2002-05-15 Thread Salman Ahmed

Hi,

I am also PHP lover plz dont hate me for this but I really need to know any free perl 
hosting company where I can host my perl script. Only circumstances has made this that 
I programming in perl. I have no idea where to put my question, as I always did 
programming in php and asked this list. So I am asking this question here to, plz tell 
me about free CGI hosting site.

Asking for the help and forgiveness
Statbat



Re: [PHP] Compiling PHP on Solaris 7

2002-05-15 Thread Billy S Halsey

Greetings, Thomas.

Did you solve this problem? If not, I would suggest getting rid of the 
"--enable-libgcc" in your ./configure command. Here's how I configured 
my installation of 4.2.0 for Solaris 8: (Directory names XXX'ed out)

'./configure' '--prefix=XXX' '--enable-cli'
'--enable-magic-quotes' '--disable-short-tags' '--enable-bcmath'
'--enable-calendar' '--enable-dba=shared' '--enable-dbx' '--enable-dio'
'--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-shmop'
'--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-tokenizer' '--enable-wddx' '--enable-yp'
'--enable-inline-optimization' '--with-apxs=XXX'
'--with-openssl=shared,XXX' '--with-zlib=shared,XXX'
'--with-bz2=shared,XXX' '--with-curl=shared,XXX'
'--with-gd=shared,XXX' '--with-ldap=shared,XXX'
'--with-mcal=shared,XXX' '--with-mcrypt=shared,XXX'
'--with-mnogosearch=shared,XXX'
'--with-mysql=shared,XXX'
'--with-sybase-ct=shared,XXX' '--with-expat-dir=XXX'

I'm building with gcc 3.0.3.

Regards,
/bsh/

Thomas Finley wrote:
> Pleas help. I'm installing php on a Solaris 7 server that is running
> iplanet 4.1.
> 
> PHP Version 4.2.1
> 
> Configure: (I had more compiled in (gd, gdbm...) but error below
> occured so I cut it down)
> 
> ./configure --with-nsapi=/usr/netscape/server4 --enable-libgcc \
> --prefix=/usr --with-mysql=/usr/local/mysql --enable-track-vars
> 
> The Error:
> 
> bash-2.05# make
> Making all in Zend
> make[1]: Entering directory `/usr/share/src/php-4.2.1/Zend'
> /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
> -I../main   -D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS
> -D_REENTRANT -I../TSRM  -g -O2 -pthreads -DZTS -prefer-pic -c -o
> zend_language_parser.lo `test -f zend_language_parser.c || echo
> './'`zend_language_parser.c
> In file included from zend_compile.h:24,
>  from zend_language_parser.c:147:
> zend.h:55: unix.h: No such file or directory
> make[1]: *** [zend_language_parser.lo] Error 1
> make[1]: Leaving directory `/usr/share/src/php-4.2.1/Zend'
> make: *** [all-recursive] Error 1
> 
> Thomas Finley
> [EMAIL PROTECTED]
> 
> 
-- 


/-=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
| "All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer." |
\--=[ [EMAIL PROTECTED] ]=/


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




Re: [PHP] Tellwhich browser

2002-05-15 Thread Justin French

A simple looks around at phpbuilder.com will result in an article on browser
detection & CSS... the browser detection function he writes can be used for
many things, including what you want.

Justin French


on 16/05/02 12:09 AM, Diana Castillo ([EMAIL PROTECTED])
wrote:

> What is the code to tell whether the user is on IE or Netscape?
> 
> 


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




Re: [PHP] The future of call time pass-as-reference

2002-05-15 Thread Lars Torben Wilson

On Wed, 2002-05-15 at 17:13, Frank wrote:
> 
> After installing PHP 4.2.0 I got the following error-message under a run:
> 
> "Warning: Call-time pass-by-reference has been deprecated - argument passed 
> by value; If you would like to pass it by reference, modify the declaration 
> of [runtime function name](). If you would like to enable call-time 
> pass-by-reference, you can set allow_call_time_pass_reference to true in 
> your INI file. However, future versions may not support this any longer. "
> 
> This is actually big news as parameter passing is a fundamental issue.

What version did you upgrade from? This has been the case for over two
years. Here's the actual commit which added this warning:

http://cvs.php.net/diff.php/Zend/zend_compile.c?r1=1.85&r2=1.86&ty=h&Horde=f1b8ac02f66b49090920734c03b780c1

...which is from Dec 15, 1999---5 months before PHP 4.0.0 was released. 
Chances are you had the error suppressed in php.ini.

> Anyway - it seems that I have to choose between either starting to rewrite 
> quite a lot of code right away or risk being forced to rewrite more later 
> if I use the quick fix with setting allow_call_time_pass_reference to true.
> 
> Any thoughts?
> 
> Frank

Yup. Start changing that code. :) 

Sorry if this seems overly glib but it's just the way things work. This 
has been hashed over before--check the list archives. Essentially, the
feeling is that references are not what you might expect if you come 
from a C-like background and the call-time syntax doesn't give you
the benefits you might expect.

Hope that explains some of it. I believe there is more on the topic
on zend.com, too.


Cheers,

Torben


-- 
 Torben Wilson <[EMAIL PROTECTED]>
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


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




RE: [PHP] phpmysqladmin ? still viable?

2002-05-15 Thread Erik Gilchrist

AH!   That is how I got it the first time for my L33T.ca account.  I think I 
got it from SourceForge.net and he knows I now have it posted there after 
last weeks search.

Damn!  This list is fast   

Erik


>From: Jason Murray <[EMAIL PROTECTED]>
>To: "'Erik Gilchrist'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Subject: RE: [PHP] phpmysqladmin ?  still viable?
>Date: Thu, 16 May 2002 10:19:56 +1000
>
>Go to www.google.com -> enter "phpMyAdmin" -> hit "I'm Feeling Lucky"
>
>:)
>
>--
>Jason Murray
>[EMAIL PROTECTED]
>Web Developer, Melbourne IT
>"Work now, freak later!"
>
> > -Original Message-
> > From: Erik Gilchrist [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 16, 2002 10:15 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] phpmysqladmin ? still viable?
> >
> >
> > First off, I am a total newbie to php and DB stuff.  Pardon
> > the intrusion on
> > your busy schedules.  Really.
> >
> > My host is having a hard time finding phpmysqladmin 
>.>>


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Re: [PHP] phpmysqladmin ? still viable?

2002-05-15 Thread Erik Gilchrist

Damian,

Yes, I sent that to him, but who knows...  well, at least I don't know.  PHP 
is new to me.  SQL?  Even newer.

I created an account like that on L33T.ca last week, and just sent my host 
an email on that before posting here.  I just figured that phpmysqladmin was 
a different thing.

These are the same things. eh?

(DIGEST delayed - please CC:)
erik

>From: Damian Harouff <[EMAIL PROTECTED]>
>Reply-To: Damian Harouff <[EMAIL PROTECTED]>
>To: "Erik Gilchrist" <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: [PHP] phpmysqladmin ?  still viable?
>Date: Wed, 15 May 2002 19:18:57 -0500
>
>Are you sure you don't mean "phpmyadmin"?
>
>http://phpmyadmin.sourceforge.net/
>
>EG> First off, I am a total newbie to php and DB stuff.  Pardon the 
>intrusion on
>EG> your busy schedules.  Really.
>
>EG> My host is having a hard time finding phpmysqladmin and he touted this 
>as a
>EG> solution to my wanting to get into the DB arena as well as php.  
>...   


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




Re: [PHP] phpmysqladmin ? still viable?

2002-05-15 Thread Danny Shepherd

I think you're looking for phpMyAdmin and yes, it's very viable and PHP4
compatible.

http://www.phpwizard.net/projects/phpMyAdmin/

HTH

Danny.

- Original Message -
From: "Erik Gilchrist" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 1:15 AM
Subject: [PHP] phpmysqladmin ? still viable?


> First off, I am a total newbie to php and DB stuff.  Pardon the intrusion
on
> your busy schedules.  Really.
>
> My host is having a hard time finding phpmysqladmin and he touted this as
a
> solution to my wanting to get into the DB arena as well as php.  Does
anyone
> know where to get it?   All of my evening has now been wasted googling
> looking for it and perhaps there is a better solution.
>
> And no, I really am out of my game here, but I figured it was a good place
> to ask.  The only caveat the host said was that it MUST be PHP4.x
> compatible.
>
> I sincerely apologize for the intrusion if it's not on topic enough.  I
know
> I need to go further in my exploration that the net has via tutorials and
> PHP manual, but if anyone has time I would sincerely appreciate it.  I
have
> been lurking for a week or two.  Good stuff to be found here.  Indeed.
>
> I could have all the assumptions above all wrong and some bad
> data/opinions...  sorry.  please explain.  If I am in the wrong place to
> ask, please tell me where the best place to look/ask is.  I don't want to
> waste anybodys time.  I surely would not want mine wasted.
>
> BTW-- I am on DIGEST, so a CC: would be appreciated dearly.
>
> TIA.
> Erik
>
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] phpmysqladmin ? still viable?

2002-05-15 Thread Damian Harouff

Are you sure you don't mean "phpmyadmin"?

http://phpmyadmin.sourceforge.net/

EG> First off, I am a total newbie to php and DB stuff.  Pardon the intrusion on 
EG> your busy schedules.  Really.

EG> My host is having a hard time finding phpmysqladmin and he touted this as a 
EG> solution to my wanting to get into the DB arena as well as php.  Does anyone 
EG> know where to get it?   All of my evening has now been wasted googling 
EG> looking for it and perhaps there is a better solution.

EG> And no, I really am out of my game here, but I figured it was a good place 
EG> to ask.  The only caveat the host said was that it MUST be PHP4.x 
EG> compatible.

EG> I sincerely apologize for the intrusion if it's not on topic enough.  I know 
EG> I need to go further in my exploration that the net has via tutorials and 
EG> PHP manual, but if anyone has time I would sincerely appreciate it.  I have 
EG> been lurking for a week or two.  Good stuff to be found here.  Indeed.

EG> I could have all the assumptions above all wrong and some bad 
EG> data/opinions...  sorry.  please explain.  If I am in the wrong place to 
EG> ask, please tell me where the best place to look/ask is.  I don't want to 
EG> waste anybodys time.  I surely would not want mine wasted.

EG> BTW-- I am on DIGEST, so a CC: would be appreciated dearly.

EG> TIA.
EG> Erik


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




RE: [PHP] phpmysqladmin ? still viable?

2002-05-15 Thread Jason Murray

Go to www.google.com -> enter "phpMyAdmin" -> hit "I'm Feeling Lucky"

:)

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

> -Original Message-
> From: Erik Gilchrist [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 16, 2002 10:15 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] phpmysqladmin ? still viable?
> 
> 
> First off, I am a total newbie to php and DB stuff.  Pardon 
> the intrusion on 
> your busy schedules.  Really.
> 
> My host is having a hard time finding phpmysqladmin and he 
> touted this as a 
> solution to my wanting to get into the DB arena as well as 
> php.  Does anyone 
> know where to get it?   All of my evening has now been wasted 
> googling 
> looking for it and perhaps there is a better solution.
> 
> And no, I really am out of my game here, but I figured it was 
> a good place 
> to ask.  The only caveat the host said was that it MUST be PHP4.x 
> compatible.
> 
> I sincerely apologize for the intrusion if it's not on topic 
> enough.  I know 
> I need to go further in my exploration that the net has via 
> tutorials and 
> PHP manual, but if anyone has time I would sincerely 
> appreciate it.  I have 
> been lurking for a week or two.  Good stuff to be found here.  Indeed.
> 
> I could have all the assumptions above all wrong and some bad 
> data/opinions...  sorry.  please explain.  If I am in the 
> wrong place to 
> ask, please tell me where the best place to look/ask is.  I 
> don't want to 
> waste anybodys time.  I surely would not want mine wasted.
> 
> BTW-- I am on DIGEST, so a CC: would be appreciated dearly.
> 
> TIA.
> Erik
> 
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

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




[PHP] The future of call time pass-as-reference

2002-05-15 Thread Frank


After installing PHP 4.2.0 I got the following error-message under a run:

"Warning: Call-time pass-by-reference has been deprecated - argument passed 
by value; If you would like to pass it by reference, modify the declaration 
of [runtime function name](). If you would like to enable call-time 
pass-by-reference, you can set allow_call_time_pass_reference to true in 
your INI file. However, future versions may not support this any longer. "

This is actually big news as parameter passing is a fundamental issue.

Traditionally

function foo($v)   called as
foo(&$myvar)

was regarded as safer coding than

function foo(&$v)   called as
foo($myvar)

as in the first case the user would automatically be aware that $myvar 
could be changed by the function, in the second not.

Worse is that in some functions it makes fine sense for the user to have a 
choice. These functions will be very hard to rewrite as the user will be 
forced to references in all cases.

Finally default parameters are not supported for reference-parameters in 
the function header.

Anyway - it seems that I have to choose between either starting to rewrite 
quite a lot of code right away or risk being forced to rewrite more later 
if I use the quick fix with setting allow_call_time_pass_reference to true.

Any thoughts?

Frank



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




[PHP] phpmysqladmin ? still viable?

2002-05-15 Thread Erik Gilchrist

First off, I am a total newbie to php and DB stuff.  Pardon the intrusion on 
your busy schedules.  Really.

My host is having a hard time finding phpmysqladmin and he touted this as a 
solution to my wanting to get into the DB arena as well as php.  Does anyone 
know where to get it?   All of my evening has now been wasted googling 
looking for it and perhaps there is a better solution.

And no, I really am out of my game here, but I figured it was a good place 
to ask.  The only caveat the host said was that it MUST be PHP4.x 
compatible.

I sincerely apologize for the intrusion if it's not on topic enough.  I know 
I need to go further in my exploration that the net has via tutorials and 
PHP manual, but if anyone has time I would sincerely appreciate it.  I have 
been lurking for a week or two.  Good stuff to be found here.  Indeed.

I could have all the assumptions above all wrong and some bad 
data/opinions...  sorry.  please explain.  If I am in the wrong place to 
ask, please tell me where the best place to look/ask is.  I don't want to 
waste anybodys time.  I surely would not want mine wasted.

BTW-- I am on DIGEST, so a CC: would be appreciated dearly.

TIA.
Erik

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Re: [PHP] fopen failing to connect

2002-05-15 Thread Jennifer

i looked at the php.ini file and f wrapper is configured. thanks for the
suggestion. i am still looking for any suggestions anyone has. thanks.

-jennifer

Miguel Cruz wrote:

> Sounds like maybe the fopen url wrapper is not installed. I've never taken
> any particular steps to install it, so I'm not sure how that would come
> about.
>
> miguel
>
> On Wed, 15 May 2002, jennifer jefferson wrote:
> > thanks for looking. my guess is that it could be a
> > server configuration issue. i am really not sure. the
> > actual script works just not on the server i need
> > it to work on. maybe it has something to do with the
> > .ini file or the installation. i am not very familiar
> > with that. does this sound likely as a problem?
> > thanks.
> >
> > -jennifer
> >
> > --- Kevin Stone <[EMAIL PROTECTED]> wrote:
> > > Jennifer, works just fine here..
> > >
> > > -
> > > $fp =
> > >
> > fopen("http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfe
> > > ed","r");
> > > if ($fp !== FALSE)
> > >  echo "The file exists!";
> > > else
> > > echo "The file does not exist";
> > > -
> > >
> > > This prints "The file exists!" so it may be
> > > something else in your code
> > > cuasing the problem.  And when I read the file it
> > > displays a bunch of
> > > numbers.  Don't know what you could be doing wrong
> > > but if you continue to
> > > experiece problems post some more of your code and
> > > maybe we can decipher the
> > > error from that.
> > >
> > > -Kevin
> >
> > __
> > Do You Yahoo!?
> > LAUNCH - Your Yahoo! Music Experience
> > http://launch.yahoo.com
> >
> >


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




Re: [PHP] fopen failing to connect

2002-05-15 Thread Miguel Cruz

Sounds like maybe the fopen url wrapper is not installed. I've never taken
any particular steps to install it, so I'm not sure how that would come
about.

miguel

On Wed, 15 May 2002, jennifer jefferson wrote:
> thanks for looking. my guess is that it could be a
> server configuration issue. i am really not sure. the
> actual script works just not on the server i need
> it to work on. maybe it has something to do with the
> .ini file or the installation. i am not very familiar
> with that. does this sound likely as a problem?
> thanks.
> 
> -jennifer
> 
> --- Kevin Stone <[EMAIL PROTECTED]> wrote:
> > Jennifer, works just fine here..
> > 
> > -
> > $fp =
> >
> fopen("http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfe
> > ed","r");
> > if ($fp !== FALSE)
> >  echo "The file exists!";
> > else
> > echo "The file does not exist";
> > -
> > 
> > This prints "The file exists!" so it may be
> > something else in your code
> > cuasing the problem.  And when I read the file it
> > displays a bunch of
> > numbers.  Don't know what you could be doing wrong
> > but if you continue to
> > experiece problems post some more of your code and
> > maybe we can decipher the
> > error from that.
> > 
> > -Kevin
> 
> __
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
> 
> 


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




Re: [PHP] How program automatic 'filler forms' robots?

2002-05-15 Thread M

"SHEETS,JASON (Non-HP-Boise,ex1)" wrote:

> You need to tell PHP to input the value and you should be using "'s
>
> example:
>
> 
>
> This example assumes you are using at least PHP 4.1, also you may use
> $_REQUEST instead of $_GET if you are going to be using both GET and POST
> methods.
>
> Jason

Hello Jason

Well, maybe I got little confusion by naming 'myurl.html' rather than
'yoursurl.html', because web pages I want to fill automatically are web pages
built by another people I have no contact with. For instance (it is not true,
but it worth like example), I want to fill automatically some creditcard page
with name, account , address and so. I want to program my script to fill exactly
that page, because I know that URL, I can peruse through that html source and
learn what name values are into form and I know exactly how that url treat those
names (get, post etc). The only problem is: I am obligued to call that url and
write manually all data.

Suppose I need to fill that web page thounsand times (to all my employers), then
I want to make some kind of script to call url passing parameters, in a way when
that page appears to me, it already has all fields filled with correct values (I
only would need to press the 'send' button). If possible, I would like to press
'send' button also automatically.

I know there are programs that perform this task, because I noticed some search
engines (ie altavista) ask you type some blurr code appearing as image, just to
avoid these robots fill automatically fields. Since robots can't read (for a
while) that blurr images, it is necessary a human to type that info.

Mig



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




Re: [PHP] fopen failing to connect

2002-05-15 Thread jennifer jefferson

thanks for looking. my guess is that it could be a
server configuration issue. i am really not sure. the
actual script works just not on the server i need
it to work on. maybe it has something to do with the
.ini file or the installation. i am not very familiar
with that. does this sound likely as a problem?
thanks.

-jennifer

--- Kevin Stone <[EMAIL PROTECTED]> wrote:
> Jennifer, works just fine here..
> 
> -
> $fp =
>
fopen("http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfe
> ed","r");
> if ($fp !== FALSE)
>  echo "The file exists!";
> else
> echo "The file does not exist";
> -
> 
> This prints "The file exists!" so it may be
> something else in your code
> cuasing the problem.  And when I read the file it
> displays a bunch of
> numbers.  Don't know what you could be doing wrong
> but if you continue to
> experiece problems post some more of your code and
> maybe we can decipher the
> error from that.
> 
> -Kevin

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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




RE: [PHP] header() -- function failed to due caching.

2002-05-15 Thread Patrick Lynch

Hi Scott,

If you are using IE, make sure that the browser checks for updates every
visit to the page. (Tools->Internet Options->Settings). I am not sure
that this setting observes Cache-Control, etc...

Are you setting the Cache-Control header to Private and the expires
header to a suitable time?

Regards,
Patrick Lynch
http://www.optip.com/

-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]] 
Sent: 15 May 2002 18:31
To: [EMAIL PROTECTED]
Subject: [PHP] header() -- function failed to due caching.


I tried to use this script but it failed due to the caching.  Does
anyone know the way around hte problem or have a solution to the
problem?

--- example script 
  $url_address = $GLOBALS["HTTP_HOST"];

   switch ($url_address) {
   case "www.php.net":
   $url_address = "http://www.php.net/db2admin/db2_cleanup.php";;
   break;
   case "test.php.net":
   $url_address =
"https://test.php.net/db2admin/db2_cleanup.php";;
   break;
   default:
   $url_address = "  ";
   echo $url_address;
   break;
   }
header("Location: $url_address");

--- example script end 



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



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




Re: [PHP] Formatting Time

2002-05-15 Thread Analysis & Solutions

Devin:

> I want to a kewl script that will format time from seconds. I have a script
> that returns the number of seconds a person has been an employee and
> I want to format it in human readable format like:
> 
> 1 year 6 months 14 days, etc.

Start with the manual:

http://www.php.net/manual/en/ref.calendar.php
http://www.php.net/manual/en/ref.datetime.php

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




Re: [PHP] PHP Tag question

2002-05-15 Thread Lars Torben Wilson

On Wed, 2002-05-15 at 13:31, Matthew Walker wrote:
> I'm writing a coding standards document for our programmers, and I need
> to know if the 'echo' shortcut PHP tags are always on, or if we need to
> assume they might not be on.
> 
> (By echo shortcut, I mean this syntax: )

The only guaranteed acceptable open tags are . If you expect that your code may ever run on
a server where you don't control php.ini, you should definitely
mandate that short_open_tag = off when developing.

BTW--no offense, but this is explained at some length in the
manual:

   http://www.php.net/manual/en/language.basic-syntax.php

> Matthew Walker
> Senior Software Engineer
> ePliant Marketing

-- 
 Torben Wilson <[EMAIL PROTECTED]>
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


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




Re: [PHP] Done w/ PHP - VB or C# ?

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, Phil Schwarzmann wrote:
> I know I'll get mauled big-time on this mailing list but I'm thinking
> about putting PHP on hold for a while and learning ASP.NET
>  
> I love PHP and open-source computing but if one wants to get a job in
> web development, you'll have a much better time find a job with both PHP
> and ASP (among others) skills.
>  
> I'm going to hop on the ASP bandwagon but I'm not sure if I should
> first learn ASP w/ VB or w/ C#
>  
> Any thoughts on this?  What are the pros and cons of both?

I worked with ASP/VBScript for about a year when I was with a government
agency that had standardized on it.

My thought is this: I'd rather change jobs to tongue-clean toilets at an
Nigerian truck stop than go through that again. You won't believe how
verbose and weak the language is. Imagine all the hassle of Java coupled
all the power of DOS batchfiles. Every single thing you want to do - even
basic filesystem operations like working with directories and file
permissions!!! - requires purchasing expensive and buggy .COM components
from nasty little companies with horrible documentation and nonexistent
customer service. I consider it an incredibly developer-hostile
environment (unless you're in the business of developing developer tools,
which seems to be the lynchpin of the ASP ponzi scheme).

Your choices are your own, but it's always seemed to me that it makes more 
sense to be focus on being really good at something fun, than to spread 
out to things that every other loser is already doing. Insofar as it can 
be said about a programming language, PHP is actually fun - in a way that 
only Perl seems to match (though Perl is certainly a more frustrating kind 
of fun).

As for .NET, I thought I just read that Microsoft was pulling everything 
in for a rethink because of all the negative reactions it was getting.

miguel


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




[PHP] Simple logic and sessions - Typo somewhere?

2002-05-15 Thread Damian Harouff

I am unable to get this to work. You start with
system_logic.php?system=a900. It's supposed to start with memory
selection, the proceed to hard drive, and onward. Instead, it starts
with videocard, and keeps going through the videocard set, instead of
at least progressing into hard drive.

This is with php 4.2.1 on Debian Linux.

Here are the 2 files:

system_logic.php
---


--
systembuild.php
--

";

$outer = new ftable;

$outer->bodybgcolor = '058BAA';
$outer->caption = 'http://www.unicortex.com/";>'.
'UniCortex - ' . 
$_SESSION[location] ;

$outer->radius = 20;
$outer->lineheight=3;
$outer->linecolor='CC';
$outer->width='75%';
$outer->printtop();

echo '';

while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {

$row++;

blanker( "100", 4 );

$tempdesc = explode("|", $line[desc]);
$tempdesc = implode("", $tempdesc);

$pop = new ftable;

$pop->bodybgcolor = 'FF';
$pop->linecolor = 'AFAFAF';
$pop->captionbgcolor = 'FF';
$pop->caption = "". $line[name] ." :: ";
$pop->radius = 8;
$pop->lineheight = 3;
$pop->width = '325';
$pop->printtop();

print "For system: " . formatSmall($line[forsystem], 0) . "";
print "Price: " . formatSmall("$".$line[price], 0) . "";

$pop->linecolor = '0CC303';
$pop->changebodybgcolor('AAFFAA');

print "View 
Information";
if ($line[picture] != "nopicture") print "See 
Picture";
else print "";

$pop->printbottom();
if ($row != 3) echo ''.ft_blank(4,4).'';
elseif ($row >= 3) echo '';

}

echo '';
$outer->printbottom();
print '';

mysql_free_result($result);
mysql_close($link);


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




Re: [PHP] PhP 4.2.1 (and various)

2002-05-15 Thread Analysis & Solutions

Olav:

> >   if( empty($Authorized) ) {
> >  header ('Location: http://jaggu.org');
> >   } else {
> >  $user = $Session['user'];
> >   }
> 
> Thanks for the reply, but it didnt help :)

Perhaps because you're ignoring what I said.


> The code is without errors. What I submitted was
> written on the fly to illustrate what i tried to do.
> 
> Here is the actual code...
> 
> $playername=$_GET['player'];

This will generate an error message if there's no player variable in the 
request string and you have error reporting set high enough.  Evaluate 
for "empty($_GET['player'])"


> if (!$playername)
> {
> ..print HTML form code...
> }
> else 
> {
>   if ($playername)

Why are you testing for playername again?  You already know it's there 
because your'e in the else after the "if (!$playername)" statement.

>   {
>   $_SESSION['playername']=$playername;
>   
>   header('Location:
> http://'.$_SERVER['HTTP_HOST'].'/UTGE/index.html'); 

Hmm...  You're sticking playername into the Session array.  I haven't
used PHP's session handling, but some things seem odd here.  Where did
you start the session?  Also, how is your relocated page going to know 
about the session?  I don't see any code here that performs those tasks.

Enjoy,

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

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




[PHP] Re: Done w/ PHP - VB or C# ?

2002-05-15 Thread Michael Kimsal

Phil Schwarzmann wrote:
> I know I'll get mauled big-time on this mailing list but I'm thinking
> about putting PHP on hold for a while and learning ASP.NET
>  
> I love PHP and open-source computing but if one wants to get a job in
> web development, you'll have a much better time find a job with both PHP
> and ASP (among others) skills.


Funny, I don't know many ASP developers who are all that eager
to learn other technologies.  I also don't see that many Java developers
jumping up and down to say "gosh, I gotta go learn perl or I won't
be able to get a job".

That's not to say your prospects might not be a bit brighter
in terms of sheer financial gain hitching onto the MS bandwagon -
they're big, have name recognition, and it's often an easy sale.  But
don't assume that you need 10 languages under your belt.  It helps,
but it most likely won't instantly get you better results.


Michael Kimsal
http://www.logicreate.com
734-480-9961


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




[PHP] Re: Done w/ PHP - VB or C# ?

2002-05-15 Thread Jim Winstead

Phil Schwarzmann <[EMAIL PROTECTED]> wrote:
> Any thoughts on this?  What are the pros and cons of both?

i think you should not waste our time with such a discussion, perhaps by
taking it to a relevant forum. if you don't want to use php, that's your
problem. this list/newsgroup is for discussing php.

jim

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




Re: [PHP] fopen failing to connect

2002-05-15 Thread Kevin Stone

Jennifer, works just fine here..

-
$fp =
fopen("http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfe
ed","r");
if ($fp !== FALSE)
 echo "The file exists!";
else
echo "The file does not exist";
-

This prints "The file exists!" so it may be something else in your code
cuasing the problem.  And when I read the file it displays a bunch of
numbers.  Don't know what you could be doing wrong but if you continue to
experiece problems post some more of your code and maybe we can decipher the
error from that.

-Kevin


- Original Message -
From: "jennifer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 2:09 PM
Subject: [PHP] fopen failing to connect


> Hello
>
> I have a script which uses fopen( ).  It works on my local machine which
has
> php and apache on a windows platform as well as on another server
> (php/apache) which is windows based.  However, when I have the same script
on
> a unix machine (php/apache), the fopen gives me the following error:
>
>
> Warning: php_hostconnect: connect failed in
> /usr/local/apache/htdocs/514parser.php on line 135
>
> Warning:
>
fopen("http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfe
ed",
> "r") - Bad file number in /usr/local/apache/htdocs/514parser.php on line
135
> Any suggestions?
>
> -jennifer
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



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




RE: [PHP] SQL Server test tool

2002-05-15 Thread Collins, Robert

This is not tested but should work


$mysql_host = "localhost:1433";
$mysql_login = "billy";
$mysql_pw = "bob";

if(!$db_conn = mysql_connect($mysql_host, $mysql_login, $mysql_pw)){
echo "Connection Failed";
}


Robert W. Collins II 
Webmaster 
New Orleans Regional Transit Authority 
Phone : (504) 248-3826 
Email : [EMAIL PROTECTED] 
 

-Original Message-
From: Scott St. John [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 15, 2002 6:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] SQL Server test tool

Has anyone seen or know if it is possible to use PHP to test if a SQL 
server is alive on port 1433?  I know I could run a query, but was
looking 
for something to actually test on the port.

Thanks,

-Scott


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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

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




Re: [PHP] I'm doing something wrong....

2002-05-15 Thread Jerome Houston


yah, there's a function. (isn't there almost always?)

http://www.php.net/manual/en/function.array-values.php

it gives you a numerically indexed array of all the values in your current 
array, associative or not.

-j

Original Message Follows
From: "1LT John W. Holmes" <[EMAIL PROTECTED]>
Reply-To: "1LT John W. Holmes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>, "Robert Rothe" <[EMAIL PROTECTED]>
Subject: Re: [PHP] I'm doing something wrong
Date: Wed, 15 May 2002 17:14:58 -0400


There is no [0]...only ['one'] and ['two']...

Look through the array functions, there may be a way to reassign the keys...

---John Holmes...

- Original Message -
From: "Robert Rothe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 4:35 PM
Subject: [PHP] I'm doing something wrong


 > I've created an array.  A very simple array that uses strings as keys.
 >
 > aname['one']=something;
 > aname['two']=something else;
 >
 > Isn't there any way to directly access the 'n'th element?
 > example: aname[0]?
 >
 > I've searched the group, but haven't found anything.  Am I missing
 > something or can't this be done?
 >
 > TIA,
 >
 > Rob
 >
 > --
 > PHP General Mailing List (http://www.php.net/)
 > To unsubscribe, visit: http://www.php.net/unsub.php
 >


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



_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Re: [PHP] I'm doing something wrong....

2002-05-15 Thread Jerome Houston


http://www.php.net/manual/en/language.types.array.php

An array in PHP is actually an ordered map. A map is a type that maps values 
to keys.


we're not working with C where each array value is right next to each other 
in memory.  it's an abstraction that does the job intelligently, but gives 
you a familiar-looking interface.

-j

Original Message Follows
From: Robert Rothe <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: [PHP] I'm doing something wrong
Date: Wed, 15 May 2002 17:10:44 -0400

Thanks.  So the next() and prev() functions just traverse an array using
some type of linked list?  This is what precludes direct access to
specific elements?


"Thalis A. Kalfigopoulos" wrote:
 >
 > In an associative array, there is no notion of the 'n-th' element. So 
AFAIK you can't do that.
 >
 > cheers,
 > thalis
 >
 > On Wed, 15 May 2002, Robert Rothe wrote:
 >
 > > I've created an array.  A very simple array that uses strings as keys.
 > >
 > > aname['one']=something;
 > > aname['two']=something else;
 > >
 > > Isn't there any way to directly access the 'n'th element?
 > >   example: aname[0]?
 > >
 > > I've searched the group, but haven't found anything.  Am I missing
 > > something or can't this be done?
 > >
 > > TIA,
 > >
 > > Rob
 > >
 > > --
 > > PHP General Mailing List (http://www.php.net/)
 > > To unsubscribe, visit: http://www.php.net/unsub.php
 > >

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


_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: [PHP] PHP Tag question

2002-05-15 Thread Pushkar Pradhan

Yes  I believe he was talking about
>
>  vs. 
>
> not 
> I don't know of any way to disable  being on. Does 
> ---John Holmes...
> - Original Message -
> From: "Pushkar Pradhan" <[EMAIL PROTECTED]>
> To: "Matthew Walker" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 15, 2002 4:49 PM
> Subject: Re: [PHP] PHP Tag question
>
>
> > You can tell that from the php.ini file look for:
> >
> > ; Allow the  tags are
> > recognized.
> > short_open_tag = On
> >
> > So basically you can switch them on/off.
> >
> > On Wed, 15 May 2002, Matthew Walker wrote:
> >
> > > I'm writing a coding standards document for our programmers, and I need
> > > to know if the 'echo' shortcut PHP tags are always on, or if we need to
> > > assume they might not be on.
> > >
> > > (By echo shortcut, I mean this syntax: )
> > >
> > > Matthew Walker
> > > Senior Software Engineer
> > > ePliant Marketing
> > >
> > >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> > -Pushkar S. Pradhan
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-Pushkar S. Pradhan


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




Re: [PHP] I'm doing something wrong....

2002-05-15 Thread 1LT John W. Holmes

There is no [0]...only ['one'] and ['two']...

Look through the array functions, there may be a way to reassign the keys...

---John Holmes...

- Original Message -
From: "Robert Rothe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 4:35 PM
Subject: [PHP] I'm doing something wrong


> I've created an array.  A very simple array that uses strings as keys.
>
> aname['one']=something;
> aname['two']=something else;
>
> Isn't there any way to directly access the 'n'th element?
> example: aname[0]?
>
> I've searched the group, but haven't found anything.  Am I missing
> something or can't this be done?
>
> TIA,
>
> Rob
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] I'm doing something wrong....

2002-05-15 Thread Robert Rothe

Thanks.  So the next() and prev() functions just traverse an array using
some type of linked list?  This is what precludes direct access to
specific elements?



"Thalis A. Kalfigopoulos" wrote:
> 
> In an associative array, there is no notion of the 'n-th' element. So AFAIK you 
>can't do that.
> 
> cheers,
> thalis
> 
> On Wed, 15 May 2002, Robert Rothe wrote:
> 
> > I've created an array.  A very simple array that uses strings as keys.
> >
> > aname['one']=something;
> > aname['two']=something else;
> >
> > Isn't there any way to directly access the 'n'th element?
> >   example: aname[0]?
> >
> > I've searched the group, but haven't found anything.  Am I missing
> > something or can't this be done?
> >
> > TIA,
> >
> > Rob
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >

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




[PHP] Done w/ PHP - VB or C# ?

2002-05-15 Thread Phil Schwarzmann

I know I'll get mauled big-time on this mailing list but I'm thinking
about putting PHP on hold for a while and learning ASP.NET
 
I love PHP and open-source computing but if one wants to get a job in
web development, you'll have a much better time find a job with both PHP
and ASP (among others) skills.
 
I'm going to hop on the ASP bandwagon but I'm not sure if I should
first learn ASP w/ VB or w/ C#
 
Any thoughts on this?  What are the pros and cons of both?
 
Thanks!



Re: [PHP] PHP Tag question

2002-05-15 Thread 1LT John W. Holmes

I believe he was talking about

 vs. 

not 
To: "Matthew Walker" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 4:49 PM
Subject: Re: [PHP] PHP Tag question


> You can tell that from the php.ini file look for:
>
> ; Allow the  tags are
> recognized.
> short_open_tag = On
>
> So basically you can switch them on/off.
>
> On Wed, 15 May 2002, Matthew Walker wrote:
>
> > I'm writing a coding standards document for our programmers, and I need
> > to know if the 'echo' shortcut PHP tags are always on, or if we need to
> > assume they might not be on.
> >
> > (By echo shortcut, I mean this syntax: )
> >
> > Matthew Walker
> > Senior Software Engineer
> > ePliant Marketing
> >
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> -Pushkar S. Pradhan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




RE: [PHP] SQL Server test tool

2002-05-15 Thread Matthew Walker

Just attempt to connect. If it succeeds, the server is alive.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Scott St. John [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 15, 2002 6:53 AM
To: [EMAIL PROTECTED]
Subject: [PHP] SQL Server test tool

Has anyone seen or know if it is possible to use PHP to test if a SQL 
server is alive on port 1433?  I know I could run a query, but was
looking 
for something to actually test on the port.

Thanks,

-Scott


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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




RE: [PHP] I'm doing something wrong....

2002-05-15 Thread Matthew Walker

When you create an array this way, no numeric indexes are assigned.

Matthew Walker
Senior Software Engineer
ePliant Marketing
 

-Original Message-
From: Robert Rothe [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 15, 2002 2:35 PM
To: [EMAIL PROTECTED]
Subject: [PHP] I'm doing something wrong

I've created an array.  A very simple array that uses strings as keys.

aname['one']=something;
aname['two']=something else;

Isn't there any way to directly access the 'n'th element?  
example: aname[0]?

I've searched the group, but haven't found anything.  Am I missing
something or can't this be done?

TIA,

Rob

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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




[PHP] Re: PHP Tag question

2002-05-15 Thread Hugh Bothwell

"Matthew Walker" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm writing a coding standards document for our programmers,
> and I need to know if the 'echo' shortcut PHP tags are always
> on, or if we need to assume they might not be on.
>
> (By echo shortcut, I mean this syntax: )

Whether short-form tags are available or not is controlled
by the 'short_open_tag' setting in php.ini.

If your files will ever contain a mixture of XML and PHP,
it is best to stick to the long opening tag, as the http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] I'm doing something wrong....

2002-05-15 Thread Thalis A. Kalfigopoulos

In an associative array, there is no notion of the 'n-th' element. So AFAIK you can't 
do that.


cheers,
thalis


On Wed, 15 May 2002, Robert Rothe wrote:

> I've created an array.  A very simple array that uses strings as keys.
> 
> aname['one']=something;
> aname['two']=something else;
> 
> Isn't there any way to directly access the 'n'th element?  
>   example: aname[0]?
> 
> I've searched the group, but haven't found anything.  Am I missing
> something or can't this be done?
> 
> TIA,
> 
> Rob
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




[PHP] I'm doing something wrong....

2002-05-15 Thread Robert Rothe

I've created an array.  A very simple array that uses strings as keys.

aname['one']=something;
aname['two']=something else;

Isn't there any way to directly access the 'n'th element?  
example: aname[0]?

I've searched the group, but haven't found anything.  Am I missing
something or can't this be done?

TIA,

Rob

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




Re: [PHP] PHP Tag question

2002-05-15 Thread Pushkar Pradhan

You can tell that from the php.ini file look for:

; Allow the  tags are
recognized.
short_open_tag = On

So basically you can switch them on/off.

On Wed, 15 May 2002, Matthew Walker wrote:

> I'm writing a coding standards document for our programmers, and I need
> to know if the 'echo' shortcut PHP tags are always on, or if we need to
> assume they might not be on.
>
> (By echo shortcut, I mean this syntax: )
>
> Matthew Walker
> Senior Software Engineer
> ePliant Marketing
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-Pushkar S. Pradhan


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




[PHP] Re: multithreading

2002-05-15 Thread Julio Nobrega Trabalhando

  This might help you:

http://www.faqts.com/knowledge_base/view.phtml/aid/1982/fid/58

  I've also seen before an actual php script that interacts with a C program
to do the same. Google for it and it will be esay to find.

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"Andrew Milne" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a PHP script that is run hourly by cron; I would like to make this
> multithreading rather than configure cron to run the script more than once
> per hour.  Is this possible using PHP?  I've tried using ticks, but it
> doesn't appear to work - the tick function doesn't execute more than once
at
> the same time...  I'm using 4.1.2.
>
> Any help greatly appreciated!
>
> Andrew
>
>
>



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




Re: [PHP] Using Sessions under Win98/Apache

2002-05-15 Thread Edward Marczak

On 5/15/02 4:30 PM, "SHEETS,JASON (Non-HP-Boise,ex1)"
[EMAIL PROTECTED] pressed the keys forming the message:

> Sessions under windows were broken for 4.1.x
> 
> They were fixed in 4.2.x so you should upgrade.

Great - a definitive answer.  Thank you.  I'll just have to make note of the
differences between 4.2.x and older versions.

Thanks everyone who sent over tips and suggestions.
-- 
Ed Marczak
[EMAIL PROTECTED]


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




Re: [PHP] File Handling

2002-05-15 Thread Miguel Cruz

On Thu, 16 May 2002, karthikeyan wrote:
> Just assume that I have a text file with a separator like  "|"
>  
> It would be something like this 
>  
> "ImagePath" | "DialogName" | "Dialog location"
>  
> I have to read the text file of above format and display in the html file.  
> 
>  DialogName1
>  DialogName2
>  DialogName3

http://php.net/fopen
http://php.net/fgets
http://php.net/explode

miguel


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




[PHP] File Handling

2002-05-15 Thread karthikeyan

Dear All, 
 
Greetings. 
 
Please let me know if the following can be done with php.  All I need to do is this, 
 
Just assume that I have a text file with a separator like  "|"
 
It would be something like this 
 
"ImagePath" | "DialogName" | "Dialog location"
 
I have to read the text file of above format and display in the html file.  

 DialogName1
 DialogName2
 DialogName3
 
Thank you 
 
With Regards
 
karthikeyan 
-
Judge not, that ye be not Judged - Abraham Lincoln's favorite quote
-



RE: [PHP] How program automatic 'filler forms' robots?

2002-05-15 Thread SHEETS,JASON (Non-HP-Boise,ex1)

You need to tell PHP to input the value and you should be using "'s

example:



This example assumes you are using at least PHP 4.1, also you may use
$_REQUEST instead of $_GET if you are going to be using both GET and POST
methods.

Jason
-Original Message-
From: M [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 15, 2002 2:24 PM
To: 1LT John W. Holmes
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] How program automatic 'filler forms' robots?


"1LT John W. Holmes" wrote:

>
> You need to get a little more specific. Is this a specific form, or do you
> want to be able to post any form? What kind of script is processing the
> form? Is it looking for GET or POST data? GET data is as simple as
creating
> a URL with the nec. fields. POST is a little harder, but just required you
> to send the appropriate headers with the data. "filling out a form" isn't
> much different than any other web request. The "data" just included in the
> URL or in the headers, and the "action" page of the form processes that
> data...

Hello John, thanks for your reply.

suppose this form into myurl.html (i will replace < and >  by [ and ] to
avoid
unwanted url treatment into msgs)

[form]
[input type=text name=driver length=20]
[input type=text name=os length=20]
[/form]

I figured could open myurl.html already with filled values by calling

http://.../myurl.html?driver=midi&os=windows

but it appears not working. I regularly program PHP and pass url parameters
in
this way to my php scripts successully.

My problem is as follow: there are many forms around web I will need fill
regularly with values at every week (or months). My idea is to create a
database with these web urls, containing all info needed to fill
automatically
these forms. Probably will need to store info about these pages uses get or
post commands, I really don't know how to begin with.

At every week, I would call my PHP script and browse all these urls and
automatically fill values to call pages with values already filled. I even
don't know how my 'robot' could send button action commands to these forms.

Ok, thats all.

Thanks for any info on this subject.

Mig



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

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




Re: [PHP] Re: Getting PHP on FreeBSD to talk to MSSQL Server 7...

2002-05-15 Thread Danny Shepherd

In my expierence you'll have much greater chance of sucess if you compile
with --with-sybase-ct :)

I just used --with-sybase-ct=/usr/local  - I didn't bother with --with-mssql
or --with-sybase

Paticulars:
FreeBSD 4.5
PHP 4.2.0
FreeTDS 0.53

Of course, using this methods means you also have to use the sybase commands
not the mssql commands but they're pretty much identical in function - just
the names that are different.

HTH

Danny.

- Original Message -
From: "Michael Kimsal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 11, 2002 2:08 AM
Subject: [PHP] Re: Getting PHP on FreeBSD to talk to MSSQL Server 7...


> Glenn Sieb wrote:
> > Hi.. it's me again :)
> >
> > We have a few different servers here, most of which are FreeBSD,
> > including our internal web server (Apache 1.3.24). We have PHP 4.2.0
> > installed as well.
> >
> > Currently I'm running my MSSQL query scripts on a Win2k webserver, as I
> > can't seem to get PHP to talk to MSSQL on the FreeBSD side. I'd really
> > prefer to have my PHP scripts all running on the FreeBSD side, rather
> > than on Win2k.
> >
> > We do have Perl able to talk to the MSSQL server using FreeTDS and the
> > DBI::Sybase package on the same FreeBSD machine.
> >
> > My ./configure:
> >
> >  ./configure --prefix=/usr/local
> > --with-apache=/home/src/Apache/Apachetoolbox
> > -1.5.56/apache_1.3.24 --enable-exif --enable-track-vars
> > --with-calendar=shared -
> > -enable-safe-mode --enable-magic-quotes --enable-trans-sid --enable-wddx
> > --enabl
> > e-ftp --with-gd=/usr/local --with-zlib --enable-gd-native-tt
> > --with-t1lib=/usr/l
> > ocal --with-jpeg-dir=/usr/local --with-png-dir=/usr/local
> > --with-zlib-dir=/usr -
> > -with-ttf --with-freetype-dir=/usr/local
> > --with-unixodbc=/usr/local/unixODBC --w
> > ith-openssl=/usr/local --with-curl=/usr/local --enable-apc
> > --with-mysql=/sw/mysq
> >
l --with-mssql=/usr/local/etc/freetds --with-sybase=/usr/local/etc/freetds
> >
> > (built using ApacheToolbox, 1.5.56)
> >
> > FreeTDS' interfaces file is located in /usr/local/etc/freetds, which it
> > is/was my understanding that this is what's supposed to be there. Yet
> > not only does PHP give me:
>
> the --with-sybase= line needs to point to where freetds was compiled,
> not the interfaces file.  We don't use the interfaces file, which seems
> to be primarily a way to map names to IPs.  We just use the IP address
> directly in the mssql_connect() functions and it works.
>
> Michael Kimsal
> http://www.phphelpdesk.com
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] How program automatic 'filler forms' robots?

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, M wrote:
> suppose this form into myurl.html (i will replace < and >  by [ and ] to avoid
> unwanted url treatment into msgs)
> 
> [form]
> [input type=text name=driver length=20]
> [input type=text name=os length=20]
> [/form]
> 
> I figured could open myurl.html already with filled values by calling
> 
> http://.../myurl.html?driver=midi&os=windows
> 
> but it appears not working. I regularly program PHP and pass url parameters in
> this way to my php scripts successully.
> 
> My problem is as follow: there are many forms around web I will need fill
> regularly with values at every week (or months). My idea is to create a
> database with these web urls, containing all info needed to fill automatically
> these forms. Probably will need to store info about these pages uses get or
> post commands, I really don't know how to begin with.
> 
> At every week, I would call my PHP script and browse all these urls and
> automatically fill values to call pages with values already filled. I even
> don't know how my 'robot' could send button action commands to these forms.
> 
> Ok, thats all.

Many web browsers support form autofilling. I suspect that's the way to do 
it. It'd be a whole lot of work to parse-n-proxy all those forms with PHP. 
It's much more easily dealt with by the client.

miguel


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




[PHP] PHP Tag question

2002-05-15 Thread Matthew Walker

I'm writing a coding standards document for our programmers, and I need
to know if the 'echo' shortcut PHP tags are always on, or if we need to
assume they might not be on.

(By echo shortcut, I mean this syntax: )

Matthew Walker
Senior Software Engineer
ePliant Marketing
 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

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




Re: [PHP] How program automatic 'filler forms' robots?

2002-05-15 Thread M

"1LT John W. Holmes" wrote:

>
> You need to get a little more specific. Is this a specific form, or do you
> want to be able to post any form? What kind of script is processing the
> form? Is it looking for GET or POST data? GET data is as simple as creating
> a URL with the nec. fields. POST is a little harder, but just required you
> to send the appropriate headers with the data. "filling out a form" isn't
> much different than any other web request. The "data" just included in the
> URL or in the headers, and the "action" page of the form processes that
> data...

Hello John, thanks for your reply.

suppose this form into myurl.html (i will replace < and >  by [ and ] to avoid
unwanted url treatment into msgs)

[form]
[input type=text name=driver length=20]
[input type=text name=os length=20]
[/form]

I figured could open myurl.html already with filled values by calling

http://.../myurl.html?driver=midi&os=windows

but it appears not working. I regularly program PHP and pass url parameters in
this way to my php scripts successully.

My problem is as follow: there are many forms around web I will need fill
regularly with values at every week (or months). My idea is to create a
database with these web urls, containing all info needed to fill automatically
these forms. Probably will need to store info about these pages uses get or
post commands, I really don't know how to begin with.

At every week, I would call my PHP script and browse all these urls and
automatically fill values to call pages with values already filled. I even
don't know how my 'robot' could send button action commands to these forms.

Ok, thats all.

Thanks for any info on this subject.

Mig



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




Re: [PHP] Using Sessions under Win98/Apache

2002-05-15 Thread Edward Marczak

On 5/15/02 3:47 PM, "1LT John W. Holmes" [EMAIL PROTECTED] pressed
the keys forming the message:

> I'm not sure what it could be then. If you try a simple test script, doing
> nothing but starting a session and setting a value, does it work?

No.

> If that still doesn't work, then definitely upgrade to 4.2.1.

The reality is, why should I?  I want to match my production environment as
closely as possible.  Is this working for other people or not (under
Win98/WinApache)?  Are you saying that sessions never worked under this
configuration until v 4.2.1?

> Load this script up:
>  session_start();
> if(isset($_SESSION["var"]))
> { echo "variable is already set"; }
> else
> { $_SESSION["var"] = "one"; }
> echo "Click here";
> ?>

It remembers the variable for the duration of the script.  Once the page is
reloaded, since the session is never written, I get nothing.

I appreciate your help on this.  However, my frustration is that it's not my
code, it's something with the system setup - which seems right!
-- 
Ed Marczak
[EMAIL PROTECTED]


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




[PHP] fopen failing to connect

2002-05-15 Thread jennifer

Hello

I have a script which uses fopen( ).  It works on my local machine which has
php and apache on a windows platform as well as on another server
(php/apache) which is windows based.  However, when I have the same script on
a unix machine (php/apache), the fopen gives me the following error:


Warning: php_hostconnect: connect failed in
/usr/local/apache/htdocs/514parser.php on line 135

Warning:
fopen("http://www.thedeal.com/NASApp/cs/ContentServer?pagename=TheDeal/xmlfeed";,
"r") - Bad file number in /usr/local/apache/htdocs/514parser.php on line 135
Any suggestions?

-jennifer


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




Re: [PHP] How program automatic 'filler forms' robots?

2002-05-15 Thread heinisch

At 15.05.2002  15:20, you wrote:
>
>Hello, I am interested on some info - how do robots  work to fill web
>forms authomatically?
>Sometimes I notice a blurr code to be manually writen to avoid these
>robots when filling forms, but I am interested in programm just one of
>these machines. Is it necessary PHP of another script for this task?
>
>Thank for any info
>
>Mig
look for the snoopy class, this does all you need
http://sourceforge.net/projects/snoopy/

Oliver


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




Re: [PHP] Cool PHP Tricks/Features ?

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, George Whiffen wrote:
> 1. My biggest concern is the slowest user i.e. at the end of a modem
> on the other side of the planet.  I thought they would almost certainly
> have modem compression so doing our own compression doesn't
> really help them at all i.e. actual download speeds stay the same, it's
> just we/they do the work rather than the modems.

The modem is only part of the route. All the people between you and the 
modem are paying for that bandwidth, and the costs are getting passed 
along somehow.

> 2. I was surprised when I got ISDN dial-up that it didn't seem
> to have automatic compression on the line, but assumed that was
> going to change.  Am I too hopeful?

Probably.

> 3. But surely, ASDL, cable, the backbone and decent intranets
> must all do hardware compression, don't they?  Or are they
> secretly not very keen on decreasing network traffic?

None of the above routinely do compression on data. Imagine backbone
routers trying to compress data! The poor things run white-hot just trying
to deal with packet headers. If they actually had to look at the data and
do complicated transforms on it, that'd be the end of the internet.

> 4. Finally, if the network hardware isn't handling compression
> for us, I would have thought it was a good job for a web server.
> I guess I'd have to ask the Apache guys, but I would guess this
> can be really neatly done with some fancy mod_rewrite, custom
> extension or whatever.

There is a module for Apache that does gzip compression. It's called - 
wait for it - mod_gzip. We use it and it seems to work great. Cuts our 
bandwidth bills down.

I think the web server is a very reasonable place to do this compression. 
It divides the work so that it's in direct proportion to the volume of 
generated data. This is both fair and easy to manage.

miguel


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




[PHP] Can't see namespace definition with DOMXML in 4.2.1

2002-05-15 Thread Thalis A. Kalfigopoulos

It seems that lots of DOM stuff was added in 4.2.1! Still I can't seem to see the 
namespace definition attributes of an element. 

The code:
$xmlstr='http://www.ns.com/ns1/"; 
attr="value"/>';
$domdoc=domxml_open_mem($xmlstr);
$root=$domdoc->document_element();
echo("".htmlentities($domdoc->html_dump_mem())."");

just returns:


instead of the full:
http://www.ns.com/ns1/"; attr="value">

Even trying to get the attributes from  with $elem->attributes() returns an 
array that only contains only "attr" but "xmlns:ns1" is nowhere to be seen.

Is there a way that I'm missing to get the namespace definitions or is the code not in 
place yet?


thanks in advance,
thalis


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




Re: [PHP] php fgets()

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, arnaud gonzales wrote:
> I'm newbie in php and i would like to clearly understand how can i use:
>   LENGTH  in   string fgets ( int fp [, int length])
> 
> "Returns a string of up to length - 1 bytes read from the file pointed to by
> fp. Reading ends when length - 1 bytes have been read, on a newline (which
> is included in the return value), or on EOF (whichever comes first). If no
> length is specified, the length defaults to 1k, or 1024 bytes."
> 
> -Can i have an example of the differents way for reading file with fgets
> according to the  differentes values of "length "?
> -why '4096' is used as length for reading a file line by line ?
> 
>   $fd = fopen ("/tmp/inputfile.txt", "r");
>   while (!feof ($fd)) {
>$buffer = fgets($fd, 4096);
>echo $buffer;
>   }
>   fclose ($fd);
> 
> Is this any max for one line??

The idea is to avoid runaway reads. This way if you get pointed to a file 
that's a link to /dev/random, you won't blow through all your memory and 
explode.

miguel


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




[PHP] Can't see namespace definition with DOMXML in 4.2.1?

2002-05-15 Thread Thalis A. Kalfigopoulos

It seems that lots of DOM stuff was added in 4.2.1! Still I can't seem to see the 
namespace definition attributes of an element. 

The code:
$xmlstr='http://www.ns.com/ns1/"; 
attr="value"/>';
$domdoc=domxml_open_mem($xmlstr);
$root=$domdoc->document_element();
echo("".htmlentities($domdoc->html_dump_mem())."");

just returns:


instead of the full:
http://www.ns.com/ns1/"; attr="value">

Even trying to get the attributes from  with $elem->attributes() returns an 
array that only contains only "attr" but "xmlns:ns1" is nowhere to be seen.

Is there a way to get the namespace definitions at the moment or is the code not in 
place yet?


thanks in advance,
thalis


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




[PHP] Re: Date Function in Php

2002-05-15 Thread George Nicolae

try mktime() function.

--


Best regards,
George Nicolae
IT Manager
___
PaginiWeb.com  - Professional Web Design
www.PaginiWeb.com


"Vinod Palan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi ,
> Do any one have date functions like that we have in asp 1) Dateadd()
> 2) Datediff()
> etc?
> Thanks
> Vinod
>
>
> --
> Vinod Palan A
> Calypso Technology, Inc.
> [EMAIL PROTECTED]
> (415) 817-2463 Phone
>
>
>
>
>



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




Re: [PHP] php and servlets (fwd)

2002-05-15 Thread 1LT John W. Holmes



That is a whole seperate request that  has nothing to do with Java servlets.
Who cares what program generates the HTML, it could be Frontpage for all I
care. If you want this to work, then try_param.php has to be a seperate PHP
file that creates image headers() and outputs image data

What are you trying to do?

---John Holmes...

- Original Message -
From: "Maciej Przybycien" <[EMAIL PROTECTED]>
To: "1LT John W. Holmes" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 3:25 PM
Subject: Re: [PHP] php and servlets (fwd)


>
> No really. If I generate html on-fly in Java servlets
> and 'try_param.php' is pointed in img then php does not generate any
> output. But that is my goal.
>
> However if I point 'try_param.php' in image in static html and I load that
> file image is generated.
>
> So my question is if I need any specific compilation or support for Java
> servlets.
>
>Thanks,
>   Maciej
>
>
> On Wed, 15 May 2002, 1LT John W. Holmes wrote:
>
> > So if you see an image, what's the problem?
> >
> > ---John Holmes...
> >
> > - Original Message -
> > From: "Maciej Przybycien" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, May 15, 2002 2:50 PM
> > Subject: [PHP] php and servlets (fwd)
> > >
> > >
> > > The problem seems to come because I generate html and include
> > >  > > from Java servlets.
> > >
> > > If my ' > > is included in html file and I load that html the image appears on the
> > > screen with no problem.
> > >
> > > Do I need any special php compilation or support for Java servlets?
> > >
> > >Thanks,
> > >  Maciej
> > >
> > >
> > > On Wed, 15 May 2002, 1LT John W. Holmes wrote:
> > >
> > > > Yes, that does work, but the big question is if try_param.php is
> > outputting
> > > > an image? How are you doing it? Are you setting the appropriate
> > headers()?
> > > >
> > > > ---John Holmes...
> > > >
> > > > - Original Message -
> > > > From: "Maciej Przybycien" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Wednesday, May 15, 2002 1:38 PM
> > > > Subject: [PHP] tag img and php
> > > >
> > > >
> > > > >
> > > > > Hi,
> > > > > I included php file as html img:
> > > > >  > > > > height="240" >
> > > > > and Netscape brawser seems not to interpret that. However if I
change
> > > > > try_param.php -> try_param.png then image can be desplayed.
> > > > >
> > > > > According to the documentation 'try_param.php' should be
interpereted
> > > > > fine.
> > > > > What could be the problem?
> > > > >
> > > > >  Thank you,
> > > > > Maciek
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>


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




Re: [PHP] header failing...

2002-05-15 Thread Jason Wong

On Thursday 16 May 2002 03:31, Joshua E Minnie wrote:
> Can anybody tell me why a call to header would fail.  What I mean by this
> is that it doesn't redirect at all.  Here is a snippet of the code that I
> am using:
>
>  ...
> if(session_is_registered("user")) {
>   header("Location: http://www.somwhere.net/admin.php";);
> }
> ...
> ?>

Did you try it outside of the IF statement? IOW is your IF statement TRUE?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Practice is the best of all instructors.
-- Publilius
*/


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




Re: [PHP] header failing...

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, Joshua E Minnie wrote:
> Can anybody tell me why a call to header would fail.  What I mean by this is
> that it doesn't redirect at all.  Here is a snippet of the code that I am
> using:
> 
>  ...
> if(session_is_registered("user")) {
>   header("Location: http://www.somwhere.net/admin.php";);
> }
> ...
> ?>

Lynx is a fine tool for web debuggery. Use it to see whether the header is
actually being sent (navigate through the site and then hit ] to fetch the
header).

miguel


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




[PHP] multithreading

2002-05-15 Thread Andrew Milne

I have a PHP script that is run hourly by cron; I would like to make this
multithreading rather than configure cron to run the script more than once
per hour.  Is this possible using PHP?  I've tried using ticks, but it
doesn't appear to work - the tick function doesn't execute more than once at
the same time...  I'm using 4.1.2.

Any help greatly appreciated!

Andrew




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




Re: [PHP] Date Function in Php

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, Vinod Palan wrote:
> Do any one have date functions like that we have in asp 1) Dateadd()
> 2) Datediff()
> etc?

You might be able to get what you need with strtotime, which is a 
marvelous thing. See:

  http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html

The rest of the time, I usually pass dates off to MySQL for math. You 
don't need to be doing any database transactions; you can just take 
advantage of its date functions by sending in constants:

  select date_add("2002-05-14 15:44:21", interval 1 day);

Write a function wrapper for the mysql_query() and mysql_result() and then
it's as easy to use as strtotime or anything else.

miguel


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




Re: [PHP] Uploading JPEG's - Security Issues?

2002-05-15 Thread Jason Wong

On Thursday 16 May 2002 03:06, Miguel Cruz wrote:
> On Wed, 15 May 2002, Andre Dubuc wrote:
> > Actually, I figured out how to do it: a combination of  checking:
> > if ( $_REQUEST['pix']['type'] == "image/jpeg")}  blah, blah, blah
>
> I'm pretty certain that the 'type' that appears here is just derived from
> the file name, and therefore is not trustworthy. Someone please correct me
> if I'm wrong (as if that's ever a problem...)

If you're using linux/unix then you might want to look at the 'file' program.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
It'll be just like Beggars' Canyon back home.
-- Luke Skywalker
*/


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




[PHP] header failing...

2002-05-15 Thread Joshua E Minnie

Can anybody tell me why a call to header would fail.  What I mean by this is
that it doesn't redirect at all.  Here is a snippet of the code that I am
using:

http://www.somwhere.net/admin.php";);
}
...
?>

I am using PHP 4.1.2 on Win NT 4.0

--
Joshua E Minnie/CIO
[EMAIL PROTECTED]
"Don't work for recognition, but always do work worthy of recognition."



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




Re: [PHP] Using Sessions under Win98/Apache

2002-05-15 Thread Edward Marczak

On 5/15/02 2:21 PM, "1LT John W. Holmes" [EMAIL PROTECTED] pressed
the keys forming the message:

> You probably want to get 4.2, or 4.2.1 if it's out.

Didn't think those were considered production quality just yet.

> How are you registering variables for the session? Is register_globals on or
> off in your php.ini.

Off

> If it's off, you register a variables just by using
> $_SESSION["var"] = "value";
> instead of using
> session_register("var");
> $var = "value";

Yeah, I'm using $_SESSION["blah"]

> If register globals is on, then use the second method with
> session_register().
> 
> This is all after you call session_start, of course.

Of course.

Again, this is all code that works perfectly against a setup I have on
Solaris and Linux.  And again, I'm using a file handler for sessions, and
the 'sess_037df7670' file gets created.  Just that nothing ends up in it
- which is a problem when PHP goes to retrieve a session.

Thanks for the response.
-- 
Ed Marczak
[EMAIL PROTECTED]


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




Re: [PHP] php and servlets (fwd)

2002-05-15 Thread Maciej Przybycien


No really. If I generate html on-fly in Java servlets 
and 'try_param.php' is pointed in img then php does not generate any
output. But that is my goal.

However if I point 'try_param.php' in image in static html and I load that
file image is generated.

So my question is if I need any specific compilation or support for Java
servlets.
  
   Thanks,
  Maciej


On Wed, 15 May 2002, 1LT John W. Holmes wrote:

> So if you see an image, what's the problem?
> 
> ---John Holmes...
> 
> - Original Message -
> From: "Maciej Przybycien" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 15, 2002 2:50 PM
> Subject: [PHP] php and servlets (fwd) 
> >
> >
> > The problem seems to come because I generate html and include
> >  > from Java servlets.
> >
> > If my ' > is included in html file and I load that html the image appears on the
> > screen with no problem.
> >
> > Do I need any special php compilation or support for Java servlets?
> >
> >Thanks,
> >  Maciej
> >
> >
> > On Wed, 15 May 2002, 1LT John W. Holmes wrote:
> >
> > > Yes, that does work, but the big question is if try_param.php is
> outputting
> > > an image? How are you doing it? Are you setting the appropriate
> headers()?
> > >
> > > ---John Holmes...
> > >
> > > - Original Message -
> > > From: "Maciej Przybycien" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, May 15, 2002 1:38 PM
> > > Subject: [PHP] tag img and php
> > >
> > >
> > > >
> > > > Hi,
> > > > I included php file as html img:
> > > >  > > > height="240" >
> > > > and Netscape brawser seems not to interpret that. However if I change
> > > > try_param.php -> try_param.png then image can be desplayed.
> > > >
> > > > According to the documentation 'try_param.php' should be interpereted
> > > > fine.
> > > > What could be the problem?
> > > >
> > > >  Thank you,
> > > > Maciek
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> 



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




[PHP] Date Function in Php

2002-05-15 Thread Vinod Palan

hi ,
Do any one have date functions like that we have in asp 1) Dateadd()
2) Datediff()
etc?
Thanks
Vinod


--
Vinod Palan A
Calypso Technology, Inc.
[EMAIL PROTECTED]
(415) 817-2463 Phone






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




Re: [PHP] PhP 4.2.1 (and various)

2002-05-15 Thread Olav Bringedal

 --- Analysis & Solutions
<[EMAIL PROTECTED]> wrote: > Olav:
> 
> On Wed, May 15, 2002 at 11:53:06AM +0100, Olav
> Bringedal wrote:
> 
> > $user=$Session["user"];
> > 
> > if(!$Authorized)
> > {
> > header ("Location: http://jaggu.org";);
> > }
> 
> As I was saying before, write your code in a way
> that doesn't generate error
> messages.  For example, the above passage would be
> error free if you did this...
> 
>   if( empty($Authorized) ) {
>  header ('Location: http://jaggu.org');
>   } else {
>  $user = $Session['user'];
>   }
> 
> Enjoy,
> 
> --Dan
> 
> -- 
>PHP classes that make web design
> easier
> SQL Solution  |   Layout Solution   |  Form
> Solution
> sqlsolution.info  | layoutsolution.info | 
> formsolution.info
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S
>   C O M P A N Y
>  4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335
> f: 718-854-0409
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

Thanks for the reply, but it didnt help :)

The code is without errors. What I submitted was
written on the fly to illustrate what i tried to do.

Here is the actual code...

$playername=$_GET['player'];
if (!$playername)
{
..print HTML form code...
}
else 
{
if ($playername)
{
$_SESSION['playername']=$playername;

header('Location:
http://'.$_SERVER['HTTP_HOST'].'/UTGE/index.html'); 
}
else
{
die ("something gone wrong! Do it properly");
}   


}

I also tried with ~all in logging and without logging
at all.



=
Olav Bringedal
jaggu.org

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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




Re: [PHP] trans-sid .. help

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, Joshua E Minnie wrote:
> I have been using some simple session management for some of my pages.  I am
> inquiring about the use of transparent session id usage.  I have read the
> manual and I am still a little confused on how to go about using it.
> 
> I did run phpinfo() to make sure that trans-id was enabled.  It outputed:
> session.use_trans_id[local value] 1[master value] 1
> 
> I am assuming that this means it is enabled.  Now my question is how do I go
> about using a trans-id?  I've seen session id appended to the URL (i.e.
> this.php?PHPSESSID=a2604374903c616c9cd34e13c0ceed98), but would like to use
> it without disclosing the session id in the URL.

You can't; that's how it works. This is why people prefer cookies.

miguel


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




[PHP] Re: textarea problem

2002-05-15 Thread Vinod Palan

Hi
I think that would be problem of the method you are using.
Can you tell if you were using post method?

Thanks
Vinod

"Tim Ward" <[EMAIL PROTECTED]> wrote in message 
01D892A483EAD511926A00500416D3C01C6B49@HUNTERS-MAIL">news:01D892A483EAD511926A00500416D3C01C6B49@HUNTERS-MAIL...
Are you POSTing or GETting the data?

Tim Ward
www.chessish.com  

--
From:  Enrique Vadillo [SMTP:[EMAIL PROTECTED]]
Sent:  14 May 2002 01:33
To:  [EMAIL PROTECTED]
Subject:  textarea problem

Hi,

I'm not sure if this is purely a PHP problem but here it goes:

i have a form that sends text data to a PHP script, i have some
textarea field which goes like this:



everytime i POST this, $mynote is truncated to 1867 bytes, i have
repeatedly tried to submit text 2500 bytes long but it's always
truncated to that size -btw there is no javascript or anything in
the
middle that might modify the size- my questions is: do i have to
setup anything special in my php.ini? i have this in my php.ini:

post_max_size = 30M

I have also noticed that Hotmail has no problem sending textarea
input 2500 bytes long or more using exactly the same tags.. what's
wrong then? I use Apache 1.3.23 and PHP 4.1.1 (on RedHat 7.1)

if anyone has encountered this problem b4, i'd appreciate some help.

Enrique-



_
Únase con MSN Hotmail al servicio de correo electrónico más grande
del 
mundo. http://www.hotmail.com




Re: [PHP] tag img and php

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, Maciej Przybycien wrote:
> I included php file as html img:
>  height="240" >
> and Netscape brawser seems not to interpret that. However if I change 
> try_param.php -> try_param.png then image can be desplayed. 

Does try_param.php contain the magic line:

   header('Content-Type: image/png');

??

miguel


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




Re: [PHP] Uploading JPEG's - Security Issues?

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, Andre Dubuc wrote:
> Actually, I figured out how to do it: a combination of  checking:
> if ( $_REQUEST['pix']['type'] == "image/jpeg")}  blah, blah, blah

I'm pretty certain that the 'type' that appears here is just derived from
the file name, and therefore is not trustworthy. Someone please correct me
if I'm wrong (as if that's ever a problem...)

miguel


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




Re: [PHP] Formatting Time

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, Devin Atencio wrote:
> I want to a kewl script that will format time from seconds. I have a script
> that returns the number of seconds a person has been an employee and
> I want to format it in human readable format like:
> 
> 1 year 6 months 14 days, etc.

Say you had 18001 seconds. How would you figure out how many minutes that
was? Do you know how many seconds there are in a minute? And once you had
the minutes, how would you figure out how many hours that was? Do you know
how many minutes there are in an hour? I hate to be condescending, but I
think they teach this sort of thing in school around age 7.

Of course, you can only go up to weeks this way. It's not possible to
accurately calculate months or years from an abstract number of seconds
(without knowing the starting date and time) because months and years have
varying lengths. You could average it out by saying a month is 30 days and 
a year is 365.25 days but that's ever so slightly off (only matters when 
you get into hundreds of years).

miguel


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




Re: [PHP] Uploading JPEG's - Security Issues?

2002-05-15 Thread Andre Dubuc

Thanks Miguel,

Actually, I figured out how to do it: a combination of  checking:
 
if ( $_REQUEST['pix']['type'] == "image/jpeg")}  blah, blah, blah

and then using 'fread' on the actual file itself, applying my 'eregi' 
verification code. It works! 

The problem before was that I was attempting to read the array, rather than 
the actuial file. Thanks for the link.

Btw, I still confused about how to organize my /var/www/html directory so 
that I can still access it for code, but others will not be able to say 
access /var/www/html/tmp_for_checking_files_like_jpegs. I've made a temporary 
change (for protyping) to php.ini using /var/www/html as the upload_temp_dir, 
but I don't know how or where it should go in production. Any suggestions?

Tia, Andre 


On Wednesday 15 May 2002 02:36 pm, you wrote:
> On Tue, 14 May 2002, Andre Dubuc wrote:
> > My question will probably expose my woeful lack understanding of security
> > breaches, but perhaps someone can enlighten me.
> >
> > On my site, registered members will be allowed to upload jpg/jpeg
> > pictures. I'm concerned about possible security problems. First, is there
> > a way to ensure that a picture (and not some other malicious stuff) has
> > been uploaded?
> >
> > Aside from checking the mime type info associated with the file, is there
> > any way of verifying what's in the file that has been uploaded? (I'm
> > using Linux LM8.2) Would it be possible to fake info to fool this check?
> > Would verification checks for html/scripts/commands be of any use?
>
> You can pass the path to the unix command 'file' which looks at the file's
> prologue to attempt to figure out what it is. This is usually a pretty
> good way to weed out trouble.
>
>   http://www.doc.ic.ac.uk/lab/labman/lookup-man.cgi?file
>
> miguel

-- 
Please pray the Holy Rosary to end the holocaust of abortion.
Remember in your prayers the Holy Souls in Purgatory.

May God bless you abundantly in His love!
For a free Cenacle Scriptural Rosary Booklet: http://www.webhart.net/csrb/

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




Re: [PHP] php and servlets (fwd)

2002-05-15 Thread 1LT John W. Holmes

So if you see an image, what's the problem?

---John Holmes...

- Original Message -
From: "Maciej Przybycien" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 2:50 PM
Subject: [PHP] php and servlets (fwd)


>
>
> The problem seems to come because I generate html and include
>  from Java servlets.
>
> If my ' is included in html file and I load that html the image appears on the
> screen with no problem.
>
> Do I need any special php compilation or support for Java servlets?
>
>Thanks,
>  Maciej
>
>
> On Wed, 15 May 2002, 1LT John W. Holmes wrote:
>
> > Yes, that does work, but the big question is if try_param.php is
outputting
> > an image? How are you doing it? Are you setting the appropriate
headers()?
> >
> > ---John Holmes...
> >
> > - Original Message -
> > From: "Maciej Przybycien" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, May 15, 2002 1:38 PM
> > Subject: [PHP] tag img and php
> >
> >
> > >
> > > Hi,
> > > I included php file as html img:
> > >  > > height="240" >
> > > and Netscape brawser seems not to interpret that. However if I change
> > > try_param.php -> try_param.png then image can be desplayed.
> > >
> > > According to the documentation 'try_param.php' should be interpereted
> > > fine.
> > > What could be the problem?
> > >
> > >  Thank you,
> > > Maciek
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] PhP 4.2.1 (and various)

2002-05-15 Thread Miguel Cruz

On Wed, 15 May 2002, Olav Bringedal wrote:
> That is all well, but if php 4.2.1 interprets any
> output (as errors not only screen errors) as something
> that is sent before a header in a redirect, there is
> no other way (that i'm aware of) around it. 
> 
> Like this:
> 
> $user=$Session["user"];
> if(!$Authorized)
> {
>   header ("Location: http://jaggu.org";);
> }
> this will not work, you have to write:
>  
> @$user=@$Session["user"];
> @if(@!$Authorized)
> {
>   header ("Location: http://jaggu.org";);
> }
> 
> To actually get the redirect. 

That's not new to 4.2.1.

The solution remains the same as always: Choose between either:

A) Using output buffering; or

B) Make sure you don't generate any output before sending headers. You 
don't need to stick @ in front of everything, just eliminate all errors 
from your code and then make sure you aren't printing stuff.

For better or worse, there's no scapegoat here.

miguel


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




  1   2   >