Re: [PHP] hotmail, yahoo..why can't me?

2001-07-05 Thread another programmer

I'm being quick, so pseudo code:
on message display page:







what happens is on sending, deleteList will be a list of all selected checkbox's 
values.

on action page: (I'd also check deleteList isonly numeric characters and numbers, use 
a Regular Expression to
cleanse the variable)
 0>




- Original Message -
From: "Dhaval Desai" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 5:04 PM
Subject: [PHP] hotmail, yahoo..why can't me?


Hi!

I wanna do something like in ur mailboxes. if u check
ur hotemail or yahoo a/c u can find checkboxes on the
left side of each message. U can check the boxes and
delete the messages..

I want to delete certain rows that come out of a
database. So if I have 20 records coming out of the
databases i want a checkbox on the left of each
message so that I can delete some of them if i want.


Is there a way.. i don't seem to get the logic to do
this..

Please help me out...


Thank You
Dhaval Desai

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



-- 
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] Parse URL parameters

2001-07-05 Thread ReDucTor

$vars = array();
$url2 = explode("?", $url);
$url3 = explode("&", $url2[1]);
for($i=0;$i
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 5:19 PM
Subject: [PHP] Parse URL parameters


> How can I parse parameters sent with the URL of an pgp site?
> 
> Example: I call the site with
> http://www.server.xyz/sub/site.php?a1=123&a2=312
> How can I get the values of a1 and a2?
> 
> Thanks, folks!
> Andy.
> 
> 
> 
> -- 
> 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] Batch job in UNIX.

2001-07-05 Thread Johan Vikerskog (ECS)

If i want to add something into a table with just the mysql command.
Is this possible.

Like
./mysql -p -u root test "insert into..."

Something like this.Is that possible and how in that case.

Johan Vikerskog
Technician - CAE Tools Support
Research & Technology Development
'''
Ericsson Mobile Communications AB
Mobile Phones & Terminals   Telephone: +46 46 19 33 38
Nya VattentornetTelefax:+46 46 19 32 36 
SE-221 83 Lund, Sweden  


-- 
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] Parse URL parameters

2001-07-05 Thread Adrian Ciutureanu

a2 = '$a2'"?>

:)

> -Original Message-
> From: Andy [mailto:[EMAIL PROTECTED]]
> Sent: 5 iulie 2001 10:20
> To: [EMAIL PROTECTED]
> Subject: [PHP] Parse URL parameters
> 
> 
> How can I parse parameters sent with the URL of an pgp site?
> 
> Example: I call the site with
> http://www.server.xyz/sub/site.php?a1=123&a2=312
> How can I get the values of a1 and a2?
> 
> Thanks, folks!
> Andy.
> 
> 
> 
> -- 
> 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] Parse URL parameters

2001-07-05 Thread Matthew Loff


Those are automatically assigned to $a1 and $a2.


-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 05, 2001 3:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Parse URL parameters


How can I parse parameters sent with the URL of an pgp site?

Example: I call the site with
http://www.server.xyz/sub/site.php?a1=123&a2=312
How can I get the values of a1 and a2?

Thanks, folks!
Andy.



-- 
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] Security of PHP code

2001-07-05 Thread Adrian Ciutureanu

http://php.net/realpath

$allowed_path = '/www/sites/mysite/teaching';
$file = realpath($file);
if(ereg("^$allowed_path", $file)) {
// it's OK
} else {
// possible attack!
}

> -Original Message-
> From: Steve Werby [mailto:[EMAIL PROTECTED]]
> Sent: 5 iulie 2001 02:22
> To: Sascha Schumann
> Cc: Jon Haworth; 'Hankley, Chip'; PHP Mailingliste
> Subject: Re: [PHP] Security of PHP code
> 
> 
> "Sascha Schumann" <[EMAIL PROTECTED]> wrote:
> > On Wed, 4 Jul 2001, Steve Werby wrote:
> >
> > > "Jon Haworth" <[EMAIL PROTECTED]> wrote:
> > > > Yes, I would have thought this would do it:
> > > >
> > > > if (strstr($file, "/usr/local/apache/htdocs/") {
> > > > show_source($file);
> > [..]
> > > Something along those lines will work.  Without some kind 
> of limitations
> > > built in, the page will be able to load any file that's 
> world-readable
> so
> > > it's a good idea to limit access to certain directories 
> or hardcode the
> > > directory you want to give access to.
> >
> > Imagine someone passing in
> > /usr/local/apache/htdocs/../../../../etc/passwd as path..
> 
> Excellent point.  In addition to hardcoding the path I would 
> do something to
> ensure that the file requested does not attempt to bypass 
> that directory.
> I'd probably use a regex to make sure it doesn't include a 
> "/" or if I want
> to serve files from a deeper directory I'd do a regex or use 
> something like
> strstr() to see if ".." is within the filename.  Personally, 
> I wouldn't make
> a script that outputed a file on the server or a script's 
> code *and* allowed
> the user to dictate what file was accessed.
> 
> --
> Steve Werby
> President, Befriend Internet Services LLC
> http://www.befriend.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] Security of PHP code

2001-07-05 Thread Matt Williams

 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> The only foolproof method for restricting access is to strip
> forward  slashes.  In the above example, I can change the file to:
> /www/sites/mysite/teaching/../../../../etc/passwd
> And it will be allowed
> If you were to do this, however:
> $allowed_path = "/www/sites/mysite/teaching";
> $file = ereg_replace("/","",$file);
> show_source($allowed_path."/".$file);
> That would block any attempt to trick the server into going into
> another  directory.

You could also check for/ remove any instances of ..

M@

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 7.0.3 for non-commercial use 

iQA/AwUBO0QmZ6W0/zC+QxWwEQJwEgCgkvHAwNgR+tHvlyWgfefw5tipb24AoPXn
QNZ72t51rOmh7dts2zZd0S3p
=q64c
-END PGP SIGNATURE-


-- 
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] raw POST data

2001-07-05 Thread Thies C. Arntzen

On Thu, Jul 05, 2001 at 09:14:36AM +0200, Xavier Paz wrote:
> Hi,
> 
> Is there any way to get the raw POST data sent by the client? I mean the
> full data, before parsing into PHP variables.

no - you would have to hack it up
hint: serch for _RAW_ in /functions/post.c
tc

> 
> I am using PHP 3.0.16 with Apache.

that's an ddd version;-)


> 
> Regards,
> Xavier
> 
> 
> -- 
> 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] Suggest Table Structure

2001-07-05 Thread kachaloo

Hi guys,
I am making a table which will store articles for a site
and the feilds are :

ID int(6) NOT NULL auto_increment,
CATEORY varchar(10) NOT NULL DEFAULT 'EVENTS' ,
HEADING varchar(30) NOT NULL DEFAULT '' ,
BODY longblob ,
PICTURE longblob ,
KEYWORD varchar(30) NOT NULL DEFAULT '' ,
FILENAME varchar(50) ,
FILESIZE varchar(50) ,
FILETYPE varchar(50) ,
PRIMARY KEY (ID),
UNIQUE ID (ID)


But now I noticed some of the articles will have more than one
picture... so how do I structure my talbe ?

Thanks in advance,
Vishal

-- 
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] verifying that a dropdown was selected

2001-07-05 Thread Richard Kurth


 I have a dropdown box that is for selecting the month How can I  be
 verified that the customer has selected one of the months. I am using
 verification like this but it does not do what I want for a dropdown
 box it works fine for regular fields

if ($month == "") {

$month_err = "
Please enter the Month of expiration!
";
$send = "no";





 
01
02
03
04
05











Best regards,
 Richard  
mailto:[EMAIL PROTECTED]


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




RE: [PHP] verifying that a dropdown was selected

2001-07-05 Thread Don Read


On 05-Jul-01 Richard Kurth wrote:
> 
>  I have a dropdown box that is for selecting the month How can I  be
>  verified that the customer has selected one of the months. I am using
>  verification like this but it does not do what I want for a dropdown
>  box it works fine for regular fields
> 
> if ($month == "") {
> 
> $month_err = "
> Please enter the Month of expiration!
> ";
> $send = "no";
> 
> 
> 
> 
> 
>  
> 01
> 02
> 03
> 04
> 05
> 
> 
> 

  look at your .

  if ( (isset($month)) && ($month +0 > 0) ) {
   ... 

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] verifying that a dropdown was selected

2001-07-05 Thread Tom Gitzinger

Hello Richard,

I'm not quite sure but I think the problem is the following:
  - If no month has been specified, the variable $month is not defined.
  - If you then mention $month in
   if ($month == "") 
the Parser creates the variable. Its value is unpredictable, but it is
most unlikely that
it is an empty string ("").

To solve the problem, you should be able to check whether the variable
$month exists. I'm sorry I can't help you here because I've only started
programming PHP but reading the function reference or something might help you.

Good luck
 Tom

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

GMX Tipp:

Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1!
http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a


-- 
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] verifying that a dropdown was selected

2001-07-05 Thread Alexander Deruwe

On Thu, Jul 05, 2001 at 12:05:28PM +0200, Tom Gitzinger wrote:
> Hello Richard,
> 
> I'm not quite sure but I think the problem is the following:
>   - If no month has been specified, the variable $month is not defined.
>   - If you then mention $month in
>if ($month == "") 
> the Parser creates the variable. Its value is unpredictable, but it is
> most unlikely that
> it is an empty string ("").
> 
> To solve the problem, you should be able to check whether the variable
> $month exists. I'm sorry I can't help you here because I've only started
> programming PHP but reading the function reference or something might help you.

You could check if it has been set by doing:

if (isset($month))
or even
if ($month)

(I'm not 100% sure about the last one, though..)

ad

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

2001-07-05 Thread Johan Vikerskog (ECS)

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?

Do i use mysqlacccess?

//johan

-- 
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] verifying that a dropdown was selected

2001-07-05 Thread Dave Mariner

ermshouldnt that be 

if($month == "00" ) {


?

Dave


- Original Message - 
From: "Richard Kurth" <[EMAIL PROTECTED]>
To: "php" <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 12:35 PM
Subject: [PHP] verifying that a dropdown was selected


> 
>  I have a dropdown box that is for selecting the month How can I  be
>  verified that the customer has selected one of the months. I am using
>  verification like this but it does not do what I want for a dropdown
>  box it works fine for regular fields
> 
> if ($month == "") {
> 
> $month_err = "
> Please enter the Month of expiration!
> ";

> $send = "no";
> 
> 
> 
> 
> 
>  
> 01
> 02
> 03
> 04
> 05
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Best regards,
>  Richard  
> mailto:[EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
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] Batch job in UNIX.

2001-07-05 Thread Alexander Wagner

Johan Vikerskog (ECS) wrote:
> If i want to add something into a table with just the mysql command.
> Is this possible.
>
> Like
> ./mysql -p -u root test "insert into..."
>
> Something like this.Is that possible and how in that case.

echo "insert into..." | ./mysql -p -u root test
or
cat filename | ...

regards
Wagner

-- 
"Isn't it strange? The same people who laugh at gypsy fortune tellers take 
economists seriously."
 - Cincinnati Enquirer   

-- 
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] verifying that a dropdown was selected

2001-07-05 Thread Adrian Ciutureanu


Select month
January
. . .


. . .

if(!$month) {
// please select month
} else {
// month selected
}

> -Original Message-
> From: Richard Kurth [mailto:[EMAIL PROTECTED]]
> Sent: 5 iulie 2001 12:36
> To: php
> Subject: [PHP] verifying that a dropdown was selected
> 
> 
> 
>  I have a dropdown box that is for selecting the month How can I  be
>  verified that the customer has selected one of the months. I am using
>  verification like this but it does not do what I want for a dropdown
>  box it works fine for regular fields
> 
> if ($month == "") {
> 
> $month_err = "
> Please enter the Month of 
> expiration!
> ";
> $send = "no";
> 
> 
> 
> 
> 
>  
> 01
> 02
> 03
> 04
> 05
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Best regards,
>  Richard  
> mailto:[EMAIL PROTECTED]
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 
> 

--
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 binary ??

2001-07-05 Thread Marc van Duivenvoorde


I've got a small question, can I make php system scripts just like perl 
when I have compiled php as a dso module for apache or do I have to 
compile it to an binary executable ??

something like #! /usr/bin/perl -w with a script except then for php.

Marc van Duivenvoorde

-- 
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 binary ??

2001-07-05 Thread Justin Farnsworth

Just an observation..

It is already "installed" in RedHat 7x and is found
in /usr/bin/php.  If you are running Linux, you can
probably easily get the RPM.

_jef



Marc van Duivenvoorde wrote:
> 
> I've got a small question, can I make php system scripts just like perl
> when I have compiled php as a dso module for apache or do I have to
> compile it to an binary executable ??
> 
> something like #! /usr/bin/perl -w with a script except then for php.
> 
> Marc van Duivenvoorde
> 
> --
> 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]




[PHP] optimal code

2001-07-05 Thread Adrian Ciutureanu

Is any of the versions below more effective?

/** Version 1 **/


/** Version 2 **/


/** Version 3 **/


--
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] Batch job in UNIX.

2001-07-05 Thread Johan Vikerskog (ECS)

But i want dont want to type in the password. I want to have the password in the 
command file.

//Johan

-Original Message-
From: Alexander Wagner [mailto:[EMAIL PROTECTED]]
Sent: den 5 juli 2001 12:57
To: Johan Vikerskog (ECS); [EMAIL PROTECTED]
Subject: Re: [PHP] Batch job in UNIX.


Johan Vikerskog (ECS) wrote:
> If i want to add something into a table with just the mysql command.
> Is this possible.
>
> Like
> ./mysql -p -u root test "insert into..."
>
> Something like this.Is that possible and how in that case.

echo "insert into..." | ./mysql -p -u root test
or
cat filename | ...

regards
Wagner

-- 
"Isn't it strange? The same people who laugh at gypsy fortune tellers take 
economists seriously."
 - Cincinnati Enquirer   

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

2001-07-05 Thread Thies C. Arntzen

On Thu, Jul 05, 2001 at 02:29:12PM +0300, Adrian Ciutureanu wrote:
> Is any of the versions below more effective?
> 
> /** Version 1 **/
>  if($condition) {
> // some big code
> } else {
> // other big code
> }
> ?>
> 
> /** Version 2 **/
>  if($condition) {
> include 'file_with_some _big_code.php';
> } else {
> include 'file_with_other_big_code.php';
> }
> ?>
> 
> /** Version 3 **/
>  if($condition) {
> require 'file_with_some _big_code.php';
> } else {
> require 'file_with_other_big_code.php';
> }
> ?>

i'd bet no #2. but to be sure benchmark it.

tc

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

2001-07-05 Thread Justin Farnsworth

This depends upon what you mean by "effective".  For administration
purposes, it may be that you want to include some "commen" code,
and therefore not rewrite reusable bits.

If you are talking about speed, opening a file is expensive
because it is a kernel call, a directory search and all that.
Your "some big code" in-line will beat it every time...

If you require, and the thingy has been already loaded, then
you will have to analyze how many times you use it, and
try to determine tradeoffs.  This is difficult.

My take is, unless you are getting 100,000 hits a day and
your server load is 0.99, do what is best for reusability,
clarity, and administration purposes.

_jef

--
Adrian Ciutureanu wrote:
> 
> Is any of the versions below more effective?
> 
> /** Version 1 **/
>  if($condition) {
> // some big code
> } else {
> // other big code
> }
> ?>
> 
> /** Version 2 **/
>  if($condition) {
> include 'file_with_some _big_code.php';
> } else {
> include 'file_with_other_big_code.php';
> }
> ?>
> 
> /** Version 3 **/
>  if($condition) {
> require 'file_with_some _big_code.php';
> } else {
> require 'file_with_other_big_code.php';
> }
> ?>
> 
> --
> 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] Batch job in UNIX.

2001-07-05 Thread Alexander Wagner

Johan Vikerskog (ECS) wrote:
> But i want dont want to type in the password. I want to have the
> password in the command file.

"--password=whatever_it_is" instead of "-p" ?

If that doesn't help, try ./mysql --help

regards
Wagner

-- 
Madness takes its toll. Please have exact change.

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




RE: [PHP] optimal code

2001-07-05 Thread Richard Heyes

> If you are talking about speed, opening a file is expensive
> because it is a kernel call, a directory search and all that.
> Your "some big code" in-line will beat it every time...

Not in my experience. I have a file which defines ~40 functions, with
the bodies
included when the function is called. Eg:

function blah(){

return include('includes/func.blah.inc');
}

Having all the function bodies in the same file would cause php to have
to parse all
of that code, probably about 3-4000 lines causing awful slowdowns. And
the reason to define all of
the functions in one file, is so that we can include that file, and all
the functions are then available.

-- 
Richard Heyes

--
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] Batch job in UNIX.

2001-07-05 Thread Gunther E. Biernat

>But i want dont want to type in the password. I want to have
>the password in the command file.

>>echo "insert into..." | ./mysql -p -u root test
>>or
>>cat filename | ...

Perfectly right. And a "mysql --help" would have told you that you can call it 
(combined with the above) like this:

echo "insert into..." | mysql -uroot -pwhitehat test

or if you just don't want to type the mysql command parameters all the time, make 
yourself a shell script:

#!/bin/bash
mysql -uroot -pwhitehat test

name it e.g. mymysql, make it executable and call

echo "insert into..." | mymysql

Have I missed the problem?


mit freundlichen Gruessen / yours sincerely


Gunther E. Biernat
Web Application Engineer
__

RealNetworks GmbH   Tel.: +49-40-415204-24
Weidestraße 128 Fax.: +49-40-415204-11
22083 Hamburg   Mail: [EMAIL PROTECTED]
Germany URL : http://de.real.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] optimal code

2001-07-05 Thread Nick Davies



surely the include function only "pastes" the contents of the included
file into the point where the include statement occours. Php still has to
parse it all.

On Thu, 5 Jul 2001, Richard Heyes wrote:

> > If you are talking about speed, opening a file is expensive
> > because it is a kernel call, a directory search and all that.
> > Your "some big code" in-line will beat it every time...
> 
> Not in my experience. I have a file which defines ~40 functions, with
> the bodies
> included when the function is called. Eg:
> 
> function blah(){
> 
>   return include('includes/func.blah.inc');
> }
> 
> Having all the function bodies in the same file would cause php to have
> to parse all
> of that code, probably about 3-4000 lines causing awful slowdowns. And
> the reason to define all of
> the functions in one file, is so that we can include that file, and all
> the functions are then available.
> 
> 


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

2001-07-05 Thread Justin Farnsworth

But, my friend, if you include that file, PHP _still_ has
to parse it.  You just didn't benchmark.  No matter what



will beat



because of the addition of the call to the kernel.  You
cannot get around this.


Richard Heyes wrote:
> 
> > If you are talking about speed, opening a file is expensive
> > because it is a kernel call, a directory search and all that.
> > Your "some big code" in-line will beat it every time...
> 
> Not in my experience. I have a file which defines ~40 functions, with
> the bodies
> included when the function is called. Eg:
> 
> function blah(){
> 
> return include('includes/func.blah.inc');
> }
> 
> Having all the function bodies in the same file would cause php to have
> to parse all
> of that code, probably about 3-4000 lines causing awful slowdowns. And
> the reason to define all of
> the functions in one file, is so that we can include that file, and all
> the functions are then available.
> 
> --
> Richard Heyes

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




[PHP] multiple domains using one cookie

2001-07-05 Thread Tobias Talltorp

Hello all.

I want multiple domains to be able to read from one cookie, or set one
cookie each for the different domains.

Here is the case:
When the user logs in to my server, I want to set a cookie that has the
value $name="tobias". He specifies which domains that can read this cookie,
something like $domains="domain1.com;domain2.com;domain6.com".
Then these sites can read the $name and print it.

The other way might be to set one cookie with the value $name="tobias" for
domain1.com, one for domain2.com and one for domain6.com.
But the cookie _has_ to come from domain1.com, otherwise it will only work
for mydomain.com, right?
In other words, I can´t set, edit or read a cookie for an other site?

How would I go about doing this?

Regards,
// Tobias



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

2001-07-05 Thread Justin Farnsworth

Nick Davies wrote:
> 
> surely the include function only "pastes" the contents of the included
> file into the point where the include statement occours. Php still has to
> parse it all.
---

Right, and so no matter what, you still have the extra cost
of the file operation, something almost a magnitude slower that
PHP running through it...

--
> On Thu, 5 Jul 2001, Richard Heyes wrote:
> 
> > > If you are talking about speed, opening a file is expensive
> > > because it is a kernel call, a directory search and all that.
> > > Your "some big code" in-line will beat it every time...
> >
> > Not in my experience. I have a file which defines ~40 functions, with
> > the bodies
> > included when the function is called. Eg:
> >
> > function blah(){
> >
> >   return include('includes/func.blah.inc');
> > }
> >
> > Having all the function bodies in the same file would cause php to have
> > to parse all
> > of that code, probably about 3-4000 lines causing awful slowdowns. And
> > the reason to define all of
> > the functions in one file, is so that we can include that file, and all
> > the functions are then available.
> >
> >
> 
> --
> 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] optimal code

2001-07-05 Thread Richard Heyes

> But, my friend, if you include that file, PHP _still_ has
> to parse it.  You just didn't benchmark.  No matter what

Actually, I did do benchmarks, you simply didn't understand correctly.
Not all of the functions are used on every page. So if I were to include
all the functions in one file, roughly 30 functions worth of code would
need to be unnecessarily parsed, which obviously causes unecessary
slowdown. This is similar to the original version 2:

/** Version 2 **/


This code will run one set of code. Having the other set of "big_code"
parsed is pointless. FWIW, it's this cutting out of parsing code that
makes the Zend Cache produce such high speed increases.
-- 
Richard Heyes

--
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] Socket Madness !!!!

2001-07-05 Thread Steve Brett

Hi,

I need to set up a sockets connection to a server that was written in
Delphi.

Using the following code I can connect to the socket and send a message
through it but don't get a reply back ...

{
echo "Socket opened ok ... sending message";
$message=sprintf("Steve%c Hello world",255);
fputs($socket,$message);
echo fgets($socket, 255);
fclose($socket);
}

the socket is opened using fsockopen() and the message get there but i only
get the reply when the remote socket server is closed ...

can anyone help ?

thanks in advance
Steve Brett 
Internal Development
tel: 3263 
EMIS Ltd. 
"Privileged and /or Confidential information may be contained in this
message. If you are not the original addressee indicated in this message (or
responsible for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, please delete this message,
and notify us immediately. Opinions, conclusions and other information
expressed in this message are not given or endorsed by my firm or employer
unless otherwise indicated by an authorised representative independently of
this message."
Egton Medical Information Systems Limited. Registered in England. No
2117205. 
Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth,
Leeds, LS18 4RF



-- 
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] Socket Madness !!!!

2001-07-05 Thread Steve Brett

fixed it now by adding ascii(10) to reply from server BUT what if i use
fgetc ?

does anyone know the ascii value for EOF ?

cheers,

Steve

> -Original Message-
> From: Steve Brett [mailto:[EMAIL PROTECTED]]
> Sent: 05 July 2001 12:58
> To: Php-General (E-mail)
> Subject: [PHP] Socket Madness 
> 
> 
> Hi,
> 
> I need to set up a sockets connection to a server that was written in
> Delphi.
> 
> Using the following code I can connect to the socket and send 
> a message
> through it but don't get a reply back ...
> 
>   {
>   echo "Socket opened ok ... sending message";
>   $message=sprintf("Steve%c Hello world",255);
>   fputs($socket,$message);
>   echo fgets($socket, 255);
>   fclose($socket);
>   }
> 
> the socket is opened using fsockopen() and the message get 
> there but i only
> get the reply when the remote socket server is closed ...
> 
> can anyone help ?
> 
> thanks in advance
> Steve Brett 
> Internal Development
> tel: 3263 
> EMIS Ltd. 
> "Privileged and /or Confidential information may be contained in this
> message. If you are not the original addressee indicated in 
> this message (or
> responsible for delivery of the message to such person), you 
> may not copy or
> deliver this message to anyone. In such case, please delete 
> this message,
> and notify us immediately. Opinions, conclusions and other information
> expressed in this message are not given or endorsed by my 
> firm or employer
> unless otherwise indicated by an authorised representative 
> independently of
> this message."
> Egton Medical Information Systems Limited. Registered in England. No
> 2117205. 
> Registered Office: Park House Mews, 77 Back Lane, Off 
> Broadway, Horsforth,
> Leeds, LS18 4RF
> 
> 
> 
> -- 
> 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] ng working? - ignore

2001-07-05 Thread maatt

Just trying to see...

--
Matt



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




[PHP] PHP Books

2001-07-05 Thread Bernie Kruger

Hi,

I know this may be a previously discussed topic, but I want to be sure I get
the right books.  I need a good book on intermediate PHP programming.  I am
looking to buy PHP 4 Bible, but is that the best I can get?

I looked through the list on the PHP website, but it does not rate the books
so I don't know which is best to start off with.  Untill now I have used the
manual, but I need more everyday examples.

Tx
Bernie



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

2001-07-05 Thread Roger Ramirez

On Thu, 5 Jul 2001, Bernie Kruger wrote:

> Hi,
> 
> I know this may be a previously discussed topic, but I want to be sure I get
> the right books.  I need a good book on intermediate PHP programming.  I am
> looking to buy PHP 4 Bible, but is that the best I can get?
> 
> I looked through the list on the PHP website, but it does not rate the books
> so I don't know which is best to start off with.  Untill now I have used the
> manual, but I need more everyday examples.

I like Professional PHP Programming from WROX press.  I've never read
through the PHP4 Bible but I usually hear good things about the bible
series books.





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

2001-07-05 Thread kmurrah

I second the recommendation of the WROX Professional PHP Programming book.

If database work is anywhere in your future, though, try "PHP and MySQL Web
Development" by Luke Welling and Laura Thomson.  It is an EXCELLENT
reference on both PHP and MySQL, and although I own several PHP books, I
find myself referring to that book for almost everything.  (I think one of
the authors, Luke Welling, is on this list, but I'm not sure.)


Kenn Murrah
Baker GRFX
214-630-1700

-Original Message-
From: Roger Ramirez [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 9:01 AM
To: Bernie Kruger
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Books


On Thu, 5 Jul 2001, Bernie Kruger wrote:

> Hi,
>
> I know this may be a previously discussed topic, but I want to be sure I
get
> the right books.  I need a good book on intermediate PHP programming.  I
am
> looking to buy PHP 4 Bible, but is that the best I can get?
>
> I looked through the list on the PHP website, but it does not rate the
books
> so I don't know which is best to start off with.  Untill now I have used
the
> manual, but I need more everyday examples.

I like Professional PHP Programming from WROX press.  I've never read
through the PHP4 Bible but I usually hear good things about the bible
series books.





--
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] problem with php3 and safe mode

2001-07-05 Thread Denis Chapligin

Hi

I have apache compiled with next configuration:

Server: Apache/1.3.19 (Unix) PHP/4.0.5 PHP/3.0.18 mod_perl/1.25 mod_ssl/2.8.3 
OpenSSL/0.9.6a rus/PL30.4

It runs on SunOS censo.red.cityline.ru 5.7 Generic_106541-12 sun4u sparc 
SUNW,UltraSPARC-IIi-cEngine

Where php4 compiles as dso and php3 is builtin to server.  All works fine except for 
safe mode in php3. When any script, thet interpreted by php3 tries to read file from 
filesystem i got next message(not only for this script): 
===
Warning: SAFE MODE Restriction in effect. The script whose uid is 1 is not allo:by uid 
65533 in /opt/apache/clients/www.kcl.ru/news.php3 on line 26
===

But uid of this script is 65533 (gid is 65534) and uid of apache process is 39! From 
where comes uid==1???

btw, on current apache installation (Server: Apache/1.3.14 (Unix) PHP/4.0.4pl1 
PHP/3.0.18 rus/PL30.0)  this script just fine...
-- 
Denis Chapligin
Sorry for my English :) 

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

2001-07-05 Thread Jeff Lewis

I strongly suggest this book.  I bought it about a month or two ago and
learned PHP with it.  it is an EXCELLENT book.

Jeff
www.hyrum.net
www.xnull.com

> If database work is anywhere in your future, though, try "PHP and MySQL
Web
> Development" by Luke Welling and Laura Thomson.  It is an EXCELLENT
> reference on both PHP and MySQL,


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

2001-07-05 Thread Nick Davies

On Thu, 5 Jul 2001, Roger Ramirez wrote:

> On Thu, 5 Jul 2001, Bernie Kruger wrote:
> 
> > Hi,
> > 
> > I know this may be a previously discussed topic, but I want to be sure I get
> > the right books.  I need a good book on intermediate PHP programming.  I am
> > looking to buy PHP 4 Bible, but is that the best I can get?
> > 
> > I looked through the list on the PHP website, but it does not rate the books
> > so I don't know which is best to start off with.  Untill now I have used the
> > manual, but I need more everyday examples.
> 
> I like Professional PHP Programming from WROX press.  I've never read
> through the PHP4 Bible but I usually hear good things about the bible
> series books.

I have both of these i have to say that the php bible tends to explain
things a bit better and in more detail (mostly) than pro php but pro php
has more examples/full applications and stuff.

> 
> 
> 
> 
> 
> 


-- 
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] Socket Madness !!!!

2001-07-05 Thread Justin Farnsworth

Steve Brett wrote:
> 
> fixed it now by adding ascii(10) to reply from server BUT what if i use
> fgetc ?
> 
> does anyone know the ascii value for EOF ?
> 
> cheers,
> 
> Steve

I think it is four (CTRL-D), viz:

| 00 nul| 01 soh| 02 stx| 03 etx| 04 eot| 05 enq| 06 ack| 07 bel|
| 08 bs | 09 ht | 0a nl | 0b vt | 0c np | 0d cr | 0e so | 0f si |
| 10 dle| 11 dc1| 12 dc2| 13 dc3| 14 dc4| 15 nak| 16 syn| 17 etb|
| 18 can| 19 em | 1a sub| 1b esc| 1c fs | 1d gs | 1e rs | 1f us |
| 20 sp | 21  ! | 22  " | 23  # | 24  $ | 25  % | 26  & | 27  ' |
| 28  ( | 29  ) | 2a  * | 2b  + | 2c  , | 2d  - | 2e  . | 2f  / |
| 30  0 | 31  1 | 32  2 | 33  3 | 34  4 | 35  5 | 36  6 | 37  7 |
| 38  8 | 39  9 | 3a  : | 3b  ; | 3c  < | 3d  = | 3e  > | 3f  ? |
| 40  @ | 41  A | 42  B | 43  C | 44  D | 45  E | 46  F | 47  G |
| 48  H | 49  I | 4a  J | 4b  K | 4c  L | 4d  M | 4e  N | 4f  O |
| 50  P | 51  Q | 52  R | 53  S | 54  T | 55  U | 56  V | 57  W |
| 58  X | 59  Y | 5a  Z | 5b  [ | 5c  \ | 5d  ] | 5e  ^ | 5f  _ |
| 60  ` | 61  a | 62  b | 63  c | 64  d | 65  e | 66  f | 67  g |
| 68  h | 69  i | 6a  j | 6b  k | 6c  l | 6d  m | 6e  n | 6f  o |
| 70  p | 71  q | 72  r | 73  s | 74  t | 75  u | 76  v | 77  w |
| 78  x | 79  y | 7a  z | 7b  { | 7c  | | 7d  } | 7e  ~ | 7f del|

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




[PHP] doing a search for domains

2001-07-05 Thread Romulo Roberto Pereira

Hello,

I am curious about creating a script that would bring me results of a search
organized not by the actual name of the domain but the lenght of each part
of a domain.

This is an example:

Domains that finish in .com/.net/.org with the lenght of one character:

a.com
a.net
a.org
b.com
b.net
b.org
c.com
..
aa.com
aa.net
aa.org
..
aaa.com
..

I was thinking that I would need the following:

[a] a crowler for search for the domains and hosts;
[b] a routine that would check and "clean" the actual captured domains;
[c] a routine to present the captured and organized domains by size;

Any ideas how should I start? Anyone wants to help?

Thank you in advance,

Rom


-- 
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] Suggest Table Structure

2001-07-05 Thread Mauricio T?llez Jim?nez

Hi, you have to break your table in pieces and create tables for items that occur more 
than once. For example:

CREATE TABLE articles (
ID int(6) NOT NULL auto_increment,
id_category UNSIGNED INT REFERENCES category,
HEADING varchar(30) NOT NULL DEFAULT '' ,
BODY longblob ,
...)

CREATE TABLE pictures (
ID int(6) NOT NULL auto_increment,
PICTURE longblob ,
id_article UNSIGNED INT REFERENCES articles)

CREATE TABLE category (
ID int(6) NOT NULL auto_increment,
category varchar(30))

So, if you want to list all the pictures of the article 'Linux Rules!' you have to 
write a query like:

SELECT heading, picture FROM articles, pictures WHERE pictures.id_article = 
articles.id AND heading='Linux Rules!'
PS: A create the table category to illustrate how to put things in order with some 
normal forms.

On Thu, Jul 05, 2001 at 02:31:55PM +0530, kachaloo wrote:
> Hi guys,
> I am making a table which will store articles for a site
> and the feilds are :
> 
> ID int(6) NOT NULL auto_increment,
> CATEORY varchar(10) NOT NULL DEFAULT 'EVENTS' ,
> HEADING varchar(30) NOT NULL DEFAULT '' ,
> BODY longblob ,
> PICTURE longblob ,
> KEYWORD varchar(30) NOT NULL DEFAULT '' ,
> FILENAME varchar(50) ,
> FILESIZE varchar(50) ,
> FILETYPE varchar(50) ,
> PRIMARY KEY (ID),
> UNIQUE ID (ID)
> 
> 
> But now I noticed some of the articles will have more than one
> picture... so how do I structure my talbe ?
> 
> Thanks in advance,
> Vishal
> 
> -- 
> 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] session troubles

2001-07-05 Thread Brad Wright

Hi all,
Im new to this mailing list so im not sure what to expect from 'y'all' but
i'm hoping this will be the beginning of a long and beautiful friendship.

My question:

i have a series of PHP4 pages that if I start a session (session_start()) on
the first page (adminLogin.php), all is fine and dandy...all the
session_resources get passed to the next page (login2.php) and i can get
acccess to those session resources. Te problem is, at the top of the page a
warning message is displayed:

Warning: Cannot send session cache limiter - headers already sent (output
started at /home/e-smith/files/ibays/test/html/login2.php:1) in
/home/e-smith/files/ibays/test/html/login2.php on line 1


What does this mean?? If i comment out the "session_start()" line,  i dodnt
get this message BUT i also dont get the session variuables i need.

Hope Im making some sense, Hope someone can help.

Thanks,
Brad


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

2001-07-05 Thread Steve Brett

your session_start() has to be the first thing in the page. no blank lines
etc.

like

right at the top of your page. a blank line will send header info ...

Steve

> -Original Message-
> From: Brad Wright [mailto:[EMAIL PROTECTED]]
> Sent: 05 July 2001 16:21
> To: [EMAIL PROTECTED]
> Subject: [PHP] session troubles
> 
> 
> Hi all,
> Im new to this mailing list so im not sure what to expect 
> from 'y'all' but
> i'm hoping this will be the beginning of a long and beautiful 
> friendship.
> 
> My question:
> 
> i have a series of PHP4 pages that if I start a session 
> (session_start()) on
> the first page (adminLogin.php), all is fine and dandy...all the
> session_resources get passed to the next page (login2.php) 
> and i can get
> acccess to those session resources. Te problem is, at the top 
> of the page a
> warning message is displayed:
> 
> Warning: Cannot send session cache limiter - headers already 
> sent (output
> started at /home/e-smith/files/ibays/test/html/login2.php:1) in
> /home/e-smith/files/ibays/test/html/login2.php on line 1
> 
> 
> What does this mean?? If i comment out the "session_start()" 
> line,  i dodnt
> get this message BUT i also dont get the session variuables i need.
> 
> Hope Im making some sense, Hope someone can help.
> 
> Thanks,
> Brad
> 
> 
> -- 
> 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] session troubles

2001-07-05 Thread Justin Farnsworth

You must have some white space going out somewhere before your
code/HTML "starts", that you are unaware of.  If you can't find
it, you can always buffer up your output with ob_start() and
put it out later...

---

Brad Wright wrote:
> 
> Hi all,
> Im new to this mailing list so im not sure what to expect from 'y'all' but
> i'm hoping this will be the beginning of a long and beautiful friendship.
> 
> My question:
> 
> i have a series of PHP4 pages that if I start a session (session_start()) on
> the first page (adminLogin.php), all is fine and dandy...all the
> session_resources get passed to the next page (login2.php) and i can get
> acccess to those session resources. Te problem is, at the top of the page a
> warning message is displayed:
> 
> Warning: Cannot send session cache limiter - headers already sent (output
> started at /home/e-smith/files/ibays/test/html/login2.php:1) in
> /home/e-smith/files/ibays/test/html/login2.php on line 1
> 
> What does this mean?? If i comment out the "session_start()" line,  i dodnt
> get this message BUT i also dont get the session variuables i need.
> 
> Hope Im making some sense, Hope someone can help.
> 
> Thanks,
> Brad
> 
> --
> 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]




[PHP] File download script

2001-07-05 Thread Tom Carter

Hi all,

I have a script getfile.php which when I call like getfile.php?fileid=12 and
it returns the file to the browser with the appropiate mime headers etc..

however a problem has recently come where when I have a link to this from a
page then it prompts me to download the page I'm calling from. if I then
click open it then prompts me correctly.. any body got any idea? It never
used to do this so something has changed

TIA
Tom


-- 
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] Executing after certain time

2001-07-05 Thread Oliver Hotz

Hey guys, I have a php script that generates files, and a www page that
links to them.

Is there a way to delete those files, based on a time variable ?..

lets say 1 minute after they have been generated, they get deleted ?

(this is on redhat linux, and the latest build of php/apache 1.3)

Thanks,

Oliver


-- 
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] Writting to files.?

2001-07-05 Thread James Bartlett

Hi,

Anyone know how I can write and read to different lines in a file rather than just 
adding to the text already on the first line of the file?

Thanks

Zotud



Re: [PHP] Executing after certain time

2001-07-05 Thread Marty Landman

At 08:41 am 7/5/01 -0700, Oliver Hotz wrote:
>Hey guys, I have a php script that generates files, and a www page that
>links to them.
>
>Is there a way to delete those files, based on a time variable ?..

Why not have cron kick off a script every minute that checks all candidate 
files and deletes the ones that need it. You can either embed the delete 
criteria within the file name or alternatively have the program which 
creates the candidate files post entries to a control file which the cron 
pgm reads.

What about updating the links on the webpage though? You'll have to handle 
this too unless the page is written by a program which generates links on 
the fly based on candidate file availability. Like generating the links 
from a read of the candidate file directory.

Of course you'll want a very appealing 404 handler (see .htaccess for 
those) because the webpage could be invoked by a visitor to the site 
displaying links that are clobbered some seconds/minutes later by the cron 
job. Then the visitor clicks and it ain't there. :(

Maybe there's a better way to accomplish what you're after??

hth,

Marty

Face 2 Interface Web Solutions
Website Creation Made SIMPL(tm)
Online Demo Available
http://face2interface.com/Home/Demo.shtml


-- 
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] Security of PHP code

2001-07-05 Thread Christopher Ostmo

Adrian Ciutureanu pressed the little lettered thingies in this order...

> $allowed_path = '/www/sites/mysite/teaching';
> $file = realpath($file);
> if(ereg("^$allowed_path", $file)) {
>  // it's OK
> } else {
>  // possible attack!
> }
> 

This is not good code.

A user could replace the $file in the URL with this:
/www/sites/mysite/teaching/../../../../etc/passwd
Since it starts with $allowed_path, your code has just been fooled.

The basic problem that I have seen with posts to this thread is the fact 
that many people do not understand how Unix servers address and/or 
secure files. If what I have written above doesn't make any sense, 
please go and pick up a book that covers Unix/Linux security. If you 
don't, you are inviting a security breach.  You may or may not be aware 
of this, but many hackers know Unix, it's security and it's common 
vulnerabilities VERY well and they WILL exploit your code if it is 
exploitable.

Simply checking to see if a particular path exists in the URL will 
NEVER secure this issue.

Here's the script that I use:









I explicitly declare the path and I delete all forward slashes. This means 
that if someone tries to send:
$f=calendar/../../../.../../../../etc/passwd
They instead send:
$f=calendar...etcpasswd
And the server interprets this as:
./calendar/calendar...etcpasswd

The bottom line is that no files outside of the intended directory will ever 
be viewable through this script, regardless of how clever, smart or 
devious the user might be.

I could have gotten a little more fancy and given warnings if there were 
forward slashes, but the point is this: If you are allowing real file names 
to be passed as the parameter, you HAVE to do one of two things:
1) Strip or otherwise block forward slashes and/or consecutive periods.
2) Declare the file path before the show_source() call and disallow 
consecutive periods (".."), forward slashes or both.  This is the method 
used at slashdot.

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Innovative Application Ideas
Meeting cutting edge dynamic
web site needs since the 
dawn of Internet time (1995)

For a good time,
http://www.AppIdeas.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] Security of PHP code

2001-07-05 Thread Adrian Ciutureanu

This is a good code. Read http://php.net/realpath

> -Original Message-
> From: Christopher Ostmo [mailto:[EMAIL PROTECTED]]
> Sent: 5 iulie 2001 19:57
> To: Adrian Ciutureanu
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Security of PHP code 
> 
> 
> Adrian Ciutureanu pressed the little lettered thingies in 
> this order...
> 
> > $allowed_path = '/www/sites/mysite/teaching';
> > $file = realpath($file);
> > if(ereg("^$allowed_path", $file)) {
> >  // it's OK
> > } else {
> >  // possible attack!
> > }
> > 
> 
> This is not good code.
> 
> A user could replace the $file in the URL with this:
> /www/sites/mysite/teaching/../../../../etc/passwd
> Since it starts with $allowed_path, your code has just been fooled.
> 
> The basic problem that I have seen with posts to this thread 
> is the fact 
> that many people do not understand how Unix servers address and/or 
> secure files. If what I have written above doesn't make any sense, 
> please go and pick up a book that covers Unix/Linux security. If you 
> don't, you are inviting a security breach.  You may or may 
> not be aware 
> of this, but many hackers know Unix, it's security and it's common 
> vulnerabilities VERY well and they WILL exploit your code if it is 
> exploitable.
> 
> Simply checking to see if a particular path exists in the URL will 
> NEVER secure this issue.
> 
> Here's the script that I use:
> 
>  require("common.php");
> $f = ereg_replace("/","",$f);
> commonHeader("$f Source Code");
> ?>
> 
> 
>  show_source("./calendar/$f");
> ?>
> 
> 
>  commonFooter();
> ?>
> 
> I explicitly declare the path and I delete all forward 
> slashes. This means 
> that if someone tries to send:
> $f=calendar/../../../.../../../../etc/passwd
> They instead send:
> $f=calendar...etcpasswd
> And the server interprets this as:
> ./calendar/calendar...etcpasswd
> 
> The bottom line is that no files outside of the intended 
> directory will ever 
> be viewable through this script, regardless of how clever, smart or 
> devious the user might be.
> 
> I could have gotten a little more fancy and given warnings if 
> there were 
> forward slashes, but the point is this: If you are allowing 
> real file names 
> to be passed as the parameter, you HAVE to do one of two things:
> 1) Strip or otherwise block forward slashes and/or 
> consecutive periods.
> 2) Declare the file path before the show_source() call and disallow 
> consecutive periods (".."), forward slashes or both.  This is 
> the method 
> used at slashdot.
> 
> Christopher Ostmo
> a.k.a. [EMAIL PROTECTED]
> AppIdeas.com
> Innovative Application Ideas
> Meeting cutting edge dynamic
> web site needs since the 
> dawn of Internet time (1995)
> 
> For a good time,
> http://www.AppIdeas.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] Security of PHP code

2001-07-05 Thread Adrian Ciutureanu

An observation: I presume (in my code) that $allowed_path is a "root" of
an allowed path. So, files in subfolders of allowed_path are also
allowed.

> -Original Message-
> From: Christopher Ostmo [mailto:[EMAIL PROTECTED]]
> Sent: 5 iulie 2001 19:57
> To: Adrian Ciutureanu
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] Security of PHP code 
> 
> 
> Adrian Ciutureanu pressed the little lettered thingies in 
> this order...
> 
> > $allowed_path = '/www/sites/mysite/teaching';
> > $file = realpath($file);
> > if(ereg("^$allowed_path", $file)) {
> >  // it's OK
> > } else {
> >  // possible attack!
> > }
> > 
> 
> This is not good code.
> 
> A user could replace the $file in the URL with this:
> /www/sites/mysite/teaching/../../../../etc/passwd
> Since it starts with $allowed_path, your code has just been fooled.
> 
> The basic problem that I have seen with posts to this thread 
> is the fact 
> that many people do not understand how Unix servers address and/or 
> secure files. If what I have written above doesn't make any sense, 
> please go and pick up a book that covers Unix/Linux security. If you 
> don't, you are inviting a security breach.  You may or may 
> not be aware 
> of this, but many hackers know Unix, it's security and it's common 
> vulnerabilities VERY well and they WILL exploit your code if it is 
> exploitable.
> 
> Simply checking to see if a particular path exists in the URL will 
> NEVER secure this issue.
> 
> Here's the script that I use:
> 
>  require("common.php");
> $f = ereg_replace("/","",$f);
> commonHeader("$f Source Code");
> ?>
> 
> 
>  show_source("./calendar/$f");
> ?>
> 
> 
>  commonFooter();
> ?>
> 
> I explicitly declare the path and I delete all forward 
> slashes. This means 
> that if someone tries to send:
> $f=calendar/../../../.../../../../etc/passwd
> They instead send:
> $f=calendar...etcpasswd
> And the server interprets this as:
> ./calendar/calendar...etcpasswd
> 
> The bottom line is that no files outside of the intended 
> directory will ever 
> be viewable through this script, regardless of how clever, smart or 
> devious the user might be.
> 
> I could have gotten a little more fancy and given warnings if 
> there were 
> forward slashes, but the point is this: If you are allowing 
> real file names 
> to be passed as the parameter, you HAVE to do one of two things:
> 1) Strip or otherwise block forward slashes and/or 
> consecutive periods.
> 2) Declare the file path before the show_source() call and disallow 
> consecutive periods (".."), forward slashes or both.  This is 
> the method 
> used at slashdot.
> 
> Christopher Ostmo
> a.k.a. [EMAIL PROTECTED]
> AppIdeas.com
> Innovative Application Ideas
> Meeting cutting edge dynamic
> web site needs since the 
> dawn of Internet time (1995)
> 
> For a good time,
> http://www.AppIdeas.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] FEDEx API's

2001-07-05 Thread Daniel Guerrier

The FED Es api suite says tat windows is a
requirement.

Has anyone intergrated this into a sight using PHP on linux.

__
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] Security of PHP code

2001-07-05 Thread Christopher Ostmo

Adrian Ciutureanu pressed the little lettered thingies in this order...

> This is a good code. Read http://php.net/realpath
> 

You are correct. I was unaware of the addition of the realpath() function 
to PHP. According to the description of realpath(), using it should close 
this hole also.

> > -Original Message-
> > From: Christopher Ostmo [mailto:[EMAIL PROTECTED]]
> > Sent: 5 iulie 2001 19:57
> > To: Adrian Ciutureanu
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: [PHP] Security of PHP code 
> > 
> > 
> > Adrian Ciutureanu pressed the little lettered thingies in 
> > this order...
> > 
> > > $allowed_path = '/www/sites/mysite/teaching';
> > > $file = realpath($file);
> > > if(ereg("^$allowed_path", $file)) {
> > >  // it's OK
> > > } else {
> > >  // possible attack!
> > > }
> > > 
> > 
> > This is not good code.
> > 
> > A user could replace the $file in the URL with this:
> > /www/sites/mysite/teaching/../../../../etc/passwd
> > Since it starts with $allowed_path, your code has just been fooled.
> > 
> > The basic problem that I have seen with posts to this thread 
> > is the fact 
> > that many people do not understand how Unix servers address and/or 
> > secure files. If what I have written above doesn't make any sense, 
> > please go and pick up a book that covers Unix/Linux security. If you
> > don't, you are inviting a security breach.  You may or may not be aware
> > of this, but many hackers know Unix, it's security and it's common
> > vulnerabilities VERY well and they WILL exploit your code if it is
> > exploitable.
> > 
> > Simply checking to see if a particular path exists in the URL will 
> > NEVER secure this issue.
> > 
> > Here's the script that I use:
> > 
> >  > require("common.php");
> > $f = ereg_replace("/","",$f);
> > commonHeader("$f Source Code");
> > ?>
> > 
> >  > commonFooter(); ?>
> > 
> > I explicitly declare the path and I delete all forward 
> > slashes. This means 
> > that if someone tries to send:
> > $f=calendar/../../../.../../../../etc/passwd
> > They instead send:
> > $f=calendar...etcpasswd
> > And the server interprets this as:
> > ./calendar/calendar...etcpasswd
> > 
> > The bottom line is that no files outside of the intended 
> > directory will ever 
> > be viewable through this script, regardless of how clever, smart or
> > devious the user might be.
> > 
> > I could have gotten a little more fancy and given warnings if 
> > there were 
> > forward slashes, but the point is this: If you are allowing 
> > real file names 
> > to be passed as the parameter, you HAVE to do one of two things:
> > 1) Strip or otherwise block forward slashes and/or 
> > consecutive periods.
> > 2) Declare the file path before the show_source() call and disallow
> > consecutive periods (".."), forward slashes or both.  This is the method
> > used at slashdot.
> > 

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Innovative Application Ideas
Meeting cutting edge dynamic
web site needs since the 
dawn of Internet time (1995)

Business Applications:
http://www.AppIdeas.com/

Open Source Applications:
http://open.AppIdeas.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] PHP Books

2001-07-05 Thread Rudolf Visagie

Hallo Bernie,

Ek het begin met 'Teach yourself PHP in 24 hours' en to later 'PHP
Developer's Cookbook' aangeskaf van Sterling Hughes. Eg. help met die
basiese en lg. het meer gevorderde 'resepte' in. Dit het goeie resensies
gekry en ek geniet dit.

Groetnis

Rudolf Visagie
[EMAIL PROTECTED]

-Original Message-
From: Bernie Kruger [mailto:[EMAIL PROTECTED]]
Sent: 05 July 2001 03:59
To: [EMAIL PROTECTED]
Subject: [PHP] PHP Books


Hi,

I know this may be a previously discussed topic, but I want to be sure I get
the right books.  I need a good book on intermediate PHP programming.  I am
looking to buy PHP 4 Bible, but is that the best I can get?

I looked through the list on the PHP website, but it does not rate the books
so I don't know which is best to start off with.  Untill now I have used the
manual, but I need more everyday examples.

Tx
Bernie



-- 
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] PHP Run Command Line

2001-07-05 Thread Matt Simpson

I need to let PHP run a command as SU... is there any way it can be done? I
need it to let Courier compile it's makeuserdb and makemaildir. Any help
would be great.

--
Matt Simpson
Design Coordinator
[EMAIL PROTECTED]
Online Creator Inc

780 Midpark Dr. Suites 105 & 107
Phone: 613.389.8618
Fax: 613.389.7491
Toll Free: 1.877.768.9327

This transmission is intended only for the correct addressee(s).  It may
contain privileged or confidential information.  Any unauthorized
disclosure, copying or retransmission is strictly prohibited.  If you have
received this transmission in error, please so confirm by sending us a
return email copy immediately, then delete the original message.
  Thank you.



-- 
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-05 Thread php

> >
> >I look forward to your earliest reply through my email
> >address or by my
> >Tel:874-762-727947,
> >fax:874-762-727949.
> >
> >yours truly
> >
> >SOLOMON BALOGUN.
> >

this supposed banker is using a phone number that if dialed from 
anywhere in the world, can charge your phone bill $24,000.  Yes 
twenty four thousand dollars.

this is a scam to get you to dial the number, then you contest the 
bill, then they opt out of putting it on your credit report for $500 or 
something similiar.

Its an extortion ripoff from the carribean.

[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] Batch job in UNIX.

2001-07-05 Thread Don Read


On 05-Jul-01 Johan Vikerskog (ECS) wrote:
> If i want to add something into a table with just the mysql command.
> Is this possible.
> 
> Like
> ./mysql -p -u root test "insert into..."


mysql -e "cmd"
mysql -B "cmd"
mysql < somescript.sql
cat many*.sql | mysql 
 -- also look at --
mysql --help

-- 
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] Using PHP + GD to make bar graphs?

2001-07-05 Thread Aaron Bennett

I've had good success in creating SVG (Scalable Vector Graphic) documents
for producing bar/line/pie graphs... The format uses an XML document for its
structure, so producing data from a database connection is very easy and
produces nice results.. More information at:
http://www.w3.org/Graphics/SVG/Overview.htm8

It does require a download of a viewer to embed documents into the
webpage... available from adobe... There is also a SDK for converting SVG
documents to a raster image (PNG, Gif, Jpeg) called Batik, I believe.

I found this to be a little easier than gd, plus a lot more exchangable (due
to its XML nature). Hope this proves to be helpful!

--
Aaron Bennett
[EMAIL PROTECTED]

- Original Message -
From: "Gonyou, Austin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 03, 2001 1:13 PM
Subject: [PHP] Using PHP + GD to make bar graphs?


> I'm looking to see if it's possible to do something like this. Has anyone
> seen anything like this at all? Thanks for the time.
> --
> Austin Gonyou
> Systems Architect, CCNA
> Coremetrics, Inc.
> Phone: 512-796-9023
> email: [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] Batch job in UNIX.

2001-07-05 Thread Don Read


On 05-Jul-01 Johan Vikerskog (ECS) wrote:
> But i want dont want to type in the password. I want to have the password in
> the command file.

No, you don't.
Put your user name & password in ~/.my.cnf
 (as explained in the fine manual).

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

2001-07-05 Thread Shrout, Ryan

I know this really isn't a correct list, but I know most of you have
experience in getting hosting, etc and you have been very helpful in my PHP
troubles, so maybe you can help me here, too!  :)

Anyway, my site is currently colocated at a small ISP, that charges as
follows:

$265 - 2U rackspace + 8 GB traffic
+$8 each GB over 8

I just got my invoice for June, totaled at $947.  That's 77 GB over my
alloted 8 GB.  The site is growing and is very popular, so I am not
questioning the bandwidth number, but I am asking about the bandwidth rate.

Is $8/GB too much?  Last I checked most hosting providers charge by how much
continuous bandwidth I use, for instance 512 kbps, 768 kbps, 1.5 mbps, etc.
What kind of numbers can you all give me for comparison?  I want to see if I
am getting ripped off

Ryan Shrout
http://www.amdmb.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] Bandwidth?

2001-07-05 Thread Chadwick, Russell


Most colocations charge by sustained bandwidth throughout the month, not in
transfers per month so it may be difficult to get a comparison.  I am paying
485$/month which gets me 6U (2 servers) and a sustained 350kb/sec which
comes out to ummm a lot.  The colocation is at a Level3 facility with dual
OC-192s among other connections.  I think you should renegotiate your deal
with your current ISP or find somone else.  - Russ

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 10:12 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Bandwidth?


I know this really isn't a correct list, but I know most of you have
experience in getting hosting, etc and you have been very helpful in my PHP
troubles, so maybe you can help me here, too!  :)

Anyway, my site is currently colocated at a small ISP, that charges as
follows:

$265 - 2U rackspace + 8 GB traffic
+$8 each GB over 8

I just got my invoice for June, totaled at $947.  That's 77 GB over my
alloted 8 GB.  The site is growing and is very popular, so I am not
questioning the bandwidth number, but I am asking about the bandwidth rate.

Is $8/GB too much?  Last I checked most hosting providers charge by how much
continuous bandwidth I use, for instance 512 kbps, 768 kbps, 1.5 mbps, etc.
What kind of numbers can you all give me for comparison?  I want to see if I
am getting ripped off

Ryan Shrout
http://www.amdmb.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] Executing after certain time

2001-07-05 Thread Don Read


On 05-Jul-01 Oliver Hotz wrote:
> Hey guys, I have a php script that generates files, and a www page that
> links to them.
> 
> Is there a way to delete those files, based on a time variable ?..
> 
> lets say 1 minute after they have been generated, they get deleted ?
> 

man find
(check for the -mmin expression)

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

2001-07-05 Thread Alex Behrens

Most colos charge for a dedicated pipe, 512k, 1mb, etc, per month, not usually by 
total transfer. However, some do but they usually give you like 30 or 50gb per month. 
The 8 you are getting is very low. My old host gave us 50gb for $150, so thats $3/gb. 
:)

Thanks!

-Alex  "Big Al" Behrens
E-mail: [EMAIL PROTECTED]
Phone:  651-482-8779
Cell: 651-329-4187
Fax: 651-482-1391
ICQ: 3969599
Owner  of the 3D-Unlimited Network:
http://www.3d-unlimited.com
Send News:
[EMAIL PROTECTED]
  - Original Message - 
  From: Chadwick, Russell 
  To: '[EMAIL PROTECTED]' 
  Sent: Thursday, July 05, 2001 10:19 AM
  Subject: RE: [PHP] Bandwidth?



  Most colocations charge by sustained bandwidth throughout the month, not in
  transfers per month so it may be difficult to get a comparison.  I am paying
  485$/month which gets me 6U (2 servers) and a sustained 350kb/sec which
  comes out to ummm a lot.  The colocation is at a Level3 facility with dual
  OC-192s among other connections.  I think you should renegotiate your deal
  with your current ISP or find somone else.  - Russ

  -Original Message-
  From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, July 05, 2001 10:12 AM
  To: '[EMAIL PROTECTED]'
  Subject: [PHP] Bandwidth?


  I know this really isn't a correct list, but I know most of you have
  experience in getting hosting, etc and you have been very helpful in my PHP
  troubles, so maybe you can help me here, too!  :)

  Anyway, my site is currently colocated at a small ISP, that charges as
  follows:

  $265 - 2U rackspace + 8 GB traffic
  +$8 each GB over 8

  I just got my invoice for June, totaled at $947.  That's 77 GB over my
  alloted 8 GB.  The site is growing and is very popular, so I am not
  questioning the bandwidth number, but I am asking about the bandwidth rate.

  Is $8/GB too much?  Last I checked most hosting providers charge by how much
  continuous bandwidth I use, for instance 512 kbps, 768 kbps, 1.5 mbps, etc.
  What kind of numbers can you all give me for comparison?  I want to see if I
  am getting ripped off

  Ryan Shrout
  http://www.amdmb.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]





[PHP] where can I find a good documentation on regular expressions?

2001-07-05 Thread Mick Foster

where can I find a good documentatio on regular expressions?
I´m desperate in need of it...

thanks for your time



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

2001-07-05 Thread Chadwick, Russell


The little b, bits, so ~45KB

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 10:26 AM
To: 'Chadwick, Russell'
Subject: RE: [PHP] Bandwidth?


Is that 350 KB/sec or 350 kbps?

Ryan Shrout

-Original Message-
From: Chadwick, Russell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 1:19 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Bandwidth?



Most colocations charge by sustained bandwidth throughout the month, not in
transfers per month so it may be difficult to get a comparison.  I am paying
485$/month which gets me 6U (2 servers) and a sustained 350kb/sec which
comes out to ummm a lot.  The colocation is at a Level3 facility with dual
OC-192s among other connections.  I think you should renegotiate your deal
with your current ISP or find somone else.  - Russ

-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 10:12 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Bandwidth?


I know this really isn't a correct list, but I know most of you have
experience in getting hosting, etc and you have been very helpful in my PHP
troubles, so maybe you can help me here, too!  :)

Anyway, my site is currently colocated at a small ISP, that charges as
follows:

$265 - 2U rackspace + 8 GB traffic
+$8 each GB over 8

I just got my invoice for June, totaled at $947.  That's 77 GB over my
alloted 8 GB.  The site is growing and is very popular, so I am not
questioning the bandwidth number, but I am asking about the bandwidth rate.

Is $8/GB too much?  Last I checked most hosting providers charge by how much
continuous bandwidth I use, for instance 512 kbps, 768 kbps, 1.5 mbps, etc.
What kind of numbers can you all give me for comparison?  I want to see if I
am getting ripped off

Ryan Shrout
http://www.amdmb.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]

-- 
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] Writting to files.?

2001-07-05 Thread Don Read


On 05-Jul-01 James Bartlett wrote:
> Hi,
> 
> Anyone know how I can write and read to different lines in a file rather
> than just adding to the text already on the first line of the file?
> 
> Thanks
> 

Assuming you're talking about text files:

A. suck the whole thing up in memory, change it there, write it back out.
B. open a temp, copy till the line of interest, write your change,
   copy remainder. mv/cp the temp to the original.
C. read to line of interest, ftell(), suck remainder into memory.
   ftruncate(), fseek(), write your changes, write out the remainder.

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] where can I find a good documentation on regular expressions?

2001-07-05 Thread Andrew Kirilenko

Hello!

Try to find some good PERL or PHP book.
You can get one from http://194.84.74.116/iced/lp.tar.gz

Best regards,
Andrew Kirilenko,
Senior Programmer / System Administrator,
Internet Service.

-Original Message-
From: Mick Foster [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 05, 2001 8:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] where can I find a good documentation on regular expressions?


where can I find a good documentatio on regular expressions?
I´m desperate in need of it...

thanks for your time



--
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] where can I find a good documentation on regular expressions?

2001-07-05 Thread Justin Farnsworth

I like the O'Reilly book on "Regular Expressions".

_jef

---
Mick Foster wrote:
> 
> where can I find a good documentatio on regular expressions?
> I´m desperate in need of it...
> 
> thanks for your time
> 
> --
> 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] where can I find a good documentation on regular expressions?

2001-07-05 Thread David A Dickson

On Thu, 05 Jul 2001 14:33:55  
 Mick Foster wrote:
>where can I find a good documentatio on regular expressions?
>I´m desperate in need of it...

Try the manual at www.php.net/manual/en



Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

-- 
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: where can I find a good documentation on regular expressions?

2001-07-05 Thread Mike Eggleston

Actually,

If you look at the Perl pages, you will find some awesome documentation on
reg.exps.  Have fun!!

Mike Eggleston

Mick Foster <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> where can I find a good documentatio on regular expressions?
> I´m desperate in need of it...
>
> thanks for your time
>
>



-- 
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] Frames, PDF and links problem

2001-07-05 Thread Shrout, Ryan

Here is the problem I am facing now.  I have a site, with a sort-of shopping
cart but heavily modified for the job it does.  The site uses 2 frames: 1
for the cart and 1 for the content.

The customer has Acrobat PDF files that they want links in to add things to
the 'cart'.  If PDF files had the ability to add the target="cart"
attribute, this would be a simple task.  However, I can't find it if it
does.  So, my current solution was to try this:  have the PDF file link to a
temp_add.php file in the same frame, that file then adds to the cart in
other frame, then reverts back to the sender by using the $HTTP_REFERER
variable.  For some reason, the $HTTP_REFERER variable is NULL when it comes
from a PDF file but reports just fine from a regular PHP file or HTML file.

Any ideas?

Ryan

-- 
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] Interpreting PHP in dynamic generated web-pages

2001-07-05 Thread Dieter Stolpmann

Hi,

I'm trying to solve the following issue in a (hopefully) simply way:

- I'm creating web-pages using php and perl (using a page template)
- the dynamically created pages may contain php code which I like to get

  interpreted in a normal fasion.

The ideas is have to solve the problem are:
- using 'eval()' ... that does not seem to work correctly, because
  the pages may use  blocks allover and the variable
  context seems not to be maintained. (btw: I already redirected the
  eval() output to a string)
- save the created page to a file and redirect the browser to the
  new page (seems to be slow, because interaction with the users
  browser is required

What I like to do:
- simply create the page (as normal), but instead of sending this
  page to the browser, I like to send it to the web-server again
  (linux with apache & windows with IIS). So the webserver
  can handle the page as it had been a normal php page.

Any idea





-- 
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] mail() and command line headers

2001-07-05 Thread Eric Wood

I can easliy add addional email header using the php mail() function.  Does
'mail' or 'sendmail' have this same ability to add email headers from the
command line?
Thanks,
-eric wood


-- 
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] upgrading to gd2.0.1

2001-07-05 Thread Mark Maggelet

Hi,
I just upgraded gd to 2.0.1 and recompiled apache1.3.20/php4.06.
when I do phpinfo() it says:
GD Support enabled
GD Version 1.6.2 or higher
WBMP Support enabled

and when i call imagepng() it says:
Warning: ImagePng: No PNG support in this PHP build

any ideas what's going on here?
I removed config.cache before reconfiguring php

thanks,
- Mark


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




Re: [PHP] multiple domains using one cookie

2001-07-05 Thread Mark Maggelet

On Thu, 5 Jul 2001 14:59:19 +0200, Tobias Talltorp
([EMAIL PROTECTED]) wrote:
>Hello all.
>
>I want multiple domains to be able to read from one cookie, or set
>one
>cookie each for the different domains.
>
>Here is the case:
>When the user logs in to my server, I want to set a cookie that has
>the
>value $name="tobias". He specifies which domains that can read this
>cookie,
>something like $domains="domain1.com;domain2.com;domain6.com".
>Then these sites can read the $name and print it.
>
>The other way might be to set one cookie with the value
>$name="tobias" for
>domain1.com, one for domain2.com and one for domain6.com.
>But the cookie _has_ to come from domain1.com, otherwise it will
>only work
>for mydomain.com, right?
>In other words, I can´t set, edit or read a cookie for an other
site?
>
>How would I go about doing this?

right, you can't do it. the browser won't accept a cookie for a
domain other than the one it's coming from, and it won't send a
cookie for a domain other than the one that's being requested.

a couple of ideas for a workaround would be:
1) you can set a cookie on domain1, redirect to a page on domain2
which sets another cookie, redirects to domain6 and sets another
cookie and redirects back to domain1 (messy)

2) you can restructure your domains into subdomains like so:
www1.domain.com
www2.domain.com
www3.domain.com
these will all get and send cookies for domain 'domain.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] Writting to files.?

2001-07-05 Thread lists

On Thu, 5 Jul 2001, Don Read wrote:

> > Anyone know how I can write and read to different lines in a file rather
> > than just adding to the text already on the first line of the file?
>
> A. suck the whole thing up in memory, change it there, write it back out.

Just as a note: for large (text or binary) files, it's better to use a
temporary file (see tmpfile()) and limit the in-memory buffer to smth like
1024. After finishing, do not close the tmpfile (this would automatically
delete it), but lseek and copy back to the original. Anyone know any
better ways to deal with large file contents?

thx,
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] $phpvar = javascriptvar???

2001-07-05 Thread Romeo Manzur

what I mean is, how could I save a javascript var value on a php var???
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] Creating Internationally Accessible Web Apps - i18n

2001-07-05 Thread Mike Gifford

Hello,

I'm posting here (rather than on i18n) because I was having problems with the 
other newsgroup (and well because I always get the best answers to my php 
questions by posting here).

I've got a couple web apps that I'd like to standardize so that they are more 
multilingual and was wondering if anyone has developed guidelines, etc for doing so.

I've had more experience with english/french sites than with arabic, manderin, 
and I'm not sure what issues are likely to arise.

Please let me know if there are any apps which are good models to base new apps 
on and if there are any standards which would be useful to mold existing apps into.

I'm also keen on knowing how folks have constructed MySQL tables to allow for 
multilingual content.

Thanks!

Mike
-- 
Mike Gifford, OpenConcept Consulting, http://openconcept.ca
Offering everything your organization needs for an effective web site.
Abolish Nuclear Weapons Now!: http://pgs.ca/petition/
It is a miracle that curiosity survives formal education. - A Einstein


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




Re: [PHP] multiple domains using one cookie

2001-07-05 Thread Kurt Lieber

Actually, that's not entirely accurate.

You can set cookies for multiple domains on one HTML page -- you simply have
to write a page that calls one image from each domain that you want to set a
cookie on, even if that image is nothing but a 1x1 transparent gif.

Cookie management and updating will be a challenge moving forth, but you
should get the result you're looking for.

--kurt

- Original Message -
From: "Mark Maggelet" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 11:45 AM
Subject: Re: [PHP] multiple domains using one cookie


On Thu, 5 Jul 2001 14:59:19 +0200, Tobias Talltorp
([EMAIL PROTECTED]) wrote:
>Hello all.
>
>I want multiple domains to be able to read from one cookie, or set
>one
>cookie each for the different domains.
>
>Here is the case:
>When the user logs in to my server, I want to set a cookie that has
>the
>value $name="tobias". He specifies which domains that can read this
>cookie,
>something like $domains="domain1.com;domain2.com;domain6.com".
>Then these sites can read the $name and print it.
>
>The other way might be to set one cookie with the value
>$name="tobias" for
>domain1.com, one for domain2.com and one for domain6.com.
>But the cookie _has_ to come from domain1.com, otherwise it will
>only work
>for mydomain.com, right?
>In other words, I can´t set, edit or read a cookie for an other
site?
>
>How would I go about doing this?

right, you can't do it. the browser won't accept a cookie for a
domain other than the one it's coming from, and it won't send a
cookie for a domain other than the one that's being requested.

a couple of ideas for a workaround would be:
1) you can set a cookie on domain1, redirect to a page on domain2
which sets another cookie, redirects to domain6 and sets another
cookie and redirects back to domain1 (messy)

2) you can restructure your domains into subdomains like so:
www1.domain.com
www2.domain.com
www3.domain.com
these will all get and send cookies for domain 'domain.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] $phpvar = javascriptvar???

2001-07-05 Thread Kurt Lieber

As the original respondent said:

window.location = 'http://url?yourVar=' + yourVar;

from there, parse out the URL variable and store it into a PHP variable and
you're good to go.
- Original Message -
From: "Romeo Manzur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 11:55 AM
Subject: [PHP] $phpvar = javascriptvar???


> what I mean is, how could I save a javascript var value on a php var???
> 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] $phpvar = javascriptvar???

2001-07-05 Thread Romeo Manzur

I want to store the value of screen.ColorDepth on a php var...
Thanks...

Kurt Lieber wrote:

> As the original respondent said:
>
> window.location = 'http://url?yourVar=' + yourVar;
>
> from there, parse out the URL variable and store it into a PHP variable and
> you're good to go.
> - Original Message -
> From: "Romeo Manzur" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, July 05, 2001 11:55 AM
> Subject: [PHP] $phpvar = javascriptvar???
>
> > what I mean is, how could I save a javascript var value on a php var???
> > 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] PHP for NetWare?

2001-07-05 Thread Chris Anderson

I agree, I've had it at work and I hated it. I love my SuSE box at home.
What more security do you need than Linux?
- Original Message -
From: "Jesse S. Williams" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 3:30 AM
Subject: RE: [PHP] PHP for NetWare?


> Actually, Netware isn't specifically a "direct" competitor of Microsloth.
> Netware is strictly a NOS (network operating System), where as Windows is
a
> network, server and client OS.  Now, this certainly isn't meant to make it
> look as if I like M$, but I used to work on my company's General Motors
> account, and GM has (literally) the world's largest NDS Tree/Novell
Network.
> Frankly, it's not all that great.  Whether Wind-woes 2000 and AD will be
> better has yet to be seen, but NW isn't too great either.
>
> At any rate, no, there is currently no (supported/official) port of PHP to
> Netware, and frankly I doubt there's much, if any, work being done on such
a
> project.  At the rate NW is losing it's customer base, there may be more
> client's with OS/2 then servers with NW soon.
>
>
> Jesse Williams
>
>
>
>
>
> -Original Message-
> From: Tony Gettig [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 03, 2001 1:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP for NetWare?
>
>
> Actually, NetWare is a very different operating system than Windows. It's
a
> direct competitor to M$. Way more stable than windows. If PHP is available
> for NetWare, someone must have ported to the platform to run either as an
> NLM or with the JVM.
>
> There's a queston: is there perhaps a java executable version of PHP? If
so,
> it could feasibly run on NetWare.
>
> The Netscape Enterprise server for NetWare supports ASP, which is not
> preferable to PHP. I'd really like to stick with PHP.
>
>
> Tony Gettig
> Network Administrator
> Kalamazoo Public Schools
>
>
>
> >>> "Chris Anderson" <[EMAIL PROTECTED]> 07/03/01 12:44PM >>>
> Ugh Netware. I believe that is Windows oriented/based so try the windows
> distrobutions
> - Original Message -
> From: "Tony Gettig" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 03, 2001 7:49 AM
> Subject: [PHP] PHP for NetWare?
>
>
> Hi there,
>
> Is PHP available for NetWare? I've looked high and low and find no
reference
> to such a beast. I prefer PHP on my Linux box, but I need to explore being
> able to put it on a NetWare server running Netscape Enterprise. TIA for
any
> pointers in the right direction.
>
>
> Tony Gettig
> Network Administrator
> Kalamazoo Public Schools
>
>
>
>
> --
> 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] how can I call a link? ??

2001-07-05 Thread Shrout, Ryan

I don't really no how to word this.  How can I use a single PHP to update
two sides of a framed page?

like a call to: add.php?add=4ffqe45&manual=123.33&fn=ex1

I want it to update the left frame with a call to:

http://serverview_cart.php?add=4ffqe45

and I want it to update the right frame with a call to:

http://server/pdf/ex1.pdf

The only page updating/refreshing/goto'ing I know of in PHP is the header (
Location: ) command, but that only does a single page and must be in the
header (obviously).  

What can I do?

Ryan Shrout

-- 
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] Submiting Data with an '

2001-07-05 Thread Mike Mike

Hello everyone,
I'm having a problem of submiting an ' into a mysql
database.  When I have a ' it doesn't update or submit
the data.  but if I use \' it works fine.  Does anyone
know of a way around this.
Thanks
  --Mike

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




[PHP] Re: how can I call a link? ??

2001-07-05 Thread Philip Hallstrom

Use javascript.  Have that first page return HTML that contains javascript
along the following:




top.leftframe.document.href = 'http://serverview_cart.php?add=4ffqe45';
top.rightframe.document.href = 'http://server/pdf/ex1.pdf';





You'll need to change the "top.leftframe" (etc) to match your frame setup,
but it works just fine.

-philip

On Thu, 5 Jul 2001, Shrout, Ryan wrote:

> I don't really no how to word this.  How can I use a single PHP to update
> two sides of a framed page?
>
> like a call to: add.php?add=4ffqe45&manual=123.33&fn=ex1
>
> I want it to update the left frame with a call to:
>
> http://serverview_cart.php?add=4ffqe45
>
> and I want it to update the right frame with a call to:
>
> http://server/pdf/ex1.pdf
>
> The only page updating/refreshing/goto'ing I know of in PHP is the header (
> Location: ) command, but that only does a single page and must be in the
> header (obviously).
>
> What can I do?
>
> Ryan Shrout
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




RE: [PHP] how can I call a link? ??

2001-07-05 Thread Matthew Loff



BODY onLoad="otherFrameName.document.location =
'http://serverview_cart.php?add=4ffqe45'"

I think that's how you'd do it...  Can anyone with more experience in
javascript verify?


-Original Message-
From: Shrout, Ryan [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 05, 2001 3:18 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] how can I call a link? ??


I don't really no how to word this.  How can I use a single PHP to
update two sides of a framed page?

like a call to: add.php?add=4ffqe45&manual=123.33&fn=ex1

I want it to update the left frame with a call to:

http://serverview_cart.php?add=4ffqe45

and I want it to update the right frame with a call to:

http://server/pdf/ex1.pdf

The only page updating/refreshing/goto'ing I know of in PHP is the
header (
Location: ) command, but that only does a single page and must be in the
header (obviously).  

What can I do?

Ryan Shrout

-- 
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] Submiting Data with an '

2001-07-05 Thread Matthew Loff


Use the addslashes() call to automatically escape characters like that.

MySQL will not add the slashes into the table cell, so no need to
stripslashes() after you SELECT it back out.


-Original Message-
From: Mike Mike [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, July 05, 2001 3:19 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Submiting Data with an '


Hello everyone,
I'm having a problem of submiting an ' into a mysql
database.  When I have a ' it doesn't update or submit
the data.  but if I use \' it works fine.  Does anyone
know of a way around this.
Thanks
  --Mike

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


-- 
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] Sessions and redundant servers

2001-07-05 Thread Daniel Baldoni

G'day folks,

Here's a theoretical question for those of you using PHP's inbuilt session
facilities...

How do you "keep" your variables across redundant servers?  Or,
isn't anybody out there hosting PHP-based services on grouped
servers?

My question may reflect a lack of understanding on just how PHP's sessions
work, but (bear with me a moment) I thought that session variables were
simply stored in a local file-store (default: /tmp).

Are people using NFS-shared directories, rsync (or some other method of
keeping such areas synchronised), or are all "redundant" sites using
home-grown session handling?

Ciao.

-- 
---+-
Daniel Baldoni BAppSc, PGradDipCompSci |  Technical Director
require 'std/disclaimer.pl'|  LcdS Pty. Ltd.
---+  856B Canning Hwy
Phone/FAX:  +61-8-9364-8171|  Applecross
Mobile: 041-888-9794   |  WA 6153
URL:http://www.lcds.com.au/|  Australia
---+-
"Any time there's something so ridiculous that no rational systems programmer
 would even consider trying it, they send for me."; paraphrased from "King Of
 The Murgos" by David Eddings.  (I'm not good, just crazy)

-- 
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 for NetWare?

2001-07-05 Thread Tony Gettig

NetWare is great for an enterprise where directory enabled management is a 
requirement. And it is bullet-proof secure and 24/7 reliable  if setup correctly. 
(Most NOS's are with a couple of exceptions. :) I work for a school system, and I 
can't imagine managing accounts on multiple servers without NDS.

NDS is at version 8.x, whereas AD is at 1.0. And you don't need NetWare to have NDS. 
It runs on NT, 2000, Solaris, and Linux too. There's an LDAP server for NetWare that 
seems (so far) to work good too. I'm interacting with it from a PHP script with no 
problems at all.

Someone has tried porting PHP to NetWare as recently as this past April.  I emailed 
him this morning and await a reply. Since there seems to be no NetWare port of PHP 
yet, I think it would be great to get it started as a new open source project. 



Tony Gettig
Network Administrator
Kalamazoo Public Schools



>>> "Chris Anderson" <[EMAIL PROTECTED]> 07/05/01 12:03PM >>>
I agree, I've had it at work and I hated it. I love my SuSE box at home.
What more security do you need than Linux?
- Original Message -
From: "Jesse S. Williams" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 04, 2001 3:30 AM
Subject: RE: [PHP] PHP for NetWare?


> Actually, Netware isn't specifically a "direct" competitor of Microsloth.
> Netware is strictly a NOS (network operating System), where as Windows is
a
> network, server and client OS.  Now, this certainly isn't meant to make it
> look as if I like M$, but I used to work on my company's General Motors
> account, and GM has (literally) the world's largest NDS Tree/Novell
Network.
> Frankly, it's not all that great.  Whether Wind-woes 2000 and AD will be
> better has yet to be seen, but NW isn't too great either.
>
> At any rate, no, there is currently no (supported/official) port of PHP to
> Netware, and frankly I doubt there's much, if any, work being done on such
a
> project.  At the rate NW is losing it's customer base, there may be more
> client's with OS/2 then servers with NW soon.
>
>
> Jesse Williams
>
>
>
>
>
> -Original Message-
> From: Tony Gettig [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, July 03, 2001 1:10 PM
> To: [EMAIL PROTECTED] 
> Subject: Re: [PHP] PHP for NetWare?
>
>
> Actually, NetWare is a very different operating system than Windows. It's
a
> direct competitor to M$. Way more stable than windows. If PHP is available
> for NetWare, someone must have ported to the platform to run either as an
> NLM or with the JVM.
>
> There's a queston: is there perhaps a java executable version of PHP? If
so,
> it could feasibly run on NetWare.
>
> The Netscape Enterprise server for NetWare supports ASP, which is not
> preferable to PHP. I'd really like to stick with PHP.
>
>
> Tony Gettig
> Network Administrator
> Kalamazoo Public Schools
>
>
>
> >>> "Chris Anderson" <[EMAIL PROTECTED]> 07/03/01 12:44PM >>>
> Ugh Netware. I believe that is Windows oriented/based so try the windows
> distrobutions
> - Original Message -
> From: "Tony Gettig" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 03, 2001 7:49 AM
> Subject: [PHP] PHP for NetWare?
>
>
> Hi there,
>
> Is PHP available for NetWare? I've looked high and low and find no
reference
> to such a beast. I prefer PHP on my Linux box, but I need to explore being
> able to put it on a NetWare server running Netscape Enterprise. TIA for
any
> pointers in the right direction.
>
>
> Tony Gettig
> Network Administrator
> Kalamazoo Public Schools
>
>
>
>
> --
> 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] $phpvar = javascriptvar???

2001-07-05 Thread Kurt Lieber

I must not be clear on your question as it seems my response (and the
original response) describe exactly what you're looking to do.

I recommend you check out forums.devshed.com and do a search in their PHP
forum for "javascript php variable" You'll get a ton of examples and
suggestions.  Here's one thread specifically:

http://forums.devshed.com/showthread.php?s=&threadid=16698&forumid=5&highlig
ht=javascript+variable+php+variable

best of luck

--kurt
- Original Message -
From: "Romeo Manzur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 12:12 PM
Subject: Re: [PHP] $phpvar = javascriptvar???


> I want to store the value of screen.ColorDepth on a php var...
> Thanks...
>
> Kurt Lieber wrote:
>
> > As the original respondent said:
> >
> > window.location = 'http://url?yourVar=' + yourVar;
> >
> > from there, parse out the URL variable and store it into a PHP variable
and
> > you're good to go.
> > - Original Message -
> > From: "Romeo Manzur" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, July 05, 2001 11:55 AM
> > Subject: [PHP] $phpvar = javascriptvar???
> >
> > > what I mean is, how could I save a javascript var value on a php
var???
> > > 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]
>
>


-- 
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] Sessions and redundant servers

2001-07-05 Thread infoz

The load-balanced cluster implementations I've worked with define a PHP
session handler that uses a database to store session data, and so it
doesn't matter which web server a particular session comes from, the data is
stored in a centralized place.

- Tim
  http://www.phptemplates.org

> How do you "keep" your variables across redundant servers?  Or,
> isn't anybody out there hosting PHP-based services on grouped
> servers?



-- 
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] Interpreting PHP in dynamic generated web-pages

2001-07-05 Thread lists

On Thu, 5 Jul 2001, Dieter Stolpmann wrote:

> Hi,
>
> I'm trying to solve the following issue in a (hopefully) simply way:
>
> - I'm creating web-pages using php and perl (using a page template)
> - the dynamically created pages may contain php code which I like to get
>   interpreted in a normal fasion.

Oh, let me see if I get this right: You need to have something like perl
or php generate hybrid html/php content, so you want this content be
reinterpreted by PHP, right?

Here's how I see things:

say http://mydom.com/cgi-bin/dynsite.pl is the thing that generates the
html/php code. Make http://mydom.com/index.php contain just this line:

http://mydom.com/cgi-bin/dynsite.pl";) ?>

This works effectively as a include-virtual SSI directive: it reads from
http and interprets the stream as php code. I have checked it and it seems
to work just fine.

Good luck,
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] PHP/Apache security question

2001-07-05 Thread lists


Hello list,

I have a security problem to solve with my apache setup and I am clueless
at this moment...

My web server holds multiple domains and uses name-based virtual servers
to direct requests to different portions of the html tree for different
domain names (we presume only one IP is available). There are just a few
people storing content on the webserver to be served to the public and
everyone has access to php scripts. The server runs as apache.apache and
therefore all the files and dirs in the html tree are owned by group
apache so that the server can see them yet people cannot see anything but
their own files.

It has recently crossed my mind that anyone can write a very simple php
script to peek at everything that apache can see because any script is run
with the uid/gid inhereted from the webserver. Now, the html tree does not
contain any security-sensitive information, but I am sure that the clients
would not be happy to know that any other of my clients can see their
scripts and hidden information, like .htaccess-protected files or db files
generated by php or cgi scripts.

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]




RE: [PHP] $phpvar = javascriptvar???

2001-07-05 Thread Johnson, Kirk

> -Original Message-
> From: Romeo Manzur [mailto:[EMAIL PROTECTED]]

> Subject: [PHP] $phpvar = javascriptvar???
> 
> what I mean is, how could I save a javascript var value on a 
> php var???


You can also put a HIDDEN field in your form, have JS assign the value to
that, then PHP will have access to the value when the form is submitted.

Kirk

-- 
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] Missing first record in PHP/Mysql query

2001-07-05 Thread Rory O'Connor

Excuse me if this is too newbie...but I'm writing a simple script to
query a database and loop through the reuslts, echoing them on the page.
 When I enter the query at the mysql command line, I get the correct
results.  But the same query run through PHP renders all results except
the first one.  Any idea why?  I've included the code snippet below:

//the query to select the data
$query = "SELECT firstname,email,optin from contact where
interest='rory'";
$result = mysql_query($query);
if(!$result) error_message(sql_error());

$query_data = mysql_fetch_row($result);

while($query_data = mysql_fetch_array($result)) {
$firstname = $query_data["firstname"];
$email = $query_data["email"];
$optin = $query_data["optin"];

echo "\n";
echo "$firstname;$email;$optin\n";

} //end while loop 

also, what would be the code to output the reuslts to a text file
instead of (or in addition to) the screen?

thanks,

rory

providing the finest in midget technology

-- 
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] Sessions and redundant servers

2001-07-05 Thread lists

On Fri, 6 Jul 2001, Daniel Baldoni wrote:

> G'day folks,
>
> Here's a theoretical question for those of you using PHP's inbuilt session
> facilities...
>
>   How do you "keep" your variables across redundant servers?  Or,
>   isn't anybody out there hosting PHP-based services on grouped
>   servers?

You are right, by default PHP stores session data in /tmp, but there are
ways to change this. First of all, rsync seems to be the least reliable
method, nfs seems better (i would not try it though). I have seen
session-handling implemented with postgresql (and i think porting it on
mysql isn't that hard...). You may want to take a look at

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

Also see http://freshmeat.net/search/?q=php+session, there are a few
implementations of db storage for sessions.

Needless to say, having sessions stored on a database makes them available
across a cluster.

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]




Re: [PHP] Sessions and redundant servers

2001-07-05 Thread Daniel Baldoni

G'day again everybody,

>> Here's a theoretical question for those of you using PHP's inbuilt session
>> facilities...
>>
>>   How do you "keep" your variables across redundant servers?  Or,
>>   isn't anybody out there hosting PHP-based services on grouped
>>   servers?
> 
> You are right, by default PHP stores session data in /tmp, but there are
> ways to change this. First of all, rsync seems to be the least reliable
> method, nfs seems better (i would not try it though). I have seen
> session-handling implemented with postgresql (and i think porting it on
> mysql isn't that hard...). You may want to take a look at
> 
> http://www.php.net/manual/en/ref.session.php

Considering NFS is stateless, why do you consider it to be a more acceptable
solution to, say, rsync (which I personally don't like - but that's another
matter)?

> Also see http://freshmeat.net/search/?q=php+session, there are a few
> implementations of db storage for sessions.
> 
> Needless to say, having sessions stored on a database makes them available
> across a cluster.

I should have been "clearer" in my original question.  It really was meant as
a "what are others doing" - we've developed a MySQL-based session handler for
a client (without wanting to start a flame war, I'd prefer to be using
PostgreSQL but it isn't available on the client's selected hosting service).
In our case, the web-servers are clustered, but I'm told the back-end
databases aren't.

>From what I've been reading over the last few days, there aren't that many
people hosting their services on a clustered setup, so this shouldn't really
affect them.  But, with the discussions that have been going on w.r.t.
authentication and session-handling, I thought I should bring it up.

Ciao.

-- 
---+-
Daniel Baldoni BAppSc, PGradDipCompSci |  Technical Director
require 'std/disclaimer.pl'|  LcdS Pty. Ltd.
---+  856B Canning Hwy
Phone/FAX:  +61-8-9364-8171|  Applecross
Mobile: 041-888-9794   |  WA 6153
URL:http://www.lcds.com.au/|  Australia
---+-
"Any time there's something so ridiculous that no rational systems programmer
 would even consider trying it, they send for me."; paraphrased from "King Of
 The Murgos" by David Eddings.  (I'm not good, just crazy)

-- 
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] Must Have Cookies. PHP/JavaScript

2001-07-05 Thread Jeff Gannaway

OK, I'm working on a site that absolutely must use a cookie containing a
session identifier.

I know how to set a cookie through PHP, but I need to do something else too.

The same page MUST identifier whether the cookie was accepted or not.  I've
seen sites like NetFlix.com that will test to see if their cookie was
accepted, and if not, print up a page that says "Sorry, you've got have
your Cookies on or go somewhere else."

Does anyone know how to do this with PHP, Java, or JavaScript?

Code examples or example URLs would be appreciated.

Thanks,
Jeff Gannaway
___

SUMMER ART PRINT SALE at www.PopStreet.com
Save an additional 10% off art print orders of $50 or more.
Type in coupon code jemc when checking out.
___

Find the right art print for your home.
* Search by artist, color, art style and subject.
* Preview the art prints against your wall color.
* Specializing in contemporary, abstract and African
  American art.
* Every day discounts on thousands of fine art prints.

PopStreet.com is your avenue to art. 


http://www.popstreet.com 
___ 
Coupon may be redeemed from June 27 through July 31, 2001.

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