RE: [PHP] parse error when requiring

2001-12-06 Thread Oosten, Sjoerd van

hmm it still doesn't work. Maybe its because if have an if statement in the
include which is closed in bottom.php?


Sjoerd van Oosten 
Digitaal vormgever [EMAIL PROTECTED]
Datamex E-sites B.V. 
http://www.esites.nl
Minervum 7368 Telefoon: (076) 5 730 730 
4817 ZH BREDA Telefax: (076) 5 877 757 
___


-Oorspronkelijk bericht-
Van: Jon Farmer [mailto:[EMAIL PROTECTED]]
Verzonden: donderdag 6 december 2001 16:49
Aan: Oosten, Sjoerd van; 'Andrew Forgue'
CC: [EMAIL PROTECTED]
Onderwerp: Re: [PHP] parse error when requiring


> Parse error: parse error in /home/sites/site139/web/EIA/sessionstart.php
on
> line 10
>
> It's strange that line number 10 doesn't exist!

Do you have an include statement in sessionstart.php?

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key


-- 
PHP General Mailing List (http://www.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] Bug #14360: Script ends on >

2001-12-06 Thread Thomas.Seuring

Dear friends,

I've opened a Bug I think I've found on PHP, but there I was recommended to ask 
you.

Below you'll find the Mail I wrote and I hope, that you can help me.


[2001-12-06 06:30:32] [EMAIL PROTECTED]
I'm using a generated Script of the PHAKT-Software on a Windows 2000 and Apache 
Server.

The complete Script is:

 0) $KT_referrer .= "?" . $QUERY_STRING;
  $KT_authFailedURL = $KT_authFailedURL . $KT_qsChar . "accessdenied=" .
urlencode($KT_referrer);
  header("Location: $KT_authFailedURL");
  exit;
}
?>

On

if (strlen($QUERY_STRING) > 0) $KT_referrer .= "?" . $QUERY_STRING;

The PHP Engine ends after the > of (strlen($QUERY_STRING) > 0).

I think PHP interpretes the > as end of the Scripting Section.

I hope you could help me on this.

Yours

Tom


[2001-12-06 06:36:40] [EMAIL PROTECTED]
Ask for support questions at [EMAIL PROTECTED] .

This is most likely a programming error.

Bogus.

Thank you very much for your Feedback.

Yours,

Tom


Thomas W. Seuring
Senior Manager Corporate IT
DaimlerChrysler Capital Services
Europe & South Africa

HPC 0635
Epplestrasse 225
70546 Stuttgart
Germany

E-Mail: [EMAIL PROTECTED]

Phone: +49 (711) 17 94 783
Fax: +49 (711) 17 91 698

Mobile:+49 (171) 370 71 84
Mobile Fax: +49 (171) 37 48 158
- Forwarded by Thomas Seuring/DEBIS/debis/DCX on 07.12.2001 08:04 -

[EMAIL PROTECTED]
06.12.2001 15:14
Please respond to php-dev
 
 To: Thomas Seuring/DEBIS/debis/DCX@WK-EMEA1
 bcc: 
 Subject: Bug #14360: Script ends on >

From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:  4.0.6
PHP Bug Type: Scripting Engine problem
Bug description:  Script ends on >

I'm using a generated Script of the PHAKT-Software on a Windows 2000 and
Apache Server.

The complete Script is:

 0) $KT_referrer .= "?" . $QUERY_STRING;
  $KT_authFailedURL = $KT_authFailedURL . $KT_qsChar . "accessdenied=" .
urlencode($KT_referrer);
  header("Location: $KT_authFailedURL");
  exit;
}
?>

On

if (strlen($QUERY_STRING) > 0) $KT_referrer .= "?" . $QUERY_STRING;

The PHP Engine ends after the >.

I think PHP interpretes the > as end of the Scripting Section.

I hope you could help me on this.

Yours

Tom


--
Edit bug report at: http://bugs.php.net/?id=14360&edit=2



--
PHP General Mailing List (http://www.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: Re:USERNAME

2001-12-06 Thread Fred

You would normally access this via:
$HTTP_REMOTE_USER or
$PHP_AUTH_USER
but these variables are only available (and thus only show up in phpinfo) if
you have actually logged in via apache htaccess authentication.

Fred

Chamarty Prasanna Kumar <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


Hi Rasmas and All,

  Thanks very much for the prompt reply.

 phpinfo() shows only

REMOTE_ADDR
REMOTE_HOST
REMOTE_PORT

but not $REMOTE_USER.

Even I tried using $REMOTE_USER alone, but no response.

Please suggest a way.


Kumar.



  On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
> To use the HyperWave functions you need to download and
> install HyperWave,
> whatever it is.
>
> And your second question has nothing to do with
> HyperWave.  Simply check
> $REMOTE_USER.  phpinfo() would have shown you this.
>
> -Rasmus
>
> On 7 Dec 2001, Chamarty Prasanna Kumar wrote:
>
> >
> >
> > Hi Rasmas and All,
> >
> >Thanks very much for the reply, Rasmas.
> >
> > To use Hyperwave functions does I need to download
> >
> > software and install it or it will work with php
> >
> > intallation.
> >
> > Or is there any way to find the login "username" from
> >
> > the web page using php and that login authentication
> >
> > is being done by the apache server.ie., we are using
> >
> > password protecting directory by apache.
> >
> >
> > Thanks in advance,
> >
> > Kumar.
> >
> >
> > On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
> > > Not that I have ever used HyperWave, but a 3 second
> > > glimpse at the manual
> > > would seem to indicate that you get a HyperWave
> connect
> > > by calling
> > > hw_connect().
> > >
> > > -Rasmus
> > >
> > > On 7 Dec 2001, Chamarty Prasanna Kumar wrote:
> > >
> > > >
> > > >
> > > > Hi All,
> > > >
> > > >Want to know the usage of
> > > >
> > > > hw_getusername(int connection); function
> > > >
> > > >
> > > > specifically, what connection refers to !!
> > > >
> > > >
> > > > Thanks in advance,
> > > >
> > > > Kumar.
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > php.net
> > > > 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: php-general-unsubscribe@list-
> s.ph-
> > > p.net
> > > 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]
> p.net
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>





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




[PHP] Re:USERNAME

2001-12-06 Thread Chamarty Prasanna Kumar



Hi Rasmas and All,

  Thanks very much for the prompt reply.

 phpinfo() shows only

REMOTE_ADDR
REMOTE_HOST
REMOTE_PORT

but not $REMOTE_USER.

Even I tried using $REMOTE_USER alone, but no response.

Please suggest a way.


Kumar.



  On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
> To use the HyperWave functions you need to download and 
> install HyperWave, 
> whatever it is.
> 
> And your second question has nothing to do with 
> HyperWave.  Simply check 
> $REMOTE_USER.  phpinfo() would have shown you this.
> 
> -Rasmus
> 
> On 7 Dec 2001, Chamarty Prasanna Kumar wrote:
> 
> > 
> > 
> > Hi Rasmas and All,
> > 
> >Thanks very much for the reply, Rasmas.
> > 
> > To use Hyperwave functions does I need to download
> > 
> > software and install it or it will work with php
> > 
> > intallation.
> > 
> > Or is there any way to find the login "username" from 
> > 
> > the web page using php and that login authentication
> > 
> > is being done by the apache server.ie., we are using 
> > 
> > password protecting directory by apache.
> >  
> > 
> > Thanks in advance,
> > 
> > Kumar.
> > 
> > 
> > On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
> > > Not that I have ever used HyperWave, but a 3 second 
> > > glimpse at the manual 
> > > would seem to indicate that you get a HyperWave 
> connect 
> > > by calling 
> > > hw_connect().
> > > 
> > > -Rasmus
> > > 
> > > On 7 Dec 2001, Chamarty Prasanna Kumar wrote:
> > > 
> > > > 
> > > > 
> > > > Hi All,
> > > > 
> > > >Want to know the usage of
> > > > 
> > > > hw_getusername(int connection); function
> > > > 
> > > > 
> > > > specifically, what connection refers to !!
> > > > 
> > > > 
> > > > Thanks in advance,
> > > > 
> > > > Kumar.
> > > > 
> > > >  
> > > > 
> > > > 
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
> > > php.net
> > > > 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: php-general-unsubscribe@list-
> s.ph-
> > > p.net
> > > 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]
> p.net
> For additional commands, e-mail: 
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 
 


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




[PHP] Re: Re:[PHP] USERNAME

2001-12-06 Thread Fred

If you simply want to find out the username of someone who has logged in
using apache htaccess authentication, that information is contained in the
global variable $PHP_AUTH_USER

Fred

Chamarty Prasanna Kumar <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


Hi Rasmas and All,

   Thanks very much for the reply, Rasmas.

To use Hyperwave functions does I need to download

software and install it or it will work with php

intallation.

Or is there any way to find the login "username" from

the web page using php and that login authentication

is being done by the apache server.ie., we are using

password protecting directory by apache.


Thanks in advance,

Kumar.


On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
> Not that I have ever used HyperWave, but a 3 second
> glimpse at the manual
> would seem to indicate that you get a HyperWave connect
> by calling
> hw_connect().
>
> -Rasmus
>
> On 7 Dec 2001, Chamarty Prasanna Kumar wrote:
>
> >
> >
> > Hi All,
> >
> >Want to know the usage of
> >
> > hw_getusername(int connection); function
> >
> >
> > specifically, what connection refers to !!
> >
> >
> > Thanks in advance,
> >
> > Kumar.
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> php.net
> > 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]
> p.net
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>





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




[PHP] Re:[PHP] USERNAME

2001-12-06 Thread Rasmus Lerdorf

To use the HyperWave functions you need to download and install HyperWave, 
whatever it is.

And your second question has nothing to do with HyperWave.  Simply check 
$REMOTE_USER.  phpinfo() would have shown you this.

-Rasmus

On 7 Dec 2001, Chamarty Prasanna Kumar wrote:

> 
> 
> Hi Rasmas and All,
> 
>Thanks very much for the reply, Rasmas.
> 
> To use Hyperwave functions does I need to download
> 
> software and install it or it will work with php
> 
> intallation.
> 
> Or is there any way to find the login "username" from 
> 
> the web page using php and that login authentication
> 
> is being done by the apache server.ie., we are using 
> 
> password protecting directory by apache.
>  
> 
> Thanks in advance,
> 
> Kumar.
> 
> 
> On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
> > Not that I have ever used HyperWave, but a 3 second 
> > glimpse at the manual 
> > would seem to indicate that you get a HyperWave connect 
> > by calling 
> > hw_connect().
> > 
> > -Rasmus
> > 
> > On 7 Dec 2001, Chamarty Prasanna Kumar wrote:
> > 
> > > 
> > > 
> > > Hi All,
> > > 
> > >Want to know the usage of
> > > 
> > > hw_getusername(int connection); function
> > > 
> > > 
> > > specifically, what connection refers to !!
> > > 
> > > 
> > > Thanks in advance,
> > > 
> > > Kumar.
> > > 
> > >  
> > > 
> > > 
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > php.net
> > > 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]
> > p.net
> > For additional commands, e-mail: 
> > [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> > [EMAIL PROTECTED]
> > 
>  
> 
> 


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




[PHP] Re:[PHP] USERNAME

2001-12-06 Thread Chamarty Prasanna Kumar



Hi Rasmas and All,

   Thanks very much for the reply, Rasmas.

To use Hyperwave functions does I need to download

software and install it or it will work with php

intallation.

Or is there any way to find the login "username" from 

the web page using php and that login authentication

is being done by the apache server.ie., we are using 

password protecting directory by apache.
 

Thanks in advance,

Kumar.


On Fri, 07 Dec 2001 Rasmus Lerdorf wrote :
> Not that I have ever used HyperWave, but a 3 second 
> glimpse at the manual 
> would seem to indicate that you get a HyperWave connect 
> by calling 
> hw_connect().
> 
> -Rasmus
> 
> On 7 Dec 2001, Chamarty Prasanna Kumar wrote:
> 
> > 
> > 
> > Hi All,
> > 
> >Want to know the usage of
> > 
> > hw_getusername(int connection); function
> > 
> > 
> > specifically, what connection refers to !!
> > 
> > 
> > Thanks in advance,
> > 
> > Kumar.
> > 
> >  
> > 
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> php.net
> > 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]
> p.net
> 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] Problems producing an image

2001-12-06 Thread Harshdeep S Jawanda


> Try taking the header line out; that way if there is an error message

> you should be able to see it in 'View Source'.

Finally managed to solve the problem - there was an empty line before
the start tag ("http://greetings.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] Is there a GUI for MySQL?

2001-12-06 Thread Alex Shi

http://phpwizard.net/projects/phpMyAdmin/  -- this is a great admin tool
through web

http://www.mysql.com/downloads/gui-mysqlgui.html -- you can find screenshot
there,
looks ugly

- Original Message -
From: "Hai Nguyen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 12:31 AM
Subject: [PHP] Is there a GUI for MySQL?


> Hi,
>
> I am a newbie at this.  I was just wondering if there is a Graphical
> User Interface for MySQL?
>
> Cheers,
>
> Hai Nguyen
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


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




Re: [PHP] Is there a GUI for MySQL?

2001-12-06 Thread chip

On Thursday 06 December 2001 09:31 pm, Hai Nguyen wrote:
> Hi,
>
> I am a newbie at this.  I was just wondering if there is a Graphical
> User Interface for MySQL?
>
> Cheers,
>
> Hai Nguyen

Did you check the mysql.com web site? They list a few, and do a 
search on google, you'll find lots more.

--
Chip

--
PHP General Mailing List (http://www.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] Is there a GUI for MySQL?

2001-12-06 Thread Hai Nguyen

Hi,

I am a newbie at this.  I was just wondering if there is a Graphical 
User Interface for MySQL?

Cheers,

Hai Nguyen

-- 
PHP General Mailing List (http://www.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] USERNAME

2001-12-06 Thread Rasmus Lerdorf

Not that I have ever used HyperWave, but a 3 second glimpse at the manual 
would seem to indicate that you get a HyperWave connect by calling 
hw_connect().

-Rasmus

On 7 Dec 2001, Chamarty Prasanna Kumar wrote:

> 
> 
> Hi All,
> 
>Want to know the usage of
> 
> hw_getusername(int connection); function
> 
> 
> specifically, what connection refers to !!
> 
> 
> Thanks in advance,
> 
> Kumar.
> 
>  
> 
> 
> --
> PHP General Mailing List (http://www.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] Redirect Function?!!

2001-12-06 Thread Brian Clark

* Cam <[EMAIL PROTECTED]> [Dec 07. 2001 00:23]:

> Anyone know of a way to redirect to another page with PHP?  I'm aware of the
> META tag redirection via the HTTP header, but I really need a more elegant
> solution that redirects immediately without relying on any HTML tags.
> Appreciate the help,



-- 
 -Brian Clark


-- 
PHP General Mailing List (http://www.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] Redirect Function?!!

2001-12-06 Thread Alex Shi

You can use,

header ("Location: http://www.php.net";);

and you can pass variable,

header ("Location: http://www.php.net?name1=$value&$name2=$value2";);

Hope this can helps.

Alex Shi


- Original Message -
From: "Cam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 12:22 AM
Subject: [PHP] Redirect Function?!!


> Anyone know of a way to redirect to another page with PHP?  I'm aware of
the
> META tag redirection via the HTTP header, but I really need a more elegant
> solution that redirects immediately without relying on any HTML tags.
> Appreciate the help,
> -C
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.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] Redirect Function?!!

2001-12-06 Thread Jason Brooke

http://your.domain/path/to/file.html";); ?>


- Original Message -
From: "Martin Towell" <[EMAIL PROTECTED]>
To: "'Cam'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 3:23 PM
Subject: RE: [PHP] Redirect Function?!!


> how about include'ing the target page then exit'ing straight after?
>
> include "$page";
> exit;
>
> -Original Message-
> From: Cam [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 4:23 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Redirect Function?!!
>
>
> Anyone know of a way to redirect to another page with PHP?  I'm aware of
the
> META tag redirection via the HTTP header, but I really need a more elegant
> solution that redirects immediately without relying on any HTML tags.
> Appreciate the help,
> -C
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.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] Redirect Function?!!

2001-12-06 Thread Martin Towell

how about include'ing the target page then exit'ing straight after?

include "$page";
exit;

-Original Message-
From: Cam [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 4:23 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Redirect Function?!!


Anyone know of a way to redirect to another page with PHP?  I'm aware of the
META tag redirection via the HTTP header, but I really need a more elegant
solution that redirects immediately without relying on any HTML tags.
Appreciate the help,
-C




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



[PHP] Redirect Function?!!

2001-12-06 Thread Cam

Anyone know of a way to redirect to another page with PHP?  I'm aware of the
META tag redirection via the HTTP header, but I really need a more elegant
solution that redirects immediately without relying on any HTML tags.
Appreciate the help,
-C




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




[PHP] USERNAME

2001-12-06 Thread Chamarty Prasanna Kumar



Hi All,

   Want to know the usage of

hw_getusername(int connection); function


specifically, what connection refers to !!


Thanks in advance,

Kumar.

 


--
PHP General Mailing List (http://www.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] Trying to pass a variable through a form...

2001-12-06 Thread Anthony Ritter

Thanks Alex.

I typed in:
$name

within the script for Tony2.php

and it was fine.

*However*, I thought I could have the value from that variable entered into
the Tony2.php page by using the AHREF tag...

This is what I'm reading:

"Let's say you wanted to construct your site so that it showed the visitors
name at the top of *every* page.   With our custom welcome message example
above, we're halfway there already.   Here are the problems we'll need to
overcome to extend the example into what we need.

We need the name on *every* page of the site, not just one.

The first problem isn't too hard too overcome.  Once we have the user's name
in a variable on one page, we can pass it with any request to another page
by adding the name to the query string of all links:"

 Link 

I thought that by having the php script within the AHREF tag that would
accomplish that without coding each page with:

echo $name


Please advise if and when you get a chance...
TR
..

Alex Shi <[EMAIL PROTECTED]> wrote in message
018101c17ed4$c0a8a990$0105050a@pony">news:018101c17ed4$c0a8a990$0105050a@pony...
> Can you paste Tnoy2.php script? Please make sure in Tony2.php $name
> is printed but not $lname.
>
> Alex


>
> - Original Message -
> From: "Anthony Ritter" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, December 07, 2001 12:01 AM
> Subject: [PHP] Trying to pass a variable through a form...
>
>
> > I'm trying to pass a variable from a form text box into a php file
> > (Tony1.php).
> >
> > Then, I'd like to click on a link in the Tony1.php page and get the
> > Tony2.php page to load with the original variable -$lname - printed on
the
> > next page (Tony2.php).
> >
> > The Tony2.php loads when I click the link but the value from the
variable
> is
> > not printed.
> >
> > Any help would be greatly appreciated.
> > The code is below.
> > Tony Ritter
> > ...
> >
> >
> > file://TonyForm.html//
> >
> > 
> > 
> > Name:  
> > 
> > 
> > 
> >
> > .
> > file://Tony1.php//
> >
> >  > echo ("Welcome $lname");
> > ?>
> >  Link 
> >
> >
> > ...
> > file://Tony2.php//
> >
> > Hello




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




Re: [PHP] Strange problem with some includes...

2001-12-06 Thread Deron

Yes sir:  -rw-rw-r--
Directory : drwxrwsr-x

Deron
www.metalages.com

"Martin Towell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> look at read permissions, does the web server have permissions to read
those
> files?
>
> -Original Message-
> From: Deron [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 9:03 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Strange problem with some includes...
>
>
> I have this page:
> http://www.metalages.com/2002/reviews/rev-evergrey-insearchoftruth.php
>
> If you look on the bottom, it says: Warning: Failed opening
> 'http://www.metalages.com/includes/relatedinfo/inc-evergrey.php' for
> inclusion (include_path='.:/usr/local/lib/php') in
> /home/www/metalages/2002/reviews/rev-evergrey-insearchoftruth.php on line
> 209
>
> The weird thing is, those paths are CORRECT and DO contain those files!
> WEIRD! Has anyone had something like this happen or know a cause as to why
> this would not work even if the paths it is looking for are 100% correct?
If
> you need to know the code in my page I'll be happy to provide, I'm
stumped!
>
> Deron
> www.metalages.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] Trying to pass a variable through a form...

2001-12-06 Thread Alex Shi

Can you paste Tnoy2.php script? Please make sure in Tony2.php $name
is printed but not $lname.

Alex

- Original Message -
From: "Anthony Ritter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 12:01 AM
Subject: [PHP] Trying to pass a variable through a form...


> I'm trying to pass a variable from a form text box into a php file
> (Tony1.php).
>
> Then, I'd like to click on a link in the Tony1.php page and get the
> Tony2.php page to load with the original variable -$lname - printed on the
> next page (Tony2.php).
>
> The Tony2.php loads when I click the link but the value from the variable
is
> not printed.
>
> Any help would be greatly appreciated.
> The code is below.
> Tony Ritter
> ...
>
>
> file://TonyForm.html//
>
> 
> 
> Name:  
> 
> 
> 
>
> .
> file://Tony1.php//
>
>  echo ("Welcome $lname");
> ?>
>  Link 
>
>
> ...
> file://Tony2.php//
>
> Hello
>
>
>
>
>
> --
> PHP General Mailing List (http://www.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] Trying to pass a variable through a form...

2001-12-06 Thread Anthony Ritter

I'm trying to pass a variable from a form text box into a php file
(Tony1.php).

Then, I'd like to click on a link in the Tony1.php page and get the
Tony2.php page to load with the original variable -$lname - printed on the
next page (Tony2.php).

The Tony2.php loads when I click the link but the value from the variable is
not printed.

Any help would be greatly appreciated.
The code is below.
Tony Ritter
...


file://TonyForm.html//



Name:  




.
file://Tony1.php//


 Link 


...
file://Tony2.php//

Hello





-- 
PHP General Mailing List (http://www.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] "trigger" words

2001-12-06 Thread Deron

Is there an easy way with PHP, or something else, to have a document on the
web where a certain word is mentioned within the page somewhere...in my case
a band name and it could automatically take that name/word and create it
as a link that's stored in either a flatfile or a database of some sort?

Deron
www.metalages.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: Help required MySql + PHP

2001-12-06 Thread CK Raju

On Thursday 06 December 2001 01:08, Karthikeyan wrote:
> Dear Members,
> I installed RedHat 7.1, Apache, PHP4 and MySQL in a Intel Pentium processor
> system.
> Everything works fine (i.e. MySQL, PHP, etc). But when I want to connect

Is phpinfo() working ?
Test on mysql support.

Check on the file extensions.
If you are using .html or .htm, probably you cant unless you make changes in 
the /etc/httpd/conf/httpd.conf file. (use .phtml or .php instead)

CK Raju

-- 
PHP General Mailing List (http://www.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] Apache restart env - i issues as concerns PHP

2001-12-06 Thread Rasmus Lerdorf

Hrm..  You seem to have worked out your issue yourself.  Yes, Apache by 
default inherits the environment it is started from.  Sometimes this is 
quite useful as some things need to be configured via environment 
variables.  ie. Oracle.  If you don't want any of your environment 
exposed, it is easy to start Apache with a clean one as you discovered.

-Rasmus

On Thu, 6 Dec 2001, Gerard Onorato wrote:

> I have a question about PHP under apache.
> I was playing with some PHP4.0.6 apps running under apache 1.3.20 on a
> vanilla
> RedHat 7.1 box. I was logged in as 'xyz' on the box via SSH.
> I 'su'd to root to restart apache (/etc/init.d/httpd restart) a few times
> during testing.
> 
> In one of my tests I exploited an exec function that sent unchecked input to
> shell. The input I gave was "...some expected input; echo TEST|mail
> myuserID"
> and I ended up getting the email but (the part that concerns me even more
> than
> the "hole") is that the email came from the 'xyz' userID!
> 
> A peek at 'ps' shows httpd -is- running as 'apache' (as expected)
> but...after quite a lengthy investigation, phpinfo(), e.g.
>  // phpinfo.php
>   phpinfo();
>   ?>
> shows, in the "Environment" section of the output, the environment VARS
> (PATH,
> MANPATH, USER, SSH session, etc... ) of the -xyz- user that restarted httpd!
> 
> I rebooted and let httpd come up "normally" and the same exploit sends mail
> as
> 'anonymous'. But after 'xyz' login, su and restart...email is sent
> as -xyz-?!?
> 
> After more investigation, I see this has been discussed before:
> 
> Some defensiveness from apache developers:
> http://www.geocrawler.com/mail/thread.php3?subject=general%2F6600%3A+phpinfo
> %28%29+returns+a+user+environment&list=192
> 
> workaround offered at:
> http://www.phpbuilder.com/mail/php-developer-list/2001042/0459.php
> 
> So... I added "env -i" to the /etc/init.d/httpd script
>   e.g. daemon env -i $httpd ..
> 
> 'xyz' login, su and restart (with 'env -i') and now the phpinfo() output has
> -nothing- listed in the Environment section. I guess that's to be expected
> but
> I'm still left scratching my head as to why the 'env -i' is not used
> -by default- in the RedHat (or other) httpd rc script for apache and what
> else
> might be impacted by doing so.
> 
> Is this just a PHP-under-apache issue?
> Insight anyone?
> 
> 
> 


-- 
PHP General Mailing List (http://www.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] Apache restart env - i issues as concerns PHP

2001-12-06 Thread Gerard Onorato

I have a question about PHP under apache.
I was playing with some PHP4.0.6 apps running under apache 1.3.20 on a
vanilla
RedHat 7.1 box. I was logged in as 'xyz' on the box via SSH.
I 'su'd to root to restart apache (/etc/init.d/httpd restart) a few times
during testing.

In one of my tests I exploited an exec function that sent unchecked input to
shell. The input I gave was "...some expected input; echo TEST|mail
myuserID"
and I ended up getting the email but (the part that concerns me even more
than
the "hole") is that the email came from the 'xyz' userID!

A peek at 'ps' shows httpd -is- running as 'apache' (as expected)
but...after quite a lengthy investigation, phpinfo(), e.g.
  
shows, in the "Environment" section of the output, the environment VARS
(PATH,
MANPATH, USER, SSH session, etc... ) of the -xyz- user that restarted httpd!

I rebooted and let httpd come up "normally" and the same exploit sends mail
as
'anonymous'. But after 'xyz' login, su and restart...email is sent
as -xyz-?!?

After more investigation, I see this has been discussed before:

Some defensiveness from apache developers:
http://www.geocrawler.com/mail/thread.php3?subject=general%2F6600%3A+phpinfo
%28%29+returns+a+user+environment&list=192

workaround offered at:
http://www.phpbuilder.com/mail/php-developer-list/2001042/0459.php

So... I added "env -i" to the /etc/init.d/httpd script
  e.g. daemon env -i $httpd ..

'xyz' login, su and restart (with 'env -i') and now the phpinfo() output has
-nothing- listed in the Environment section. I guess that's to be expected
but
I'm still left scratching my head as to why the 'env -i' is not used
-by default- in the RedHat (or other) httpd rc script for apache and what
else
might be impacted by doing so.

Is this just a PHP-under-apache issue?
Insight anyone?


-- 
PHP General Mailing List (http://www.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] Reg ex help-Removing extra blank spaces before HTML output

2001-12-06 Thread Jack Dempsey

cool, glad you got it working...if you think there's a bug with using / and
| you might want to see if you can replicate the problem, and if its really
a bug, submit it...my guess is that it was just a typo or something

jack

-Original Message-
From: Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 5:13 PM
To: Jack Dempsey; PHP list
Subject: RE: [PHP] Reg ex help-Removing extra blank spaces before HTML
output


OK, this time the \n worked.  The only thing I changed was using /
delimiters instead of | delimiters in the search string.  No idea if/why
that would affect anything in the replacement string.

Anyway, I finally came up with exactly what I wanted:
preg_replace(array("/\s*\n+\s*/", "/[ ]+/"), array("\n", " "), $input);

All padding (defined as any series of spaces, newlines and sometimes tabs)
is removed from $input, but always leaving at least a space or a newline in
its place.  If there were any newlines in the "padding", then a newline is
left.  If there weren't, then a space is left.

Thanks for the help!

Ken
[EMAIL PROTECTED]

At 04:40 PM 12/6/01 -0500, Jack Dempsey wrote:
>one call to preg_replace...if you check out php.net/preg_replace, you'll
see
>what i mean...use arrays...
>and as long as you have them ordered in the right way, it'll execute them
in
>that order, so by the time the \s replace comes up all your 'bbbnbb' will
be
>fixed...problem then is that those newlines would get caught by the \s and
>get switched to spaces...so, if you want them to stay, then use [ ] to
>represent a space instead of \s...might want [ \t] to catch tabs as well...



-- 
PHP General Mailing List (http://www.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] defeating squid

2001-12-06 Thread Rasmus Lerdorf

A standard cache-control header should do the trick:

Header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, 
pre-check=0");

-Rasmus

On Thu, 6 Dec 2001, Mark wrote:

> Hi,
> does anybody know of a way to 'encourage' squid to not cache files
> using headers or meta tags?
> 
> 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]
> 


-- 
PHP General Mailing List (http://www.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] defeating squid

2001-12-06 Thread Mark

Hi,
does anybody know of a way to 'encourage' squid to not cache files
using headers or meta tags?

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] Strange problem with some includes...

2001-12-06 Thread Deron

Hi Jim!



Ok couple of questions then...



.. yesterday these includes WERE working. For some reason I went to the site
today and they weren't. VERY weird! Since these includes are showing up on
multiple pages in different directories, I currently have them being called
like this:



Code in page: (out of whack due to cut/paste)



 0) {

$num=$x+1;

   } else {

$num='';

   }

  $incline=$GLOBALS["prefix"] .
$GLOBALS["folders"][$x] . $GLOBALS["preband"] . $bandname . $num .
$GLOBALS["suffix"];

  include($incline);

  if ($x<(count($GLOBALS["folders"])-1)) {

  echo"\n";

   }

  }

?>



Then I have a common.php outside of web folder with this code:



http://www.metalages.com/includes/';

$folders=array('relatedinfo/','alsosee/','sounds/','progged/');

$preband='inc-';

$suffix='.php';

?>



So, since it DID work yesterday for me, the code I have set up isn't
correct? I'm baffled by the fact that it did work for me yesterday, I kinda
wish it didn't now! LoL!





"Jimtronic" <[EMAIL PROTECTED]> wrote in message
news:p05101010b8359cecd8f0@[192.168.1.17]...
>
> It looks like you put a full URL into your include ... which would be
> incorrect.
>
> The syntax is ...
>
> include("path/relative/to/your/script");
>
> jim
>
> --
> Jim Musil
> -
> Multimedia Programmer
> Nettmedia
> -
> 212-629-0004
> [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] Help displaying an image stored in a database...

2001-12-06 Thread Martin Towell

in the html page have:

...

...


in myimage.php have:


-Original Message-
From: Christofe DuBois [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 10:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help displaying an image stored in a database...


I would like to store an image in a database and then allow users to select
the image for display...

I can upload the file, and write it to the database.  I base64_encode ' d it
and dropped it in a longblob field.

I then query the database, pull the encoded image out...  now what...

I have tried simply saying  and that doesn't work
worth squat...

So basically, I have:

HTML

HTML

HTML
HTML
HTML

Image to display here

HTML
HTML

HTML


How do I get the iamge to pull from teh database and display there in the
middle of all the HTML?

-Chris




-- 
PHP General Mailing List (http://www.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] Help displaying an image stored in a database...

2001-12-06 Thread Christofe DuBois

I would like to store an image in a database and then allow users to select
the image for display...

I can upload the file, and write it to the database.  I base64_encode ' d it
and dropped it in a longblob field.

I then query the database, pull the encoded image out...  now what...

I have tried simply saying  and that doesn't work
worth squat...

So basically, I have:

HTML

HTML

HTML
HTML
HTML

Image to display here

HTML
HTML

HTML


How do I get the iamge to pull from teh database and display there in the
middle of all the HTML?

-Chris




-- 
PHP General Mailing List (http://www.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] HTTP Environment Varialbles

2001-12-06 Thread Andrey Hristov

Searching Google :
http://php.weblogs.com/discuss/msgReader$934
List: php-dev
Subject:  [PHP-DEV] PHP 4.0.7
From: Zeev Suraski <[EMAIL PROTECTED]>
Date: 2001-08-08 18:48:19
As those of you who are subscribed to php-cvs may have noticed, Andi and I 
implemented today the functionality I suggested to replace register_globals:
!!!- $_GET, $_POST, $_COOKIE, $_FILES, $_ENV and $_SERVER replace $HTTP_*_VARS 
(the old vars still remain for downwards compatibility)!!!
- The new variables are auto-globals - they're available in all function 
contexts - there's no need to import them using the 'global' statement or 
reference them using $GLOBALS.
- $_REQUEST (this name might change) - includes the data from $_GET, 
$_POST, $_COOKIE and $_FILES, all in one array, for those users who don't 
really care to differentiate between the various types of input.
This change was my last major TODO item for PHP 4.0.7.  At this point, we 
should try to get PHP 4.0.7 out the door soon.  I suggest we branch 4.0.7 
away next Tuesday, and start the QA process.  This should give people 
enough time to make any final changes they want to put into 4.0.7.
One other idea I'd like to pitch is releasing 4.0.7 and 4.1.0 
simultaneously, with the only difference between them being the default 
value for register_globals.  This would create lots of noise and encourage 
people to start actually using the new $_GET&friends features, which can 
otherwise go unnoticed.
Regards and best wishes,
Andrey Hristov

-=-=-=-=-=-=-=-=-=-=--=-=-=-=-==-=-=--=-=
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Andrey Hristov" <[EMAIL PROTECTED]>
Cc: "Alex Shi" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 12:49 AM
Subject: Re: [PHP] HTTP Environment Varialbles


> > var_dump($HTTP_SERVER_VARS);
> > var_dump($HTTP_POST_VARS);
> > var_dump($HTTP_GET_VARS);
> > var_dump($HTTP_COOKIE_VARS);
> > var_dump($HTTP_ENV_VARS);
> > 
> > since 4.1.0 these are deprecated. Use
> > $_SERVER, $_POST, $_GET, $_COOKIE, $_ENV
> 
> They are not deprecated.  They will still work.  $_* are slightly 
> different in that they are auto-globals just like $GLOBALS.  An 
> auto-global does not need to be declared global inside a function.
> 
> -Rasmus
> 
> 
> -- 
> PHP General Mailing List (http://www.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] Again (still?) problems with php and ldaps

2001-12-06 Thread Stig Venaas

On Thu, Dec 06, 2001 at 12:08:12PM +0100, Susanne Benkert wrote:
> After recompiling my Php with the newest LDAP-Libraries and Openssl
> "ldap_connect("ldap://hostname";)" works. But I still have problems with
> "ldap_connect("ldaps://hostname")": 

Could you check whether ldapsearch -H "ldaps://hostname" works? PHP
should work if and only if this works. As hostname you should use
the same as the CN in the certificate, probably the FQDN (full
hostname and domain).

> What did I wrong? Does Php need its own Key/Certificate (as client
> certificate)? Or is something wrong with my server certificate of Ldap?
> (But I can't imagine, because other actions like ldapsearch already seem
> to work with TLS.) 

Did you also try with -H ldaps:// and the same hostname? Client
certificate is only needed if you put "TLSVerifyClient 1" in
slapd.conf on the server.

> Has anything should be change in the configuration of php when using it
> with SSL and Openldap?

No.

I suggest you try to get ldapsearch -H ldaps://host/ to work first.
If it doesn't work (and you don't get more answers here), please ask
on the OpenLDAP lists. If you get ldapsearch -H to work, but not PHP,
then this is the place to ask or submit a report at bugs.php.net. I'm
pretty sure ldapsearch -H will give the same error though.

I see now that you did mail the OpenLDAP list as well. I think that
is the right place, but there is a danger people there will think
it's a PHP problem. If you don't get answers there, test with
ldapsearch -H, and if that fails, post that on the OpenLDAP list as
well, since in that case PHP isn't involved.

I could try to provide more help if necessary, but I'll be mostly
available for over a week now, so I hope some others will offer
help as well.

Don't give up,

Stig

-- 
PHP General Mailing List (http://www.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] Sending PHP script output to stderr?

2001-12-06 Thread Martin Towell

$fp = fopen("php://stderr", "w");
fputs($fp, "error message");
fclose($fp);

never tried it, but that's what it says in the manual (look at fopen())

-Original Message-
From: Ken [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 10:01 AM
To: PHP list
Subject: [PHP] Sending PHP script output to stderr?


Is there a way to get a PHP script to return text that would be directed to
stderr instead of to stdout?

This is for a PHP script that I'm running via cron, and I don't need its
output (which at the least includes the annoying "Content-type: text/html"
at the top), but I would like to know about errors.

Thanks,
Ken


-- 
PHP General Mailing List (http://www.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] Sending PHP script output to stderr?

2001-12-06 Thread Ken

Is there a way to get a PHP script to return text that would be directed to stderr 
instead of to stdout?

This is for a PHP script that I'm running via cron, and I don't need its output (which 
at the least includes the annoying "Content-type: text/html" at the top), but I would 
like to know about errors.

Thanks,
Ken


-- 
PHP General Mailing List (http://www.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] Announcement: Smarty template engine 1.5.0 available

2001-12-06 Thread Monte Ohrt

Several feature enhancements were made to this version, most notably the
{foreach ...} command which is an alternative to {section ...} with an
easier syntax for looping through a single array of values. Several
functions were enhanced so that the output can be automatically assigned
to a template variable instead of displayed (assign attribute). Cache
files can now be controlled with a custom function as an alternative to
the built-in file based method. Many code cleanups and bug fixed went
into this release as well.

Monte

http://www.phpinsider.com/php/code/Smarty/

ChangeLog since 1.4.6:
--

- added include_php built-in function, documented. (Monte)
- added trusted_dir functionality, documented. (Monte)
- consolidated secure_dir tests to one function. (Monte)
- prepended _smarty_ to variable names in fetch() class function to
avoid
  namespace conflicts. (Monte)
- introduced $compile_id class variable that can be used to set
persistent
  compile identifier across multiple display calls, documented. (Andrei)
- fixed bug with concatenated null cache and compile identifiers.
(Andrei)
- added $smarty.section.* syntax for accessing section properties,
  documented. (Andrei)
- added custom cache handling function ability, documented. (Monte)
- added assign attribute to include, include_php, insert, fetch, math,
and
  counter functions, documented. (Monte)
- fixed bug with fetch testing for local file when http address. (Monte)
- fixed bug with counter and skipval setting. (Monte)
- made {config_load ...} merge globals from each config file only once
per
  scope, thus avoiding several problems. (Andrei)
- added {foreach ...} tag that can be used to iterate through
  non-sequential and associative arrays, documented. (Andrei)
- speeded up section property access a bit. (Andrei)
- removed $smarty variable from storage used by normal template
variables,
  to prevent any problems. (Andrei)
- fixed a bug that could cause parse error with quotes inside literal
  blocks. (Andrei, Alexander Belonosov)
- added 'field_array' attribute to html_select_time function,
documented.
  (Andrei, Michael Caplan)
- documented {section} "max" attribute. (Monte)
- fixed notice message in Smarty_Compiler.class.php. (Monte)
- fixed bug with clear_cache introduced in 1.4.6, third parameter should
  default to null. (Monte)
- updated Config_File class to support '\' path separator in OS/2.
(Monte,
  Francesco Cipriani)
- removed secure_ext setting (not used). (Monte)
- made cache reading process more efficient. (Monte)
- fixed bug, is_cached() now supports new 1.4.6 caching behavior.
(Monte)
- update FAQ with mailing list Reply-To header FAQ. (Monte)
- supress error messages for fopen(), fix cache to regenerate if cache
  file is not available (i.e. cluster race condition). (Monte)
- added index key example to QUICKSTART guide. (Monte)

-- 
PHP General Mailing List (http://www.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] HTTP Environment Varialbles

2001-12-06 Thread Rasmus Lerdorf

> var_dump($HTTP_SERVER_VARS);
> var_dump($HTTP_POST_VARS);
> var_dump($HTTP_GET_VARS);
> var_dump($HTTP_COOKIE_VARS);
> var_dump($HTTP_ENV_VARS);
> 
> since 4.1.0 these are deprecated. Use
> $_SERVER, $_POST, $_GET, $_COOKIE, $_ENV

They are not deprecated.  They will still work.  $_* are slightly 
different in that they are auto-globals just like $GLOBALS.  An 
auto-global does not need to be declared global inside a function.

-Rasmus


-- 
PHP General Mailing List (http://www.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] HTTP Environment Varialbles

2001-12-06 Thread Andrey Hristov

var_dump($HTTP_SERVER_VARS);
var_dump($HTTP_POST_VARS);
var_dump($HTTP_GET_VARS);
var_dump($HTTP_COOKIE_VARS);
var_dump($HTTP_ENV_VARS);

since 4.1.0 these are deprecated. Use
$_SERVER, $_POST, $_GET, $_COOKIE, $_ENV

Regards,
Andrey Hristov
- Original Message - 
From: "Alex Shi" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 12:41 AM
Subject: [PHP] HTTP Environment Varialbles


> Hi,
> 
> I have a question about how we can read environment variables. In perl we
> can
> do this as following:
> 
> $caller = $ENV{'HTTP_REFERER'};
> $doc_name = $ENV{'DOCUMENT_NAME'};
> $visitor_ip = $ENV{'REMOTE_ADDR'};
> $visitor_host = $ENV{'REMOTE_HOST'};
> 
> Actually in Perl, either SSI or CGI, we can get all the environment
> variables.
> 
> How can we do the same thing in PHP?
> 
> Alex
> 
> 
> -- 
> PHP General Mailing List (http://www.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] HTTP Environment Varialbles

2001-12-06 Thread Alex Shi

Hi,

I have a question about how we can read environment variables. In perl we
can
do this as following:

$caller = $ENV{'HTTP_REFERER'};
$doc_name = $ENV{'DOCUMENT_NAME'};
$visitor_ip = $ENV{'REMOTE_ADDR'};
$visitor_host = $ENV{'REMOTE_HOST'};

Actually in Perl, either SSI or CGI, we can get all the environment
variables.

How can we do the same thing in PHP?

Alex


-- 
PHP General Mailing List (http://www.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] Forms and Results with PHP

2001-12-06 Thread Gareth Hastings

I do forms like this








The if line just checks to see if any data has been passed if it has it
prints what you send else if shows the form




-Original Message-
From: Ben Clumeck [mailto:[EMAIL PROTECTED]] 
Sent: 06 December 2001 17:14
To: [EMAIL PROTECTED]
Subject: [PHP] Forms and Results with PHP

I have a form that a user can put his contact info.  This form posts to
a
file called results.php.  The results.php file has a mail() command and
the
echo (i.e. )  to show the user confirmation of what
he
has submitted.

However, if someone goes directly to results.php it will show Name:
blank
and email blank information.  Is there a way for the page to post an
error
stating no information was submitted or is there a way to enable the
page to
process without information?

Thanks for the help,
Ben


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




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




[PHP] Re: Forms and Results with PHP

2001-12-06 Thread Chris Noble

Have it check to see if the submit button has been clicked. such as the name
attribute you use on it. like
if(!isset($HTTP_POST_VARS[submit]))
{
header("Location: formpage.php");
}

Chris N.

"Ben Clumeck" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a form that a user can put his contact info.  This form posts to a
> file called results.php.  The results.php file has a mail() command and
the
> echo (i.e. )  to show the user confirmation of what he
> has submitted.
>
> However, if someone goes directly to results.php it will show Name: blank
> and email blank information.  Is there a way for the page to post an error
> stating no information was submitted or is there a way to enable the page
to
> process without information?
>
> Thanks for the help,
> Ben
>



-- 
PHP General Mailing List (http://www.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] Forms and Results with PHP

2001-12-06 Thread jimtronic


It's good practice to check that needed variables were passed at the 
top of the page.

if($name) {

normal display
exit

} else {

error display
exit
}

To take this further, you should verify that not only was the 
required data sent, but that it was in the correct format and not 
some malicious attack.


>I have a form that a user can put his contact info.  This form posts to a
>file called results.php.  The results.php file has a mail() command and the
>echo (i.e. )  to show the user confirmation of what he
>has submitted.
>
>However, if someone goes directly to results.php it will show Name: blank
>and email blank information.  Is there a way for the page to post an error
>stating no information was submitted or is there a way to enable the page to
>process without information?
>
>Thanks for the help,
>Ben
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[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] Forms and Results with PHP

2001-12-06 Thread Martin Towell

what about checking for some mandatory field and if it doesn't exist,
display an error message. something like:



-Original Message-
From: Ben Clumeck [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 9:14 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Forms and Results with PHP


I have a form that a user can put his contact info.  This form posts to a
file called results.php.  The results.php file has a mail() command and the
echo (i.e. )  to show the user confirmation of what he
has submitted.

However, if someone goes directly to results.php it will show Name: blank
and email blank information.  Is there a way for the page to post an error
stating no information was submitted or is there a way to enable the page to
process without information?

Thanks for the help,
Ben


-- 
PHP General Mailing List (http://www.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] Forms and Results with PHP

2001-12-06 Thread Ben Clumeck

I have a form that a user can put his contact info.  This form posts to a
file called results.php.  The results.php file has a mail() command and the
echo (i.e. )  to show the user confirmation of what he
has submitted.

However, if someone goes directly to results.php it will show Name: blank
and email blank information.  Is there a way for the page to post an error
stating no information was submitted or is there a way to enable the page to
process without information?

Thanks for the help,
Ben


-- 
PHP General Mailing List (http://www.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] Reg ex help-Removing extra blank spaces before HTML output

2001-12-06 Thread Ken

OK, this time the \n worked.  The only thing I changed was using / delimiters instead 
of | delimiters in the search string.  No idea if/why that would affect anything in 
the replacement string.

Anyway, I finally came up with exactly what I wanted:
preg_replace(array("/\s*\n+\s*/", "/[ ]+/"), array("\n", " "), $input);

All padding (defined as any series of spaces, newlines and sometimes tabs) is removed 
from $input, but always leaving at least a space or a newline in its place.  If there 
were any newlines in the "padding", then a newline is left.  If there weren't, then a 
space is left.

Thanks for the help!

Ken
[EMAIL PROTECTED]

At 04:40 PM 12/6/01 -0500, Jack Dempsey wrote:
>one call to preg_replace...if you check out php.net/preg_replace, you'll see
>what i mean...use arrays...
>and as long as you have them ordered in the right way, it'll execute them in
>that order, so by the time the \s replace comes up all your 'bbbnbb' will be
>fixed...problem then is that those newlines would get caught by the \s and
>get switched to spaces...so, if you want them to stay, then use [ ] to
>represent a space instead of \s...might want [ \t] to catch tabs as well...


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




RE: [PHP] Strange problem with some includes...

2001-12-06 Thread Martin Towell

look at read permissions, does the web server have permissions to read those
files?

-Original Message-
From: Deron [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 9:03 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Strange problem with some includes...


I have this page:
http://www.metalages.com/2002/reviews/rev-evergrey-insearchoftruth.php

If you look on the bottom, it says: Warning: Failed opening
'http://www.metalages.com/includes/relatedinfo/inc-evergrey.php' for
inclusion (include_path='.:/usr/local/lib/php') in
/home/www/metalages/2002/reviews/rev-evergrey-insearchoftruth.php on line
209

The weird thing is, those paths are CORRECT and DO contain those files!
WEIRD! Has anyone had something like this happen or know a cause as to why
this would not work even if the paths it is looking for are 100% correct? If
you need to know the code in my page I'll be happy to provide, I'm stumped!

Deron
www.metalages.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] Strange problem with some includes...

2001-12-06 Thread jimtronic


It looks like you put a full URL into your include ... which would be 
incorrect.

The syntax is ...

include("path/relative/to/your/script");

jim

-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[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] move_uploaded_file on NT Server

2001-12-06 Thread jimtronic

Hi,

I've been having a problem moving uploaded files recently.

I have a script in directory

/foo/bar

  and it has no trouble moving a file into

/foo/rex

  but it can't move a file into

/foo/zip

This is strange because I created all the folders and the scripts, so 
presumably they would have the same gid/pid as required by safe mode. 
But this all seems like *nix terminology and not NT. The folders (rex 
and zip) are as identical as I could make them.

Actually, to clarify, I created all the folders but I used different 
ftp programs to
create them. (FTP Voyager, WS-FTP, Homesite)

Anyone else have this problem?

-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[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] Strange problem with some includes...

2001-12-06 Thread Deron

I have this page:
http://www.metalages.com/2002/reviews/rev-evergrey-insearchoftruth.php

If you look on the bottom, it says: Warning: Failed opening
'http://www.metalages.com/includes/relatedinfo/inc-evergrey.php' for
inclusion (include_path='.:/usr/local/lib/php') in
/home/www/metalages/2002/reviews/rev-evergrey-insearchoftruth.php on line
209

The weird thing is, those paths are CORRECT and DO contain those files!
WEIRD! Has anyone had something like this happen or know a cause as to why
this would not work even if the paths it is looking for are 100% correct? If
you need to know the code in my page I'll be happy to provide, I'm stumped!

Deron
www.metalages.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] Function Alias: mysql()

2001-12-06 Thread Dennis Moore

I think it is aliased to mysql_db_query().  However the documentation states
that this function is deprecated in PHP4.0.6.

"Note: This function has been deprecated since PHP 4.0.6. Do not use this
function. Use mysql_select_db() and mysql_query() instead. "  (www.php.net
documentation)

My question is why is my code  still working? If so, what are the
consequences of  using mysql() or mysql_db_query(0 with PHP4.0.6?

/dkm


- Original Message -
From: "Tyler Longren" <[EMAIL PROTECTED]>
To: "Dennis Moore" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 4:23 PM
Subject: Re: [PHP] Function Alias: mysql()


> Are you sure that isn't a custom function in your code (assuming you're
> using somebody else's code)?
>
> It could be an alias to: mysql_db_query()
> It has the same handlers, ex:
> $rez=mysql_db_query($dbname,$query);
>
> Tyler Longren
>
> - Original Message -
> From: "Dennis Moore" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 06, 2001 3:12 PM
> Subject: [PHP] Function Alias: mysql()
>
>
> I cannot seem to find in the documentation the what the function mysql()
is
> aliaseed to using PHP4.0.6.  Any ideas?
>
> Example:
>
> $rez=mysql($dbname,$query);
>
> Everything works fine... But I want to be sure what is actually being
used.
>
> /dkm
>
>
>


-- 
PHP General Mailing List (http://www.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] Creating multidimensional array dynamically

2001-12-06 Thread Mike Eheler

Oops.. my bad
$quarterbacks[$data['NAME']][$key] = $value;

Mike

Mike Eheler wrote:

> $result = mysql_query("select NAME,ATTEMPTS,COMPLETIONS,YARDS,TD,INT 
> from players where pos = 'QB'");
> // or whatever it takes to get just qb's
> while ($data = mysql_fetch_array($result)) {
>foreach ($data as $key => $value) {
>// I've noticed that $data stores numeric and text keys, this 
> filters the numeric ones
>if (!is_numeric($key)) {
>$quarterbacks[$name][$key] = $value;
>}
>}
> }
>
> That's how I'd do it.. a little extra work, but it keeps only the data 
> you want on hand.
>
> It's also a good idea to store the name so you can reference later if 
> you want to spew forth all the qbs..
>
> Mike
>
> J. Roberts wrote:
>
>> I can't seem to figure out how to create a multidimensional array from
>> a database query.  Here is an example of what I was looking for, using
>> NFL quarterbacks as a statistical foundation...
>> A record contains the following fields:
>>
>> NAME, ATTEMPTS, COMPLETIONS, YARDS, TD, INT
>>
>> Now I would like to be able to create an array with NAME as a key 
>> containing
>> the array(ATTEMPTS, COMPLETIONS, YARDS, TD, INT).
>>
>> That way I would be able to do the following:
>>
>> echo $quarterbacks["GARCIA"]["YARDS"];
>>
>> and get the output of 3,100 or whatever the case may be.
>>
>> Thanks,
>> -Jamison.
>>
>>
>>
>
>
>



-- 
PHP General Mailing List (http://www.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] Creating multidimensional array dynamically

2001-12-06 Thread Mike Eheler

$result = mysql_query("select NAME,ATTEMPTS,COMPLETIONS,YARDS,TD,INT 
from players where pos = 'QB'");
// or whatever it takes to get just qb's
while ($data = mysql_fetch_array($result)) {
foreach ($data as $key => $value) {
// I've noticed that $data stores numeric and text keys, this 
filters the numeric ones
if (!is_numeric($key)) {
$quarterbacks[$name][$key] = $value;
}
}
}

That's how I'd do it.. a little extra work, but it keeps only the data 
you want on hand.

It's also a good idea to store the name so you can reference later if 
you want to spew forth all the qbs..

Mike

J. Roberts wrote:

>I can't seem to figure out how to create a multidimensional array from
>a database query.  Here is an example of what I was looking for, using
>NFL quarterbacks as a statistical foundation...
>A record contains the following fields:
>
>NAME, ATTEMPTS, COMPLETIONS, YARDS, TD, INT
>
>Now I would like to be able to create an array with NAME as a key containing
>the array(ATTEMPTS, COMPLETIONS, YARDS, TD, INT).
>
>That way I would be able to do the following:
>
>echo $quarterbacks["GARCIA"]["YARDS"];
>
>and get the output of 3,100 or whatever the case may be.
>
>Thanks,
>-Jamison.
>
>
>



-- 
PHP General Mailing List (http://www.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] Display BLOB Image

2001-12-06 Thread Steve Cayford

This is what I used to do what you're trying:

header("Content-Type: image/" . $imagetype); // $imagetype is jpeg or gif
header("Content-Length: " . strlen($image));
echo $image;

Note that "Type" is capitalized in "Content-Type", and include the 
"Content-Length" as well.

-Steve


On Thursday, December 6, 2001, at 02:45  PM, phantom wrote:

> I have successfully placed images (jpg,gif,png) into a MySQL database
> BLOB field, now I want to be able to pull the data out and diplay it.
>
> based on tutorial at
> http://www.zdnet.com/devhead/stories/articles/0,4413,2644827,00.html
>
> after Querying the DB I have the following lines:
>
> $ImgFile = mysql_result($Results,0,ImgFile); \\ image data;
> $ImgType = mysql_result($Results,0,ImgType);  \\ image type (image/jpeg,
> image/gif);
> header("Content-type: ${ImgType}");
> echo "$ImgFile";
>
> Problem: This method, when it pulls up an image, it shows no image but a
> bunch of greek code.  Example
> http://www.phantomcougar.com/strawberrypie_com/mem/show_img.php?PNum=8
> ((be sure to view page source)
>
>
>
>
> --
> PHP General Mailing List (http://www.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] Reg ex help-Removing extra blank spaces before HTML output

2001-12-06 Thread Jack Dempsey

second issue first:
one call to preg_replace...if you check out php.net/preg_replace, you'll see
what i mean...use arrays...
and as long as you have them ordered in the right way, it'll execute them in
that order, so by the time the \s replace comes up all your 'bbbnbb' will be
fixed...problem then is that those newlines would get caught by the \s and
get switched to spaces...so, if you want them to stay, then use [ ] to
represent a space instead of \s...might want [ \t] to catch tabs as well...
first issue: hard to see whats going on, but check your syntax. i just ran
this;
$text = "this is some text with a newline in it right here \n  there it
was";
echo $text;
echo '';
echo preg_replace("/[ ]+\n+[ ]+/","\n",$text);
and it made the substitution fine.

jack

-Original Message-
From: Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 1:56 PM
To: Jack Dempsey
Subject: RE: [PHP] Reg ex help-Removing extra blank spaces before HTML
output


At 11:41 AM 12/6/01 -0500, Jack Dempsey wrote:
>using "\n" as your replacement text will do ithowever, if you want a
>newline in the html, then you'll want ...

Using "\n" (either in single or double quotes) resulted in actual 'backslash
n' being all over my output, instead of newlines.  Hence, my inquiry.

>your first pattern will be "/[ ]+\n+[ ]+/" with a replacement of a single
>newline...then the second will be the previous regex.check out php.net
>for help with syntax and using arrays with preg_* functionsthe first
>should catch all situations of a series of spaces [with at least one
newline
>in between them] and substitute a newline.

Thanks, sounds about right.  The second pattern (which sometimes includes
getting rid of newlines) won't clobber the results of the first pattern?
And are you suggesting two separate calls to the preg* function?  It sounds
like you are, if each of the two patterns also has a unique replacement
string.

Thanks a lot!

- Ken
[EMAIL PROTECTED]

>check out mastering regular expressions as well.its worth the money
>jack
>
>-Original Message-
>From: Ken [mailto:[EMAIL PROTECTED]]
>
>At 02:43 PM 12/5/01 -0500, Jack Dempsey wrote:
> >$t = preg_replace('/\s+/',' ',$text);
>
>One more thing:
>How do I replace with newline instead of a space?  I read through the
>manuals but couldn't grasp how to do this.  \n didn't cut it.
>
>And, more advanced -
>The above replaces any groups of 2 or more blanks (newlines, spaces, tabs)
>with a single blank.
>Is there an easy way to replace them with EITHER a space or a newline,
>depending on whether any newlines were present in the input?
>I.e. bb would be replaced with b, but bnbn would be
>replaced with n.



-- 
PHP General Mailing List (http://www.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] Creating multidimensional array dynamically

2001-12-06 Thread jimtronic


you could also do this ...

$data = mysql_fetch_assoc($res); //this is a nice function because it 
returns an associative array. so
// if you change your SQL db, you 
wouldn't need to change your php code
// as much.

$quarterbacks[$name]= $data;


jim




>Something like this?
>
>while( list( $name, $attempts, $completions, $yards, $td, $int ) =
>mysql_fetch_row($res) )
>{
>   $quarterbacks[$name] = array( "ATTEMPTS" => $attempts,
>   "COMPLETIONS" =>
>$completions,
>   "YARDS" => $yards,
>   "TD" => $td,
>   "INT" => $int );
>}
>
>echo $quarterbacks["GARCIA"]["YARDS"];
>
>Jason Lotito
>[EMAIL PROTECTED]
>www.NewbieNetwork.net
>
>>  -Original Message-
>>  From: J. Roberts [mailto:[EMAIL PROTECTED]]
>>  Sent: Thursday, December 06, 2001 4:08 PM
>>  To: [EMAIL PROTECTED]
>>  Subject: [PHP] Creating multidimensional array dynamically
>>
>>
>>  I can't seem to figure out how to create a multidimensional
>>  array from a database query.  Here is an example of what I
>>  was looking for, using NFL quarterbacks as a statistical
>>  foundation... A record contains the following fields:
>>
>>  NAME, ATTEMPTS, COMPLETIONS, YARDS, TD, INT
>>
>>  Now I would like to be able to create an array with NAME as a
>>  key containing the array(ATTEMPTS, COMPLETIONS, YARDS, TD, INT).
>>
>>  That way I would be able to do the following:
>>
>>  echo $quarterbacks["GARCIA"]["YARDS"];
>>
>>  and get the output of 3,100 or whatever the case may be.
>>
>>  Thanks,
>>  -Jamison.
>>
>>
>>
>>  --
>>  PHP General Mailing List (http://www.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]


-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[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] Function Alias: mysql()

2001-12-06 Thread Tyler Longren

Are you sure that isn't a custom function in your code (assuming you're
using somebody else's code)?

It could be an alias to: mysql_db_query()
It has the same handlers, ex:
$rez=mysql_db_query($dbname,$query);

Tyler Longren

- Original Message -
From: "Dennis Moore" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 3:12 PM
Subject: [PHP] Function Alias: mysql()


I cannot seem to find in the documentation the what the function mysql() is
aliaseed to using PHP4.0.6.  Any ideas?

Example:

$rez=mysql($dbname,$query);

Everything works fine... But I want to be sure what is actually being used.

/dkm




-- 
PHP General Mailing List (http://www.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] Creating multidimensional array dynamically

2001-12-06 Thread Dennis Moore

Not sure what you are trying to do, but try using

mysql_fetch_row ()

you can use SQL to limit your results.

/dkm


- Original Message -
From: "J. Roberts" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 4:08 PM
Subject: [PHP] Creating multidimensional array dynamically


> I can't seem to figure out how to create a multidimensional array from
> a database query.  Here is an example of what I was looking for, using
> NFL quarterbacks as a statistical foundation...
> A record contains the following fields:
>
> NAME, ATTEMPTS, COMPLETIONS, YARDS, TD, INT
>
> Now I would like to be able to create an array with NAME as a key
containing
> the array(ATTEMPTS, COMPLETIONS, YARDS, TD, INT).
>
> That way I would be able to do the following:
>
> echo $quarterbacks["GARCIA"]["YARDS"];
>
> and get the output of 3,100 or whatever the case may be.
>
> Thanks,
> -Jamison.
>
>
>
> --
> PHP General Mailing List (http://www.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] Creating multidimensional array dynamically

2001-12-06 Thread Jason Lotito

Something like this?

while( list( $name, $attempts, $completions, $yards, $td, $int ) =
mysql_fetch_row($res) )
{
$quarterbacks[$name] = array( "ATTEMPTS" => $attempts,
"COMPLETIONS" =>
$completions,
"YARDS" => $yards,
"TD" => $td,
"INT" => $int );
}

echo $quarterbacks["GARCIA"]["YARDS"];

Jason Lotito
[EMAIL PROTECTED]
www.NewbieNetwork.net

> -Original Message-
> From: J. Roberts [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, December 06, 2001 4:08 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Creating multidimensional array dynamically
> 
> 
> I can't seem to figure out how to create a multidimensional 
> array from a database query.  Here is an example of what I 
> was looking for, using NFL quarterbacks as a statistical 
> foundation... A record contains the following fields:
> 
> NAME, ATTEMPTS, COMPLETIONS, YARDS, TD, INT
> 
> Now I would like to be able to create an array with NAME as a 
> key containing the array(ATTEMPTS, COMPLETIONS, YARDS, TD, INT).
> 
> That way I would be able to do the following:
> 
> echo $quarterbacks["GARCIA"]["YARDS"];
> 
> and get the output of 3,100 or whatever the case may be.
> 
> Thanks,
> -Jamison.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.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] Creating multidimensional array dynamically

2001-12-06 Thread J. Roberts

I can't seem to figure out how to create a multidimensional array from
a database query.  Here is an example of what I was looking for, using
NFL quarterbacks as a statistical foundation...
A record contains the following fields:

NAME, ATTEMPTS, COMPLETIONS, YARDS, TD, INT

Now I would like to be able to create an array with NAME as a key containing
the array(ATTEMPTS, COMPLETIONS, YARDS, TD, INT).

That way I would be able to do the following:

echo $quarterbacks["GARCIA"]["YARDS"];

and get the output of 3,100 or whatever the case may be.

Thanks,
-Jamison.



-- 
PHP General Mailing List (http://www.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] Function Alias: mysql()

2001-12-06 Thread Dennis Moore

I cannot seem to find in the documentation the what the function mysql() is aliaseed 
to using PHP4.0.6.  Any ideas?

Example:

$rez=mysql($dbname,$query);

Everything works fine... But I want to be sure what is actually being used.

/dkm




[PHP] Display BLOB Image

2001-12-06 Thread phantom

I have successfully placed images (jpg,gif,png) into a MySQL database
BLOB field, now I want to be able to pull the data out and diplay it.

based on tutorial at
http://www.zdnet.com/devhead/stories/articles/0,4413,2644827,00.html

after Querying the DB I have the following lines:

$ImgFile = mysql_result($Results,0,ImgFile); \\ image data;
$ImgType = mysql_result($Results,0,ImgType);  \\ image type (image/jpeg,
image/gif);
header("Content-type: ${ImgType}");
echo "$ImgFile";

Problem: This method, when it pulls up an image, it shows no image but a
bunch of greek code.  Example
http://www.phantomcougar.com/strawberrypie_com/mem/show_img.php?PNum=8
((be sure to view page source)




-- 
PHP General Mailing List (http://www.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] extracting info from HTML

2001-12-06 Thread Boaz Yahav

Hi

Suppose I have something like this :


Test1-1
Test1-2
Test1-3
Test1-4
Test1-5


Test2-1
Test2-2
Test2-3
Test2-4
Test2-5


How can I get to the data most easily?
The data are the Test1-1, Test1-2..


berber

--
PHP General Mailing List (http://www.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] Extending classes multiple times

2001-12-06 Thread Matt Friedman

This is what I had thought. I wasn't sure and needed the clarification. 

Thanks as always! 

Matt Friedman


-Original Message-
From: Harshdeep S Jawanda [mailto:[EMAIL PROTECTED]] 
Sent: Thursday December 6, 2001 1:55 PM
To: Matt Friedman
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Extending classes multiple times

I am not very sure what your question is, but "multiple inheritance"
means that a derived class can inherit (i.e., be derived from) more
than one class.

In multiple inhericance, you can have:

A   B
|   |
+---+---+
|
C

Here, C is simultaneously derived from A & B. You can't have this in
single inheritance (which is what the PHP manual is saying). This means
that C can be derived from either A or B, not both.

The following is always possible, irrespective of whether multiple
inheritance is supported or not:

A
|
+-B
|
+-C
|
+-D

This is three different classes (B, C and D) derived from A.

Hope this helps clarify your doubts.

--- Matt Friedman <[EMAIL PROTECTED]> wrote:
> I had been under the impression that one could extend a class only
> once.
> That is, if I extend class A with class B I would then not be able to
> extend B again with any other class. 
> 
> See: http://www.php.net/manual/en/keyword.extends.php
> "An extended class is always dependent on a single base class, that
> is,
> multiple inheritance is not supported. Classes are extended using the
> keyword 'extends'."
> 
> With some testing however, it appears that I can extend class B with
> class C and class C with class D and so on...
> 
> Am I misinterpreting the manual? I suspect I am. Or is this a new
> feature. Thoughts?
> 
> Thanks,
> 
> Matt Friedman
> Web Applications Developer
> www.SpryNewMedia.com
> 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]
> 
> 
> 


=
Please send all emails to my automatically redirecting
address: [EMAIL PROTECTED]

Regards,
Harshdeep S Jawanda
[[EMAIL PROTECTED]]

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.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] Extending classes multiple times

2001-12-06 Thread Harshdeep S Jawanda

I am not very sure what your question is, but "multiple inheritance"
means that a derived class can inherit (i.e., be derived from) more
than one class.

In multiple inhericance, you can have:

A   B
|   |
+---+---+
|
C

Here, C is simultaneously derived from A & B. You can't have this in
single inheritance (which is what the PHP manual is saying). This means
that C can be derived from either A or B, not both.

The following is always possible, irrespective of whether multiple
inheritance is supported or not:

A
|
+-B
|
+-C
|
+-D

This is three different classes (B, C and D) derived from A.

Hope this helps clarify your doubts.

--- Matt Friedman <[EMAIL PROTECTED]> wrote:
> I had been under the impression that one could extend a class only
> once.
> That is, if I extend class A with class B I would then not be able to
> extend B again with any other class. 
> 
> See: http://www.php.net/manual/en/keyword.extends.php
> "An extended class is always dependent on a single base class, that
> is,
> multiple inheritance is not supported. Classes are extended using the
> keyword 'extends'."
> 
> With some testing however, it appears that I can extend class B with
> class C and class C with class D and so on...
> 
> Am I misinterpreting the manual? I suspect I am. Or is this a new
> feature. Thoughts?
> 
> Thanks,
> 
> Matt Friedman
> Web Applications Developer
> www.SpryNewMedia.com
> 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]
> 
> 
> 


=
Please send all emails to my automatically redirecting
address: [EMAIL PROTECTED]

Regards,
Harshdeep S Jawanda
[[EMAIL PROTECTED]]

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.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] Failed to initialize session module

2001-12-06 Thread derek fong

Hello,

I am trying to get session data written to a MySQL table using 
set_session_save_handler(), but am getting the following error when I 
issue session_register("varname") on a page:

Fatal error: Failed to initialize session module in 
/Library/WebServer/Documents/VirtualHosts/www/admin/en/login.php on 
line 4

I have set session.save_handler to user and session.save_path to 
mysql://USER:PASS@localhost/DB in my php.ini file.  File-based 
sessions seem to work fine with session.save_handler set to files and 
session.save_path to /tmp.  I am using the following code as my save 
handler (taken from Web Application Development With PHP 4.0 by 
Tobias Ratschiller and Till Gerken):




I have also tried Sam Johnston's PEAR Custom Session Handler for PHP4 
(http://sourceforge.net/projects/pearsession/), but I get the same 
error.  Like I said, file-based sessions are working fine, but any 
custom handler bombs with the error I noted above.  This is all 
running under Mac OS X 10.1.1, PHP 4.0.6 using the PEAR DB libraries 
(among others) and MySQL 3.23.43.

What could be causing the error?  I've searched and searched but 
can't seem to find any answers.  Thanks in advance,

-f


-- 
Derek Fong
Web Application Developer
subtitle designs inc. 

"Mistakes are the portals of discovery." --James Joyce
>> GPG key/fingerprint available upon request <<


Re: [PHP] Extending classes multiple times

2001-12-06 Thread Rasmus Lerdorf

> I had been under the impression that one could extend a class only once.
> That is, if I extend class A with class B I would then not be able to
> extend B again with any other class. 
> 
> See: http://www.php.net/manual/en/keyword.extends.php
> "An extended class is always dependent on a single base class, that is,
> multiple inheritance is not supported. Classes are extended using the
> keyword 'extends'."
> 
> With some testing however, it appears that I can extend class B with
> class C and class C with class D and so on...
> 
> Am I misinterpreting the manual? I suspect I am. Or is this a new
> feature. Thoughts?

This is not a new feature.  In your example each class only has a single 
parent.  Multiple Inheritance is when you do something like:

class C extends A,B { ... }

Doing B extends A followed by C extends B is still single inheritance.

-Rasmus


-- 
PHP General Mailing List (http://www.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]I know I know, but quick Apache/PHP question

2001-12-06 Thread Chris Allen

hmm looks right ...are you loading thru the server or are you doing a
file://c/:doc_root/file.php ?


heres the relevant info from my httpd.conf file on windows:

ScriptAlias /php4/ "C:/php/"
Action application/x-httpd-php4 "/php4/php.exe"
AddType application/x-httpd-php4 .php


whats a url to check it out ?


-- 
PHP General Mailing List (http://www.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] Extending classes multiple times

2001-12-06 Thread Matt Friedman

I had been under the impression that one could extend a class only once.
That is, if I extend class A with class B I would then not be able to
extend B again with any other class. 

See: http://www.php.net/manual/en/keyword.extends.php
"An extended class is always dependent on a single base class, that is,
multiple inheritance is not supported. Classes are extended using the
keyword 'extends'."

With some testing however, it appears that I can extend class B with
class C and class C with class D and so on...

Am I misinterpreting the manual? I suspect I am. Or is this a new
feature. Thoughts?

Thanks,

Matt Friedman
Web Applications Developer
www.SpryNewMedia.com
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]




Re: [PHP]I know I know, but quick Apache/PHP question

2001-12-06 Thread Sam2


Un-comment lines like this:

#AddType application/x-httpd-php .php

and these should be there:

AddModule mod_php4.c
LoadModule php4_modulelibexec/libphp4.so

Unless you're using the cgi.

And there might be some stuff I forgot.


-- 
PHP General Mailing List (http://www.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 Installed in CGI for IIS 5(microsoft)

2001-12-06 Thread Kurt Lieber

On Thursday 06 December 2001 11:23 am, pong-TC wrote:
> Has anyone installed and used PHP in CGI (not ISAPI) for IIS 5?  Is it
> running good?  I mean you got a full capability as PHP has, and there is
> no serious harm to the webserver(IIS 5).   I am also using ASP.  I don't
> know installing PHP on the system will jeopardize the ASP application.
> Please let me know.

In my experience, setting up a CGI version of PHP on IIS is easier than the 
ISAPI version.  The major drawback is speed:  the CGI version will be much, 
much slower.  Not a big deal if you have a low volume site, though.

Shouldn't affect your ASP pages at all -- the two can happily co-exist on the 
same server.

hth

--kurt

-- 
PHP General Mailing List (http://www.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: Newbie PHP/MySQL Question

2001-12-06 Thread Peter van der Maas

Think i figured out my problem...next time i will RTFM!!!

Sorry!



"Peter Van Der Maas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ok, Im' pretty new at this, but I can't see what may be wrong here:
>
> Table IMT
> -
> User (char)
> SessionID (char)
> StartTime(TIMESTAMP)
> EndTime(TIMESTAMP)
>
> Code on first page:
> INSERT INTO IMT VALUES ('testuser', '$id', CURRENT_TIMESTAMP, '/0');
>
> Code on second page:
> UPDATE IMT SET EndTime=NOW() WHERE SessionID='$id';
>
> The problem I am having is that when the second page is executed, it
places
> the current time in both StartTime and EndTime.  However, while I am
viewing
> the contents throught the process, the StartTime value is correct until
the
> second page is executed, and then whatever is placed into EndTime shows up
> in StartTime.  If it matters, the only session variable i'm using is
> session_id().
>
> TIA
> Pete van der Maas
>
>
>



-- 
PHP General Mailing List (http://www.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 Installed in CGI for IIS 5(microsoft)

2001-12-06 Thread pong-TC

Hello  All

Has anyone installed and used PHP in CGI (not ISAPI) for IIS 5?  Is it
running good?  I mean you got a full capability as PHP has, and there is
no serious harm to the webserver(IIS 5).   I am also using ASP.  I don't
know installing PHP on the system will jeopardize the ASP application. 
Please let me know.

Thank you.
Pong


-- 
PHP General Mailing List (http://www.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]I know I know, but quick Apache/PHP question

2001-12-06 Thread Chris Cocuzzo

my apologies.

my question is, how do i solve the problem of having the source show up in
my browser when i call a php page based on the information i provided, or
didn't provide that I should've modified in the .conf file

chris

- Original Message -
From: "The Big Roach" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 8:42 AM
Subject: Re: [PHP]I know I know, but quick Apache/PHP question


> Chris,
>
> I'm a bit lost... what exactly is your question?
>
> "Chris Cocuzzo" <[EMAIL PROTECTED]> wrote in message
> 010e01c17e0d$d28e72b0$ae687780@webs224">news:010e01c17e0d$d28e72b0$ae687780@webs224...
> hey-
>
> I have php 4.0.6 on Win 2k with Apache 1.3.20 ... I figure I'm close to
> getting this installed correctly. I've edited my httpd.conf file to the
> point where if I call the php file I want, I get the source in the browser
>
> here's what my .conf file says?
>
> ScriptAlias /php/ "c:/php/"
>
> and then further down in the file...
>
> AddType application/x-httpd-php .php
> AddType application/x-httpd-php-source .phps
> Action application/x-httpd-php "C:/php/php.exe"
>
> can someone point me in the right direction ..?
>
> -chris-
>
>
>
>
> --
> PHP General Mailing List (http://www.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] forms & PHP

2001-12-06 Thread Dan McCullough

In some browsers that is what will happen on a form, is that will process the 
infromation twice.
--- "Richard S. Crawford" <[EMAIL PROTECTED]> wrote:
> I've done something similar like this:
> 
>  < a href="javascript:window.back()" >Click here to go back< /a >
> 
> In the situations in which I've used it, the form data from the previous 
> page is still in the form fields.
> 
> Potential downsides of this approach: the data has not yet been 
> processed.  Or, if it has been, you run the risk of processing it 
> twice.  Also, it may be unreliable depending on how the user's cache is set 
> up (though I've never had any problems reported to me).
> 
> So, it may or may not suit your needs.
> 
> 
> At 09:44 AM 12/6/2001, [EMAIL PROTECTED] wrote:
> >I think I'm making this harder or more confusing than it really needs to be.
> >
> >I have a form that is spread out over four pages.  I want to be able to give
> >the user the opportunity to return to page 1 from page 3, for example, by
> >providing a regular link on page 3 to return to page1.  When they click on
> >this link, I want the info. originally entered in page 1 to still be there.
> >
> >Do I need to use sessions to do this or is there another way?
> >
> >Thank you, Shawna
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> Sliante,
> Richard S. Crawford
> 
> http://www.mossroot.com
> AIM: Buffalo2K   ICQ: 11646404  Y!: rscrawford
> MSN: [EMAIL PROTECTED]
> 
> "It is only with the heart that we see rightly; what is essential is 
> invisible to the eye."  --Antoine de Saint Exupéry
> 
> "Push the button, Max!"
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


=
dan mccullough

"Theres no such thing as a problem unless the servers are on fire!"


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.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] Using HEADER to redirect

2001-12-06 Thread Mike Eheler

More than likely not. Putting an exit statement after a header redirect 
is just good practice and ensures that nothing gets executed after 
redirecting.

Mike

Don wrote:

>Hi,
>
>I have a PHP script that uses the following code to redirect to a page of the user's 
>choice:
>
>header("Location: http://www.mypage.net/";); 
>
>In examples of this type of coding in various scriots,  the above line is always 
>followed by the statement:
>
>exit;
>
>I am wondering why.  When executing a Header("Location"); statement, does control 
>return to the PHP script after execution?  In that case, I assume that the exit; 
>statement is there in order to terminate the php script.  In that event, can I 
>execute code within my script after calling the Header("Location") page?
>



-- 
PHP General Mailing List (http://www.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] Newbie PHP/MySQL Question

2001-12-06 Thread Peter van der Maas

Ok, Im' pretty new at this, but I can't see what may be wrong here:

Table IMT
-
User (char)
SessionID (char)
StartTime(TIMESTAMP)
EndTime(TIMESTAMP)

Code on first page:
INSERT INTO IMT VALUES ('testuser', '$id', CURRENT_TIMESTAMP, '/0');

Code on second page:
UPDATE IMT SET EndTime=NOW() WHERE SessionID='$id';

The problem I am having is that when the second page is executed, it places
the current time in both StartTime and EndTime.  However, while I am viewing
the contents throught the process, the StartTime value is correct until the
second page is executed, and then whatever is placed into EndTime shows up
in StartTime.  If it matters, the only session variable i'm using is
session_id().

TIA
Pete van der Maas




-- 
PHP General Mailing List (http://www.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] Using HEADER to redirect

2001-12-06 Thread Don

Hi,

I have a PHP script that uses the following code to redirect to a page of the user's 
choice:

header("Location: http://www.mypage.net/";); 

In examples of this type of coding in various scriots,  the above line is always 
followed by the statement:

exit;

I am wondering why.  When executing a Header("Location"); statement, does control 
return to the PHP script after execution?  In that case, I assume that the exit; 
statement is there in order to terminate the php script.  In that event, can I execute 
code within my script after calling the Header("Location") page?



[PHP] Re: forms & PHP

2001-12-06 Thread Julio Nobrega Trabalhando

  Session would be the easiest thing to use. You could also 'pre-store' the
info on a database and retrive it depending at what page users are visiting.

--

Julio Nobrega

Don't eat the yellow snow.


<[EMAIL PROTECTED]> wrote in message
BB6D932A42D6D211B4AC0090274EBB1DA0F14F@GLOBAL1">news:BB6D932A42D6D211B4AC0090274EBB1DA0F14F@GLOBAL1...
> I think I'm making this harder or more confusing than it really needs to
be.
>
> I have a form that is spread out over four pages.  I want to be able to
give
> the user the opportunity to return to page 1 from page 3, for example, by
> providing a regular link on page 3 to return to page1.  When they click on
> this link, I want the info. originally entered in page 1 to still be
there.
>
> Do I need to use sessions to do this or is there another way?
>
> Thank you, Shawna



-- 
PHP General Mailing List (http://www.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] forms & PHP

2001-12-06 Thread Richard S. Crawford

I've done something similar like this:

 < a href="javascript:window.back()" >Click here to go back< /a >

In the situations in which I've used it, the form data from the previous 
page is still in the form fields.

Potential downsides of this approach: the data has not yet been 
processed.  Or, if it has been, you run the risk of processing it 
twice.  Also, it may be unreliable depending on how the user's cache is set 
up (though I've never had any problems reported to me).

So, it may or may not suit your needs.


At 09:44 AM 12/6/2001, [EMAIL PROTECTED] wrote:
>I think I'm making this harder or more confusing than it really needs to be.
>
>I have a form that is spread out over four pages.  I want to be able to give
>the user the opportunity to return to page 1 from page 3, for example, by
>providing a regular link on page 3 to return to page1.  When they click on
>this link, I want the info. originally entered in page 1 to still be there.
>
>Do I need to use sessions to do this or is there another way?
>
>Thank you, Shawna
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


Sliante,
Richard S. Crawford

http://www.mossroot.com
AIM: Buffalo2K   ICQ: 11646404  Y!: rscrawford
MSN: [EMAIL PROTECTED]

"It is only with the heart that we see rightly; what is essential is 
invisible to the eye."  --Antoine de Saint Exupéry

"Push the button, Max!"


--
PHP General Mailing List (http://www.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] Equivalent of the Basic function SELECT...CASE

2001-12-06 Thread py

switch( $x ){
   case 1:
   case 2:
   case 3:
   case 4:
   case 5: {...}
 break;
   default: {...}
 break;
}

py

At 05:38 PM 12/6/01 +, Robin McKenzie wrote:


>Could anyone tell me if there is a PHP equivalent to:
>
>SELECT x
> CASE 1 to 5
> {...}
> CASE ELSE
> {...}
>END SELECT
>
>Muchos gracias.
>
>Robin
>
>
>
>--
>PHP General Mailing List (http://www.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] forms & PHP

2001-12-06 Thread sgibbs

I think I'm making this harder or more confusing than it really needs to be.

I have a form that is spread out over four pages.  I want to be able to give
the user the opportunity to return to page 1 from page 3, for example, by
providing a regular link on page 3 to return to page1.  When they click on
this link, I want the info. originally entered in page 1 to still be there.

Do I need to use sessions to do this or is there another way?

Thank you, Shawna

-- 
PHP General Mailing List (http://www.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 Forms and String Limitations

2001-12-06 Thread Jeremy Reed

I've set up a news database with a PHP front-end and am using MS SQL Server.
The news table is set up correctly with the pertinent field being of type
'text' which, according to documentation, should support well over 10 megs
of text data.

This is the problem: The user tries to submit a news article of 2+ pages
(approx 4400 characters) but the article gets truncated to about 4050
characters.  Is there some sort of limitation on PHP variables that is
causing this?

Thanks!

Best regards,

Jeremy Reed



-- 
PHP General Mailing List (http://www.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] Equivalent of the Basic function SELECT...CASE

2001-12-06 Thread jimtronic


switch {} will do it.

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

>Could anyone tell me if there is a PHP equivalent to:
>
>SELECT x
> CASE 1 to 5
> {...}
> CASE ELSE
> {...}
>END SELECT
>
>Muchos gracias.
>
>Robin
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[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] Equivalent of the Basic function SELECT...CASE

2001-12-06 Thread Robin McKenzie



Could anyone tell me if there is a PHP equivalent to:

SELECT x
CASE 1 to 5
{...}
CASE ELSE
{...}
END SELECT

Muchos gracias.

Robin



-- 
PHP General Mailing List (http://www.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] Maximum execution time of 30 seconds exceeded

2001-12-06 Thread Jon Farmer

> The timeout is set in php.ini

Only change it in php.ini if you want it to be serverwide. For a specific
script use set_time_linit().

Regards

Jon

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key



-- 
PHP General Mailing List (http://www.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 SSL credit card transaction

2001-12-06 Thread Chris Allen

http://www.openecho.com/php/echophp-1.4.tar.gz


I used this package, which requires cURL and for you to have setup a
merchant account.
Was really easy!

As far as SSL jsut make sure you are serving the pages in SSL (https) and
all is fine.
You can home roll your on shopping cart like I did or you can DL any open
source cart and add hooks into openecho..
I owuld check the forum they have @openecho and see if anyone has a shopping
cart that you can use!


GL,

ccma

- Original Message -
From: "Daniel Guerrier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 11:09 AM
Subject: [PHP] PHP SSL credit card transaction


> Can some give me a brief synopsis or direct me to some
> information on how to create an ecommerce site using
> php.  My main question is in the area of performing a
> secure credit card transaction.  Do I need to use a
> third party shopping or can I create my own, if I
> create my own how do I integrate it with a credit
> authorizer?  In addition how do I implement SSL with
> PHP when performing the transaction?  Thanks in advance!!
>
> __
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.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] PHP SSL credit card transaction

2001-12-06 Thread Daniel Guerrier

Can some give me a brief synopsis or direct me to some
information on how to create an ecommerce site using
php.  My main question is in the area of performing a
secure credit card transaction.  Do I need to use a
third party shopping or can I create my own, if I
create my own how do I integrate it with a credit
authorizer?  In addition how do I implement SSL with
PHP when performing the transaction?  Thanks in advance!!

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.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] Maximum execution time of 30 seconds exceeded

2001-12-06 Thread Richard Black

The timeout is set in php.ini

-Original Message-
From:   Christoph Starkmann [SMTP:[EMAIL PROTECTED]]
Sent:   06 December 2001 17:09
To: [EMAIL PROTECTED]
Subject:[PHP] Maximum execution time of 30 seconds exceeded 

Hi everybody!

I wrote a script just to do some local replacement stuff here on my own
machine.
Is there any way to change the maximum execution time of PHP which seems to
be 
restricted to 30 seconds

Would be great if you could give me a hint on how to change this...

Thanx alot,

Kiko

-
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-

-- 
PHP General Mailing List (http://www.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] Maximum execution time of 30 seconds exceeded

2001-12-06 Thread Jon Farmer

> I wrote a script just to do some local replacement stuff here on my own
> machine.
> Is there any way to change the maximum execution time of PHP which seems
to
> be
> restricted to 30 seconds
>
> Would be great if you could give me a hint on how to change this...


http://www.php.net/manual/en/function.set-time-limit.php

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07763 620378
PGP Key available, send email with subject: Send PGP Key



-- 
PHP General Mailing List (http://www.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] Maximum execution time of 30 seconds exceeded

2001-12-06 Thread Andrey Hristov

set_time_limit(0); // no limit
set_time_limit(60); // 60 seconds

Regards,
Andrey
- Original Message - 
From: "Christoph Starkmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 7:09 PM
Subject: [PHP] Maximum execution time of 30 seconds exceeded 


> Hi everybody!
> 
> I wrote a script just to do some local replacement stuff here on my own
> machine.
> Is there any way to change the maximum execution time of PHP which seems to
> be 
> restricted to 30 seconds
> 
> Would be great if you could give me a hint on how to change this...
> 
> Thanx alot,
> 
> Kiko
> 
> -
> It's not a bug, it's a feature.
> christoph starkmann
> mailto:[EMAIL PROTECTED]
> http://www.fh-augsburg.de/~kiko
> ICQ: 100601600
> -
> 
> -- 
> PHP General Mailing List (http://www.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] Maximum execution time of 30 seconds exceeded

2001-12-06 Thread Christoph Starkmann

Hi everybody!

I wrote a script just to do some local replacement stuff here on my own
machine.
Is there any way to change the maximum execution time of PHP which seems to
be 
restricted to 30 seconds

Would be great if you could give me a hint on how to change this...

Thanx alot,

Kiko

-
It's not a bug, it's a feature.
christoph starkmann
mailto:[EMAIL PROTECTED]
http://www.fh-augsburg.de/~kiko
ICQ: 100601600
-

-- 
PHP General Mailing List (http://www.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] ImageCopy() not working

2001-12-06 Thread geoff catlin

I created a function (appears below) that crops a JPG and outputs it on the
fly. However Apache crashes when I use the function. Unfortunately, Apache
does not put an error message in the logs.

I'm running it on a Windows2000 machine with Apache 1.3.20 and PHP 4.0.6
(installed via EasyPHP 1.5.0.0).

I've isolated the problem to be the ImageCopy() function, I'm sure of this.
If I use ImageCopyMerge() instead (with pct = 100), it works albeit with
varying results.

Has anyone else encountered this? Does anyone know how to fix it?

---snip---
function ImageCropJPEG( $src_file, $dst_file, $dst_width, $dst_height,
$quality = '100', $crop_type = 'r' ) {

// Must be a valid file
if ( is_file( $src_file ) ) {

// Get image dimensions
list( $src_width, $src_height, $src_type ) = @GetImageSize(
$src_file );

// Must be a valid JPEG
if ( is_set( $src_width ) && is_set( $src_height ) && $src_type ==
2 ) {

// Generate crop coords
switch ( $crop_type ) {

// Centered crop coords
case 'c':
$src_x  = max( 1, floor( ( $src_width  - $dst_width  ) /
2 ) );
$src_y  = max( 1, floor( ( $src_height - $dst_height ) /
2 ) );
break;

// Random crop coords
case 'r':
default:
$src_x  = mt_rand( 0, max( 1, $src_width - $dst_width -
1 ) );
$src_y  = mt_rand( 0, max( 1, $src_height -
$dst_height - 1 ) );
break;

}

// Create resources pointers for source and destination images
$src_image = ImageCreateFromJPEG( $src_file );
$dst_image = ImageCreate( $dst_width, $dst_height );

// Copy cropped portion of source image to destination image
ImageCopy( $dst_image, $src_image, 0, 0, $src_x, $src_y,
$dst_width, $dst_height );
#ImageCopyMerge( $dst_image, $src_image, 0, 0, $src_x, $src_y,
$dst_width, $dst_height, 100 ); // testing...

// Output to STDOUT
if ( empty( $dst_file ) ) {
header( 'Content-type: image/jpeg' );
}

// Output image
ImageJPEG( $dst_image, $dst_file, $quality );

// Free any memory associated the source and destination images
ImageDestroy( $src_image );
ImageDestroy( $dst_image );

}

}

return( TRUE );

}

---snip---

Forgive me if this has been asked before. I searched the archives but
couldn't find the answer.

TIA!


geoff.catlin
programmer#Q15439

---

http://www.3rdkynd.com
http://www.urthling.com

3rdkynd :: From the electricity of the edge to the subtlety
of the sublime, we've got what you've been looking for.

e :: [EMAIL PROTECTED]
p :: 315.685.3415
f :: 315.685.5159




[PHP] Q regarding recursive function

2001-12-06 Thread Bart Verbeek

Hello,

I'm using the following function:
>>BEGIN CODE<<
$q_cat ="SELECT cat_id, cat_naam, cat_parent_id FROM cat";
$r_cat = mysql_query($q_cat) or die ("Invalid Query fout Q=cat");
if ($r_cat)


$n=0;
if (mysql_num_rows($r_cat) > 0)


while ($row_cat = mysql_fetch_array($r_cat))


$item[$row_cat[cat_id]][naam] = $row_cat[cat_naam];
$item[$row_cat[cat_id]][id] = $row_cat[cat_id];
$kidsof[$row_cat[cat_parent_id]][] = $row_cat[cat_id];
  }
  }
  }

#CAT-FUNCTIE
function print_tree($id=0,$spatie=0,$sid)


global $kidsof;
global $item;
global $sid;
$j=0;
while ($j < $spatie)


echo "  ";
$j++;
  }
$i=0;
$spatie++;
print ("".$item[$id][naam]."\n");
while ($i < count($kidsof[$id]))


print_tree($kidsof[$id][$i],$spatie,$sid);
$i++;
  }
  }

print_tree();
>>END CODE<<

It prints the tree of categories with all childs under the parent categories
with there parents.

But when I call the function with $id=5 (I want the categorie-tree of cat 5
and children) nothing happens.
How can I change the function so the cat-tree for $id=$var1 will be shown??


Kind regards,

Bart



-- 
PHP General Mailing List (http://www.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] dynamic maps

2001-12-06 Thread Rocky Dean Pulley

I need to have a map to a map of classes, is this possible using PHP?

For example, in C++, I can do this:

map > m_strMap;

===
Rocky Dean Pulley
Senior Technologist
CorTechs, Inc.
[EMAIL PROTECTED]
703-968-7021 x108
-- Quidquid latine dictum sit, altum videtur




RE: [PHP] Reg ex help-Removing extra blank spaces before HTML output

2001-12-06 Thread Jack Dempsey

using "\n" as your replacement text will do ithowever, if you want a
newline in the html, then you'll want ...

and as far as the advanced replace, make an array of search patterns, in
this case two.
your first pattern will be "/[ ]+\n+[ ]+/" with a replacement of a single
newline...then the second will be the previous regex.check out php.net
for help with syntax and using arrays with preg_* functionsthe first
should catch all situations of a series of spaces [with at least one newline
in between them] and substitute a newline.
check out mastering regular expressions as well.its worth the money
jack

-Original Message-
From: Ken [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 3:08 AM
To: Jack Dempsey; liljim; PHP list
Subject: RE: [PHP] Reg ex help-Removing extra blank spaces before HTML
output


At 02:43 PM 12/5/01 -0500, Jack Dempsey wrote:
>$t = preg_replace('/\s+/',' ',$text);

One more thing:
How do I replace with newline instead of a space?  I read through the
manuals but couldn't grasp how to do this.  \n didn't cut it.

And, more advanced -
The above replaces any groups of 2 or more blanks (newlines, spaces, tabs)
with a single blank.
Is there an easy way to replace them with EITHER a space or a newline,
depending on whether any newlines were present in the input?
I.e. bb would be replaced with b, but bnbn would be
replaced with n.

Right now the issue is that I'm sometimes getting results that have no line
breaks for a really long time, and I know there are reasons to try to avoid
individual lines of HTML longer than 200 characters.

Thanks!

- Ken
[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] SMS

2001-12-06 Thread Daniel Berwig

It works with a "virtual phone" in the site, but I can't try sending SMS
berfore buying it (U$ 400.00). I won't buy a product before being sure it
works.

Does anyone know another method to do it?

Tnx.


"Dan McCullough" <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Heres a code snippet:
> Sorry for leading astray.
>
> // load the swsms module
> dl( "../swsms.so" );
>
> // create the sms object
> $sms = create_sms();
>
> // send the carrier list request
> carrierlist_send( &$sms );
>
> // check if the request was a success
> if( ! $sms->success ) {
> // display error info
> print( "Unable to retreive a carrier list from Simplewire: " .
$sms->errorDesc . "\n" );
> print( "Error Code: " . $sms->errorCode . "\n" );
> }
> else {
> // walk the carrier list array
> array_walk( $sms->carrierlist, displayCarrier );
> }
>
> function displayCarrier( $c ) {
> // display the carrier info
> print( "ID: " . $c->id . "\n" );
> print( "Title: " . $c->title . $c->subtitle . "\n\n" );
> }
> --- Daniel Berwig <[EMAIL PROTECTED]> wrote:
> > Does anyone know how could I send data from php through SMS to a cel
phone?
> > I simply can't find info about that.
> >
> > Thanks in advance,
> >
> > Daniel Berwig.
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> =
> Dan McCullough
> ---
> "Theres no such thing as a problem unless the servers are on fire!"
> h: 603.444.9808
> w: McCullough Family
> w: At Work
>
> __
> Do You Yahoo!?
> Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1



-- 
PHP General Mailing List (http://www.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] Checking Checkboxes using Arrays

2001-12-06 Thread jimtronic



When you perform the test you want to know if the $id is the user's 
choice and if the user's choice is in the array.

Your code reads differently. You are checking to see if $id is the 
user's choice OR $id is in the array. which would always check the 
countries in the array.

>   if(($id == $register_country_of_origin) ||
(in_array($id, $european_union))) {

try this ...

> if(($id == $register_country_of_origin) ||
(in_array($register_country_of_origin, $european_union))) {


jim

>
> $european_union = array('24', '17', '1', '58', '74', '80',
>'73', '83', '101', '103', '119', '144', '164', '186', '193', '212');
> print_r($european_union);
>
> if(mysql_num_rows($europe_result) > 0) {
>
> while(list($id, $country) =
>mysql_fetch_array($europe_result)) {
>
> if(($id == $register_country_of_origin) ||
>(in_array($id, $european_union))) {
>
> echo"\tCLASS=\"pofgreencard\">VALUE=\"$id\" CHECKED> $country\n";
>
> } else {
>
> echo"\tCLASS=\"pofgreencard\">VALUE=\"$id\"> $country\n";
>
> }
> }
>

-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[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 error when requiring

2001-12-06 Thread jimtronic

You forgot the semicolon (;) after session_start()


>  > This works fine, but now i made the files sessionstart.php and bottom.php
>>
>>  sessionstart.php
>>  --
>>  >  session_start()
>>  if ($SessieEIA->Login == 1)
>>  { 
>>  ?>
>>
>>
>>  bottom.php
>>  --
>>  >  else {
>>  require "error.php";
>>  }
>>  ?>
>>
>>  And i require these files on top resp. bottom of the page and i get two
>  > parse errors.
>>

-- 
Jim Musil
-
Multimedia Programmer
Nettmedia
-
212-629-0004
[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 error when requiring

2001-12-06 Thread Johnson, Kirk

There is a semi-colon missing on the session_start() line. PHP can't pin
down the exact line number of an error where the error is a missing
terminator.

Kirk

> -Original Message-
> From: Oosten, Sjoerd van [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 06, 2001 8:44 AM
> To: 'Andrew Forgue'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [PHP] parse error when requiring
> 
> 
> Parse error: parse error in 
> /home/sites/site139/web/EIA/sessionstart.php on
> line 10
> 
> It's strange that line number 10 doesn't exist!

> On Thu, 2001-12-06 at 06:51, Oosten, Sjoerd van wrote:
> > I have a question about require...
> > 
> > I have a session_start() on top of every page and an 
> if-else construction.
> >  > session_start()
> > if ($SessieEIA->Login == 1) 
> > {  
> > ?>
> 

-- 
PHP General Mailing List (http://www.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   >