[PHP] open_basedir

2001-07-07 Thread Yacoon

mornin,

i´m new to the list and to php, so please don´t jump to hard on me, when you
think the question is dump.


okay: is there a possibility to make a server only execute the php scripts
in the document root it was called from?
I saw something about open_basedir, but am not sure if that is the way.

I badly need to protect the server from i.e. includes, that read out or
manipulated server config files, like passwd.
I have systems run under redhat, if that matters. could anyone please just
let me know how and where?
I´ll definatelly need the correct syntax, since that’s my main-problem with
php.

thanks a lot - ulrich




RE: [PHP] ok!

2001-07-07 Thread Matthew Loff


A quick plug for Mysql-front at http://www.mysqlfront.de/ that Hennik
meantions here...

If you use Win98/ME/2k/NT, and are looking for a utility to admin a
MySQL database, this is hands-down the best front end I've ever used...



-Original Message-
From: Henrik Hansen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 05, 2001 5:42 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] ok!


"Johan Vikerskog (ECS)" <[EMAIL PROTECTED]> wrote:

 > Simple question and i know that i shouldent post it here.
 > Hope you bare with me.
 > 
 > I have a mysql database that is called supportdb
 > How do i create an account for my user so he can connect to this
database?

http://www.mysql.com/doc/P/r/Privilege_system.html

 > 
 > Do i use mysqlacccess?

i only know of mysqlfront.de

-- 
Henrik Hansen


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


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




Re: [PHP] Next Book

2001-07-07 Thread rick

I started off with a Core PHP4 book and quickly outgrew it.  I find that
most of the books don't get much past the basics either, so I find myself
sticking to www.php.net and it's wonderful searchable documentation.

I have read Web Application Development with PHP4.0
(http://www.phpwizard.net), which I enjoyed.  While it does go into some
more advanced PHP syntax, it mostly discusses application development
concepts -- stuff that would be boring for any experienced programmer of
other languages.  I think it's geared at the people who picked PHP up as
their first language (me included).

I'd be interested in some good PHP books as well, I feel like I'm in a rut.
At first, PHP was all new, and I was learning s much... but now if I
think up a task I can visualize how to do it in PHP pretty easily.  I know I
have a LOT to learn, but I think my problem is I don't know proper
programming techniques...

Has anyone tried to expand into other languages?  I like perl due to its
heavy similarity to PHP, but I like to focus on web stuff.

rick

- Original Message -
From: "Chris Lott" <[EMAIL PROTECTED]>
To: "Php-General (E-mail)" <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 11:23 PM
Subject: [PHP] Next Book


> Finished with Beginning PHP from Wrox. Am eyeing Advanced PHP from Wrox.
> Other good books I should think about? Recommendations? Reviews? I know
the
> PHP FAQ has pointers to books, but I am looking for recommendations on
what
> I SHOULD get as I transition from a Cold Fusion person to a PHP devotee :)
>
> Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly
is
> pretty dated.
>
> c


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




[PHP] Next Book

2001-07-07 Thread Chris Lott

Finished with Beginning PHP from Wrox. Am eyeing Advanced PHP from Wrox.
Other good books I should think about? Recommendations? Reviews? I know the
PHP FAQ has pointers to books, but I am looking for recommendations on what
I SHOULD get as I transition from a Cold Fusion person to a PHP devotee :)

Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly is
pretty dated.

c

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




Re: [PHP] Getting any possible value inside an array

2001-07-07 Thread Mark Charette

$newarray=array_flip($myarray)

$newarray will have unique key values made up of the second element of
$myarray.

Mark C.
- Original Message -
From: "Aaron Bennett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 08, 2001 12:51 AM
Subject: [PHP] Getting any possible value inside an array


> Hi everyone...
>
> Does someone have a quick and dirty way of returning _any_ possible value
> contained within an array?
>
> For instance:
>
> $myarray[0] = "red";
> $myarray[1] = "red";
> $myarray[2] = "red";
> $myarray[3] = "blue";
> $myarray[4] = "green";
> $myarray[5] = "blue";
> $myarray[6] = "red";
>
> and i'd output "red", "blue" and "green", but not have multiple instances
of
> each.
>
> Thanks in advance!
> --
> Aaron Bennett
>


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




RE: [PHP] Getting any possible value inside an array

2001-07-07 Thread Aaron Bennett

Perfect! I actually was making up the 'colors' analogy, but i've adapted it
to what i need!
--
Aaron

-Original Message-
From: mike cullerton [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 07, 2001 11:05 PM
To: Aaron Bennett; [EMAIL PROTECTED]
Subject: Re: [PHP] Getting any possible value inside an array


i think this should work

$color_list = array(); // not sure if you need this
foreach ($myarray as $color) {
  if (!in_array($color,$color_list)) $color_list[] = $color;
}

http://php.net/in_array

on 7/7/01 11:51 PM, Aaron  Bennett at [EMAIL PROTECTED] wrote:

> Hi everyone...
> 
> Does someone have a quick and dirty way of returning _any_ possible value
> contained within an array?
> 
> For instance:
> 
> $myarray[0] = "red";
> $myarray[1] = "red";
> $myarray[2] = "red";
> $myarray[3] = "blue";
> $myarray[4] = "green";
> $myarray[5] = "blue";
> $myarray[6] = "red";
> 
> and i'd output "red", "blue" and "green", but not have multiple instances
of
> each.
> 
> Thanks in advance!
> --
> Aaron Bennett
> 


 -- mike cullerton




Re: [PHP] Getting any possible value inside an array

2001-07-07 Thread mike cullerton

i think this should work

$color_list = array(); // not sure if you need this
foreach ($myarray as $color) {
  if (!in_array($color,$color_list)) $color_list[] = $color;
}

http://php.net/in_array

on 7/7/01 11:51 PM, Aaron  Bennett at [EMAIL PROTECTED] wrote:

> Hi everyone...
> 
> Does someone have a quick and dirty way of returning _any_ possible value
> contained within an array?
> 
> For instance:
> 
> $myarray[0] = "red";
> $myarray[1] = "red";
> $myarray[2] = "red";
> $myarray[3] = "blue";
> $myarray[4] = "green";
> $myarray[5] = "blue";
> $myarray[6] = "red";
> 
> and i'd output "red", "blue" and "green", but not have multiple instances of
> each.
> 
> Thanks in advance!
> --
> Aaron Bennett
> 


 -- mike cullerton



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




[PHP] Getting any possible value inside an array

2001-07-07 Thread Aaron Bennett

Hi everyone...

Does someone have a quick and dirty way of returning _any_ possible value
contained within an array?

For instance:

$myarray[0] = "red";
$myarray[1] = "red";
$myarray[2] = "red";
$myarray[3] = "blue";
$myarray[4] = "green";
$myarray[5] = "blue";
$myarray[6] = "red";

and i'd output "red", "blue" and "green", but not have multiple instances of
each.

Thanks in advance!
--
Aaron Bennett



Re: [PHP] watermarks

2001-07-07 Thread Todd Cary

I am using watermarks on the photos I put on the net (
http://www.floatographs.com), except I do it before I send them up.  My
procedure is to use some Delphi code I wrote implementing some grpahic
primitives.

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]



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




Re: [PHP] watermarks

2001-07-07 Thread Jon Yaggie

well i understand that this is normally a digit signature involved.  That is
why i am concerned about dynamic creation.  looking through the image
functions i dont actually see a obvious function that would do such a thing.
Can you please tell me what and how if this is simple.  thank you




Thank You,

Jon Yaggie
www.design-monster.com

And they were singing . . .

'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code

101 little bugs in the code . . .'

And it continued until they reached 0


- Original Message -
From: "Chris Anderson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, July 08, 2001 10:50 AM
Subject: Re: [PHP] watermarks


> a watermark is not something ON an image. A watermark is the same as a
> digital signature so you know who created the piece
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, July 07, 2001 11:38 PM
> Subject: Re: [PHP] watermarks
>
>
> > on 7/7/01 11:27 PM, Chris Lambert - WhiteCrown Networks at
> > [EMAIL PROTECTED] wrote:
> >
> > > I am afraid I am completely stupid in the way that watermarks
> > > work(researching now).  however I need to know quickly if I can
> dynamically
> > > apply a watermark to an image using PHP.  Any one know?
> >
> >
> > Just use
> >  imagestring (int im, int font, int x, int y, string s, int col)
> >
> > that is if you have the GD lib installed.
> >
> > Susan
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] watermarks

2001-07-07 Thread Chris Anderson

a watermark is not something ON an image. A watermark is the same as a
digital signature so you know who created the piece
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 11:38 PM
Subject: Re: [PHP] watermarks


> on 7/7/01 11:27 PM, Chris Lambert - WhiteCrown Networks at
> [EMAIL PROTECTED] wrote:
>
> > I am afraid I am completely stupid in the way that watermarks
> > work(researching now).  however I need to know quickly if I can
dynamically
> > apply a watermark to an image using PHP.  Any one know?
>
>
> Just use
>  imagestring (int im, int font, int x, int y, string s, int col)
>
> that is if you have the GD lib installed.
>
> Susan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] watermarks

2001-07-07 Thread [EMAIL PROTECTED]

on 7/7/01 11:27 PM, Chris Lambert - WhiteCrown Networks at
[EMAIL PROTECTED] wrote:

> I am afraid I am completely stupid in the way that watermarks
> work(researching now).  however I need to know quickly if I can dynamically
> apply a watermark to an image using PHP.  Any one know?


Just use 
 imagestring (int im, int font, int x, int y, string s, int col)

that is if you have the GD lib installed.

Susan


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




Re: [PHP] watermarks

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

If the image is on a local server, you could just overlay the watermark with
GD or ImageMagick.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Jon Yaggie <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 9:36 PM
Subject: [PHP] watermarks


I am afraid I am completely stupid in the way that watermarks
work(researching now).  however I need to know quickly if I can dynamically
apply a watermark to an image using PHP.  Any one know?




Thank You,

Jon Yaggie
www.design-monster.com

And they were singing . . .

'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code

101 little bugs in the code . . .'

And it continued until they reached 0





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




[PHP] I thought I beat the safe mode ... now this ...

2001-07-07 Thread [EMAIL PROTECTED]

Okay I've been trying to do file uploads on a server that is in safe mode
(not my choice) I was able to get around the safe mode by doing:


$path = "images/$filetitle$user$filesuff";
if (is_uploaded_file ($form_data)) { move_uploaded_file
(addslashes($form_data), $path); }

And it worked, so now people can upload files ... but I also want them to be
able to delete files so I tried:

unlink($path);

Nope, can't do that in safe mode...

Okay maybe I can just move the files into a trash folder, then empty it
myself every week or so:

$chmoderror = chmod ($imageloc, 0777);
$filename = strstr ($imageloc, '/');
$trashpath = "trash$filenamec";

No I get an error:

Unable to access trash/200107072306491.gif in
/usr/local/plesk/apache/hosts/futurebird.com/httpdocs/mapbuild3/deletemap.ph
p3 on line 97


Is this safe mode? or am I doing the file move all wrong?

Susan


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




Re: [PHP] High Ascii chars

2001-07-07 Thread Zak Greant

rm wrote:
> php3.x
> 
> We have a large number of people submitting a large
> number of docs...I'm having a problem with some docs
> coming through with high ascii characters in the text,
> apparently the dbm database we're using chokes on some
> high ascii chars.  I need to eliminate characters in
> the text from 122 to 255.  I can't seem to find a
> simple way to do thisI have a routine, it works
> but it takes too long, something like;
> 
> for ($i=122; $i<256; $i++){
>  
> $textline=str_replace(chr($i),'',$textline)
> 
> }
> 
> 
> Anyone know of a better, faster way to filter out
> these high ASCII characters

Hi!

Your best option is probably GNU Recode (see the PHP manual and 
http://www.gnu.org/directory/recode.html)

It will allow you to convert 8-bit characters to a 7-bit characters 
quickly and sanely: converting accented characters to their closest 
logical equivalent.

Note: The method you chose is surprisingly speedy - it is a good 3-4 
times faster than most other methods that are similar. However
your fastest method for removing the offending characters would be to 
use preg_replace() - it should be about 4 times faster than the method 
you chose.

--zak






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




Re: [PHP] High Ascii chars

2001-07-07 Thread Justin Farnsworth

rm:

Yes, we have this problem with clients submitting stories,
or some such, by cutting and pasting from word processors.

You can get around it by using javascript to check the
text on exit from the form field, and then either replace
the high ASCII with "?" or strip it out, as appropriate.  This
is "better" too, for performance, as the javascript
will warn and block on the client side, avoiding a
round trip.

_jef
---


rm wrote:
> 
> php3.x
> 
> We have a large number of people submitting a large
> number of docs...I'm having a problem with some docs
> coming through with high ascii characters in the text,
> apparently the dbm database we're using chokes on some
> high ascii chars.  I need to eliminate characters in
> the text from 122 to 255.  I can't seem to find a
> simple way to do thisI have a routine, it works
> but it takes too long, something like;
> 
> for ($i=122; $i<256; $i++){
> 
> $textline=str_replace(chr($i),'',$textline)
> 
> }
> 
> Anyone know of a better, faster way to filter out
> these high ascii charcters
> 
> kb
> 
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Justin Farnsworth
Eye Integrated Communications
321 South Evans - Suite 203
Greenville, NC 27858 | Tel: (252) 353-0722

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




Re: [PHP] require_once(); questions

2001-07-07 Thread Chris Anderson

Try putting GLOBAL infront of the var to give it the greater scope
- Original Message -
From: "Chris Anderson" <[EMAIL PROTECTED]>
To: "Inércia Sensorial" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 8:50 PM
Subject: Re: [PHP] require_once(); questions


> Actually this does work:
> //First_File.php
>  $test = "I am the test variable";
> ?>
>
> //Second_File.php
>  echo $test;
> ?>
>
> //Active file
>  require "First_File.php";
> require "Second_File.php";
> ?>
>
> That would produce the output of :
>   I am the test variable
>
> An include or require just places the files' contents at the line you
> include it. So after the includes(requires) my parsed code was:
>  $test = "I am the test variable";
> echo $test;
> ?>
>
> Hope this helps
>
> - Original Message -
> From: "Inércia Sensorial" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, July 07, 2001 5:59 PM
> Subject: [PHP] require_once(); questions
>
>
> >   Hi All,
> >
> >   I have a function that includes files based on some SQL queries. On
one
> of
> > the first loaded files, I want to define a function and use it on
another
> > included file. Something like:
> >
> > includes file:
> > first_file.inc.php
> > This file has: $test = "Show me!";
> >
> > Then include file:
> > second_file.php
> > This file has: echo $test;
> >
> >   But doesn't show nothing, so I guess it is not possible to do. Am I
> right?
> > If so, what's the best alternative?
> >
> >   Also, another question since it is a function that includes the
> files,
> > the contents of these files are not available outside the function
scope..
> > what's the best way to use it outside the function?
> >
> >   Thanks a lot
> >
> > --
> >
> >
> >   Julio Nobrega.
> >
> > A hora está chegando:
> > http://sourceforge.net/projects/toca
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] High Ascii chars

2001-07-07 Thread rm


php3.x

We have a large number of people submitting a large
number of docs...I'm having a problem with some docs
coming through with high ascii characters in the text,
apparently the dbm database we're using chokes on some
high ascii chars.  I need to eliminate characters in
the text from 122 to 255.  I can't seem to find a
simple way to do thisI have a routine, it works
but it takes too long, something like;

for ($i=122; $i<256; $i++){
 
$textline=str_replace(chr($i),'',$textline)

}


Anyone know of a better, faster way to filter out
these high ascii charcters

kb

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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




Re: [PHP] require_once(); questions

2001-07-07 Thread Inércia Sensorial

  I guess I know what may be wrong. My function that includes the files, it
is called several times, with different arguments being passed.

  It is something like:

function LoadPositionedModules ($posv, $posh)
{
// $posv is vertical position, and $posh is horizontal position
// Inside it, something like:

SELECT file_to_include FROM table WHERE posv = '$posv' AND posh =
'$posh';

   // Then the fetch_array, include, etc...
}


  So if I call:

LoadPositionedModules ('Left', 'Center');

  And it includes files feeding the SQL. On this included file I define a
var:

$test = "Show Me!";

  If I call again, but with different parameters:

LoadPositionedModules ('Left', 'Footer');

  Then I guess the problem is that I can't use the $test var from the first
included file. It's clear to me why I can't now, thanks.

  So I believe a solution would be to find out how to use this var outside
the function scope. That was my second question.. Anyone have any ideas? I
guess I could register it on a session, or return it...

--


  Julio Nobrega.

Yes, I am developing another 'Portal-System'
Have a look:
http://sourceforge.net/projects/toca



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




Re: [PHP] Question: Processing files in directory and parsing...

2001-07-07 Thread mike cullerton

on 7/7/01 7:38 PM, mike cullerton at [EMAIL PROTECTED] wrote:

> on 7/7/01 7:02 PM, Jeff Lewis at [EMAIL PROTECTED] wrote:
> 
>> So I need to know how to process the files in the directory and then how to
>> process a few lines.  The structure will always be the same and having the
>> columns starting at the same position each time.
> 
> first, do the files have all the heading info in them as well, or just the
> data? ie, are all the lines the same, or are there some that include stuff
> other than data?
> 
> if the files cantaon only data, once you get a file in hand, this can parse
> the lines.
> 
> $fd = fopen ($file,'r');

  oops, missed something...

  while (!feof ($fd)) {

> $buffer = fgets($fd, 4096);
> $field1 = substr($buffer,0,x);
> $field2 = substr($buffer,x,y);
> $field3 = substr($buffer,x+y,z);
> ...
> 
> where x is the length of the first field, y length of the second ...
> 
> also, you may want to trim() the fields.
> 
> i'm sure others around here can come up with something better.
> 
> :)
> 
> -- mike cullerton
> 


 -- mike cullerton



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




Re: [PHP] Question: Processing files in directory and parsing...

2001-07-07 Thread mike cullerton

on 7/7/01 7:02 PM, Jeff Lewis at [EMAIL PROTECTED] wrote:

> So I need to know how to process the files in the directory and then how to
> process a few lines.  The structure will always be the same and having the
> columns starting at the same position each time.

first, do the files have all the heading info in them as well, or just the
data? ie, are all the lines the same, or are there some that include stuff
other than data?

if the files cantaon only data, once you get a file in hand, this can parse
the lines.

$fd = fopen ($file,'r');
$buffer = fgets($fd, 4096);
$field1 = substr($buffer,0,x);
$field2 = substr($buffer,x,y);
$field3 = substr($buffer,x+y,z);
...

where x is the length of the first field, y length of the second ...

also, you may want to trim() the fields.

i'm sure others around here can come up with something better.

:)

 -- mike cullerton


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




[PHP] watermarks

2001-07-07 Thread Jon Yaggie

I am afraid I am completely stupid in the way that watermarks work(researching now).  
however I need to know quickly if I can dynamically apply a watermark to an image 
using PHP.  Any one know?




Thank You,
 
Jon Yaggie
www.design-monster.com
 
And they were singing . . . 
 
'100 little bugs in the code
100 bugs in the code
fix one bug, compile it again
101 little bugs in the code
 
101 little bugs in the code . . .'
 
And it continued until they reached 0





Re: [PHP] Question: Processing files in directory and parsing...

2001-07-07 Thread [EMAIL PROTECTED]

ahh here is what you need:



$d = dir("/etc");

while($entry=$d->read()) {
echo $entry."\n";
//put what you want to do to each thing in the dir here...



}
$d->close();


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




[PHP] registering objects as session variables

2001-07-07 Thread mike cullerton

hey folks,

   i'm trying to register an object as a session variable and feel like i'm
chasing my tail. i either get the define class before starting session
problem or the can't send header error. as soon as i fix one, i cause the
other.

   what are folks doing about this? roll you own using serialize?

maybe i'm missing something easy...

mike

 -- mike cullerton



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




Re: [PHP] Question: Processing files in directory and parsing...

2001-07-07 Thread [EMAIL PROTECTED]

on 7/7/01 9:02 PM, Jeff Lewis at [EMAIL PROTECTED] wrote:

> I have a directory with 163 files.  I'd like to go through and process all
> files with the word "rost" in them.


Are these files named in any logical way? ie. 01.htm
02.htm etc.

Do you have a list of the files someplace?  I'm not certain how to get a
list of the files in a directory, but I know it's possible in perl, so out
of curiosity I'll see what's there.

The rest seems pretty easy using


$fp = fopen ("/wwbl/HTML/watrost.htm", "rw");

$rost = strstr ($fp, 'rost');

if ($rost) { echo "There it is!"; }


Susan





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




[PHP] PHP Configuration buglet

2001-07-07 Thread Shawn Starr


CrackLib uses crack.h not packer.h on Linux (at least, the sources I had
had crack.h)

Could someone change the configure script to look for crack.h or packer.h
because there's so many implimentations of CrackLib out there?

Shawn.



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




RE: [PHP] PHP/Apache security question

2001-07-07 Thread ..s.c.o.t.t..

if the script is running as user "scott" group "scott",
then it can only alter/read/execute files that the user
"scott" has access to... nothing else.

of course, if you have user "scott", group "users",
and have user "tom" in group "users", then any files
that have the group read/write/exec permissions set
could possibly be "vulnerable" to other user's scripts.

> -Original Message-
> From: Aaron Bennett [mailto:[EMAIL PROTECTED]]
> Subject: RE: [PHP] PHP/Apache security question
> 
> Does anyone know if SuExec plays "friendly" with PHP? From my recollection,
> when using suexec, it only alters the current UID/GID for scripts executed
> by httpd. Does PHP get treated the same way as would say a perl cgi script?
> 
> I've looked a little at how phpwebhosting.com does it, and they set each
> user to their own unique primary group, and are (i believe) using suexec in
> their apache config setting each VirtualHost with their respective user and
> group... But does that really 'secure' everyone's code from other equally
> privileged users? :-?
> 
> --
> Aaron Bennett
> [EMAIL PROTECTED]
> 
> 
> -Original Message-
> From: ..s.c.o.t.t.. [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 07, 2001 4:33 PM
> To: Php-General
> Subject: RE: [PHP] PHP/Apache security question
> 
> 
> of course that's possible... it's not default, but it's very possible
> 
> i think it's an apache module called suEXEC
> that will run the script with the script owner's name.group,
> not apache.apache
> 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > Subject: [PHP] PHP/Apache security question
> > 
> > Is there anything anyone can do about this? of course it would be ideal if
> > php would inherit uid/gid from the script file instead of the server
> > ownership but I think there is no way to accomplish this, so this is why
> > I am clueless.
> > 
> > Oh, one more thingie: I have this CGI script here:
> > 
> > #!/usr/bin/php
> > .
> > etc etc
> > 
> > 
> > I try to access it and the "security warning!" page appears. The
> > documentation sais that it's ok to use such CGI scripts, and warns the
> > user about the security threat of using the php binary as a CGI. Obviously
> > I am not using the php binary as a CGI, rather I am creating a CGI script
> > that's interpreted using the php binary, so what seems to be the problem
> > here?
> > 
> > Thx a lot,
> > georgeb
> > 
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

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




[PHP] Question: Processing files in directory and parsing...

2001-07-07 Thread Jeff Lewis

I have a directory with 163 files.  I'd like to go through and process all
files with the word "rost" in them.

I'd like to go through each of these files and go line by line to enter the
data into a mySQL table.

An example of the file would look like this:
http://hyrum.net/wwbl/HTML/watrost.htm

So I need to know how to process the files in the directory and then how to
process a few lines.  The structure will always be the same and having the
columns starting at the same position each time.

If someone could give me a few code snippets, I can pick up the rest
myself...



Re: [PHP] foreach loop

2001-07-07 Thread Chris Anderson

Good call
- Original Message -
From: "John Monfort" <[EMAIL PROTECTED]>
To: "PHPBeginner.com" <[EMAIL PROTECTED]>
Cc: "John Meyer" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 6:27 PM
Subject: RE: [PHP] foreach loop


>
> > >If we didn't have Microsoft, we'd have to blame ourselves for all of
our
> > >programs crashing
>
>  If we didn't have microsoft, 'Crashing Programs' wouldn't be part of our
>  daily vocabulary  :)
>
>
>
> __John Monfort_
> _+---+_
>  P E P I E  D E S I G N S
>www.pepiedesigns.com
> "The world is waiting, are you ready?"
> -+___+-
>
> On Sun, 8 Jul 2001, PHPBeginner.com wrote:
>
> >
> >
> > >If we didn't have Microsoft, we'd have to blame ourselves for all of
our
> > >programs crashing
> >
> >
> > I really don't think so
> > :-)
> >
> > -maxim maletsky
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] How to apply something to every variable

2001-07-07 Thread Chris Anderson

btw, thanks. Before now I had always sized out my arrays and looped through
them. I never noticed how easy a foreach could emulate that.
- Original Message -
From: "PHPBeginner.com" <[EMAIL PROTECTED]>
To: "Chadwick, Russell" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 1:09 AM
Subject: RE: [PHP] How to apply something to every variable


>
>
> foreach($HTTP_POST_VARS as $k=>$v) {
> $$k = addslashes($v);
> }
>
>
>
> - Maxim Maletsky
>
> PS: no, not trying to win over, just trying to suggest my way ;-)
>
>
>
> -Original Message-
> From: Chadwick, Russell [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 07, 2001 7:11 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [PHP] How to apply something to every variable
>
>
>
> while (list($key, $val) = each ($HTTP_POST_VARS)) {
> ${$key} = addslashes($val);
> }
>
> - Russ
>
> -Original Message-
> From: Chris Anderson [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 06, 2001 3:07 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] How to apply something to every variable
>
>
> I was playing around trying to find a way to addslashes() to all my
> variables, and I came up with this snippet. Hope it helps someone
>
>  $keys = array_keys($HTTP_POST_VARS);
>  $post_size = sizeof($keys);
>  for($x = 0; $x < $post_size; $x++)
>  {
>   $temp = $keys[$x];
> //you can replace addslashes with whatever you want to use
>   ${"$temp"} = addslashes($HTTP_POST_VARS["$temp"]);
>  }
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] How to apply something to every variable

2001-07-07 Thread Chris Anderson

The true point of that snippet was to apply something to all my variables.
Plus, not all servers have that option on :>
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 7:49 AM
Subject: Re: [PHP] How to apply something to every variable


> Hi Chris!
> On Fri, 06 Jul 2001, Chris Anderson wrote:
>
> > I was playing around trying to find a way to addslashes() to all my
> > variables, and I came up with this snippet. Hope it helps someone
> >
> why don't you turn on magic_quotes_gpc then?
>
> >  $keys = array_keys($HTTP_POST_VARS);
> >  $post_size = sizeof($keys);
> >  for($x = 0; $x < $post_size; $x++)
> >  {
> >   $temp = $keys[$x];
> > //you can replace addslashes with whatever you want to use
> >   ${"$temp"} = addslashes($HTTP_POST_VARS["$temp"]);
> >  }
> -- teodor
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] require_once(); questions

2001-07-07 Thread Chris Anderson

Actually this does work:
//First_File.php


//Second_File.php


//Active file


That would produce the output of :
  I am the test variable

An include or require just places the files' contents at the line you
include it. So after the includes(requires) my parsed code was:


Hope this helps

- Original Message -
From: "Inércia Sensorial" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 5:59 PM
Subject: [PHP] require_once(); questions


>   Hi All,
>
>   I have a function that includes files based on some SQL queries. On one
of
> the first loaded files, I want to define a function and use it on another
> included file. Something like:
>
> includes file:
> first_file.inc.php
> This file has: $test = "Show me!";
>
> Then include file:
> second_file.php
> This file has: echo $test;
>
>   But doesn't show nothing, so I guess it is not possible to do. Am I
right?
> If so, what's the best alternative?
>
>   Also, another question since it is a function that includes the
files,
> the contents of these files are not available outside the function scope..
> what's the best way to use it outside the function?
>
>   Thanks a lot
>
> --
>
>
>   Julio Nobrega.
>
> A hora está chegando:
> http://sourceforge.net/projects/toca
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP] PHP map?

2001-07-07 Thread Mark Charette

Start at ftp://sepftp.stanford.edu/pub/World_Map/ which is a copy of the CIA
world data. http://hjem.get2net.dk/bnielsen/ciaworld.html gives some info
for conversion of the cbd format to lat/long.

Projections (a science unto itself) is best left to the interested reader.
It ain't as simpla as it seems (unless you're going for Mercator - but
Mercator isn't one of the better projections unless you're a sailor ...)

Mark C.

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 6:08 PM
Subject: Re: [PHP] PHP map?


> on 7/7/01 3:36 PM, Chris Lambert - WhiteCrown Networks at
> [EMAIL PROTECTED] wrote:
>
> > You'd pretty much have to do that pixel by pixel. What exactly do you
want
> > the final application to do...often times there are alternative
solutions
> > derived at by others knowing what you wish to accomplish.
>
>
> Well I was hoping there'd be something that was a bunch of vectors. If you
> got to my site you'll se what I'm up to It's basically a
>
>
>  http://www.futurebird.com/mapbuild3
> *** very rough
>
>
> I'm making a site that will allow users to upload a map and add 'events'
to
> it. The events can include photographs and comments, possibly even sound
> clips and such.
>
> You can choose to share your map and to link it to similar maps. You can
> make user groups and share all of your events. You can view events from
any
> area as a time line. Or look at events from any time period as a map. You
> can chain events and make a map that shows how the event chain moved
through
> space (or didn't.)
>
> It's "postmodern" because anyone can contribute and because events
> can countian conflicting accounts and information. (Just like real
history!)
> I'm going to using it for my online diary because I want to see where I
was
> when I was thinking or seeing something (personal obssesion... sorry) But
it
> has lots of other uses...
>
> So I wanted to see if there was a vector map I could use as the "main" map
> that all the other maps will be linked to.
>
>
> Susan
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




[PHP] Re: eregi replace help

2001-07-07 Thread maatt

ereg_replace("> <[^<]*", "", $string);

or

ereg_replace("&.*\n", "", $string) if the unwanted bits end in new-lines

??

"Richard van Leeuwen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I want to delete some lines
>
> original:
>
> http://www.example.com/1.html"; >ABCD
> > Football
> http://www.example.com/2.html"; >BCDE
> > Tennis
> http://www.example.com/3.html"; >CDEF
> > Football
> http://www.example.com/4.html"; >DEFG
> > Basketball
> http://www.example.com/5.html"; >EFGH
> > Tennis
> http://www.example.com/6.html"; >FGHI
>
> after:
>
> http://www.example.com/1.html"; >ABCD
> http://www.example.com/2.html"; >BCDE
> http://www.example.com/3.html"; >CDEF
> http://www.example.com/4.html"; >DEFG
> http://www.example.com/5.html"; >EFGH
> http://www.example.com/6.html"; >FGHI
>
> I tryed eregi replace with (.*)
> but that does not seem to work
>
> Thanks if you can help me
>
> Richard van Leeuwen
>
>
>
>
>



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




[PHP] Re: mysql_insert_id()

2001-07-07 Thread Inércia Sensorial

  I used this function with a BIGINT field once, and it worked. I guess
problemas appear when it goes beyond an INT filed, or, the number you are
retrieving has more than 11 digits.

--


  Julio Nobrega.

A hora está chegando:
http://sourceforge.net/projects/toca

"John Meyer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have been reading about this function and I have a question. The PHP
> manual warns about using it if your AUTO_INCREMENT ID field is a BIGINT.
I
> am using type INTEGER.  Am I okay with this one, or should I use the MySQL
> function.
>
> John Meyer
> [EMAIL PROTECTED]
> Programmer
>
>
> If we didn't have Microsoft, we'd have to blame ourselves for all of our
> programs crashing
>



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




[PHP] Re: mysql_insert_id()

2001-07-07 Thread maatt

> I have been reading about this function and I have a question. The PHP
> manual warns about using it if your AUTO_INCREMENT ID field is a BIGINT.
I
> am using type INTEGER.  Am I okay with this one, or should I use the MySQL
> function.

Works just fine in everything I do.

Maatt



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




Re: [PHP] PHP map?

2001-07-07 Thread Inércia Sensorial

  That´s a great idea Susan. While I can't help you, I've never seen similar
application, and I like it. Hope you can make it! :-)

--


  Julio Nobrega.

A hora está chegando:
http://sourceforge.net/projects/toca

<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> on 7/7/01 3:36 PM, Chris Lambert - WhiteCrown Networks at
> [EMAIL PROTECTED] wrote:
>
> > You'd pretty much have to do that pixel by pixel. What exactly do you
want
> > the final application to do...often times there are alternative
solutions
> > derived at by others knowing what you wish to accomplish.
>
>
> Well I was hoping there'd be something that was a bunch of vectors. If you
> got to my site you'll se what I'm up to It's basically a
>
>
>  http://www.futurebird.com/mapbuild3
> *** very rough
>
>
> I'm making a site that will allow users to upload a map and add 'events'
to
> it. The events can include photographs and comments, possibly even sound
> clips and such.
>
> You can choose to share your map and to link it to similar maps. You can
> make user groups and share all of your events. You can view events from
any
> area as a time line. Or look at events from any time period as a map. You
> can chain events and make a map that shows how the event chain moved
through
> space (or didn't.)
>
> It's "postmodern" because anyone can contribute and because events
> can countian conflicting accounts and information. (Just like real
history!)
> I'm going to using it for my online diary because I want to see where I
was
> when I was thinking or seeing something (personal obssesion... sorry) But
it
> has lots of other uses...
>
> So I wanted to see if there was a vector map I could use as the "main" map
> that all the other maps will be linked to.
>
>
> Susan
>
>
>
>
>



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




Re: [PHP] PHP map?

2001-07-07 Thread [EMAIL PROTECTED]

on 7/7/01 3:36 PM, Chris Lambert - WhiteCrown Networks at
[EMAIL PROTECTED] wrote:

> You'd pretty much have to do that pixel by pixel. What exactly do you want
> the final application to do...often times there are alternative solutions
> derived at by others knowing what you wish to accomplish.


Well I was hoping there'd be something that was a bunch of vectors. If you
got to my site you'll se what I'm up to It's basically a


 http://www.futurebird.com/mapbuild3
*** very rough


I'm making a site that will allow users to upload a map and add 'events' to
it. The events can include photographs and comments, possibly even sound
clips and such.

You can choose to share your map and to link it to similar maps. You can
make user groups and share all of your events. You can view events from any
area as a time line. Or look at events from any time period as a map. You
can chain events and make a map that shows how the event chain moved through
space (or didn't.)

It's "postmodern" because anyone can contribute and because events
can countian conflicting accounts and information. (Just like real history!)
I'm going to using it for my online diary because I want to see where I was
when I was thinking or seeing something (personal obssesion... sorry) But it
has lots of other uses...

So I wanted to see if there was a vector map I could use as the "main" map
that all the other maps will be linked to.


Susan






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




Re: [PHP] install help

2001-07-07 Thread chris schneck

Usually after a "./configure" there is a "make" then a "make install",
sometimes even a "make test" before a make install
- Original Message -
From: "Evan Nemerson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 3:02 PM
Subject: [PHP] install help


> I am trying to install PHP 4.0.6 with Apache 1.3.20 on Linux Mandrake 8. I
> finally managed to get throught ./configure, then typed 'make install'.
>
> Here's the last few lines:
>
> Inf file included from main.c:26:
> php.h:285:30: tsrm_virtual_cwd.h: No such file or directory
> make[2]: *** [main.lo] Error 1
> make[2]: Leaving directory '/root/Desktop/php-4.0.6/main'
> make[1]: *** [install-recursive] Error 1
> make[1]: Leaving directory 'root/Desktop/php-4.0.6/main'
> make: *** [install-recursive] Error 1
>
> Anybody have any ideas (I already thought of smashing my computer, but
ruled
> it out...)? One I just had is to tell apache to look for the PHP module on
my
> Windoze partition (which has been installed sucessfully for months). Would
> this work? I doubt it, but anything's possible... besides I would like to
> avoid that since I plan on installing a few libs later (specifically,
mcrypt
> and pdf...) and this is entirely too difficult for windoze.
>
> Time to go watch cartoons! Be back in 1/2 hr.
>
>
> -Evan Nemerson
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] can't generate gif!!!

2001-07-07 Thread Rama

I have problem using all image functions for gif.
Does anyone have a suggestion how to convert gif images to png images?
It's ok if I have to use other programming language instead of PHP.

Ps: in case you wonder, I can't control the input file type. It will be
very helpful if I can at least convert to other image format.


Rama



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




RE: [PHP] foreach loop

2001-07-07 Thread John Monfort


> >If we didn't have Microsoft, we'd have to blame ourselves for all of our
> >programs crashing

 If we didn't have microsoft, 'Crashing Programs' wouldn't be part of our
 daily vocabulary  :)



__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Sun, 8 Jul 2001, PHPBeginner.com wrote:

>
>
> >If we didn't have Microsoft, we'd have to blame ourselves for all of our
> >programs crashing
>
>
> I really don't think so
> :-)
>
> -maxim maletsky
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] Strange problem with fputs ($fp, $newVote)

2001-07-07 Thread SED

Hi again,

I got around the problem just by doing following. However, the problem
is weird (I'm using PHP 4.0.5 for IIS).

$fp = fopen ($filename, "a+");
$fileContent = fread ($fp, filesize ($filename));
...
fclose ($fp);
$fp = fopen ($filename, "a"); <- the plus taken away!
ftruncate ($fp, 0);
fwrite ($fp, $newVote);
fclose ($fp);

Can this be a bug?

SED 

-Original Message-
From: SED [mailto:[EMAIL PROTECTED]] 
Sent: 7. júlí 2001 21:56
To: [EMAIL PROTECTED]
Subject: [PHP] Strange problem with fputs ($fp, $newVote)


Hi,

I'm having strange problem with the fputs() - it occurs only on my IIS
server but not on the Linux/apache server (I use the IIS while
programming).

The problem:

fputs ($fp, $newVote);

It does not write the content of $newVote into the text file $fp is
pointing to. If I check the value of fputs like:

$test   = fputs ($fp, $newVote);
echo $test;

I get the number "0" - but notice I don't get any error messages. Does
anyone know why this acts like that? If I echo the permission of the
file I get this: 33206 (what does that mean?).

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is
--



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


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




[PHP] install help

2001-07-07 Thread Evan Nemerson

I am trying to install PHP 4.0.6 with Apache 1.3.20 on Linux Mandrake 8. I 
finally managed to get throught ./configure, then typed 'make install'. 

Here's the last few lines:  

Inf file included from main.c:26:
php.h:285:30: tsrm_virtual_cwd.h: No such file or directory
make[2]: *** [main.lo] Error 1
make[2]: Leaving directory '/root/Desktop/php-4.0.6/main'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory 'root/Desktop/php-4.0.6/main'
make: *** [install-recursive] Error 1

Anybody have any ideas (I already thought of smashing my computer, but ruled 
it out...)? One I just had is to tell apache to look for the PHP module on my 
Windoze partition (which has been installed sucessfully for months). Would 
this work? I doubt it, but anything's possible... besides I would like to 
avoid that since I plan on installing a few libs later (specifically, mcrypt 
and pdf...) and this is entirely too difficult for windoze.

Time to go watch cartoons! Be back in 1/2 hr.


-Evan Nemerson

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




[PHP] require_once(); questions

2001-07-07 Thread Inércia Sensorial

  Hi All,

  I have a function that includes files based on some SQL queries. On one of
the first loaded files, I want to define a function and use it on another
included file. Something like:

includes file:
first_file.inc.php
This file has: $test = "Show me!";

Then include file:
second_file.php
This file has: echo $test;

  But doesn't show nothing, so I guess it is not possible to do. Am I right?
If so, what's the best alternative?

  Also, another question since it is a function that includes the files,
the contents of these files are not available outside the function scope..
what's the best way to use it outside the function?

  Thanks a lot

--


  Julio Nobrega.

A hora está chegando:
http://sourceforge.net/projects/toca




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




Re: [PHP] foreach loop

2001-07-07 Thread Steve Edberg




At 10:31 AM -0700 7/7/01, John Meyer wrote:
>When I go through a foreach loop, are the values of the individual 
>items in the array changed?
>For instance:
>$variables = array($author_firstname, $author_lastname, $author_dob, 
>$author_dod, $author_bio);
>  foreach($variables as $value) {
> $value = strip_tags($value);
> $value = AddSlashes($value);
>  }
>will the values be changed outside of the loop?
>


No, because $value is a copy the current array element, not simply a 
pointer to it. Furthermore, if I understand the documentation (see 
below) correctly, this construct (using the $variables array from 
above) -

$i = 0;
foreach ($variables as $value)
{
$variables[$i] =AddSlashes( strip_tags($value));
 $i++;
}

- will not work either, since foreach() operates a COPY of the array. 
 From the docs at

http://www.php.net/manual/en/control-structures.foreach.php :


Note: When foreach first starts executing, the internal array pointer 
is automatically reset to the first element of the array. This means 
that you do not need to call reset() before a foreach loop.

Note: Also note that foreach operates on a copy of the specified 
array, not the array itself, therefore the array pointer is not 
modified as with the each() construct and changes to the array 
element returned are not reflected in the original array.

- steve


>John Meyer
>[EMAIL PROTECTED]
>Programmer
>
>If we didn't have Microsoft, we'd have to blame ourselves for all of 
>our programs crashing
>

-- 
+-- Factoid: Of the 100 largest economies in the world, 51 are --+
| Steve Edberg   University of California, Davis |
| [EMAIL PROTECTED]   Computer Consultant |
| http://aesric.ucdavis.edu/  http://pgfsun.ucdavis.edu/ |
+--- corporations -- http://www.ips-dc.org/reports/top200text.htm ---+

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




[PHP] Strange problem with fputs ($fp, $newVote)

2001-07-07 Thread SED

Hi,

I'm having strange problem with the fputs() - it occurs only on my IIS
server but not on the Linux/apache server (I use the IIS while
programming).

The problem:

fputs ($fp, $newVote);

It does not write the content of $newVote into the text file $fp is
pointing to. If I check the value of fputs like:

$test   = fputs ($fp, $newVote);
echo $test;

I get the number "0" - but notice I don't get any error messages. Does
anyone know why this acts like that? If I echo the permission of the
file I get this: 33206 (what does that mean?).

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is
--



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




[PHP] PHP with MS Access?

2001-07-07 Thread Jeff Lewis

Anyone have a tutorial or site dealing with PHP and MS Access databases?

Jeff
www.hyrum.net
www.xnull.com



Re: [PHP] mysql_insert_id()

2001-07-07 Thread Don Read


On 07-Jul-01 Chris Lambert - WhiteCrown Networks wrote:
> I've used integer on many occasions with auto_increment, and have had no
> problems. mysql_insert_id() returns the unique identifyer of the last record
> inserted with mysql_query(). I'm not sure what "MySQL function" you're
> referencing as an alternative, but you should be fine with an
> integer/auto_increment/insert_id()...
> 

PHP int values are signed integers, so when the database id > 2147483647
mysql_insert_id() will return negative values.

On 32bit compile:
INT  = ok
INT UNSIGNED   will break at 50% of the domain (of valid id's)
BIGINT   ~2% 
BIGINT UNSIGNED  ~1%

I don't know if you can compile PHP for 64bit ... if you can then 
the first three should be fine.

And you can always use mysql_query("select LAST_INSERT_ID()");
then treat the result as a string (which it is).

Regards,
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

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




RE: [PHP] PHP/Apache security question

2001-07-07 Thread Aaron Bennett

Does anyone know if SuExec plays "friendly" with PHP? From my recollection,
when using suexec, it only alters the current UID/GID for scripts executed
by httpd. Does PHP get treated the same way as would say a perl cgi script?

I've looked a little at how phpwebhosting.com does it, and they set each
user to their own unique primary group, and are (i believe) using suexec in
their apache config setting each VirtualHost with their respective user and
group... But does that really 'secure' everyone's code from other equally
privileged users? :-?

--
Aaron Bennett
[EMAIL PROTECTED]


-Original Message-
From: ..s.c.o.t.t.. [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 07, 2001 4:33 PM
To: Php-General
Subject: RE: [PHP] PHP/Apache security question


of course that's possible... it's not default, but it's very possible

i think it's an apache module called suEXEC
that will run the script with the script owner's name.group,
not apache.apache

> -Original Message-
> From: [EMAIL PROTECTED]
> Subject: [PHP] PHP/Apache security question
> 
> Is there anything anyone can do about this? of course it would be ideal if
> php would inherit uid/gid from the script file instead of the server
> ownership but I think there is no way to accomplish this, so this is why
> I am clueless.
> 
> Oh, one more thingie: I have this CGI script here:
> 
> #!/usr/bin/php
> .
> etc etc
> 
> 
> I try to access it and the "security warning!" page appears. The
> documentation sais that it's ok to use such CGI scripts, and warns the
> user about the security threat of using the php binary as a CGI. Obviously
> I am not using the php binary as a CGI, rather I am creating a CGI script
> that's interpreted using the php binary, so what seems to be the problem
> here?
> 
> Thx a lot,
> georgeb
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

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



Re: [PHP] arrays in forms.

2001-07-07 Thread John Meyer


>
> mysql_auery($query) or die(echo mysql_error());

By the way, I know this line should be mysql_query



John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


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




[PHP] arrays in forms.

2001-07-07 Thread John Meyer

Hi, I have a multi-select listbox set up like this:

Author (you are able to select more than one.Click 
here to add a new author):

" . 
$row["AUTHOR_FNAME"] . " " . $row["AUTHOR_LNAME"] . "";
  echo $option;
}
?>


I then have a bit of code that parses through and checks which authors they 
selected, if any.

if isset($author) {
 if is_array($author) {
 foreach($authors as $key=>$value) {
 $query = "INSERT INTO BYLINE(TITLE_ID, AUTHOR_ID) 
VALUES(" . $titleid . "," . $value . ");";
 mysql_auery($query) or die(echo mysql_error());
  }
 } else {
 $query = "INSERT INTO BYLINE(TITLE_ID, AUTHOR_ID) VALUES(" 
. $titleid . "," . $author . ");";
 mysql_auery($query) or die(echo mysql_error());
 }
}

What I'd like to know is, is this correct, incorrect, redundant, etc?

John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


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




Re: [PHP] Restoring a Dump File With PHP

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

phpMyAdmin - www.phpwizard.net/

or...

http://www.sitepointforums.com/showthread.php?postid=193539#post193539

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Chris Anderson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 4:25 PM
Subject: [PHP] Restoring a Dump File With PHP


I created a MySQL dump file (.sql) and I wanted to use it to restore my
database. Unfortunately the manual (MySQL) only shows the command line
method:
mysql database < file.sql
I tried this in PHP and it didn't work. Does anyone know how to load the sql
file into the database through PHP? Thanks



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




Re: [PHP] Restoring a Dump File With PHP

2001-07-07 Thread Mark Charette

How does this _not_ work (as long as you supply the path to mysql, the
username, and the password

mark C.

- Original Message -
From: "Chris Anderson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 3:25 PM
Subject: [PHP] Restoring a Dump File With PHP


I created a MySQL dump file (.sql) and I wanted to use it to restore my
database. Unfortunately the manual (MySQL) only shows the command line
method:
mysql database < file.sql
I tried this in PHP and it didn't work. Does anyone know how to load the
.sql file into the database through PHP? Thanks



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




Re: [PHP] Convert MP3s using PHP ?

2001-07-07 Thread Chris Anderson

Try looking for BladeEnc. It is a freeware encoding dll/runtime that works
in windows and unix and is completely command line
- Original Message -
From: "Tom Carter" <[EMAIL PROTECTED]>
To: "Michel 'ZioBudda' Morelli" <[EMAIL PROTECTED]>; "Micha Ober"
<[EMAIL PROTECTED]>
Cc: "php" <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 8:12 AM
Subject: Re: [PHP] Convert MP3s using PHP ?


> > >hi,
> > >is it possible to convert a mp3 file (for example
> > >190kbps) to a mp3 file with 128kbps or less ?
> >
> > exec()
> > system()
>
> To expand upon that previous answer.. sort of. PHP can't, but if you can
> find a command line utility to perform the conversion (sorry, I don't know
> any of hand) then PHP can save the file to the syatem, run the utility by
> exec() and then read in the resulting file.
>
> HTH
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] Restoring a Dump File With PHP

2001-07-07 Thread Chris Anderson

I created a MySQL dump file (.sql) and I wanted to use it to restore my database. 
Unfortunately the manual (MySQL) only shows the command line method:
mysql database < file.sql
I tried this in PHP and it didn't work. Does anyone know how to load the .sql file 
into the database through PHP? Thanks



Re: [PHP] Something weird

2001-07-07 Thread Chris Anderson

So how is that weird?
- Original Message - 
From: "David OBrien" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 06, 2001 2:02 PM
Subject: [PHP] Something weird


> I just installed a fresh RH 7.1 server with compiled apache and php 4.0.6
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


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




Re: [PHP] Real Estate Catalog

2001-07-07 Thread Chris Anderson

Don't say "steal", say "learn from"
: )
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Joe Smith" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 1979 2:44 AM
Subject: Re: [PHP] Real Estate Catalog


> on 7/7/01 2:43 AM, Joe  Smith at [EMAIL PROTECTED] wrote:
>
> > If you'd rather I bore everyone with the details, let me know and I'll
post
> > my questions to this thread for all to see and chime in on.
>
>
> If your questions are clear, and if you don't post too much code people
here
> seem to be very nice. It helps if the question is general enough that
other
> people can use the answer too.
>
> I'm new at all this too when I get stuck, I try google or one of these
sites
> for help before posting ...
>
> http://www.php.net
> tells how to use most functions
>
> http://www.webmonkey.com
> Great tutorials, but only for easy stuff
>
> http://www.mysql.com
> a bit confusing, but in theory all the functions are here...
>
> http://www.phpbuilder.com
> lots of posts, often I find that someone else has had the same question as
> me, also some great tutorials.
>
> http://www.devshed.com
> lots of great scripts to steal
>
>
> Good Books:
>
> O'Riley PHP pocket reference
> MySQL by Paul DuBois and Michael Widenius
> O'Riley MySQL and mSQL
>
> Hope that helps!
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] PHP/Apache security question

2001-07-07 Thread ..s.c.o.t.t..

of course that's possible... it's not default, but it's very possible

i think it's an apache module called suEXEC
that will run the script with the script owner's name.group,
not apache.apache

> -Original Message-
> From: [EMAIL PROTECTED]
> Subject: [PHP] PHP/Apache security question
> 
> Is there anything anyone can do about this? of course it would be ideal if
> php would inherit uid/gid from the script file instead of the server
> ownership but I think there is no way to accomplish this, so this is why
> I am clueless.
> 
> Oh, one more thingie: I have this CGI script here:
> 
> #!/usr/bin/php
> .
> etc etc
> 
> 
> I try to access it and the "security warning!" page appears. The
> documentation sais that it's ok to use such CGI scripts, and warns the
> user about the security threat of using the php binary as a CGI. Obviously
> I am not using the php binary as a CGI, rather I am creating a CGI script
> that's interpreted using the php binary, so what seems to be the problem
> here?
> 
> Thx a lot,
> georgeb
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

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




Re: [PHP] mysql_insert_id()

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

I've used integer on many occasions with auto_increment, and have had no
problems. mysql_insert_id() returns the unique identifyer of the last record
inserted with mysql_query(). I'm not sure what "MySQL function" you're
referencing as an alternative, but you should be fine with an
integer/auto_increment/insert_id()...

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: John Meyer <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 4:41 PM
Subject: [PHP] mysql_insert_id()


| I have been reading about this function and I have a question. The PHP
| manual warns about using it if your AUTO_INCREMENT ID field is a BIGINT.
I
| am using type INTEGER.  Am I okay with this one, or should I use the MySQL
| function.
|
| John Meyer
| [EMAIL PROTECTED]
| Programmer
|
|
| If we didn't have Microsoft, we'd have to blame ourselves for all of our
| programs crashing
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|


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




[PHP] mysql_insert_id()

2001-07-07 Thread John Meyer

I have been reading about this function and I have a question. The PHP 
manual warns about using it if your AUTO_INCREMENT ID field is a BIGINT.  I 
am using type INTEGER.  Am I okay with this one, or should I use the MySQL 
function.

John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


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




Re: [PHP] PHP map?

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

You'd pretty much have to do that pixel by pixel. What exactly do you want
the final application to do...often times there are alternative solutions
derived at by others knowing what you wish to accomplish.

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 1979 3:09 PM
Subject: [PHP] PHP map?


| Is there a good script that uses the gd lib to draw a map of the world
| someplace?
|
| Susan
|
|
| _
| Do You Yahoo!?
| Get your free @yahoo.com address at http://mail.yahoo.com
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|



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




Re: [PHP] Determining the length of a string

2001-07-07 Thread Mark Charette

Hmmm ...

If I didn't know something like that I'd probably do something stupid like
go to http://www.php.net, type in "string" or "length" for a keyword in the
Search box, look at what came back (including the function "strlen") and
explore the other calls nearby, too.

Mark C.

- Original Message -
From: "James Bartlett" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 2:02 PM
Subject: [PHP] Determining the length of a string


Hi,

Say you read in the contents of a text file and wanted to know the length of
the text you had read in what command would you use?

Thanks

James



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




[PHP] PHP map?

2001-07-07 Thread [EMAIL PROTECTED]

Is there a good script that uses the gd lib to draw a map of the world
someplace?

Susan


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] Determining the length of a string

2001-07-07 Thread James Bartlett

Hi,

Say you read in the contents of a text file and wanted to know the length of the text 
you had read in what command would you use?

Thanks

James



Re: [PHP] Global Variables -- why not have them?

2001-07-07 Thread John Meyer

At 02:55 PM 7/7/01 -0400, Mitch Vincent wrote:
> I've been using PHP for several years now and one question has plagued
>me the entire time. Why doesn't PHP have global variables? Before someone
>says it, I do know PHP sort of does have global variables, but having to
>specify GLOBAL in any function I want to see that variable in disqualifies
>it from being a truly global variable IMHO..
>
> I suppose I'm more curious than anything else.. Thanks!
>
>-Mitch
>

I don't know what the makers of PHP had in mind, but from my experience, 
having truly global variables is a very bad idea.  In fact, you should be 
trying to limit your need of global variables, so that your program can 
count on the integrity of the variables.


John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


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




Re: [PHP] Parsing HTML files?

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

For parsing, your best bet would be regular expressions. If you aren't
familiar with them, then this would most likely be a custom programming job,
as there's no such thing as an off the shelf parsing routine.

www.php.net/preg_match_all would be the best function to use to parse, and
you should get the input via either www.php.net/fopen or www.php.net/file

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Jeff Lewis <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 2:18 PM
Subject: [PHP] Parsing HTML files?


| Is it possible to parse an HTML like at:
| http://hyrum.net/wwbl/HTML/watrost.htm ?
|
| I'd like to be able to grab the player name and ratings and add them to a
| "pretty" HTML output :)
|
| Jeff
|


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




RE: [PHP] Parsing HTML files?

2001-07-07 Thread Maxim Maletsky

Yeah it is doable, just use fsockopen, and parse the input into your
database and go wild.

Keep in mind - doing it directly on request is VERY slow. You should be
pre-parsing it and then showing the data from your resources.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Jeff Lewis [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2001 3:19 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Parsing HTML files?


Is it possible to parse an HTML like at:
http://hyrum.net/wwbl/HTML/watrost.htm ?

I'd like to be able to grab the player name and ratings and add them to a
"pretty" HTML output :)

Jeff


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




[PHP] Parsing HTML files?

2001-07-07 Thread Jeff Lewis

Is it possible to parse an HTML like at:
http://hyrum.net/wwbl/HTML/watrost.htm ?

I'd like to be able to grab the player name and ratings and add them to a
"pretty" HTML output :)

Jeff



Re: [PHP] chdir() help

2001-07-07 Thread Kurt Lieber

In that case, it would be better to read all the image names into an array
and then use that to spit out 20 images at a time.  You'll get better
performance that way, too.

--kurt
- Original Message -
From: "McShen-CelebritieZones.com" <[EMAIL PROTECTED]>
To: "Chris Lambert - WhiteCrown Networks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 11:08 AM
Subject: Re: [PHP] chdir() help


Chris,
I do that because i wanna have control of how many images will be displayed
at once. I understand what you are doing, but, you script will just display
all images at once, right? I wanna display like 20 images, then have a next
button,, you know what i mean?

- Original Message -
From: "Chris Lambert - WhiteCrown Networks" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "McShen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 11:44 AM
Subject: Re: [PHP] chdir() help


> I'm not sure I know exactly what you want, as the script isn't clear on
its
> purpose. If you simply want to print out all the images in e:\work\image,
> and nothing else, the code would be much simpler.
>
>  $dir = opendir("e:/work/image");
> while ($file_name=readdir($dir)) {
> if ($file_name <> "." && $file_name <> "..") {
> echo "";
> }
> }
> ?>
>
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
>
> - Original Message -
> From: McShen <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, July 07, 2001 11:38 AM
> Subject: [PHP] chdir() help
>
>
> hi
>
> Currently, i am working in e:\work, and there is a folder named "image"
> under e:\work, so, the path to image is e:\work\image.
>
> I have a script under e:\work, and i wanna display all images under the
> folder e:\work\image, I use chdir() to change the directory. but it
wouldn't
> work. it still displays the images under e:\work. Why is that? Does
chdir()
> work under win2k pro? here is my script
>
> ---
> 
>
> $dir_name = "e:\work";
> $dir = opendir($dir_name);
> while ($file_name=readdir($dir)) {
>
>  if (($file_name!="." && $file_name!="..")) {
>   echo $file_name."\n  ";
>
>   if (chdir('e:\work\image')) {
>echo "current dir is e:\work\image";
>   }
>   echo "";
>  }
> }
> closedir($dir);
> ?>
> -
>
> Please help me to fix the problem. Thanks.
>
>



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




Re: [PHP] chdir() help

2001-07-07 Thread Kurt Lieber

We (or at least I) are on the mailing list, not the newsgroup.  Same
content, different delivery format.  www.php.net to sign up. (beware -- it's
a HIGH volume list)

--kurt

"McShen" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> by the way, what do u guys use as your news reader client?
> how do u reply to my post and send me an email at the same time? Do u
> manually add my email to Cc: or you just hit "reply to group"? I don't
know
> how to do this.
>
> "Kurt Lieber" <[EMAIL PROTECTED]> wrote in message
> 0c7f01c106fc$9c32e170$[EMAIL PROTECTED]">news:0c7f01c106fc$9c32e170$[EMAIL PROTECTED]...
> > Look at your code -- where do you tell it to set $file_name equal to the
> > file handles within e:\work\images?  $file_name is only being set to the
> > values within e:\work -- not e:\work\images.
> >
> > If you only need to display the images within e:\work\images, then why
not
> > just set $dir_name to that in the first place?  Otherwise (I believe)
> you're
> > going to have to use two separate while ($file_name=readdir($dir))
> clauses
> > (or nest them, depending on what you really want to output)
> >
> > hth
> >
> > --kurt
> > - Original Message -
> > From: "McShen" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, July 07, 2001 8:38 AM
> > Subject: [PHP] chdir() help
> >
> >
> > hi
> >
> > Currently, i am working in e:\work, and there is a folder named "image"
> > under e:\work, so, the path to image is e:\work\image.
> >
> > I have a script under e:\work, and i wanna display all images under the
> > folder e:\work\image, I use chdir() to change the directory. but it
> wouldn't
> > work. it still displays the images under e:\work. Why is that? Does
> chdir()
> > work under win2k pro? here is my script
> >
> > ---
> >  >
> >
> > $dir_name = "e:\work";
> > $dir = opendir($dir_name);
> > while ($file_name=readdir($dir)) {
> >
> >  if (($file_name!="." && $file_name!="..")) {
> >   echo $file_name."\n  ";
> >
> >   if (chdir('e:\work\image')) {
> >echo "current dir is e:\work\image";
> >   }
> >   echo "";
> >  }
> > }
> > closedir($dir);
> > ?>
> > -
> >
> > Please help me to fix the problem. Thanks.
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] chdir() help

2001-07-07 Thread McShen

by the way, what do u guys use as your news reader client?
how do u reply to my post and send me an email at the same time? Do u
manually add my email to Cc: or you just hit "reply to group"? I don't know
how to do this.

"Kurt Lieber" <[EMAIL PROTECTED]> wrote in message
0c7f01c106fc$9c32e170$[EMAIL PROTECTED]">news:0c7f01c106fc$9c32e170$[EMAIL PROTECTED]...
> Look at your code -- where do you tell it to set $file_name equal to the
> file handles within e:\work\images?  $file_name is only being set to the
> values within e:\work -- not e:\work\images.
>
> If you only need to display the images within e:\work\images, then why not
> just set $dir_name to that in the first place?  Otherwise (I believe)
you're
> going to have to use two separate while ($file_name=readdir($dir))
clauses
> (or nest them, depending on what you really want to output)
>
> hth
>
> --kurt
> - Original Message -
> From: "McShen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, July 07, 2001 8:38 AM
> Subject: [PHP] chdir() help
>
>
> hi
>
> Currently, i am working in e:\work, and there is a folder named "image"
> under e:\work, so, the path to image is e:\work\image.
>
> I have a script under e:\work, and i wanna display all images under the
> folder e:\work\image, I use chdir() to change the directory. but it
wouldn't
> work. it still displays the images under e:\work. Why is that? Does
chdir()
> work under win2k pro? here is my script
>
> ---
> 
>
> $dir_name = "e:\work";
> $dir = opendir($dir_name);
> while ($file_name=readdir($dir)) {
>
>  if (($file_name!="." && $file_name!="..")) {
>   echo $file_name."\n  ";
>
>   if (chdir('e:\work\image')) {
>echo "current dir is e:\work\image";
>   }
>   echo "";
>  }
> }
> closedir($dir);
> ?>
> -
>
> Please help me to fix the problem. Thanks.
>
>



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




Re: [PHP] chdir() help

2001-07-07 Thread McShen-CelebritieZones.com

Chris,
I do that because i wanna have control of how many images will be displayed at once. I 
understand what you are doing, but, you script will just display all images at once, 
right? I wanna display like 20 images, then have a next button,, you know what i mean?

- Original Message - 
From: "Chris Lambert - WhiteCrown Networks" <[EMAIL PROTECTED]>
Newsgroups: php.general
To: "McShen" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 11:44 AM
Subject: Re: [PHP] chdir() help


> I'm not sure I know exactly what you want, as the script isn't clear on its
> purpose. If you simply want to print out all the images in e:\work\image,
> and nothing else, the code would be much simpler.
> 
>  $dir = opendir("e:/work/image");
> while ($file_name=readdir($dir)) {
> if ($file_name <> "." && $file_name <> "..") {
> echo "";
> }
> }
> ?>
> 
> /* Chris Lambert, CTO - [EMAIL PROTECTED]
> WhiteCrown Networks - More Than White Hats
> Web Application Security - www.whitecrown.net
> */
> 
> - Original Message -
> From: McShen <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, July 07, 2001 11:38 AM
> Subject: [PHP] chdir() help
> 
> 
> hi
> 
> Currently, i am working in e:\work, and there is a folder named "image"
> under e:\work, so, the path to image is e:\work\image.
> 
> I have a script under e:\work, and i wanna display all images under the
> folder e:\work\image, I use chdir() to change the directory. but it wouldn't
> work. it still displays the images under e:\work. Why is that? Does chdir()
> work under win2k pro? here is my script
> 
> ---
>  
> 
> $dir_name = "e:\work";
> $dir = opendir($dir_name);
> while ($file_name=readdir($dir)) {
> 
>  if (($file_name!="." && $file_name!="..")) {
>   echo $file_name."\n  ";
> 
>   if (chdir('e:\work\image')) {
>echo "current dir is e:\work\image";
>   }
>   echo "";
>  }
> }
> closedir($dir);
> ?>
> -
> 
> Please help me to fix the problem. Thanks.
> 
> 



Re: [PHP] foreach loop

2001-07-07 Thread ReDucTor

We would blame Mac/Apple
- Original Message -
From: PHPBeginner.com <[EMAIL PROTECTED]>
To: John Meyer <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, July 08, 2001 3:10 AM
Subject: RE: [PHP] foreach loop


>
>
> >If we didn't have Microsoft, we'd have to blame ourselves for all of our
> >programs crashing
>
>
> I really don't think so
> :-)
>
> -maxim maletsky
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] Re: when to delete a temporary file ?

2001-07-07 Thread Arash Dejkam


"Lasse" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> "Arash Dejkam" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > I've created a site where users can upload photos and specify which
other
> > users are allowed to view them using PHP session management. now I have
> > alittle problem in the post-upload page, script creates a temporary copy
> of
> > the uploaded image with a name the same as user's session ID, and puts a
> >  in the page for the user to view the uploaded
> photo
> > and confirm it. now I don't know when to delete that temporary file !
> > because I don't know how long does the user's browser take to download
the
> > image. currently I delete it in the script coming up just after user
> clicks
> > the confirm button, but what if the user close his/her browser before
> > clicking the confirm button ? the file remains there for ever !!
> > what's your suggestion ?

>
> Don't your sessions time out BTW? That should make it possible to check
for
> any temp files whose session isn't alive anymore and delete them. Since
the
> corresponding session is dead anyway the image can be safely deleted...
>
>  Or am I missing something?
>
> --
> Lasse
>

this was the first approach I thought about, but I don't know how to check
session IDs other that current one I use session_is_registered() to check
for the current session but how can  I check for other sessions ? tell me
please :)

Thanks
Arash Dejkam




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




RE: [PHP] foreach loop

2001-07-07 Thread PHPBeginner.com



>If we didn't have Microsoft, we'd have to blame ourselves for all of our 
>programs crashing


I really don't think so 
:-)

-maxim maletsky


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




RE: [PHP] foreach loop

2001-07-07 Thread PHPBeginner.com

actually the logic is follow:

every array has a key, therefore, you use:


  foreach($variables as $key => $value) {
 $variables[$key] = strip_tags($value);
 $variables[$key] = AddSlashes($value);
  }


where you get an array element with whatever key it uses, work on it's value
and assign it back with the original key, overriding it in other words.



Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: John Meyer [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2001 2:32 AM
To: [EMAIL PROTECTED]
Subject: [PHP] foreach loop


When I go through a foreach loop, are the values of the individual items in
the array changed?
For instance:
$variables = array($author_firstname, $author_lastname, $author_dob,
$author_dod, $author_bio);
  foreach($variables as $value) {
 $value = strip_tags($value);
 $value =
AddSlashes($value);
  }
will the values be changed outside of the loop?

John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our
programs crashing


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



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




[PHP] foreach loop

2001-07-07 Thread John Meyer

When I go through a foreach loop, are the values of the individual items in 
the array changed?
For instance:
$variables = array($author_firstname, $author_lastname, $author_dob, 
$author_dod, $author_bio);
  foreach($variables as $value) {
 $value = strip_tags($value);
 $value = 
AddSlashes($value);
  }
will the values be changed outside of the loop?

John Meyer
[EMAIL PROTECTED]
Programmer


If we didn't have Microsoft, we'd have to blame ourselves for all of our 
programs crashing


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




RE: [PHP] is_alpha_numeric ?

2001-07-07 Thread John Monfort



  I missed that part...

  Thanks.

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Sun, 8 Jul 2001, PHPBeginner.com wrote:

> yes, you have to enable it:
>
>   --enable-ctype
>
> ...and, ctype is available only starting from PHP v.4.0.4+,
> ...and it is only the experimental family of functions... (this you read on
> the site, right?)
>
>
>
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
>
>
>
>
> -Original Message-
> From: John Monfort [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, July 08, 2001 12:59 AM
> To: PHPBeginner.com
> Cc: Lasse; [EMAIL PROTECTED]
> Subject: RE: [PHP] is_alpha_numeric ?
>
>
>
>
>   I tried that, but it didn't work.
>
>   if (ctype_alnum($var)) {
>echo "ok";
>}else {
>echo "no";
>}
>
>   I got an 'undefined function' error.
>   php4.0.4pl1
>
>
>   Did I miss something ?
>   -john
>
> __John Monfort_
> _+---+_
>  P E P I E  D E S I G N S
>www.pepiedesigns.com
> "The world is waiting, are you ready?"
> -+___+-
>
> On Sat, 7 Jul 2001, PHPBeginner.com wrote:
>
> > check out ctype (suggested to PHP by me, btw)
> >
> > php.net/ctype
> >
> > we have all that.
> >
> > -Maxim Maletsky
> >
> >
> >
> >
> > -Original Message-
> > From: Lasse [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, July 07, 2001 7:40 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [PHP] is_alpha_numeric ?
> >
> >
> >
> > "scott [gts]" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > you could also use this:
> > >
> > > function is_alphanum($data) {
> > >   return preg_match('/^\w+$/', $data);
> > > }
> >
> > Watch out though... IIRC \w also includes underscore...
> >
> > --
> > Lasse
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


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




RE: [PHP] is_alpha_numeric ?

2001-07-07 Thread PHPBeginner.com

yes, you have to enable it:

--enable-ctype

...and, ctype is available only starting from PHP v.4.0.4+,
...and it is only the experimental family of functions... (this you read on
the site, right?)



Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: John Monfort [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 08, 2001 12:59 AM
To: PHPBeginner.com
Cc: Lasse; [EMAIL PROTECTED]
Subject: RE: [PHP] is_alpha_numeric ?




  I tried that, but it didn't work.

  if (ctype_alnum($var)) {
   echo "ok";
   }else {
   echo "no";
   }

  I got an 'undefined function' error.
  php4.0.4pl1


  Did I miss something ?
  -john

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Sat, 7 Jul 2001, PHPBeginner.com wrote:

> check out ctype (suggested to PHP by me, btw)
>
>   php.net/ctype
>
> we have all that.
>
> -Maxim Maletsky
>
>
>
>
> -Original Message-
> From: Lasse [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 07, 2001 7:40 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] is_alpha_numeric ?
>
>
>
> "scott [gts]" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > you could also use this:
> >
> > function is_alphanum($data) {
> >   return preg_match('/^\w+$/', $data);
> > }
>
> Watch out though... IIRC \w also includes underscore...
>
> --
> Lasse
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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



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




RE: [PHP] is_alpha_numeric ?

2001-07-07 Thread John Monfort



  I tried that, but it didn't work.

  if (ctype_alnum($var)) {
   echo "ok";
   }else {
   echo "no";
   }

  I got an 'undefined function' error.
  php4.0.4pl1


  Did I miss something ?
  -john

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
"The world is waiting, are you ready?"
-+___+-

On Sat, 7 Jul 2001, PHPBeginner.com wrote:

> check out ctype (suggested to PHP by me, btw)
>
>   php.net/ctype
>
> we have all that.
>
> -Maxim Maletsky
>
>
>
>
> -Original Message-
> From: Lasse [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 07, 2001 7:40 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] is_alpha_numeric ?
>
>
>
> "scott [gts]" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > you could also use this:
> >
> > function is_alphanum($data) {
> >   return preg_match('/^\w+$/', $data);
> > }
>
> Watch out though... IIRC \w also includes underscore...
>
> --
> Lasse
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] chdir() help

2001-07-07 Thread Kurt Lieber

Look at your code -- where do you tell it to set $file_name equal to the
file handles within e:\work\images?  $file_name is only being set to the
values within e:\work -- not e:\work\images.

If you only need to display the images within e:\work\images, then why not
just set $dir_name to that in the first place?  Otherwise (I believe) you're
going to have to use two separate while ($file_name=readdir($dir))  clauses
(or nest them, depending on what you really want to output)

hth

--kurt
- Original Message -
From: "McShen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 8:38 AM
Subject: [PHP] chdir() help


hi

Currently, i am working in e:\work, and there is a folder named "image"
under e:\work, so, the path to image is e:\work\image.

I have a script under e:\work, and i wanna display all images under the
folder e:\work\image, I use chdir() to change the directory. but it wouldn't
work. it still displays the images under e:\work. Why is that? Does chdir()
work under win2k pro? here is my script

---
";
 }
}
closedir($dir);
?>
-

Please help me to fix the problem. Thanks.



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




Re: [PHP] chdir() help

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

I'm not sure I know exactly what you want, as the script isn't clear on its
purpose. If you simply want to print out all the images in e:\work\image,
and nothing else, the code would be much simpler.

 "." && $file_name <> "..") {
echo "";
}
}
?>

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: McShen <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 11:38 AM
Subject: [PHP] chdir() help


hi

Currently, i am working in e:\work, and there is a folder named "image"
under e:\work, so, the path to image is e:\work\image.

I have a script under e:\work, and i wanna display all images under the
folder e:\work\image, I use chdir() to change the directory. but it wouldn't
work. it still displays the images under e:\work. Why is that? Does chdir()
work under win2k pro? here is my script

---
";
 }
}
closedir($dir);
?>
-

Please help me to fix the problem. Thanks.



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




Re: [PHP] chdir() help

2001-07-07 Thread mike cullerton

i believe the script considers it's own directory as it's current working
directory.

try calling the files by image/$file_name

on 7/7/01 9:38 AM, McShen at [EMAIL PROTECTED] wrote:

> hi
> 
> Currently, i am working in e:\work, and there is a folder named "image" under
> e:\work, so, the path to image is e:\work\image.
> 
> I have a script under e:\work, and i wanna display all images under the folder
> e:\work\image, I use chdir() to change the directory. but it wouldn't work. it
> still displays the images under e:\work. Why is that? Does chdir() work under
> win2k pro? here is my script
> 
> ---
>  
> 
> $dir_name = "e:\work";
> $dir = opendir($dir_name);
> while ($file_name=readdir($dir)) {
> 
> if (($file_name!="." && $file_name!="..")) {
> echo $file_name."\n  ";
> 
> if (chdir('e:\work\image')) {
> echo "current dir is e:\work\image";
> }
> echo "";
> }
> }
> closedir($dir);
> ?>
> -
> 
> Please help me to fix the problem. Thanks.
> 


 -- mike cullerton



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




[PHP] chdir() help

2001-07-07 Thread McShen

hi

Currently, i am working in e:\work, and there is a folder named "image" under e:\work, 
so, the path to image is e:\work\image.

I have a script under e:\work, and i wanna display all images under the folder 
e:\work\image, I use chdir() to change the directory. but it wouldn't work. it still 
displays the images under e:\work. Why is that? Does chdir() work under win2k pro? 
here is my script

---
";
 }
}
closedir($dir);
?>
-

Please help me to fix the problem. Thanks.



Re: [PHP] How to build this SQL statement?

2001-07-07 Thread Kurt Lieber

ummm...it's not clear at all what your decisioning criteria are.  That is to
say, how did you come up with the 6 rows in your result set?  Are they
chosen randomly or is there some rhyme/reason to how you chose them?  (and
if it's the latter -- what is your rhyme/reasoning?)

- Original Message -
From: "ckieninger" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 4:47 AM
Subject: [PHP] How to build this SQL statement?


> Hello,
>
> i've to build a SQL Statement from a table with the following resultset
>
> table with rows
>
> id subid roleid rolebundle name
> 50 0 0 50.0.0 header1
> 50 1 0 50.1.0 subheader1
> 50 2 0 50.2.0 subheader2
> 50 3 0 50.3.0 subheader3
> 50 3 1 50.3.1 subheader3.1
> 50 3 2 50.3.2 subheader3.2
> 50 4 0 50.4.0 subheader4
> 50 4 1 50.4.1 subheader4.1
> 50 4 2 50.4.2 subheader4.2
>
> 9 rows
>
> SQL statement ???
>
> Resultset
>
> id subid roleid rolebundle name
>
> 50 1 0 50.1.0 subheader1
> 50 2 0 50.2.0 subheader2
>
> 50 3 1 50.3.1 subheader3.1
> 50 3 2 50.3.2 subheader3.2
>
> 50 4 1 50.4.1 subheader4.1
> 50 4 2 50.4.2 subheader4.2
>
> 6 Rows
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




RE: [PHP] how do i remove the first 3 characters from a variable?

2001-07-07 Thread PHPBeginner.com

oops


foreach($array as $key=>$val) {
$array[$key] = substr($val, 3);
}


this is cleaner.


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: PHPBeginner.com [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 07, 2001 10:56 PM
To: Chris Lambert - WhiteCrown Networks; Doron
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] how do i remove the first 3 characters from a
variable?




I think your question was answered already by Chris,
if not (or if you think two examples are better then one) then:



$array[0] = 'how do i remove the first 3 characters from a variable?';
$array[1] = 'when do i remove the first 3 characters from a variable?';
$array[2] = 'why do i remove the first 3 characters from a variable?';


foreach($array as $key=>$val) {
$array[$key] = substr($array[$key], 3);
}

this will produce:

$array[0] = ' do i remove the first 3 characters from a variable?';
$array[1] = 'n do i remove the first 3 characters from a variable?';
$array[2] = ' do i remove the first 3 characters from a variable?';




Cheers,


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 07, 2001 6:18 PM
To: Doron
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] how do i remove the first 3 characters from a
variable?


To loop:
unset($temp);
$vars = array("this", "that");
foreach ($vars as $var) {
$temp[] = substr($var, 0, 3);
}
$vars = $temp;

Single array element:
$vars = array("this", "that");
$vars[1] = substr($vars[1], 0, 3);

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Doron <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 6:18 AM
Subject: Re: [PHP] how do i remove the first 3 characters from a variable?


| and how do i do that?
|
|
| Maxim Maletsky <[EMAIL PROTECTED]> wrote in message
| news:DC017B079D81D411998C009027B7112A015ED367@EXC-TYO-01...
| > If you loop one then Yes.
| >
| >
| > Sincerely,
| >
| >  Maxim Maletsky
| >  Founder, Chief Developer
| >  PHPBeginner.com (Where PHP Begins)
| >  [EMAIL PROTECTED]
| >  www.phpbeginner.com
| >
| >
| >
| > -Original Message-
| > From: Doron [mailto:[EMAIL PROTECTED]]
| > Sent: Saturday, July 07, 2001 7:06 PM
| > To: [EMAIL PROTECTED]
| > Subject: Re: [PHP] how do i remove the first 3 characters from a
| > variable?
| >
| >
| > does it work on arrays too??
| >
| >
| > Maxim Maletsky <[EMAIL PROTECTED]> wrote in message
| > news:DC017B079D81D411998C009027B7112A015ED364@EXC-TYO-01...
| > >
| > >
| > > php.net/substr
| > >
| > >
| > > $var = "how do i remove the first 3 characters from a variable";
| > > $substract = substr($var, 3);
| > > // returns ' do i remove the first 3 characters from a variable'
| > >
| > >
| > >
| > > Sincerely,
| > >
| > >  Maxim Maletsky
| > >  Founder, Chief Developer
| > >  PHPBeginner.com (Where PHP Begins)
| > >  [EMAIL PROTECTED]
| > >  www.phpbeginner.com
| > >
| > >
| > >
| > >
| > > -Original Message-
| > > From: Doron [mailto:[EMAIL PROTECTED]]
| > > Sent: Saturday, July 07, 2001 5:37 PM
| > > To: [EMAIL PROTECTED]
| > > Subject: [PHP] how do i remove the first 3 characters from a variable?
| > >
| > >
| > > 10x
| > >
| > >
| > >
| > > --
| > > PHP General Mailing List (http://www.php.net/)
| > > To unsubscribe, e-mail: [EMAIL PROTECTED]
| > > For additional commands, e-mail: [EMAIL PROTECTED]
| > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
| >
| >
| >
| > --
| > PHP General Mailing List (http://www.php.net/)
| > To unsubscribe, e-mail: [EMAIL PROTECTED]
| > For additional commands, e-mail: [EMAIL PROTECTED]
| > To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|


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



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



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




RE: [PHP] how do i remove the first 3 characters from a variable?

2001-07-07 Thread PHPBeginner.com



I think your question was answered already by Chris,
if not (or if you think two examples are better then one) then:



$array[0] = 'how do i remove the first 3 characters from a variable?';
$array[1] = 'when do i remove the first 3 characters from a variable?';
$array[2] = 'why do i remove the first 3 characters from a variable?';


foreach($array as $key=>$val) {
$array[$key] = substr($array[$key], 3);
}

this will produce:

$array[0] = ' do i remove the first 3 characters from a variable?';
$array[1] = 'n do i remove the first 3 characters from a variable?';
$array[2] = ' do i remove the first 3 characters from a variable?';




Cheers,


Sincerely,

 Maxim Maletsky
 Founder, Chief Developer

 PHPBeginner.com (Where PHP Begins)
 [EMAIL PROTECTED]
 www.phpbeginner.com




-Original Message-
From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 07, 2001 6:18 PM
To: Doron
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] how do i remove the first 3 characters from a
variable?


To loop:
unset($temp);
$vars = array("this", "that");
foreach ($vars as $var) {
$temp[] = substr($var, 0, 3);
}
$vars = $temp;

Single array element:
$vars = array("this", "that");
$vars[1] = substr($vars[1], 0, 3);

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Doron <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 6:18 AM
Subject: Re: [PHP] how do i remove the first 3 characters from a variable?


| and how do i do that?
|
|
| Maxim Maletsky <[EMAIL PROTECTED]> wrote in message
| news:DC017B079D81D411998C009027B7112A015ED367@EXC-TYO-01...
| > If you loop one then Yes.
| >
| >
| > Sincerely,
| >
| >  Maxim Maletsky
| >  Founder, Chief Developer
| >  PHPBeginner.com (Where PHP Begins)
| >  [EMAIL PROTECTED]
| >  www.phpbeginner.com
| >
| >
| >
| > -Original Message-
| > From: Doron [mailto:[EMAIL PROTECTED]]
| > Sent: Saturday, July 07, 2001 7:06 PM
| > To: [EMAIL PROTECTED]
| > Subject: Re: [PHP] how do i remove the first 3 characters from a
| > variable?
| >
| >
| > does it work on arrays too??
| >
| >
| > Maxim Maletsky <[EMAIL PROTECTED]> wrote in message
| > news:DC017B079D81D411998C009027B7112A015ED364@EXC-TYO-01...
| > >
| > >
| > > php.net/substr
| > >
| > >
| > > $var = "how do i remove the first 3 characters from a variable";
| > > $substract = substr($var, 3);
| > > // returns ' do i remove the first 3 characters from a variable'
| > >
| > >
| > >
| > > Sincerely,
| > >
| > >  Maxim Maletsky
| > >  Founder, Chief Developer
| > >  PHPBeginner.com (Where PHP Begins)
| > >  [EMAIL PROTECTED]
| > >  www.phpbeginner.com
| > >
| > >
| > >
| > >
| > > -Original Message-
| > > From: Doron [mailto:[EMAIL PROTECTED]]
| > > Sent: Saturday, July 07, 2001 5:37 PM
| > > To: [EMAIL PROTECTED]
| > > Subject: [PHP] how do i remove the first 3 characters from a variable?
| > >
| > >
| > > 10x
| > >
| > >
| > >
| > > --
| > > PHP General Mailing List (http://www.php.net/)
| > > To unsubscribe, e-mail: [EMAIL PROTECTED]
| > > For additional commands, e-mail: [EMAIL PROTECTED]
| > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
| >
| >
| >
| > --
| > PHP General Mailing List (http://www.php.net/)
| > To unsubscribe, e-mail: [EMAIL PROTECTED]
| > For additional commands, e-mail: [EMAIL PROTECTED]
| > To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|


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



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




[PHP] Re (2): [PHP] PHP 4.0.6 and Apache 1.3.6 ?

2001-07-07 Thread Micha Ober

I'm using the Win32 version of apache 1.3.6 !
in httpd.conf i added the following:

   LoadModule php4_module c:/php/sapi/php4apache.dll

   AddType application/x-httpd-php .php
   AddType application/x-httpd-php .php3
   AddType application/x-httpd-php .php4
   AddType application/x-httpd-php .phtml
   AddType application/x-httpd-php-source .phps

--- nelo manuel <[EMAIL PROTECTED]> wrote:
> hi Micha,
> 
> are you using the apache version 1.3.6-7? or just
> 1.3.6, can you tell me if you can see your
> php4 load and add module in
> etc/httpd/conf/httpd.conf?
> 
> is that am having problems with this my php4.0.6
> does not work
> only when i change my php ext to php3 or php but not
> php4!!!
> 
> pls advise
> 
> 
> >From: Micha Ober <[EMAIL PROTECTED]>
> >To: php <[EMAIL PROTECTED]>
> >Subject: [PHP] PHP 4.0.6 and Apache 1.3.6 ?
> >Date: Fri, 6 Jul 2001 00:15:02 -0700 (PDT)
> >
> >I've installed Apache 1.3.6 and PHP 4.0.6 and it
> >works. But if I load an extension in the php.ini
> >Apache says "abnormal program termination".
> >
> >=
> >Linux...
> >Because it works.
> >
> >__
> >Do You Yahoo!?
> >Get personalized email addresses from Yahoo! Mail
> >http://personal.mail.yahoo.com/
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> >For additional commands, e-mail:
> [EMAIL PROTECTED]
> >To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> >
> 
>
_
> Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com.
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


=
Linux...
Because it works.

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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




Re: [PHP] Very urgent!!!

2001-07-07 Thread Henrik Hansen

Duy B <[EMAIL PROTECTED]> wrote:

 > 1.  (*) text/plain  
 > 
 > Dear all,
 > Is there anybody know how to upload a file gif or jpg from a form into Oracle 
 >database?
 > I am very keen to solve that problem. Please show me soon.

insert the image data into a BLOB field, using normal sql syntax.

-- 
Henrik Hansen


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




Re: [PHP] How to apply something to every variable

2001-07-07 Thread teo

Hi Chris!
On Fri, 06 Jul 2001, Chris Anderson wrote:

> I was playing around trying to find a way to addslashes() to all my
> variables, and I came up with this snippet. Hope it helps someone
> 
why don't you turn on magic_quotes_gpc then?

>  $keys = array_keys($HTTP_POST_VARS);
>  $post_size = sizeof($keys);
>  for($x = 0; $x < $post_size; $x++)
>  {
>   $temp = $keys[$x];
> //you can replace addslashes with whatever you want to use
>   ${"$temp"} = addslashes($HTTP_POST_VARS["$temp"]);
>  }
-- teodor

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




[PHP] How to build this SQL statement?

2001-07-07 Thread ckieninger

Hello,

i've to build a SQL Statement from a table with the following resultset

table with rows

id  subid   roleid  rolebundle  name
50  0   0   50.0.0  header1
50  1   0   50.1.0  subheader1
50  2   0   50.2.0  subheader2
50  3   0   50.3.0  subheader3
50  3   1   50.3.1  subheader3.1
50  3   2   50.3.2  subheader3.2
50  4   0   50.4.0  subheader4
50  4   1   50.4.1  subheader4.1
50  4   2   50.4.2  subheader4.2

9 rows

SQL statement ???

Resultset

id  subid   roleid  rolebundle  name

50  1   0   50.1.0  subheader1
50  2   0   50.2.0  subheader2

50  3   1   50.3.1  subheader3.1
50  3   2   50.3.2  subheader3.2

50  4   1   50.4.1  subheader4.1
50  4   2   50.4.2  subheader4.2

6 Rows

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




Re: [PHP] robot.txt file

2001-07-07 Thread rm

Everything you need to know about robots.txt files but
were afraid to ask 

http://www.robotstxt.org/wc/robots.html

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

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




Re: [PHP] how do i remove the first 3 characters from a variable?

2001-07-07 Thread Doron

does it work on arrays too??


Maxim Maletsky <[EMAIL PROTECTED]> wrote in message
news:DC017B079D81D411998C009027B7112A015ED364@EXC-TYO-01...
>
>
> php.net/substr
>
>
> $var = "how do i remove the first 3 characters from a variable";
> $substract = substr($var, 3);
> // returns ' do i remove the first 3 characters from a variable'
>
>
>
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
>
>
>
>
> -Original Message-
> From: Doron [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 07, 2001 5:37 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] how do i remove the first 3 characters from a variable?
>
>
> 10x
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



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




Re: [PHP] how do i remove the first 3 characters from a variable?

2001-07-07 Thread Chris Lambert - WhiteCrown Networks

To loop:
unset($temp);
$vars = array("this", "that");
foreach ($vars as $var) {
$temp[] = substr($var, 0, 3);
}
$vars = $temp;

Single array element:
$vars = array("this", "that");
$vars[1] = substr($vars[1], 0, 3);

/* Chris Lambert, CTO - [EMAIL PROTECTED]
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/

- Original Message -
From: Doron <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 6:18 AM
Subject: Re: [PHP] how do i remove the first 3 characters from a variable?


| and how do i do that?
|
|
| Maxim Maletsky <[EMAIL PROTECTED]> wrote in message
| news:DC017B079D81D411998C009027B7112A015ED367@EXC-TYO-01...
| > If you loop one then Yes.
| >
| >
| > Sincerely,
| >
| >  Maxim Maletsky
| >  Founder, Chief Developer
| >  PHPBeginner.com (Where PHP Begins)
| >  [EMAIL PROTECTED]
| >  www.phpbeginner.com
| >
| >
| >
| > -Original Message-
| > From: Doron [mailto:[EMAIL PROTECTED]]
| > Sent: Saturday, July 07, 2001 7:06 PM
| > To: [EMAIL PROTECTED]
| > Subject: Re: [PHP] how do i remove the first 3 characters from a
| > variable?
| >
| >
| > does it work on arrays too??
| >
| >
| > Maxim Maletsky <[EMAIL PROTECTED]> wrote in message
| > news:DC017B079D81D411998C009027B7112A015ED364@EXC-TYO-01...
| > >
| > >
| > > php.net/substr
| > >
| > >
| > > $var = "how do i remove the first 3 characters from a variable";
| > > $substract = substr($var, 3);
| > > // returns ' do i remove the first 3 characters from a variable'
| > >
| > >
| > >
| > > Sincerely,
| > >
| > >  Maxim Maletsky
| > >  Founder, Chief Developer
| > >  PHPBeginner.com (Where PHP Begins)
| > >  [EMAIL PROTECTED]
| > >  www.phpbeginner.com
| > >
| > >
| > >
| > >
| > > -Original Message-
| > > From: Doron [mailto:[EMAIL PROTECTED]]
| > > Sent: Saturday, July 07, 2001 5:37 PM
| > > To: [EMAIL PROTECTED]
| > > Subject: [PHP] how do i remove the first 3 characters from a variable?
| > >
| > >
| > > 10x
| > >
| > >
| > >
| > > --
| > > PHP General Mailing List (http://www.php.net/)
| > > To unsubscribe, e-mail: [EMAIL PROTECTED]
| > > For additional commands, e-mail: [EMAIL PROTECTED]
| > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
| >
| >
| >
| > --
| > PHP General Mailing List (http://www.php.net/)
| > To unsubscribe, e-mail: [EMAIL PROTECTED]
| > For additional commands, e-mail: [EMAIL PROTECTED]
| > To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
|
|
|


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




Re: [PHP] how do i remove the first 3 characters from a variable?

2001-07-07 Thread Doron

and how do i do that?


Maxim Maletsky <[EMAIL PROTECTED]> wrote in message
news:DC017B079D81D411998C009027B7112A015ED367@EXC-TYO-01...
> If you loop one then Yes.
>
>
> Sincerely,
>
>  Maxim Maletsky
>  Founder, Chief Developer
>  PHPBeginner.com (Where PHP Begins)
>  [EMAIL PROTECTED]
>  www.phpbeginner.com
>
>
>
> -Original Message-
> From: Doron [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 07, 2001 7:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] how do i remove the first 3 characters from a
> variable?
>
>
> does it work on arrays too??
>
>
> Maxim Maletsky <[EMAIL PROTECTED]> wrote in message
> news:DC017B079D81D411998C009027B7112A015ED364@EXC-TYO-01...
> >
> >
> > php.net/substr
> >
> >
> > $var = "how do i remove the first 3 characters from a variable";
> > $substract = substr($var, 3);
> > // returns ' do i remove the first 3 characters from a variable'
> >
> >
> >
> > Sincerely,
> >
> >  Maxim Maletsky
> >  Founder, Chief Developer
> >  PHPBeginner.com (Where PHP Begins)
> >  [EMAIL PROTECTED]
> >  www.phpbeginner.com
> >
> >
> >
> >
> > -Original Message-
> > From: Doron [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, July 07, 2001 5:37 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] how do i remove the first 3 characters from a variable?
> >
> >
> > 10x
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



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




RE: [PHP] how do i remove the first 3 characters from a variable

2001-07-07 Thread Don Read


On 07-Jul-01 Doron wrote:
> 10x
> 

12x > 10x; I win.

Normally the question is presented in the message text.
  (yure not from 'round here, areya ?)

.
-- 
Don Read   [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

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




Re: [PHP] robot.txt file

2001-07-07 Thread Tom Carter

Hi Don,

How do you work this out? ie how do you know when you are spidered? I'm
interested in what logs and what patterns lead you to know this?

Thanks,

Tom

>
> On 07-Jul-01 Mark Lo wrote:
> > Hi,
> >
> >I don't know how to write a robot.txt file.  Can anyone send me a
> > link or a sample file.
> >
>
> that's 'robots.txt'
>
> User-Agent: *
> Disallow: /images/
> Disallow: /icons/
> Disallow: /cgi-bin/
> Disallow: /php/
> Disallow: /tmp/
> Disallow: /corp/login.html
> Disallow: /cust/login.html
>
>  ---
> But don't expect it to do anything for you, it's just a 'suggestion' to
> well-behaved spiders.
>
> My observation:
>  50% of them check & obey the file, 45% don't even check, & some 5% check
>  then try the 'prohibited' URLs
>
> Regards,
> --
> Don Read   [EMAIL PROTECTED]
> -- It's always darkest before the dawn. So if you are going to
>steal the neighbor's newspaper, that's the time to do it.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




[PHP] can I fopen an https url?

2001-07-07 Thread Jeff Orrok

and assuming I can, will this dump the resulting page to the browser?

$fp = fopen( $buildURI, "r" );
fpassthru( $fp );
fclose( $fp );

--
:-J
--

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




[PHP] how do i remove the first 3 characters from a variable?

2001-07-07 Thread Doron

10x



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




[PHP] never mind. i have already solved my problam.. 10x anyway.

2001-07-07 Thread Doron


ReDucTor <[EMAIL PROTECTED]> wrote in message
00a001c106b4$07dd2d20$0200a8c0@ReDucTor">news:00a001c106b4$07dd2d20$0200a8c0@ReDucTor...
> huh, explain a little more???
> - Original Message -
> From: Doron <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, July 07, 2001 6:09 PM
> Subject: [PHP] file function. please help..
>
>
> > hello.
> > how can i make the file function to put the first 9 lines, in values
> > 01, 02, 03, 04, 05, 06, 07, 08, 09
> > instead of
> > 1, 2, 3, 4, 5, 6, 7, 8, 9?
> >
> >
> > 10x...
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>



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




  1   2   >