[PHP] PHP and Paypal: no cURL

2002-02-28 Thread Phil Solomon

Hi There,
Could anyone suggest where I can get a workaround script to handle postback
variables to Paypal with PHP?
I was all set to use cURL but now I've been told that the host hasnt and
wont install it with their PHP.

Thanx in advance
Phil




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




[PHP] Re: create a file

2002-02-28 Thread Monty

Start here...

http://www.php.net/manual/en/function.fwrite.php


> From: [EMAIL PROTECTED] (Thomas Franz)
> Newsgroups: php.general
> Date: Fri, 1 Mar 2002 08:55:25 +0100
> To: [EMAIL PROTECTED]
> Subject: create a file
> 
> good morning,
> 
> i want to create a new file and save it in the current dir. I look in the
> manual but only i found how to create a dir.
> 
> Thanks for help.
> 
> Thomas
> 
> 


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




[PHP] Re: create a file

2002-02-28 Thread Thomas Franz

I found it.


"Thomas Franz" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED].;
> good morning,
>
> i want to create a new file and save it in the current dir. I look in the
> manual but only i found how to create a dir.
>
> Thanks for help.
>
> Thomas
>
>



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




RE: [PHP] RE: sending multiple frames to different pages

2002-02-28 Thread DARCY,MATTHEW (Non-HP-UnitedKingdom,ex2)

Thats a good option, 1 I will certainly look into.

more questions then.

1.)Is there a way to do this within php ?

2.) how can I refresh my page generating the frame so that it will load the
new 

Thanks, 

Matt.




-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 7:51 AM
To: Php-General
Subject: RE: [PHP] RE: sending multiple frames to different pages


You can use javascript.
If you're calling this from a frame, this is how it works:

parent.frames["first_frame" / zero based number].location.href =
"my_page.php";
parent.frames["second_name" / zero based number].location.href =
"my_page2.php";

Problem with this is that if user clicks Back button in browser, only
"second_frame" will go -1 in history. Better solution would be making
the pages creating frames to get variables for frames, so you could send
variables with page names to it.


>



Niklas

-Original Message-
From: Matthew Darcy [mailto:[EMAIL PROTECTED]] 
Sent: 1. maaliskuuta 2002 9:03
To: [EMAIL PROTECTED]
Subject: [PHP] RE: sending multiple frames to different pages





Hello all

I have just created a login script that works fine. At the moment I have
a pretty simple (I have coded this but I am trying to keep it simple to
explain what I am after

if login != ok then

generate HTML for error page

else

Generate HTML for ok page.

end;


what I want to do is

if login != ok then

generate HTML for error page

else

send browser frame1 to www.loginok.com
AND
send broswer frame2 to www.loginfeatures.com

end



can someone show me how to do the browser re-direction to multiple pages
please ?? Also can someone explain the different ways to send
frames/browser to a different page with PHP.

Thanks,

Matt


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


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

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




Re: [PHP] Re: Does anybody have code for this?

2002-02-28 Thread Monty

Explain what you mean by "scramble" and what you are trying to accomplish?
There isn't a built-in function for this that I've seen, so, you'll have to
write your own function using various PHP commands. This function might be
useful to that end: http://www.php.net/manual/en/function.levenshtein.php


> From: [EMAIL PROTECTED] (Leif K-Brooks)
> Newsgroups: php.general
> Date: Fri, 01 Mar 2002 02:50:09 -0500
> To: <[EMAIL PROTECTED]>
> Subject: Re: [PHP] Re: Does anybody have code for this?
> 
> on 3/1/02 2:43 AM, Monty at [EMAIL PROTECTED] wrote:
> 
>> Maybe try looking into the crypt() or md5() functions on php.net. These will
>> encrypt a string more than "scramble," but maybe one of these serves the
>> purpose.
> No, that isn't what I'm looking for.  It's not for encryption.  I just need
> a function that scrambles a string.
> 
> 


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




RE: [PHP] create a file

2002-02-28 Thread Niklas Lampén

fopen("file", "w")

-Original Message-
From: Thomas Franz [mailto:[EMAIL PROTECTED]] 
Sent: 1. maaliskuuta 2002 9:55
To: [EMAIL PROTECTED]
Subject: [PHP] create a file


good morning,

i want to create a new file and save it in the current dir. I look in
the manual but only i found how to create a dir.

Thanks for help.

Thomas



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


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




[PHP] create a file

2002-02-28 Thread Thomas Franz

good morning,

i want to create a new file and save it in the current dir. I look in the
manual but only i found how to create a dir.

Thanks for help.

Thomas



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




[PHP] error msg

2002-02-28 Thread mm fernandez

hi. i get this error message whenever i open my page (except during the 
first time i open it). Can someone tell me what this means?

Warning: open(/tmp\sess_4ed4219513a84c54eba4c1117756c572, O_RDWR) failed: m 
(2) in C:\apache\htdocs\rs_alumni\alumni.php on line 2

Here is the beginning of my code:
// 




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


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




RE: [PHP] RE: sending multiple frames to different pages

2002-02-28 Thread Niklas Lampén

You can use javascript.
If you're calling this from a frame, this is how it works:

parent.frames["first_frame" / zero based number].location.href =
"my_page.php";
parent.frames["second_name" / zero based number].location.href =
"my_page2.php";

Problem with this is that if user clicks Back button in browser, only
"second_frame" will go -1 in history. Better solution would be making
the pages creating frames to get variables for frames, so you could send
variables with page names to it.


>



Niklas

-Original Message-
From: Matthew Darcy [mailto:[EMAIL PROTECTED]] 
Sent: 1. maaliskuuta 2002 9:03
To: [EMAIL PROTECTED]
Subject: [PHP] RE: sending multiple frames to different pages





Hello all

I have just created a login script that works fine. At the moment I have
a pretty simple (I have coded this but I am trying to keep it simple to
explain what I am after

if login != ok then

generate HTML for error page

else

Generate HTML for ok page.

end;


what I want to do is

if login != ok then

generate HTML for error page

else

send browser frame1 to www.loginok.com
AND
send broswer frame2 to www.loginfeatures.com

end



can someone show me how to do the browser re-direction to multiple pages
please ?? Also can someone explain the different ways to send
frames/browser to a different page with PHP.

Thanks,

Matt


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


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




Re: [PHP] Re: Does anybody have code for this?

2002-02-28 Thread Leif K-Brooks

on 3/1/02 2:43 AM, Monty at [EMAIL PROTECTED] wrote:

> Maybe try looking into the crypt() or md5() functions on php.net. These will
> encrypt a string more than "scramble," but maybe one of these serves the
> purpose.
No, that isn't what I'm looking for.  It's not for encryption.  I just need
a function that scrambles a string.



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




[PHP] Re: Does anybody have code for this?

2002-02-28 Thread Monty

Maybe try looking into the crypt() or md5() functions on php.net. These will
encrypt a string more than "scramble," but maybe one of these serves the
purpose.


> From: [EMAIL PROTECTED] (Leif K-Brooks)
> Newsgroups: php.general
> Date: Fri, 01 Mar 2002 02:30:04 -0500
> To: <[EMAIL PROTECTED]>
> Subject: Does anybody have code for this?
> 
> I'm looking for two functions.  One to scramble a string, and one to check
> if one string is a scrambled version of another.  Does anybody have these?
> 


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




[PHP] Does anybody have code for this?

2002-02-28 Thread Leif K-Brooks

I'm looking for two functions.  One to scramble a string, and one to check
if one string is a scrambled version of another.  Does anybody have these?


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




[PHP] Re: OCILogin error message

2002-02-28 Thread Philippe Saladin

Have you stop / start your server ?
or may be there are some dependencies needed? try to if a DLL is missing,
using http://www.dependencywalker.com/
Regards,
Philippe

"Dharmesh Goradia" <[EMAIL PROTECTED]> a écrit dans le message
news: [EMAIL PROTECTED]
> Hi,
>I'm having trouble with connection of Oracle. I have followed the
> following steps
>
>   1.I have installed oracle (client side) on my web server
>   2.I have installed php, copied php.ini file into WinNt/System32
> directory
>   3.Uncommented extension = php_oci8.dll (even copied the php_oci8.dll
> into WinNt/System32 directory and tried with that)
>
>I'm getting the error message
> Fatal error: Call to undefined function: ocilogon()
>
>
> regards
> Dharmesh Goradia
>



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




[PHP] RE: sending multiple frames to different pages

2002-02-28 Thread Matthew Darcy




Hello all

I have just created a login script that works fine. At the moment I have a
pretty simple (I have coded this but I am trying to keep it simple to
explain what I am after

if login != ok then

generate HTML for error page

else

Generate HTML for ok page.

end;


what I want to do is

if login != ok then

generate HTML for error page

else

send browser frame1 to www.loginok.com
AND
send broswer frame2 to www.loginfeatures.com

end



can someone show me how to do the browser re-direction to multiple pages
please ??
Also can someone explain the different ways to send frames/browser to a
different page with PHP.

Thanks,

Matt


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




[PHP] Abnormal behaviour with php

2002-02-28 Thread Balaji Ankem



Hi 
,    It z amazing behaviour...I 
am wondering how it is coming only for first time execution.
  If I remove the two 
If conditions in authentication.php and if I execute then it is displaying the 
blank screen. And again if we replace those two if conditions and if you execute 
again then it works fine.
Details are 
below: I have a login 
page where we enter login details..And I post these details to 
authentication.php    After 
system rebooting if I execute first time it is giving alert with 
message    Program 
Error    
    "php.exe has generated errors and 
will be closed by 
windows.  
You will need to restart the program. An error log is being 
created.    
OK 
"Login.html==    
post emp_id and password to 
authentication.phpAuthentication.php==    
// Connect to MySQL    
$connection=mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable 
to connect to server.' );    // 
Select database on MySQL server    
mysql_select_db( 'amerm' ) or die ( 'Unable to select database.' 
);    // Formulate the 
query    $sql = "SELECT * FROM 
employee WHERE emp_id = '$emp_id' AND  emp_pass = 
PASSWORD('$emp_pass')";    // Execute 
the query and put results in 
$result    $result = mysql_query( 
$sql )   or die ( 'Unable to execute query.' 
);    // Get number of rows in 
$result.    $num = mysql_numrows( 
$result );    if ( $num != 0 
)    
{    
    $row = 
mysql_fetch_object($result);    
    // A matching row was found - the 
user is authenticated.    
    //start a new session by registering 
the employee number.    
    
session_start();    
    
session_register("user","pw","usertype");    
    
$user=$emp_id;    
    $pw  
=$emp_pass;    
    
$usertype=$row->user_type;    
    //This is the precious code. 
If we remove these two conditions and if you run once. Then it shows 
blank.    
    //And if you run second time withese 
two conditions it works fine.    
    if 
($row->user_type=='S')    
    
{    
    
    //close mysql 
connection    
    
    
mysql_close($connection);    
    
    header("Location: 
admin.php");    
    
    
exit;    
    
}    
    else if 
($row->user_type=='U')    
    
{    
    
    //close mysql 
connection    
    
    
mysql_close($connection);    
    
    header ("Location: 
user.php");    
    
    
exit;    
    
}    
}    
else    
{    
    //close mysql 
connection    
    
mysql_close($connection);    
    //User does not exist or not 
authenticated.    
    
header("Location:not_authorized.html");    
    
exit;    
}?>
 
How can I overcome this problem.
Thanks in advance.
 
Regards
Balaji

**Disclaimer
  


Information contained in this E-MAIL being proprietary to Wipro Limited
is 'privileged' and 'confidential' and intended for use only by the
individual or entity to which it is addressed. You are notified that any
use, copying or dissemination of the information contained in the E-MAIL
in any manner whatsoever is strictly prohibited.



 



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


Re: [PHP] How to decompress .bz2 file

2002-02-28 Thread Jeff Sheltren

Search on google!  Here's the bzip2 homepage with links to download a 
windows executable:

http://www.digistar.com/bzip2/

Jeff

At 10:55 AM 3/1/2002 +0530, dharmavatar wrote:
>Hi,
>Can any one tell me how to decompress .bz2 file,I am using WINDOWS-2000 so
>what are the steps?
>Thanks in advance.
>Regards
>Dharmavatar
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php



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




[PHP] Re: PDF creation with PDF-LIB samples?

2002-02-28 Thread Jim Koutoumis

You could try:
http://www.fpdf.org/

Someone posted recently and I've quickly whacked it into my toolbox :-)

Jim .

"Andras Kende" <[EMAIL PROTECTED]> wrote in message
004801c1c0e3$26bf6070$b59fb841@K...">news:004801c1c0e3$26bf6070$b59fb841@K...;
> Hello,
>
> Trying to create some pdf documents on the fly with php and mysql..
>
> I search the web but not yet found any easy way to do this...
>
> Tried Yaps but it requires ghostscript which didnt install on a cobalt
raq4
> because it it requires some more programs (glibc...etc..)...
>
> Anyone can give some hint where to start?
>
> Thanks,
>
> Andras Kende
>
>



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




[PHP] Header calling HTTP Authenticate issue

2002-02-28 Thread Gaylen Fraley

The following code returns a 404 error on a friends host site.  The
environment is Apache/1.3.23 (Unix) mod_layout/3.0.4 PHP/4.1.1 rus/PL30.11
running under FreeBSD as2.centre.ru 4.2-RELEASE FreeBSD 4.2-RELEASE #0:



Other scripts work just fine from the same directory, so I know php is
installed and working.  Has anyone else had an issue like this?  If so, what
could be the problem?

Thanks.

--
Gaylen
PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/




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




[PHP] PDF creation with PDF-LIB samples?

2002-02-28 Thread Andras Kende

Hello,

Trying to create some pdf documents on the fly with php and mysql..

I search the web but not yet found any easy way to do this...

Tried Yaps but it requires ghostscript which didnt install on a cobalt raq4
because it it requires some more programs (glibc...etc..)...

Anyone can give some hint where to start?

Thanks,

Andras Kende



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




[PHP] How to decompress .bz2 file

2002-02-28 Thread dharmavatar

Hi,
Can any one tell me how to decompress .bz2 file,I am using WINDOWS-2000 so
what are the steps?
Thanks in advance.
Regards
Dharmavatar


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




[PHP] problem with mime mail (attachment part)

2002-02-28 Thread olev rumm

Hello.
Have a submission form on my website with attachment possibility.
Now, the problem is that it submits all the fields and takes the picture
file
with it.But when i recieve it in my outlook or outl.exprss the image is
like encrypted - all in zeros and ones mixed with some other stuff.

I changed the the destination adress to my hotmail and yahoo mail - it
works.
Talked to my isp boys they said that problem is in my script...

Ok because Im not very good with it - I guess I need some advise here
please.

Downloaded the script from www.phpguru.net it had good rewievs.

///
This is mail.php part

///
$key = $val";
  $mail_text .= "$key = $val\n";
 }
$mail->add_text( $header.$mail_text.$footer );

 if (is_uploaded_file($HTTP_POST_FILES['attachment']['tmp_name'])) {
  $fattach = $mail->get_file($HTTP_POST_FILES['attachment']['tmp_name']);
  $mail->add_attachment($fattach, $HTTP_POST_FILES['attachment']['name'],
'application/zip');
 }

 $MailToAddress = "[EMAIL PROTECTED]";
 $MailSubject = "New customer's posting";
if (!$MailFromAddress) {
 $MailFromAddress = "[EMAIL PROTECTED]";
}

 if( $mail->build_message() ) {
  $send_ok = $mail->send('', $MailToAddress, '', $MailFromAddress,
$MailSubject,
'');
 } else {
  $send_ok = 0;
 }
?>

//
and this is on top of the form
/



and this is the attachment field
/




/

Any ideas please
Thanks Olev




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




[PHP] OCILogin error message

2002-02-28 Thread Dharmesh Goradia

Hi,
   I'm having trouble with connection of Oracle. I have followed the
following steps

  1.I have installed oracle (client side) on my web server
  2.I have installed php, copied php.ini file into WinNt/System32
directory
  3.Uncommented extension = php_oci8.dll (even copied the php_oci8.dll
into WinNt/System32 directory and tried with that) 

   I'm getting the error message 
Fatal error: Call to undefined function: ocilogon()


regards 
Dharmesh Goradia 



[PHP] preg_replace() ??

2002-02-28 Thread Monty

Is preg_replace() the best PHP command to use for parsing custom codes in
text retrieved from a database (e.g., turning "[link= ]" into "")? 


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




Re: [PHP] patching a lower version.

2002-02-28 Thread Rasmus Lerdorf

So download 4.0.6 and patch that.  Or walk through the patch manually and
apply the relevant bits to the rfc1867.c file.

On Thu, 28 Feb 2002, Steven Deaton wrote:

> I'm trying to use the file upload patch..on 4.0.4pl1
> but it only says its for 4.0.6.so will it not work on 4.0.4pl1?
> and if so..how does it work?
>
> I got this when running it..
>
> Hmm...  Looks like a unified diff to me...
> The text leading up to this was:
> --
> |--- rfc1867.c.1.62.2.1 Tue Jun 19 18:54:44 2001
> |+++ rfc1867.c  Tue Feb 26 15:52:55 2002
> --
> Patching file rfc1867.c using Plan A...
> Hunk #1 succeeded at 108 (offset 6 lines).
> Hunk #2 succeeded at 137 (offset 6 lines).
> Hunk #3 failed at 164.
> Hunk #4 failed at 231.
> Hunk #5 failed at 247.
> Hunk #6 succeeded at 275 (offset -22 lines).
> Hunk #7 succeeded at 341 (offset 6 lines).
> Hunk #8 succeeded at 497 (offset -22 lines).
> 3 out of 8 hunks failed--saving rejects to rfctest.rej
> done
>
>
> Any help with this would be greatly appreciated.thanks..
>
> ---Steven
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




[PHP] session/cookies

2002-02-28 Thread Vlad Kulchitski



Hi again, I am doing a simple example of cookies and my server seems to
get frozen.

Basically, what I do is:

file01.php:


file02.php


What ends up happening when I go to the second file is the server just
opens the file forever never showing the content, and ends up giving me
an error message.

Can anyone suggest what I do wrong?

Thanks,
Vlad

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




Re: [PHP] Help with functions.

2002-02-28 Thread Greg Donald

> I need some help with functions. Does anyone know of a good place to learn
> about functions? Will someone be willing to teach me what I need to know
about
> functions in PHP? Thank you,

Here's a really simple example:

\n";

// build up some more html
$html .= "\$global_var + \$local_var + \$passed_var = " . $global_var +
$local_var + $passed_var . "\n";

// pass the $html back to the caller
return $html;
}

// call the function
echo function_name ($passed_var);

?>

Usually you wanna use funtions for code you intend to use multiple times.


Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/



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




[PHP] Re: Help with functions.

2002-02-28 Thread CC Zona

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Sean Kennedy) 
wrote:

> I need some help with functions. Does anyone know of a good place to learn 
> about functions?



>  Will someone be willing to teach me what I need to know about 
> functions in PHP?

If you find after reading that that you still need help, posting specific 
questions here will usually get a quick, helpful response.

-- 
CC

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




[PHP] Re: Auto_prepend_file

2002-02-28 Thread Pete Lacey

It's not 'php' but 'php_value'.

php_value auto_prepend_file "pathtoscript/uniemail.php"

Richard Baskett wrote:
> What I want to do is have a function available to all my php files without
> having to use an include in every page.  So what I did was put this line in
> my .htaccess file:
> 
> php auto_prepend_file "pathtoscript/uniemail.php"
> 
> It didn¹t work, I also tried php_auto with the underscore in the above.. And
> that didn¹t work either.  I have modified my httpd.conf file so that it will
> process .htaccess files..
> 
> Any ideas?
> 
> Rick
> 
> "I haven't failed, I've found 10,000 ways that don't work." - Ben Franklin
> 
> 


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




[PHP] Re: php include path setting in .htaccess

2002-02-28 Thread Pete Lacey

php_value include_path "../includefiles/:../../includefiles/"

Bill wrote:
> How can I set the php include path on an Apache machine using .htaccess.
> 
> Assuming I'm puting it outside of the web root, I think it is something
> like:
> 
> php_include_path "../includefiles/:../../includefiles/"
> 
> but that generates server errors.
> 
> Any suggestions?
> 
> kind regards,
> 
> bill hollett
> 
> 


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




[PHP] patching a lower version.

2002-02-28 Thread Steven Deaton

I'm trying to use the file upload patch..on 4.0.4pl1
but it only says its for 4.0.6.so will it not work on 4.0.4pl1?
and if so..how does it work?

I got this when running it..

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--
|--- rfc1867.c.1.62.2.1 Tue Jun 19 18:54:44 2001
|+++ rfc1867.c  Tue Feb 26 15:52:55 2002
--
Patching file rfc1867.c using Plan A...
Hunk #1 succeeded at 108 (offset 6 lines).
Hunk #2 succeeded at 137 (offset 6 lines).
Hunk #3 failed at 164.
Hunk #4 failed at 231.
Hunk #5 failed at 247.
Hunk #6 succeeded at 275 (offset -22 lines).
Hunk #7 succeeded at 341 (offset 6 lines).
Hunk #8 succeeded at 497 (offset -22 lines).
3 out of 8 hunks failed--saving rejects to rfctest.rej
done


Any help with this would be greatly appreciated.thanks..

---Steven




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




RE: [PHP] elseif without else

2002-02-28 Thread Martin Towell

In this case I would assign false to $error before your if's - just to make
sure it's set to something definite - that is unless you have already set it
furthur up in your code...

Martin


-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 11:59 AM
To: Jeff Sheltren
Cc: PHP
Subject: Re: [PHP] elseif without else



On Thursday, February 28, 2002, at 07:42  PM, Jeff Sheltren wrote:

> If you are setting a variable inside of the if statements, and then 
> checking that variable later, then I would say you should either use an 
> else statement to give that variable a default value, or you should set 
> the variable to a default value before the if statements.  Your code is 
> "legitimate", ie. there is no reason you *have* to have an else 
> statement.
>

I would have thought that if I set this variable at all, then I wouldn't 
be able to use the second part of the script ( if($variable)... ).  I 
have posted a snippet of the code at the bottom, if you don't mind 
checking it out.  It works fine -- but it seems strange not to have an 
'else'.  The  bare bones of it is like so:

if (bad user input) {
$error = true;
$error_message = $a;
} elseif (different bad user input) {
$error = true;
$error_message = $b;
} elseif (still different bad user input) {
$error = true;
$error_message = $c;
}

if ($error) {
do some things
and then
echo $error_message;
} else {
present confirmation dialog
}





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]




for ($i = 1; $i <= $_POST['numfiles']; $i++) {

// check text box for filename - no danger characters!
if (preg_match("/[<>\"'\\/:]/", $_POST["filename{$i}"])) {
$input_error_confirm = true;
$error_message = $filename_is_invalid;
$problem_file_number = $i;
$problem_file_name =
htmlspecialchars($_POST["filename${i}"]);
// check text boxes for filesize, width, and height, must be of 
form .00
} elseif (  !preg_match("/^\d{1,4}\.?\d{0,2}$/", 
$_POST["filesize${i}"]) ||
!preg_match("/^\d{1,4}\.?\d{0,2}$/",
$_POST["width${i}"]) ||
!preg_match("/^\d{1,4}\.?\d{0,2}$/",
$_POST["height${i}"]) ||
!preg_match("/^\d{1,4}$/",
$_POST["resolution{$i}"]) ) {
$input_error_confirm = true;
$error_message = $filenum_is_invalid;
$problem_file_number = $i;
$problem_file_name =
htmlspecialchars($_POST["filename${i}"]);
// check text boxes to make sure that the default values (0.00) are 
not left unchanged
} elseif (  (float) $_POST["filesize{$i}"] < 0.01 ||
(float) $_POST["width{$i}"] < 0.01 ||
(float) $_POST["height{$i}"] < 0.01 ||
(int) $_POST["resolution{$i}"] < 1 ) {
$input_error_confirm = true;
$error_message = $filenum_is_zero;
$problem_file_number = $i;
$problem_file_name =
htmlspecialchars($_POST["filename{$i}"]);
} elseif ($_POST["format{$i}"] == 0) {
$input_error_confirm = true;
$error_message = $no_format_specified;
$problem_file_number = $i;
$problem_file_name =
htmlspecialchars($_POST["filename{$i}"]);
}
}

// if errors in text inputs, error messages must be returned from 
this function
if ($input_error_confirm) {
$data_to_return = " Unfortunately, there 
was an error in your data, in file number ${problem_file_number} (" . 
stripslashes(${problem_file_name}) . ").
$error_message\n";
$data_to_return .= addrecord_form($_POST['numfiles']);
// otherwise text inputs are fine, display them to the user for 
confirmation
} else {


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



[PHP] php include path setting in .htaccess

2002-02-28 Thread bill

How can I set the php include path on an Apache machine using .htaccess.

Assuming I'm puting it outside of the web root, I think it is something
like:

php_include_path "../includefiles/:../../includefiles/"

but that generates server errors.

Any suggestions?

kind regards,

bill hollett


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




Re: [PHP] interesting problem / NETSCAPE-related

2002-02-28 Thread Billy S Halsey

Vlad,

Try IMAGE

/bsh/



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




[PHP] interesting problem / NETSCAPE-related

2002-02-28 Thread Vlad Kulchitski

Hi guys, I hope someone out there can help me.

I just ran into an interesting issue.

Basically, I am working on a php-powered template which works
in two different languages (English and Ukrainian):

http://www.kulchitski.com/btl/template.php?lang=eng

When you go to this address (!in Netscape), everything's fine.
Also everything's fine when you manually change the variable lang= in
the
string. But! Try to click flags on the template and that's where I 
run to an error message.

Basically what I do there is I use IMAGE

I assume the problem is because I don't specify which file I want to 
pass the variable lang to... But it works fine in IE, and works fine on
Mozilla 
on my linux machine.

Also, the same story goes to menu on the left hand side.

If someone can help me here, that would be greatly appreciated.

I mean apparently it will work if I specify which file I want to go
to...
But I am just curious if there's another way around...

Thanks a lot in advance,
Vlad
http://vladik.tripod.com

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




[PHP] Re: Auto_prepend_file

2002-02-28 Thread Richard Baskett

Actually I did give the absolute path.. Any more ideas?

Rick

"If you're going to be able to look back on something and laugh about it,
you might as well laugh about it now." - Marie Osmond

> From: "Timothy J. Luoma" <[EMAIL PROTECTED]>
> Date: Thu, 28 Feb 2002 20:06:39 -0500 (Eastern Standard Time)
> To: Richard Baskett <[EMAIL PROTECTED]>
> Cc: PHP General <[EMAIL PROTECTED]>
> Subject: Re: Auto_prepend_file
> 
> On Thu, 28 Feb 2002, Richard Baskett wrote:
> 
>> What I want to do is have a function available to all my php files without
>> having to use an include in every page.  So what I did was put this line in
>> my .htaccess file:
>> 
>> php auto_prepend_file "pathtoscript/uniemail.php"
> 
> On my system I had to give the absolute full path (not just document root
> but /usr/local/lib/apache/htdocs/pathtoscript/uniemail.php)
> 
> You might try that.
> 
> TjL
> 
> 
> 


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




[PHP] Re: Auto_prepend_file

2002-02-28 Thread Timothy J. Luoma

On Thu, 28 Feb 2002, Richard Baskett wrote:

> What I want to do is have a function available to all my php files without
> having to use an include in every page.  So what I did was put this line in
> my .htaccess file:
>
> php auto_prepend_file "pathtoscript/uniemail.php"

On my system I had to give the absolute full path (not just document root
but /usr/local/lib/apache/htdocs/pathtoscript/uniemail.php)

You might try that.

TjL




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




Re: [PHP] elseif without else

2002-02-28 Thread Erik Price


On Thursday, February 28, 2002, at 07:42  PM, Jeff Sheltren wrote:

> If you are setting a variable inside of the if statements, and then 
> checking that variable later, then I would say you should either use an 
> else statement to give that variable a default value, or you should set 
> the variable to a default value before the if statements.  Your code is 
> "legitimate", ie. there is no reason you *have* to have an else 
> statement.
>

I would have thought that if I set this variable at all, then I wouldn't 
be able to use the second part of the script ( if($variable)... ).  I 
have posted a snippet of the code at the bottom, if you don't mind 
checking it out.  It works fine -- but it seems strange not to have an 
'else'.  The  bare bones of it is like so:

if (bad user input) {
$error = true;
$error_message = $a;
} elseif (different bad user input) {
$error = true;
$error_message = $b;
} elseif (still different bad user input) {
$error = true;
$error_message = $c;
}

if ($error) {
do some things
and then
echo $error_message;
} else {
present confirmation dialog
}





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]




for ($i = 1; $i <= $_POST['numfiles']; $i++) {

// check text box for filename - no danger characters!
if (preg_match("/[<>\"'\\/:]/", $_POST["filename{$i}"])) {
$input_error_confirm = true;
$error_message = $filename_is_invalid;
$problem_file_number = $i;
$problem_file_name = htmlspecialchars($_POST["filename${i}"]);
// check text boxes for filesize, width, and height, must be of 
form .00
} elseif (  !preg_match("/^\d{1,4}\.?\d{0,2}$/", 
$_POST["filesize${i}"]) ||
!preg_match("/^\d{1,4}\.?\d{0,2}$/", 
$_POST["width${i}"]) ||
!preg_match("/^\d{1,4}\.?\d{0,2}$/", 
$_POST["height${i}"]) ||
!preg_match("/^\d{1,4}$/", $_POST["resolution{$i}"]) ) 
{
$input_error_confirm = true;
$error_message = $filenum_is_invalid;
$problem_file_number = $i;
$problem_file_name = htmlspecialchars($_POST["filename${i}"]);
// check text boxes to make sure that the default values (0.00) are 
not left unchanged
} elseif (  (float) $_POST["filesize{$i}"] < 0.01 ||
(float) $_POST["width{$i}"] < 0.01 ||
(float) $_POST["height{$i}"] < 0.01 ||
(int) $_POST["resolution{$i}"] < 1 ) {
$input_error_confirm = true;
$error_message = $filenum_is_zero;
$problem_file_number = $i;
$problem_file_name = htmlspecialchars($_POST["filename{$i}"]);
} elseif ($_POST["format{$i}"] == 0) {
$input_error_confirm = true;
$error_message = $no_format_specified;
$problem_file_number = $i;
$problem_file_name = htmlspecialchars($_POST["filename{$i}"]);
}
}

// if errors in text inputs, error messages must be returned from 
this function
if ($input_error_confirm) {
$data_to_return = " Unfortunately, there 
was an error in your data, in file number ${problem_file_number} (" . 
stripslashes(${problem_file_name}) . ").
$error_message\n";
$data_to_return .= addrecord_form($_POST['numfiles']);
// otherwise text inputs are fine, display them to the user for 
confirmation
} else {


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




Re: [PHP] Upgrading PHP

2002-02-28 Thread Jeff Bearer

One issue I've come across is if you have a site up and running, make
php and install php and make and install apache, php won't be upgraded. 
You need to stop apache before you install the new apache so.

after you make apache, stop the running apache, install apache, and then
start apache up again.



On Thu, 2002-02-28 at 16:32, Frank Miller wrote:
> All,
>  I have a question about upgrading php. With the CERT 
> advisory coming yesterday and the quick response from the PHP website I 
> thought today would be a good day to upgrade my PHP.   I initially 
> installed the php 4.03 src in /usr/src and built it as an apache module 
> DSO. To upgrade I deleted the old source still in /usr/src and untarred php 
> 4.1.2 . I then configured it and ran make and make install. Everything went 
> well until I run the phpinfo() test script I made, I did stop and start 
> Apache. It still shows me as using PHP 4.0.3 . Can someone tell me what I 
> need to do to get rid of the older version of PHP and upgrade to the new?
> 
> Thanks in advance - Frank
> 
> Frank Miller
> Computer Specialist and Webmaster
> Technology and Distance Education
> Texas A&M University-Texarkana
> 2600 North Robison Rd
> Texarkana, Texas 75501
> 
> Phone:  903-223-3156
> Fax:  903-223-3139
> Office:   165
> 
> 

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

> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com
2002 EPpy Award, Best Online U.S. Newspaper

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




Re: [PHP] elseif without else

2002-02-28 Thread Erik Price


On Thursday, February 28, 2002, at 07:56  PM, Dennis Moore wrote:

> Perfectly legitimate... it is much like having a switch statement 
> without a
> default clause.

>

Oh, I didn't know that that was legitimate either.  :)  Thanks Dennis


Erik



Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] Variables containing HTML?

2002-02-28 Thread Erik Price

Since your function stripslashes the data, does that mean that it's not 
a good idea to use on code that has backslashes?  (For instance, if I 
have some data that I've already run through addslashes or something).  
Essentially all I'm asking is if it's safe to encode() any string data 
or just certain kinds of string data.

This function is cool -- I was thinking of using it with array_walk() 
and a bunch of POST data, to get a bunch of numerical strings, then 
imploding them into a single hidden form field, which on the next 
instantiation of the page gets exploded back to separate fields and 
entered into the database.  I haven't worked it all out yet, but then 
again I'm still testing out these functions.

Thanks!

Erik




On Thursday, February 28, 2002, at 07:14  PM, Demitrious S. Kelly wrote:

> Consider
>
>  echo serialize('blah');
> ?>
>
> it returns 's:4:"blah";'
>
> now, consider
>
> encode('blah');
>
> it returns '098108097104'
>
> now consider which of the two output strings you end up having to escape
> special characters for...
>
> :)
>
>
> -Original Message-
> From: Erik Price [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 28, 2002 1:41 PM
> To: Demitrious S. Kelly
> Cc: 'Nick Richardson'; 'PHP General'
> Subject: Re: [PHP] Variables containing HTML?
>
>
> What's the difference between this and the serialize() function?
>
>
> Erik
>
>
>
>
> On Monday, February 25, 2002, at 11:27  PM, Demitrious S. Kelly wrote:
>
>> It breaks the individual characters down into their ascii equivalent,
>> and makes it one big 'numerical' string... then breaks the string back
>> into separate values and translates each value back into a character,
>> then recreates the string from the characters...
>>
>> I got sick of slashing and un slashing and validating, and
> revalidating,
>> etc, etc, etc, etc so I made this. Which makes things 1000% simpler
>>
>> -Original Message-
>> From: Nick Richardson [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, February 25, 2002 8:11 PM
>> To: Demitrious S. Kelly; 'PHP General'
>> Subject: RE: [PHP] Variables containing HTML?
>>
>> Right on!!! - This works great!!
>>
>> Can you explain what it does ;) - i'm completly lost in it ;)
>>
>> //Nick
>>
>> -Original Message-
>> From: Demitrious S. Kelly [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, February 25, 2002 8:02 PM
>> To: 'Nick Richardson'; 'PHP General'
>> Subject: RE: [PHP] Variables containing HTML?
>>
>>
>> Try these...
>>
>> function encode($string) {
>> $string=stripslashes($string);
>> $temp='';
>> $newstring='';
>> for ( $counter=0; $counter != ; $counter++ ) {
>> $temp=substr($string, $counter, 1);
>> if ( $temp == '' ) {
>> break;
>> }
>> $newstring=$newstring . str_pad( ord($temp), 3, "0",
>> STR_PAD_LEFT);
>> }
>> return ($newstring);
>> }
>>
>> function decode($string) {
>> $temp='';
>> $newstring='';
>> for ( $counter=0; $counter != ; $counter+=3 ) {
>> $temp=substr($string, $counter, 3);
>> if ( $temp == '' ) {
>> break;
>> }
>> $newstring=$newstring . chr($temp);
>> }
>> return ($newstring);
>> }
>>
>> -Original Message-
>> From: Nick Richardson [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, February 25, 2002 7:56 PM
>> To: PHP General
>> Subject: [PHP] Variables containing HTML?
>>
>> Stupid question for everyone... i'm just having one of those braindead
>> moments.
>>
>> I have a page which allows users to add custom headers and footers in
>> HTML.
>> (i.e. Fill in a text area with a bunch of html, and that's stored in a
>> mysql
>> database and retrived when that user logs in again).
>>
>> The problem i'm having is this:
>>
>> When a users fills in all the info, and hits submit, they are taken to
> a
>> preview page which renders everything and has an accept button.
>> If i try to store the header and footer data in a hidden input it just
>> renders it on the screen (if it's more than one line it gets even
>> worse).
>>
>> How can i get this info (variable w/ strings that are QUITE long, and
>> include quotes and apostrophes) from the form they are entered on,
> into
>> a
>> preview page, then back into the script to be written into the
> database?
>>
>> I have thought about sessions, and they work until the user decides
> they
>> dont like the way it turned out and try to discard and change it, even
>> after
>> re-registering the variables in the session, they do not change to the
>> new
>> input.
>>
>> I hope someone out there can make sence of what i have said... because
> i
>> think i confused even myself ;)
>>
>> Thanks for any help!
>>
>> //Nick Richardson
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
>>
>> --
>> PHP 

RE: [PHP] elseif without else

2002-02-28 Thread Martin Towell

if there's nothing to do in the else block, then it's a bit pointless to
have one
eg
 value="xxx"
name="blah">
see what I mean?

Martin

-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 11:32 AM
To: PHP
Subject: [PHP] elseif without else


For any of you PHP legal eagles:

I rtfm'd, but the "elseif" page doesn't say -- is it okay to have

if ($x) {
// do something
} elseif  ($y) {
// do something
} elseif ($z) {
// do something
}

without a final "else"?  My code works fine -- so I know that you -can- 
do this.  What I was wondering is if this is something that is likely to 
get deprecated at some point in the future.  IOW, is it "legitimate", 
regardless of how it works?


Thanks,

Erik

PS: is it bad coding style to do the above?  I'd like comments on that 
too if applicable.  My if statements check for conditions and then set a 
variable, and later in the script if that variable exists then something 
else happens.  Is this "sloppy"?







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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



[PHP] Help with functions.

2002-02-28 Thread Sean Kennedy

Hello,

I need some help with functions. Does anyone know of a good place to learn 
about functions? Will someone be willing to teach me what I need to know about 
functions in PHP? Thank you,

-Sean Kennedy
-http://www.gdesigns.vcn.com


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




Re: [PHP] elseif without else

2002-02-28 Thread Dennis Moore

Perfectly legitimate... it is much like having a switch statement without a
default clause.





- Original Message -
From: "Erik Price" <[EMAIL PROTECTED]>
To: "PHP (E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, February 28, 2002 7:32 PM
Subject: [PHP] elseif without else


> For any of you PHP legal eagles:
>
> I rtfm'd, but the "elseif" page doesn't say -- is it okay to have
>
> if ($x) {
> // do something
> } elseif  ($y) {
> // do something
> } elseif ($z) {
> // do something
> }
>
> without a final "else"?  My code works fine -- so I know that you -can-
> do this.  What I was wondering is if this is something that is likely to
> get deprecated at some point in the future.  IOW, is it "legitimate",
> regardless of how it works?
>
>
> Thanks,
>
> Erik
>
> PS: is it bad coding style to do the above?  I'd like comments on that
> too if applicable.  My if statements check for conditions and then set a
> variable, and later in the script if that variable exists then something
> else happens.  Is this "sloppy"?
>
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] elseif without else

2002-02-28 Thread Jeff Sheltren

If you are setting a variable inside of the if statements, and then 
checking that variable later, then I would say you should either use an 
else statement to give that variable a default value, or you should set the 
variable to a default value before the if statements.  Your code is 
"legitimate", ie. there is no reason you *have* to have an else statement.

Jeff

At 07:32 PM 2/28/2002 -0500, Erik Price wrote:
>For any of you PHP legal eagles:
>
>I rtfm'd, but the "elseif" page doesn't say -- is it okay to have
>
>if ($x) {
>// do something
>} elseif  ($y) {
>// do something
>} elseif ($z) {
>// do something
>}
>
>without a final "else"?  My code works fine -- so I know that you -can- do 
>this.  What I was wondering is if this is something that is likely to get 
>deprecated at some point in the future.  IOW, is it "legitimate", 
>regardless of how it works?
>
>
>Thanks,
>
>Erik
>
>PS: is it bad coding style to do the above?  I'd like comments on that too 
>if applicable.  My if statements check for conditions and then set a 
>variable, and later in the script if that variable exists then something 
>else happens.  Is this "sloppy"?
>



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




[PHP] elseif without else

2002-02-28 Thread Erik Price

For any of you PHP legal eagles:

I rtfm'd, but the "elseif" page doesn't say -- is it okay to have

if ($x) {
// do something
} elseif  ($y) {
// do something
} elseif ($z) {
// do something
}

without a final "else"?  My code works fine -- so I know that you -can- 
do this.  What I was wondering is if this is something that is likely to 
get deprecated at some point in the future.  IOW, is it "legitimate", 
regardless of how it works?


Thanks,

Erik

PS: is it bad coding style to do the above?  I'd like comments on that 
too if applicable.  My if statements check for conditions and then set a 
variable, and later in the script if that variable exists then something 
else happens.  Is this "sloppy"?







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




RE: [PHP] Variables containing HTML?

2002-02-28 Thread Demitrious S. Kelly

Consider



it returns 's:4:"blah";'

now, consider

encode('blah');

it returns '098108097104'

now consider which of the two output strings you end up having to escape
special characters for...

:)


-Original Message-
From: Erik Price [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 28, 2002 1:41 PM
To: Demitrious S. Kelly
Cc: 'Nick Richardson'; 'PHP General'
Subject: Re: [PHP] Variables containing HTML?


What's the difference between this and the serialize() function?


Erik




On Monday, February 25, 2002, at 11:27  PM, Demitrious S. Kelly wrote:

> It breaks the individual characters down into their ascii equivalent,
> and makes it one big 'numerical' string... then breaks the string back
> into separate values and translates each value back into a character,
> then recreates the string from the characters...
>
> I got sick of slashing and un slashing and validating, and
revalidating,
> etc, etc, etc, etc so I made this. Which makes things 1000% simpler
>
> -Original Message-
> From: Nick Richardson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 8:11 PM
> To: Demitrious S. Kelly; 'PHP General'
> Subject: RE: [PHP] Variables containing HTML?
>
> Right on!!! - This works great!!
>
> Can you explain what it does ;) - i'm completly lost in it ;)
>
> //Nick
>
> -Original Message-
> From: Demitrious S. Kelly [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 8:02 PM
> To: 'Nick Richardson'; 'PHP General'
> Subject: RE: [PHP] Variables containing HTML?
>
>
> Try these...
>
> function encode($string) {
> $string=stripslashes($string);
> $temp='';
> $newstring='';
> for ( $counter=0; $counter != ; $counter++ ) {
> $temp=substr($string, $counter, 1);
> if ( $temp == '' ) {
> break;
> }
> $newstring=$newstring . str_pad( ord($temp), 3, "0",
> STR_PAD_LEFT);
> }
> return ($newstring);
> }
>
> function decode($string) {
> $temp='';
> $newstring='';
> for ( $counter=0; $counter != ; $counter+=3 ) {
> $temp=substr($string, $counter, 3);
> if ( $temp == '' ) {
> break;
> }
> $newstring=$newstring . chr($temp);
> }
> return ($newstring);
> }
>
> -Original Message-
> From: Nick Richardson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 7:56 PM
> To: PHP General
> Subject: [PHP] Variables containing HTML?
>
> Stupid question for everyone... i'm just having one of those braindead
> moments.
>
> I have a page which allows users to add custom headers and footers in
> HTML.
> (i.e. Fill in a text area with a bunch of html, and that's stored in a
> mysql
> database and retrived when that user logs in again).
>
> The problem i'm having is this:
>
> When a users fills in all the info, and hits submit, they are taken to
a
> preview page which renders everything and has an accept button.
> If i try to store the header and footer data in a hidden input it just
> renders it on the screen (if it's more than one line it gets even
> worse).
>
> How can i get this info (variable w/ strings that are QUITE long, and
> include quotes and apostrophes) from the form they are entered on,
into
> a
> preview page, then back into the script to be written into the
database?
>
> I have thought about sessions, and they work until the user decides
they
> dont like the way it turned out and try to discard and change it, even
> after
> re-registering the variables in the session, they do not change to the
> new
> input.
>
> I hope someone out there can make sence of what i have said... because
i
> think i confused even myself ;)
>
> Thanks for any help!
>
> //Nick Richardson
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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



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




[PHP] Testing patch for 4.0.6

2002-02-28 Thread Chris Mason

I am using 4.0.6 as a apache module in a redhat server, compiling the src
rpm with a couple of custom commands in the spec file. I can't upgrade to a
newer version due to changes in the xmltree() function that breaks some of
my projects.
With the recent vunerability, I needed to generate a patched version. I ran
rpm -Uvh on the src rpm, then
rpm -bp to clean up

vi php-4.06.spec
and changed the version number,
made a couple of changes
saved the spec file

cd to /usr/src/redhat/BUILD/php-4.0.6/main
cp /root/rfc1867.c.diff-4.0.6.gz .
patch -p0 rfc1867.c rfc1867.c.diff-4.0.6.gz
cd /usr/src/redhat/SPEC
rpm -bb --short-circuit php-4.0.6.spec

cd ../RPM/i386
rpm -Uvh php-4.0.6.cm.i386.rpm

/etc/init.d/httpd restart


Apache works fine, I have a patched serveror do I?

How can I check I have actually fixed it?

Is there a test i can run. I don;t need the whole exploit, I don't think,
just some kind of test.


Chris Mason
[EMAIL PROTECTED]
Box 340, The Valley, Anguilla, British West Indies
Tel: 264 497 5670 Fax: 264 497 8463
Take a virtual tour of the island
http://www.anguillaguide.com/ The Anguilla Guide
Find your perfect rental villa www.mycaribbean.com
Talk to me in real time:
MSN Instant Messenger: [EMAIL PROTECTED]
ICQ 118159388 Yahoo:netconcepts_anguilla
US Fax and Voicemail: (605)253-1759


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




[PHP] php compiler project(s)?

2002-02-28 Thread Demitrious S. Kelly

Are there any win32 / *nix PHP compilers out there to make a binary
executable. I remember one for win32 a while back but that's no longer
even a glimmer in somebody's eyes anymore. Anyone have any info on the
subject? (I'm not even looking for something GTK compliant... just
something that works)


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




[PHP] Radius.cgi to PHP conversion.

2002-02-28 Thread Josiah Wallingford

I am working with this Radius.cgi script and know nothing about cgi... I 
need all of the content to be in php. Can anybody help?



radius-cgi.tar.gz
Description: GNU Zip compressed data

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


Re: [PHP] PHP MAIL function...why wont it work????

2002-02-28 Thread Brad Wright

Yep it is a linux box.

> From: "DL Neil" <[EMAIL PROTECTED]>
> Reply-To: "DL Neil" <[EMAIL PROTECTED]>
> Date: Thu, 28 Feb 2002 22:55:59 -
> To: "Brad Wright" <[EMAIL PROTECTED]>, "PHP General List"
> <[EMAIL PROTECTED]>
> Subject: Re: [PHP] PHP MAIL function...why wont it work
> 
> Hi Brad,
> 
>> Hi all... I have a line in a page that should send me an email when
> the page
>> is loaded.
>> mail("[EMAIL PROTECTED]", "worked", "Line 1\nLine 2\nLine
> 3");
>> when i load the page...i get NO error msgs, but the function does not
> send
>> the mail. There is no record of any activity in the mail log...any
> ideas...
> 
> 
> If your server is not a *nix box you need to separate headers with CRLF
> (Win) or CR (Mac).
> What does php.ini say in the mail section?
> Simplify the msg right down to the barest minimum, get it to work, then
> start adding...
> =dn
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




Re: [PHP] Upgrading PHP

2002-02-28 Thread PHP List

Yes, you have to re-compile php because php compile and install a module
under apache_1.3.xx/src/modules





> Thanks for the reply.   I have another question. If I have to recompile
> Apache can I take this opportunity to upgrade it as well. I'm using 1.3.14
> but would like to upgrade to a more recent version.  Also, I remember when
> I compiled PHP the first time I had to have the Apache source and when I
> compiled  PHP one of the configure parameters was
> --with-apache=../apache1.3.14  . Since I didn't do that for this recent
> compile of PHP will I have to compile PHP over again?
>
> TIA - Frank
>
> At 03:37 PM 2/28/2002, you wrote:
>
> >Frank,
> >
> >Using PHP as an Apache module requires you recompile apache as a whole.
> >It's still using the php4.0.3 module, and when you recompile with the new
> >php it will register the 4.1.2 module.
> >
> >Mike
> >- Original Message -
> >From: "Frank Miller" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Thursday, February 28, 2002 4:32 PM
> >Subject: [PHP] Upgrading PHP
> >
> >
> > > All,
> > >  I have a question about upgrading php. With the CERT
> > > advisory coming yesterday and the quick response from the PHP website
I
> > > thought today would be a good day to upgrade my PHP.   I initially
> > > installed the php 4.03 src in /usr/src and built it as an apache
module
> > > DSO. To upgrade I deleted the old source still in /usr/src and
untarred
> >php
> > > 4.1.2 . I then configured it and ran make and make install. Everything
> >went
> > > well until I run the phpinfo() test script I made, I did stop and
start
> > > Apache. It still shows me as using PHP 4.0.3 . Can someone tell me
what I
> > > need to do to get rid of the older version of PHP and upgrade to the
new?
> > >
> > > Thanks in advance - Frank
> > >
> > > Frank Miller
> > > Computer Specialist and Webmaster
> > > Technology and Distance Education
> > > Texas A&M University-Texarkana
> > > 2600 North Robison Rd
> > > Texarkana, Texas 75501
> > >
> > > Phone:  903-223-3156
> > > Fax:  903-223-3139
> > > Office:   165
> > >
> >
> >
>
>---
-
> >
> >
> >
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002
> > >
> > >
> >
> >
>
>---
-
> >
> >
> >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >---
> >Incoming mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002
>
> Frank Miller
> Computer Specialist and Webmaster
> Technology and Distance Education
> Texas A&M University-Texarkana
> 2600 North Robison Rd
> Texarkana, Texas 75501
>
> Phone:  903-223-3156
> Fax:  903-223-3139
> Office:   165
>






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






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


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




Re: [PHP] MacOS-style pager

2002-02-28 Thread Philip J. Newman

We'll for give you

- Original Message -
From: "James Arthur" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 01, 2002 12:39 PM
Subject: Re: [PHP] MacOS-style pager


> Sorry -- that was supposed to go to the KDE list :)
>
> On Monday 25 Feb 2002 20:12, James Arthur wrote:
> > Hi
> >
> > Does anyone know of any MacOS-style pager applets? Something that would
sit
> > in the panel and display the current app, and give me a drop down list
of
> > running apps.
> >
> > GNOME has a very good one, and I miss it having switched to KDE.
> >
> > --jaa
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>




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




Re: [PHP] MacOS-style pager

2002-02-28 Thread James Arthur

Sorry -- that was supposed to go to the KDE list :)

On Monday 25 Feb 2002 20:12, James Arthur wrote:
> Hi
>
> Does anyone know of any MacOS-style pager applets? Something that would sit
> in the panel and display the current app, and give me a drop down list of
> running apps.
>
> GNOME has a very good one, and I miss it having switched to KDE.
>
> --jaa

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




Re: [PHP] Upgrading PHP

2002-02-28 Thread Michael Kimsal

Frank Miller wrote:
> Thanks for the reply.   I have another question. If I have to recompile 
> Apache can I take this opportunity to upgrade it as well. I'm using 
> 1.3.14 but would like to upgrade to a more recent version.  Also, I 
> remember when I compiled PHP the first time I had to have the Apache 
> source and when I compiled  PHP one of the configure parameters was 
> --with-apache=../apache1.3.14  . Since I didn't do that for this recent 
> compile of PHP will I have to compile PHP over again?
> 
> TIA - Frank
> 


If you didn't put the '--with-apache' in, PHP compiled itself as a CGI 
binary executable.  Yes, you'll need to recompile PHP over again.

You may want to take this opportunity to investigate Apache's DSO system 
(dynamic shared object).  You can recreate a new PHP 'module' for Apache 
without having to recompile Apache again in the future.  It's apparently 
a small performance hit, but I've not been able to notice any sizable 
decrease in performance on production servers we work with using the DSO 
system.

Hope that helps.

--
Michael Kimsal
http://www.phphelpdesk.com
Taking the ? out of http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] What dll files do I need to go in my SYSTEM32 dir on the server?

2002-02-28 Thread Philip J. Newman

Someone tell me what DLL files you actually need to run PHP on isapi, do I
need to have all the files in the /php/ dir?  Takes up heaps of HDD space.




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




[PHP] MacOS-style pager

2002-02-28 Thread James Arthur

Hi

Does anyone know of any MacOS-style pager applets? Something that would sit 
in the panel and display the current app, and give me a drop down list of 
running apps.

GNOME has a very good one, and I miss it having switched to KDE.

--jaa


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




Re: [PHP] Help with Array Walk

2002-02-28 Thread DL Neil

Hello Vidyut,

>  I have a question regarding array_walk.. I couldn't find any help on
> the website or on irc.. didn't know where else to look.

You've come to the right place.

> I'm stumped, and about to just copy the function on top of this script
> to make it work.. any ideas from anyone else ?. Maybe it's something
> stupid that I'm doing.. but I can't figure it out.

Is it my imagination/cross-eyedness - how many letter-Ls should there
be?

> when I run $check->is_aetters($textfield); it works fine
> array_walk ($fieldname, '$check->is_allletters');
> Warning: Unable to call $check->is_allletters() - function does not

At least there should always be the same number!
=dn


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




[PHP] Tracking mail() problems

2002-02-28 Thread Brad Wright

Hi all,
I am running PHP 4.03 on a linux box and am having problems with the mail()
function.
I use the syntax:
("[EMAIL PROTECTED]", "if this works, ring me and we party", "Line
1\nLine 2\nLine 3", "From: [EMAIL PROTECTED]")


When the script is run, i get no error msg, and the rest of the script works
fine, but no mail sent. Mail log shows no record of any event from this
script.
Is there another way that I can check foir activity from this function/?.

Any ideas, this is killing me.

Thanks in advance,
brad


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




Re: [PHP] the date90 fucntions gone haywire!

2002-02-28 Thread DL Neil

Hi Georgie,

> The date() function is returning the 19th of Januray 2038 as *ALL*
dates no
> matter what timestamp i feed it! whats goin on??


Result outside the UNIX epoch.
Sounds like DATE()'s being fed some crazy data.
What is the server's ToD clock showing?
Make sure you debugECHO the source data before you feed it to DATE().
Post some code and results from the browser and we may be able to point
fingers!

Regards,
=dn


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




Re: [PHP] PHP MAIL function...why wont it work????

2002-02-28 Thread DL Neil

Hi Brad,

> Hi all... I have a line in a page that should send me an email when
the page
> is loaded.
>  mail("[EMAIL PROTECTED]", "worked", "Line 1\nLine 2\nLine
3");
> when i load the page...i get NO error msgs, but the function does not
send
> the mail. There is no record of any activity in the mail log...any
ideas...


If your server is not a *nix box you need to separate headers with CRLF
(Win) or CR (Mac).
What does php.ini say in the mail section?
Simplify the msg right down to the barest minimum, get it to work, then
start adding...
=dn


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




RE: [PHP] loading Arrays

2002-02-28 Thread Martin Towell

sure, you can add/remove/modify element whenever you want

your syntax is wrong though

try this

// add value to array
if($flag == "true"){
$samplearray[] = $samplevalue;  // append value to end of array
}

-Original Message-
From: sundogcurt [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 9:51 AM
To: GENERAL PHP LIST
Subject: [PHP] loading Arrays


Do I have to fully load up an array when I declare it or can I assign 
more values to it later?
What I want to do is something like this :

// create empty array
$samplearray = array();

// add value to array
if($flag == "true"){
$samplearray => $samplevalue;
}

This doesn't work, can anybody tell me if I'm on the right track here or 
should I scrap it and start over?

Thanks
Curt


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



[PHP] loading Arrays

2002-02-28 Thread sundogcurt

Do I have to fully load up an array when I declare it or can I assign 
more values to it later?
What I want to do is something like this :

// create empty array
$samplearray = array();

// add value to array
if($flag == "true"){
$samplearray => $samplevalue;
}

This doesn't work, can anybody tell me if I'm on the right track here or 
should I scrap it and start over?

Thanks
Curt


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




Re: [PHP] OMG your right ... $REMOTE_ADDR don't work in Samber 5.1, PHP4

2002-02-28 Thread Philip J. Newman

Is this a server thing, becuse I have just updated the server, and I used to
use it all ver the site and it worked ... is there anything else that could
do the job of $REMOTE_ADDR ?

I run the windows isapi 4.0.5 on Sambar 5.1 if that healps

- Original Message -
From: "Simon Willison" <[EMAIL PROTECTED]>
To: "Philip J. Newman" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, March 01, 2002 11:15 AM
Subject: Re: [PHP] OMG your right ... $REMOTE_ADDR don't work in Samber 5.1,
PHP4


> Philip J. Newman wrote:
>
> >OK yah, this is a pain in the butt, $REMOTE_ADDR Dose not work in Sambar
5.1.  Anyone have anyone have any solutions that can be used insteard?
> >
> Whenever you have a problem like this run phpinfo(); and have a look at
> the available environment variables. Useing print_r($HTTP_SERVER_VARS);
> can be very helpful as well.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>




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




[PHP] Auto_prepend_file

2002-02-28 Thread Richard Baskett

What I want to do is have a function available to all my php files without
having to use an include in every page.  So what I did was put this line in
my .htaccess file:

php auto_prepend_file "pathtoscript/uniemail.php"

It didn¹t work, I also tried php_auto with the underscore in the above.. And
that didn¹t work either.  I have modified my httpd.conf file so that it will
process .htaccess files..

Any ideas?

Rick

"I haven't failed, I've found 10,000 ways that don't work." - Ben Franklin


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




RE: [PHP] Reference problem

2002-02-28 Thread Martin Towell
Title: RE: [PHP] Reference problem





I wrote an xml parsing class, and xml tag class, that might help you there


see the attachment


-Original Message-
From: John English [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 12:35 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Reference problem



I'm trying to build a tree of objects using PHP4, but I'm getting
tangled in reference problems. Some test code that illustrates the
problem:


  class X {
    var $parent;
    var $ident;
    var $kids;
    function X (&$parent,$number) {
  $this->parent = $parent;
  $this->ident  = $number;
  $this->kids   = array();
    }
  }


  $root = new X($here,1);
  $here =& $root;
  for ($i = 2; $i < 5; $i++) {
    $elem = new X($here,$i);
    $here->kids[] = $elem;
    $here =& $elem;  #--- ???
  }
  print_r($root);


I'm hoping for a structure where each node has a link to the parent
node and an array of child nodes. Instead I get a recursive set of
trees; removing the & on the line marked "???" means I get an empty
kids array in the first child node. I've been sprinkling &'s around
(and unsprinkling them ;-) and my head is starting to hurt.


Can anyone tell me what I'm doing wrong here?


TIA,


-
 John English  | mailto:[EMAIL PROTECTED]
 Senior Lecturer   | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing    | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-


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


 



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


[PHP] the date90 fucntions gone haywire!

2002-02-28 Thread Georgie Casey

The date() function is returning the 19th of Januray 2038 as *ALL* dates no
matter what timestamp i feed it! whats goin on??

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Ireland's Online Film Production Directory
***



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




Re: [PHP] Reuse variables?

2002-02-28 Thread Simon Willison

Tim Thorburn wrote:

> I've setup a form that users to our site fill out to request to be 
> added to our listings.  Currently its setup so that the user fills out 
> the form, and the information is emailed to me for reviewing - however 
> I'd like to carry it a step further and enter only some of the emailed 
> information automatically into a MySQL database.
>
> The way the script is setup now, it gathers the information from the 
> previous form, sends the email, and then is supposed to enter itself 
> into the database.  Although it doesn't get this far - it seems that 
> once the mail command is used, there is nothing left over - and vice 
> versa.
>
> Is it not possible to do two things with the same form data?

It's definitely possible. Sounds like your script has a bug in it, but 
without seeing the code there's not much we can do to help :)


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




Re: [PHP] OMG your right ... $REMOTE_ADDR don't work in Samber 5.1, PHP4

2002-02-28 Thread Simon Willison

Philip J. Newman wrote:

>OK yah, this is a pain in the butt, $REMOTE_ADDR Dose not work in Sambar 5.1.  Anyone 
>have anyone have any solutions that can be used insteard?
>
Whenever you have a problem like this run phpinfo(); and have a look at 
the available environment variables. Useing print_r($HTTP_SERVER_VARS); 
can be very helpful as well.


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




[PHP] Reuse variables?

2002-02-28 Thread Tim Thorburn

Hi,

I've setup a form that users to our site fill out to request to be added to 
our listings.  Currently its setup so that the user fills out the form, and 
the information is emailed to me for reviewing - however I'd like to carry 
it a step further and enter only some of the emailed information 
automatically into a MySQL database.

The way the script is setup now, it gathers the information from the 
previous form, sends the email, and then is supposed to enter itself into 
the database.  Although it doesn't get this far - it seems that once the 
mail command is used, there is nothing left over - and vice versa.

Is it not possible to do two things with the same form data?

Thanks
-Tim



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




RE: [PHP] Help me!!!Can I use PHP to send SMS message???

2002-02-28 Thread Frank Hertogs

Another way of doing it is thru an e-mail to sms gateway; free or paid.
That way you could make a simple form and use mail();

Just a thought.

Frank.
 

-Oorspronkelijk bericht-
Van: Simon Willison [mailto:[EMAIL PROTECTED]] 
Verzonden: donderdag 28 februari 2002 12:30
Aan: hei
CC: [EMAIL PROTECTED]
Onderwerp: Re: [PHP] Help me!!!Can I use PHP to send SMS message???

hei wrote:

>Help me!!!Can I use PHP to send SMS message???If yes, how can I use
it???
>
>
>(((Please e-mail the answer to me [EMAIL PROTECTED])))
>
One very cheeky way of doing this would be to sign up to one of the free

SMS services on the web (such as lycos mobile) and set up a PHP script 
that can "pretend" to be a browser, log in to your account and post a 
message to the "send SMS" form. You could do this using something along 
the lines of CURL or Snoopy (I recommend  Snoopy as it doesn't require 
anything to be installed on your web server):

http://snoopy.sourceforge.net/

You would have to figure out how the authentication scheme for your 
chosen web-based SMS service works (most of them use cookies). The main 
disadvantage is that it's a bit of a dirty hack and it would stop 
working if the free web service went down or changed the way its 
authentication / SMS form worked. Free services also tend to limit you 
to a certain number of messages a day.

The professional alternative is to invest in some kind of web to SMS 
gateway, but I think that's quite an expensive option.


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



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




[PHP] OMG your right ... $REMOTE_ADDR don't work in Samber 5.1, PHP4

2002-02-28 Thread Philip J. Newman

OK yah, this is a pain in the butt, $REMOTE_ADDR Dose not work in Sambar 5.1.  Anyone 
have anyone have any solutions that can be used insteard?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



Re: [PHP] Writing to files

2002-02-28 Thread William Lovaton

There is no need to use cookies, sessions, write to a file or somethings
like that... just pass the vars from a page to another through hidden
fields in the next page form.

Eg.




William


El mié, 27-02-2002 a las 02:18, Chris Kay escribió:
> 
> Question I have is, Anyway know of a better way to store temp
> information?
> 
> I have a problem that a script I use, uses many pages and after each
> page the information from the form
> Is stored and the next page is shown ect
> 
> It uses more than 20 variables so I can not store the data in cookies.
> I could store the data in a temp file created but problem is that the
> webserver would need to create
> The file which is a security risk (I would like to find another way
> other than this).
> I don't really want to use sessions but if it's the last resort I guess
> I will have to.
> 
> Other than the above any one have a better soluition?
> 
> Running php 4.1.1 on RH7.2
> 
> ---
> Chris Kay, Eleet Internet Services
> [EMAIL PROTECTED]
> ---



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


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




Re: [PHP] Variables containing HTML?

2002-02-28 Thread Simon Willison

Erik Price wrote:

>
> What's the difference between this and the serialize() function?
>
> Erik 

It solves a different problem to serialize(). serialize can take pretty 
much any PHP object / array / data structure and convert it into a 
string, but the resulting string will still need addslashes() applied to 
store it in a database and htmlspecialchars() for display in a hidden 
form field etc. The encode() function takes a PHP string and converts it 
into a "safe" string which can be put straight in a database / hidden 
form field / URL variable without needing any further processing - it 
can then be decoded at a later date.

In fact, the encode() and decode() functions would probably complement 
serialize() very well :)

> On Monday, February 25, 2002, at 11:27  PM, Demitrious S. Kelly wrote:
>
>> It breaks the individual characters down into their ascii equivalent,
>> and makes it one big 'numerical' string... then breaks the string back
>> into separate values and translates each value back into a character,
>> then recreates the string from the characters...
>>
>> I got sick of slashing and un slashing and validating, and revalidating,
>> etc, etc, etc, etc so I made this. Which makes things 1000% simpler
>>
>> -Original Message-
>> From: Nick Richardson [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, February 25, 2002 8:11 PM
>> To: Demitrious S. Kelly; 'PHP General'
>> Subject: RE: [PHP] Variables containing HTML?
>>
>> Right on!!! - This works great!!
>>
>> Can you explain what it does ;) - i'm completly lost in it ;)
>>
>> //Nick
>>
>> -Original Message-
>> From: Demitrious S. Kelly [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, February 25, 2002 8:02 PM
>> To: 'Nick Richardson'; 'PHP General'
>> Subject: RE: [PHP] Variables containing HTML?
>>
>>
>> Try these...
>>
>> function encode($string) {
>> $string=stripslashes($string);
>> $temp='';
>> $newstring='';
>> for ( $counter=0; $counter != ; $counter++ ) {
>> $temp=substr($string, $counter, 1);
>> if ( $temp == '' ) {
>> break;
>> }
>> $newstring=$newstring . str_pad( ord($temp), 3, "0",
>> STR_PAD_LEFT);
>> }
>> return ($newstring);
>> }
>>
>> function decode($string) {
>> $temp='';
>> $newstring='';
>> for ( $counter=0; $counter != ; $counter+=3 ) {
>> $temp=substr($string, $counter, 3);
>> if ( $temp == '' ) {
>> break;
>> }
>> $newstring=$newstring . chr($temp);
>> }
>> return ($newstring);
>> }
>>
>> -Original Message-
>> From: Nick Richardson [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, February 25, 2002 7:56 PM
>> To: PHP General
>> Subject: [PHP] Variables containing HTML?
>>
>> Stupid question for everyone... i'm just having one of those braindead
>> moments.
>>
>> I have a page which allows users to add custom headers and footers in
>> HTML.
>> (i.e. Fill in a text area with a bunch of html, and that's stored in a
>> mysql
>> database and retrived when that user logs in again).
>>
>> The problem i'm having is this:
>>
>> When a users fills in all the info, and hits submit, they are taken to a
>> preview page which renders everything and has an accept button.
>> If i try to store the header and footer data in a hidden input it just
>> renders it on the screen (if it's more than one line it gets even
>> worse).
>>
>> How can i get this info (variable w/ strings that are QUITE long, and
>> include quotes and apostrophes) from the form they are entered on, into
>> a
>> preview page, then back into the script to be written into the database?
>>
>> I have thought about sessions, and they work until the user decides they
>> dont like the way it turned out and try to discard and change it, even
>> after
>> re-registering the variables in the session, they do not change to the
>> new
>> input.
>>
>> I hope someone out there can make sence of what i have said... because i
>> think i confused even myself ;)
>>
>> Thanks for any help!
>>
>> //Nick Richardson
>>
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>
>




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




[PHP] Overriding session headers

2002-02-28 Thread Daniel Grace

Is there a way to override the headers that session_start() sends to the
browser from within a PHP script? On php 4.0.4pl1 (will be upgrading to
4.1.1 later) on SOME browsers (notably, IE 6.0 on XP -- my setup), a script
I have that outputs a PDF document will misbehave in IE when the "No-store"
portion of a cache-control header is present... which PHP sends as part of
the sessions.

When this is present, IE6 will either come up with a blank page, or it'll
present your typical "You are downloading the file: blah blah blah... would
you like to open the file or save it to your computer?" dialog box. However,
the 'open' option of the dialog box will be grayed out, and clicking Save
yields an error message reading "Internet Explorer can notnot download
 from . Internet explorer was not able to open this Internet
Site.  The requested site is either unavailable or cannot be found.  Please
try again later."

Like I said, it seems to be the "No-store" part of a cache-control header
that causes the problem. Change the caching options for sessions from
nocache to private fixes this, but happens to break other things on the
site. Sending my own cache-control headers with header() either merges them
with the ones the session_start sends, or does absolutely nothing (verified
by doing a GET /url HTTP/1.0 via telnet to port 80), regardless of whether
the header occurs before or after the session_start.

-- Daniel Grace

P.S. The PDF documents are generated using Wayne Munro's cpdf and cezpdf
classes, located at http://sourceforge.net/projects/pdf-php/.; They do not
require clibpdf or pdflib and are public-domain, so there are no licensing
fees involved...





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




Re: [PHP] Upgrading PHP

2002-02-28 Thread Frank Miller

Thanks for the reply.   I have another question. If I have to recompile 
Apache can I take this opportunity to upgrade it as well. I'm using 1.3.14 
but would like to upgrade to a more recent version.  Also, I remember when 
I compiled PHP the first time I had to have the Apache source and when I 
compiled  PHP one of the configure parameters was 
--with-apache=../apache1.3.14  . Since I didn't do that for this recent 
compile of PHP will I have to compile PHP over again?

TIA - Frank

At 03:37 PM 2/28/2002, you wrote:

>Frank,
>
>Using PHP as an Apache module requires you recompile apache as a whole.
>It's still using the php4.0.3 module, and when you recompile with the new
>php it will register the 4.1.2 module.
>
>Mike
>- Original Message -
>From: "Frank Miller" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Thursday, February 28, 2002 4:32 PM
>Subject: [PHP] Upgrading PHP
>
>
> > All,
> >  I have a question about upgrading php. With the CERT
> > advisory coming yesterday and the quick response from the PHP website I
> > thought today would be a good day to upgrade my PHP.   I initially
> > installed the php 4.03 src in /usr/src and built it as an apache module
> > DSO. To upgrade I deleted the old source still in /usr/src and untarred
>php
> > 4.1.2 . I then configured it and ran make and make install. Everything
>went
> > well until I run the phpinfo() test script I made, I did stop and start
> > Apache. It still shows me as using PHP 4.0.3 . Can someone tell me what I
> > need to do to get rid of the older version of PHP and upgrade to the new?
> >
> > Thanks in advance - Frank
> >
> > Frank Miller
> > Computer Specialist and Webmaster
> > Technology and Distance Education
> > Texas A&M University-Texarkana
> > 2600 North Robison Rd
> > Texarkana, Texas 75501
> >
> > Phone:  903-223-3156
> > Fax:  903-223-3139
> > Office:   165
> >
>
>
>
>
>
>
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002
> >
> >
>
>
>
>
>
>
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002

Frank Miller
Computer Specialist and Webmaster
Technology and Distance Education
Texas A&M University-Texarkana
2600 North Robison Rd
Texarkana, Texas 75501

Phone:  903-223-3156
Fax:  903-223-3139
Office:   165



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



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


Re: [PHP] Sessions and switching between php and htm documents

2002-02-28 Thread William Lovaton

Did you register de variable?

look for session_register() in the manual.


You can see this articles too:

http://www.phpbuilder.com/columns/mattias2312.php3
http://www.phpbuilder.com/columns/mattias2105.php3


William.

El mar, 26-02-2002 a las 23:36, Dave escribió:
> login.htm
>   form submits information
> 
> login.php
>   session_start();
>   $HTTP_SESSION_VARS["username"]=$formUserName;
>   header("Location: displaypage.htm");
> 
> displaypage.htm
>   show some static stuff
>   links to formpage.htm
> 
> formpage.htm
>   form submits information to form.php
> 
> form.php
>   session_start();
>   echo $HTTP_SESSION_VARS["username"];  <-  has no value
> 
> 
> Does the chain of pages have to be continually PHP pages to allow the transition
> of the session variables?  if not, any ideas on why we are losing session
> variables?
> 
> Dave



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


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




Re: [PHP] Variables containing HTML?

2002-02-28 Thread Erik Price


What's the difference between this and the serialize() function?


Erik




On Monday, February 25, 2002, at 11:27  PM, Demitrious S. Kelly wrote:

> It breaks the individual characters down into their ascii equivalent,
> and makes it one big 'numerical' string... then breaks the string back
> into separate values and translates each value back into a character,
> then recreates the string from the characters...
>
> I got sick of slashing and un slashing and validating, and revalidating,
> etc, etc, etc, etc so I made this. Which makes things 1000% simpler
>
> -Original Message-
> From: Nick Richardson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 8:11 PM
> To: Demitrious S. Kelly; 'PHP General'
> Subject: RE: [PHP] Variables containing HTML?
>
> Right on!!! - This works great!!
>
> Can you explain what it does ;) - i'm completly lost in it ;)
>
> //Nick
>
> -Original Message-
> From: Demitrious S. Kelly [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 8:02 PM
> To: 'Nick Richardson'; 'PHP General'
> Subject: RE: [PHP] Variables containing HTML?
>
>
> Try these...
>
> function encode($string) {
> $string=stripslashes($string);
> $temp='';
> $newstring='';
> for ( $counter=0; $counter != ; $counter++ ) {
> $temp=substr($string, $counter, 1);
> if ( $temp == '' ) {
> break;
> }
> $newstring=$newstring . str_pad( ord($temp), 3, "0",
> STR_PAD_LEFT);
> }
> return ($newstring);
> }
>
> function decode($string) {
> $temp='';
> $newstring='';
> for ( $counter=0; $counter != ; $counter+=3 ) {
> $temp=substr($string, $counter, 3);
> if ( $temp == '' ) {
> break;
> }
> $newstring=$newstring . chr($temp);
> }
> return ($newstring);
> }
>
> -Original Message-
> From: Nick Richardson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 25, 2002 7:56 PM
> To: PHP General
> Subject: [PHP] Variables containing HTML?
>
> Stupid question for everyone... i'm just having one of those braindead
> moments.
>
> I have a page which allows users to add custom headers and footers in
> HTML.
> (i.e. Fill in a text area with a bunch of html, and that's stored in a
> mysql
> database and retrived when that user logs in again).
>
> The problem i'm having is this:
>
> When a users fills in all the info, and hits submit, they are taken to a
> preview page which renders everything and has an accept button.
> If i try to store the header and footer data in a hidden input it just
> renders it on the screen (if it's more than one line it gets even
> worse).
>
> How can i get this info (variable w/ strings that are QUITE long, and
> include quotes and apostrophes) from the form they are entered on, into
> a
> preview page, then back into the script to be written into the database?
>
> I have thought about sessions, and they work until the user decides they
> dont like the way it turned out and try to discard and change it, even
> after
> re-registering the variables in the session, they do not change to the
> new
> input.
>
> I hope someone out there can make sence of what i have said... because i
> think i confused even myself ;)
>
> Thanks for any help!
>
> //Nick Richardson
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




[PHP] Upgrading PHP

2002-02-28 Thread Frank Miller

All,
 I have a question about upgrading php. With the CERT 
advisory coming yesterday and the quick response from the PHP website I 
thought today would be a good day to upgrade my PHP.   I initially 
installed the php 4.03 src in /usr/src and built it as an apache module 
DSO. To upgrade I deleted the old source still in /usr/src and untarred php 
4.1.2 . I then configured it and ran make and make install. Everything went 
well until I run the phpinfo() test script I made, I did stop and start 
Apache. It still shows me as using PHP 4.0.3 . Can someone tell me what I 
need to do to get rid of the older version of PHP and upgrade to the new?

Thanks in advance - Frank

Frank Miller
Computer Specialist and Webmaster
Technology and Distance Education
Texas A&M University-Texarkana
2600 North Robison Rd
Texarkana, Texas 75501

Phone:  903-223-3156
Fax:  903-223-3139
Office:   165



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



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


[PHP] Re: Tech Tip

2002-02-28 Thread Josiah Wallingford

It would also be nice to have a script that will let me add new ones 
whenever I want and delete any ones I want but I think I can figure that 
out. I also need these tech tips to be able to be in html so that I can 
add pictures.


On Thursday, February 28, 2002, at 02:23 PM, Josiah Wallingford wrote:

I have all of the tips in the database and just need to have a script 
that will view them on a certain part of the page every day. I don't 
care which it views on which days I just don't want it to show the same 
one twice before going through them all.


On Thursday, February 28, 2002, at 11:21 AM, Joe Crawford wrote:

On Wed, 27 Feb 2002, Josiah Wallingford wrote:> I will be hosting daily
tech tips on www.sofast.net here shortly but
need a script (perferably php using mysql) that will allow me to store
about 3000 tips that he html based so that I can add pictures. If you
goto http://www.sofast.net/techtips/index.htm you can see exactly what I
need. I need the script to pull a new one every day or randomly shows
one every day and remembers which one it has shown so that you don't get
one one day and the same one the next day.
Anybody know any scripts like that?

Do you have the tips in a database already?

Lots of ways to skin this cat. Depends on how you want to do it. :-\ Do
you decide a year in advance? Or do you want to decide day by day? OR
something else?

The question is too vague to get any sort of useful response.

- Joe
--
Joe Crawford, web journeyman: San Diego California USA
||| kitties thinking: http://artlung.com
|||   latest thought: http://artlung.com/blog
|||   san diego web folk: http://websandiego.org
|||   san diego bloggers: http://websandiego.org/bloggers



-
List FAQ: 
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>


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




[PHP] MySql - PHP

2002-02-28 Thread Josiah Wallingford

I am in the process of creating a php script that will do the following 
for users in the ISP that I work at:
First screen: Which department do you work for? (List of all 
departments, in this example we will use the salesman)
Second Screen: username - password (employee enters user-pass)
They are they presented with some options. First:  Sign customer up for 
Site Survey for Wireless (which will goto a database for the department 
of installers). The rest we will not worry about because this is the 
only one I care about at the moment.
Ok... so the salesman clicks on Sign customer up for Site Survey for 
Wireless. He is then presented with a form with the following 
information:
The customers name
customers phone number
customers street address
desired username
desired password
--
After filling that information, or whatever information we desire to put 
there, it is then submitted and the salesman is happy.
--
NOW: the installers log into the page and they see a list of all of the 
people who have been submitted by the salesman. A list that looks 
something like the following:

View All Users!!

Customers Name:Jake Green
Customers Phone Number:456-456-4567
Customers Street Address:123532 booger test drive
Desired Username:jgreen
Desired Password:jgreen

Customers Name:;lkjsdflkj
Customers Phone Number:;lskdjf
Customers Street Address:;lkjsdf
Desired Username:l;kjdlskfjsf
Desired Password:sdfsdf

-
Now what I need is check boxes on the left or right or something that 
means the installers have done the site survey or installation. At the 
bottom there should be a button that says finished. When that finished 
button is clicked the accounts with checks are removed from their list 
but are backed up into another database called installed.

My question is what script do I need to add to this to make it have 
check boxes and backup the data to another database?


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




[PHP] check on pictures

2002-02-28 Thread Martin Kampherbeek

Can someone help me with this problem?

Someone fills in my form. One field on the form is galleryurl. Here he types a url 
with some pictures on it. On this page the are thumbnail with links to bigger pictures.
Now I want to check if the pictures are realy on it. And I want to check if there is a 
link to a picture on the thumbnail and not to a html page.

I hope someone can help me.

Cheers,
Martin.






[PHP] Sockets

2002-02-28 Thread Karl Pietri

Hello i am trying to write a php script to monitor some tcp services running
on our network.  i use fsockopen to open it.  I use this code to get all the
data off the port in one block.

while(!feof($sock)){
$indata.=fgets($sock,256);
}

the code is roughly like this
connect
read all data off port
send a command
read all data off port
close

my problem is that feof($sock) once it evaluates to true (once it is done
reading all the data the first time) that when new data arrives (after the
send) feof($sock) is still true signifing no more data.  Any one know a
workaround or mabey what im doing wrong.
full code is available at
http://dcl.nvps.net/socket.phps

Thanks for anyhelp you might be able to give.

-Karl




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




[PHP] Re: how to: variable = php parsed file include

2002-02-28 Thread Julio Nobrega Trabalhando

  Find on phorm.php where you want to put your nav bar, and use:

include('file_name.php');

--

Julio Nobrega.

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

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


"Brian Petro" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> I've got a site that I've used php to include the navigation bar as a
> separate file.  Within that nav-bar is a small php application.  I have no
> problem including the php nav-bar file and it gets parsed by php and the
> application works.  The problem is that I also want to use the same file
> include for the navigation in a dynamic "thank you" page that is generated
> by a php-based form processor.  I'm using phorm.com's php form processor
> which I really like.  The "dynamic" "thank you" page that it generates is
> actually a hard coded html page which phorm.php parses to replace form
> variables.  I think my best way to do what I want is to have the script
grab
> the nav-bar file, parse it through php, then take the string results and
set
> a variable equal to that string.  That way I can still use the script's
> built in parsing that replaces form variables in the hard coded "thank
you"
> page.  Does anyone know the syntax to do this?  I understand the concept,
> but I'm way over my head.
>
> Thanks!
>
>
>



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




[PHP] Using SSL - slightly OT

2002-02-28 Thread Darren Gamble

Good day,

I'm trying to set up a site that will use SSL for all of its web and control
transactions.

Currently I get an error when Apache is started up with PHP and SSL compiled
together (on FreeBSD).  There's a bug report on it, so it's just a matter of
waiting.

In the meantime, I'd like to set up Apache with SSL.  I note that there are
two packages- modssl and Apache-ssl, which appear to be two completely
different packages.

Has anyone here tried both of these packages, or has a recommendation on
which to use?  I'm curious as to what everyone would recommend for someone
new to SSL.

Thanks,


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948

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




[PHP] Help with the record, here isn't visibility!!!

2002-02-28 Thread Michele Salerno

The page is http://www.coopmediante.net/page/utenti/master.php In the database i have 
3 records. the page no print a video the records, because??
Help me...help me!
Tanks you very much!...is correct much?
Bey bey
Michele


http://www.interakt.ro/

  require("./../../adodb/adodb.inc.php");
  require("./../../Connections/coopmediante.php");
?>Execute("SELECT *  FROM utente, installatore  WHERE 
installatore.IDinstallatore = utente.IDinstallatore") or 
DIE($coopmediante->ErrorMsg());
   $Recordset1_numRows=0;
   $Recordset1__totalRows=$Recordset1->RecordCount();
?>RecordCount();
  
  // set the number of rows displayed on this page
  if ($Recordset1_numRows < 0) {// if repeat region set to all records
$Recordset1_numRows = $Recordset1_total;
  } else if ($Recordset1_numRows == 0) {// if no repeat regions
$Recordset1_numRows = 1;
  }
  
  // set the first and last displayed record
  $Recordset1_first = 1;
  $Recordset1_last  = $Recordset1_first + $Recordset1_numRows - 1;
  
  // if we have the correct record count, check the other stats
  if ($Recordset1_total != -1) {
$Recordset1_numRows = min($Recordset1_numRows, $Recordset1_total);
$Recordset1_first  = min($Recordset1_first, $Recordset1_total);
$Recordset1_last  = min($Recordset1_last, $Recordset1_total);
  }
  ?> $Recordset1_total) {
  $Recordset1_numRows = $Recordset1_total;
}
  
// set the first and last displayed record
   $Recordset1_last  = min($Recordset1_first + $Recordset1_numRows - 1, 
$Recordset1_total);
$Recordset1_first = min($Recordset1_first, $Recordset1_total);
?>= $MM_rsCount || $MM_offset == -1) {  // past end or move last
   if (($MM_rsCount % $MM_size) != 0) {  // last page not a full repeat region
$MM_offset = $MM_rsCount - ($MM_rsCount % $MM_size);
   }
   else {
$MM_offset = $MM_rsCount - $MM_size;
   }
  }
 }

 // move the cursor to the selected record
 for ($i=0;!$MM_rs->EOF && ($i < $MM_offset || $MM_offset == -1); $i++) {
  $MM_rs->MoveNext();
 }
 if ($MM_rs->EOF) $MM_offset = $i;  // set MM_offset to the last possible record
}
?>EOF && ($MM_size < 0 || $i < $MM_offset + $MM_size); 
$i++) {
$MM_rs->MoveNext();
  }

  // if we walked off the end of the recordset, set MM_rsCount and MM_size
  if ($MM_rs->EOF) {
$MM_rsCount = $i;
if ($MM_size < 0 || $MM_size > $MM_rsCount) $MM_size = $MM_rsCount;
  }

  // if we walked off the end, set the offset based on page size
  if ($MM_rs->EOF && !$MM_paramIsDefined) {
if (($MM_rsCount % $MM_size) != 0) {  // last page not a full repeat region
  $MM_offset = $MM_rsCount - ($MM_rsCount % $MM_size);
} else {
  $MM_offset = $MM_rsCount - $MM_size;
}
  }

  // reset the cursor to the beginning
  $MM_rs->MoveFirst();

  // move the cursor to the selected record
  for ($i=0; !$MM_rs->EOF && $i < $MM_offset; $i++) {
$MM_rs->MoveNext();
  }
}
?>= $MM_rsCount);
?> 0) $MM_keepBoth = substr($MM_keepBoth, 1);
if (strlen($MM_keepURL) > 0)  $MM_keepURL = substr($MM_keepURL, 1);
if (strlen($MM_keepForm) > 0) $MM_keepForm = substr($MM_keepForm, 1);
?> 1) {
  $MM_moveParam = "offset";
  if (strlen($MM_keepMove)> 0) {
$params = explode("&", $MM_keepMove);
$MM_keepMove = "";
for ($i=0; $i < sizeof($params); $i++) {
  list($nextItem) = explode("=", $params[$i]);
  if (strtolower($nextItem) != $MM_moveParam)  {
$MM_keepMove.="&".$params[$i];
  }
}
if (strlen($MM_keepMove) > 0) $MM_keepMove = substr($MM_keepMove, 1);
  }
}

// set the strings for the move to links
if (strlen($MM_keepMove) > 0) $MM_keepMove.="&";
$urlStr = $PHP_SELF."?".$MM_keepMove.$MM_moveParam."=";
$MM_moveFirst = $urlStr."0";
$MM_moveLast  = $urlStr."-1";
$MM_moveNext  = $urlStr.($MM_offset + $MM_size);
$MM_movePrev  = $urlStr.(max($MM_offset - $MM_size,0));
?>


IN-OFFICE: Utenti




   
 Nome 
 Cognome 
 Località
 Provincia 
 Data ricezione e-mail
  
  EOF)) 
   { 
?>
   
 
  Fields("nome")?>

 
  Fields("cognome")?>

 
  "> 
  Fields("paese_citta")?>
   
 
  Fields("provincia")?>

 
  Fields("giorno_ric")?>
  - 
  Fields("mese_ric")?>
  - 
  Fields("anno_ric")?>

  
  MoveNext();
}
?>


   

  
  Primo
  


  
  Precedente
  


  
  Successivo
  


  
  Ultimo
  

  

 
Record da 
  
  a 
  
  su 
  



Close();
?>




[PHP] how to: variable = php parsed file include

2002-02-28 Thread Brian Petro

I've got a site that I've used php to include the navigation bar as a
separate file.  Within that nav-bar is a small php application.  I have no
problem including the php nav-bar file and it gets parsed by php and the
application works.  The problem is that I also want to use the same file
include for the navigation in a dynamic "thank you" page that is generated
by a php-based form processor.  I'm using phorm.com's php form processor
which I really like.  The "dynamic" "thank you" page that it generates is
actually a hard coded html page which phorm.php parses to replace form
variables.  I think my best way to do what I want is to have the script grab
the nav-bar file, parse it through php, then take the string results and set
a variable equal to that string.  That way I can still use the script's
built in parsing that replaces form variables in the hard coded "thank you"
page.  Does anyone know the syntax to do this?  I understand the concept,
but I'm way over my head.

Thanks!




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




Re: [PHP] PHP and passwords

2002-02-28 Thread Sam Masiello


What you could do is have a script called connect.inc which has your
pg_pconnect statement, then use the "include" directive to include your
connect.inc on all of your subsequent PHP pages.  This way you only have the
username/password hard coded in one location so if the username/password
were to change, you only have to change one script instead of changing many.

HTH

Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 X289
[EMAIL PROTECTED]

- Original Message -
From: "webmaster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 28, 2002 4:59 AM
Subject: [PHP] PHP and passwords


> Is there a way to connect to your database using php without hard coding
> a password into the php file?  We run PostgreSQL 7.1 on a Linux 7.2
> server with the latest version of apache.  I don't want to change the
> authentication within Postgres to not require a password.  But I also,
> for security reasons, don't want to have passwords coded into the php
> scripts for accessing the database.  I'm very new to php, but very
> excited about what I've learned so far.  Any help would be appreciated.
>
> thanks,
>
> Elkan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] fsockopen and HTTP Authorization

2002-02-28 Thread Mika Tuupola

On Thu, 28 Feb 2002, Bas Jobsen wrote:

> I try to do a HTTP Authorization with a fsockopen, but it doesn't seem to 
> work. Who can help?
> $user and $passwd are set well, my code:

I think you can spy from PEAR HTTP_Request class how it
can be done:

http://chora.php.net/cvs.php/pear/HTTP_Request

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


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




[PHP] regular expression; problem with '-' character

2002-02-28 Thread Lee P Reilly

Hi,

Could someone be kind enough to have a look at this regular expression
and perhaps tell me why is returns false when a '-' character is
included in the $center string?

if (eregi("^[a-zA-Z0-9!@#\$%^&\*\(\),/.//<>\?;':\"~`_\+\|\-\\\t\n\
]*$", $center))
  {
return true;
  }
  else
  {
return false;
  }

This regular expression is just for making sure that the input contains
only characters that are available on a standard (American-English)
keyboard i.e. if the string contains a '©' it will return false. Maybe
there's a better way to do this without using regular expressions?

Thanks very much in advance for any help.

- Best regards,
Lee


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




Re: [PHP] class effeciency

2002-02-28 Thread Mika Tuupola

On Thu, 28 Feb 2002, Nick Wilson wrote:

> It is only the *properties* that are different in each language class
> not the methods so I'm including all the same methods twice! That
> doesn't seem terribly efficient.

There is no need to rewrite the methods. See:

http://www.php.net/manual/en/keyword.extends.php

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


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




Re: [PHP] Apache Server Side Includes mixed with PHP pages

2002-02-28 Thread Joel Boonstra

> Thanks Martin - that does work. I was just thinking in ASP terms. But I
> am curious as to whether Server Side Includes can work together with
> php.

Nope, at least not with Apache <= 2.0.  Apache 2 will let you have
multi-pass parsing, so your PHP could output SSI, which would then be
parsed.  Why you would want this, I don't know, since PHP is much more
fully featured than SSI, and can do everything SSI can.

Joel

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


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




RE: [PHP] URGENT: CERT Advisory CA-2002-05 Multiple Vulnerabilities in PHP fileupload

2002-02-28 Thread Nathan Cassano


I'm finished! Patched all my servers, recompiled and installed. We're
safe. 

-Original Message-
From: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 28, 2002 9:58 AM
To: [EMAIL PROTECTED]
Subject: [PHP] URGENT: CERT Advisory CA-2002-05 Multiple Vulnerabilities
in PHP fileupload


Hello everybody!

For whever's interested...

CERT Advisory CA-2002-05 Multiple Vulnerabilities in PHP fileupload



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




[PHP] PHP and BrowserHawk

2002-02-28 Thread Richard Fox



Hi Richard,

I have finally got Java working with PHP. My Java is JSDK 1.4.0, the latest
release of the SDK from Sun. How do I know it's working? I put

$system = new Java("java.lang.System");

print "Java version=".$system->getProperty("java.version")."
\n";
print "Java vendor=".$system->getProperty("java.vendor")." \n\n";
print "OS=".$system->getProperty("os.name")." ".
  $system->getProperty("os.version")." on ".
  $system->getProperty("os.arch")." \n";

$formatter = new Java("java.text.SimpleDateFormat",",
 dd,  'at' h:mm:ss a ");
print $formatter->format(new Java("java.util.Date"))."\n\n";

into my PHP script and get:

Java version=1.4.0
Java vendor=Sun Microsystems Inc.
OS=Linux 2.4.2-2 on i386
Thursday, February 28, 2002 at 12:44:03 PM GMT-05:00

Nice, huh? Now, next step is to test BrowserHawk. I do not have servlet
support on my Apache webserver, but according to the BrowserHawk README
file, and I quote

BrowserHawk4J can be used anywhere server-side Java(tm) is available,
including servlets, JavaServer Pages, server-side JavaScript, and even
stand-alone Java applications. The only requirement is a Java Virtual
Machine version 1.1.x or higher. Note that to use any of the extended
properties of BrowserHawk4J (as defined below), you must use the BH4J
bean from a servlet or JSP environment.

So, I take this to mean that as long as I do not try to get extended
properties, I should be able to use my current setup to use BrowserHawks
basic capabilities. Fine, for the first step. My php.ini looks like

[Java]
java.class.path =
/usr/local/lib/php/php_java.jar:/usr/local/BrowserHawk/lib/bhawk4j.jar:/usr/
local/BrowserHawk
java.home = /usr/java/j2sdk1.4.0
java.library = libjava.so
java.library.path = /usr/local/lib/php/extensions/no-debug-non-zts-20010901
extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20010901
extension = libphp_java.so


and my CLASSPATH and LD_LIBRARY_PATH are

[root@centauri /root]# echo $CLASSPATH
/usr/local/BrowserHawk/lib/bhawk4j.jar:/usr/local/BrowserHawk
[root@centauri /root]# echo $LD_LIBRARY_PATH
/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/server:/
usr/local/lib/php:/usr/local/BrowserHawk/lib


but, when I point my browser to
http://localhost/BrowserHawk/examples/showbrow-ssjs.html I get:

Browser Capabilities Test Page
The following is information on your web browser's capabilities
as detected by BrowserHawk4J using Netscape's Server-Side JavaScript
technology.

User agent: write(request.agent)

if (b == null) { Browser information was null. This should never happen. In
case of error, getBrowserInfo() throws a BrowserHawkException.

}

Has anyone else gotten BrowserHwk running under PHP using Java extension?
Any suggestions would be appreciated. As far as I can tell (as my java is
definitely working!) this should work.


Thanks,
Rich



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




[PHP] Won't display session information

2002-02-28 Thread jeremy spielmann

I'm working on a simple session management program for logging in and I can't seem to 
get the information to properly display.  I would really appreciate a second look from 
someone.

Code is below

Execute($strSQL);
if ($rs->EOF)
{
  Access_Denied();
}
else
{
  $_SESSION["FirstName"] = $rs->fields["FirstName"];
  $_SESSION["Email"] = $rs->fields["Email"];
  //redirect at this point
}
  }
}

//-
function ConnectDB()
{
  global $objConn;

  $db_type = "mysql";
  $db_location = "localhost";
  $db_uid = "xxx";
  $db_pwd = "xxx";
  $db_name = "login";

  include("wrapper/adodb.inc.php");
  $objConn = NewADOConnection($db_type);
  $objConn->Connect($db_location, $db_uid, $db_pwd, $db_name);
  $objConn->debug = false;
}

I'm kind of lost here I'm new to PHP, but have developed in both Perl and TCL 
before so the syntax is familiar.  

Thanks for the help in advance,

Jeremy

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




Re: [PHP] Simple chat

2002-02-28 Thread Dean Householder

You can try a very cheesy solution.  Totalsimplicity will host a free chat
room without any installation.  All you have to do is go to the following
link:
http://www.totalsimplicity.com/genchat.php?fromj=y
and specify the name of the chat room you want to create and it will
generate the code to add to a link on your website. It will come up with
something like:
http://www.totalsimplicity.com/chat/?channel=Chat',
'chat',
'width=720,height=425,status=1,menubar=no,resizable=no,scrollbars=yes');
return false;">Come chat with us!

Very simple. Your chat room dies when there are noone is inside it.  This
requires no installing programs on your computer, or setting up an account
somewhere.

Dean Householder

- Original Message -
From: "Danilo Dias" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 28, 2002 11:08 AM
Subject: [PHP] Simple chat


> I have 2 problems.
>
> Problem #1:
> I need to make a simple chat page. When a user logs in, he should be able
to
> see everyone that is logged in, and send messages to all. Just that. Its
not
> necessary that they send messages to a particular person. I need just one
> room.
> It may be simple, but I have no experience making web pages.
>
> Problem #2:
> The first one to enter the chat is redirected to another page, where he
can
> make experiments. When he exits this page, a pop-up message should appear
in
> the second to enter´s screen, asking if he wants to enter the experiment
or
> not. If he answers yes, he will be redirected to the "another page", if
not,
> he will go to the last place of the FIFO, and the pop-up message should
> appear to the next in the FIFO. And so on.
>
> If anybody could help me with any of this problems I would be grateful.
> Remember I have no experience with web pages, php, javascript, so it would
> be good if there is no difficult terms in the explanation. Thanx.
>
>
> Danilo Dias
> <[EMAIL PROTECTED]>
>
> _
> Oi! Você quer um iG-mail gratuito?
> Então clique aqui: http://registro.ig.com.br/censo/igmail
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


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




Re: [PHP] PNG Lib

2002-02-28 Thread PHP List

Thanks,
Sorry I asked, I should have just searched for it, but my clue-x-4 is
broken.

> > Does anyone know where the PNG library went?
> > The manual points to cdrom.com/pub/png, but that does not exist anymore.
>
> http://www.libpng.org/pub/png/
>
> 
> Greg Donald - http://destiney.com/
> http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/
> 
>


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




Re: [PHP] Stupid Question

2002-02-28 Thread PHP List

RE: [PHP] Stupid QuestionThanks for all the responses.

Just to be clear, I have php installed as a module, so I have to re-compile apache.



  - Original Message - 
  From: Adam Plocher 
  To: 'PHP List' 
  Sent: Thursday, February 28, 2002 9:46 AM
  Subject: RE: [PHP] Stupid Question


  It depends on how you have php setup to begin with.  If you have it setup to be used 
as a loadable module, then you can just recompile the php module and re-insert it (I 
don't remember how exactly).  If you don't know how it's setup, I'm guessing it's not 
a loadable module and you will need to recompile apache.

  FYI. http://www.php.net/manual/en/installation.php <-- installation instructions. 

  -Original Message- 
  From: PHP List [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, February 28, 2002 9:27 AM 
  To: php 
  Subject: [PHP] Stupid Question 



  Yes, this is probably in the manual, but I can't find it. 

  If I want to upgrade from 4.0.6 to 4.1.2, do I have to re-compile apache as well? 

  Thanks 

  Chris 



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



[PHP] Simple chat

2002-02-28 Thread Danilo Dias

I have 2 problems. 

Problem #1: 
I need to make a simple chat page. When a user logs in, he should be able to 
see everyone that is logged in, and send messages to all. Just that. Its not 
necessary that they send messages to a particular person. I need just one 
room. 
It may be simple, but I have no experience making web pages. 

Problem #2: 
The first one to enter the chat is redirected to another page, where he can 
make experiments. When he exits this page, a pop-up message should appear in 
the second to enter´s screen, asking if he wants to enter the experiment or 
not. If he answers yes, he will be redirected to the "another page", if not, 
he will go to the last place of the FIFO, and the pop-up message should 
appear to the next in the FIFO. And so on. 

If anybody could help me with any of this problems I would be grateful. 
Remember I have no experience with web pages, php, javascript, so it would 
be good if there is no difficult terms in the explanation. Thanx. 


Danilo Dias 
<[EMAIL PROTECTED]> 

_
Oi! Você quer um iG-mail gratuito?
Então clique aqui: http://registro.ig.com.br/censo/igmail


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




[PHP] URGENT: CERT Advisory CA-2002-05 Multiple Vulnerabilities in PHP fileupload

2002-02-28 Thread Bogdan Stancescu

Hello everybody!

For whever's interested...

< @cert.org="">< @cert.org="">CERT Advisory CA-2002-05 Multiple Vulnerabilities in PHP 
fileupload

   Original release date: February 27, 2002
   Last revised: --
   Source: CERT/CC

   A complete revision history can be found at the end of this file.

Systems Affected

 * Web servers running PHP

Overview

   Multiple  vulnerabilities  exist  in the PHP scripting language. These
   vulnerabilities  could  allow  a  remote attacker to execute arbitrary
   code with the privileges of the PHP process.

I. Description

   PHP is a scripting language widely used in web development. PHP can be
   installed on a variety of web servers, including Apache, IIS, Caudium,
   Netscape  and  iPlanet,  OmniHTTPd  and others. Vulnerabilities in the
   php_mime_split  function  may  allow  an intruder to execute arbitrary
   code  with  the  privileges of the web server. For additional details,
   see

 http://security.e-matters.de/advisories/012002.html

   Web  servers  that  do not have PHP installed are not affected by this
   vulnerability.

   The  CERT/CC  is tracking this set of vulnerabilities as VU#297363. At
   this  time,  these  vulnerabilities  have  not  been  assigned  a  CVE
   identifier.

II. Impact

   Intruders  can  execute  arbitrary code with the privileges of the web
   server, or interrupt normal operations of the web server.

III. Solution

Apply a Patch

   Upgrade to PHP version 4.1.2, available from

 http://www.php.net/do_download.php?download_file=php-4.1.2.tar.gz

   If   upgrading   is  not  possible,  apply  patches  as  described  at
   http://www.php.net/downloads.php:
   * For PHP 4.10/4.11
 http://www.php.net/do_download.php?download_file=rfc1867.c.diff-4.1.x.gz
   * For PHP 4.06 
 http://www.php.net/do_download.php?download_file=rfc1867.c.diff-4.0.6.gz
   * For PHP 3.0 
 http://www.php.net/do_download.php?download_file=mime.c.diff-3.0.gz

   If  you  are  using  version  4.20-dev,  you  are not affected by this
   vulnerability. Quoting from
   http://security.e-matters.de/advisories/012002.htm:

 "[U]sers  running  PHP 4.2.0-dev from cvs are not vulnerable to any
 of  the  described  bugs  because the fileupload code was completly
 rewritten for the 4.2.0 branch."

Disable fileuploads

   If  upgrading  is  not  possible or a patch cannot be applied, you can
   avoid  these vulnerabilities by disabling fileupload support. Edit the
   PHP configuration file php.ini as follows:

 file_uploads = off

   Note  that  this  setting  only  applies  to  version 4.0.3 and above.
   However,  this  will prevent you from using fileuploads, which may not
   be acceptable in your environment.

Appendix A. - Vendor Information

   This  appendix  contains  information  provided  by  vendors  for this
   advisory.  When  vendors  report  new  information  to the CERT/CC, we
   update this section and note the changes in our revision history. If a
   particular  vendor  is  not  listed  below, we have not received their
   comments.

Apache Software Foundation

   Informationaboutthisvulnerabilityis   available   from
   http://www.php.net

FreeBSD

   FreeBSD  does not include any version of PHP by default, and so is not
   vulnerable.  However,  the  FreeBSD Ports Collection does contain both
   PHP3  and  PHP4  packages. Updates to the PHP packages are in progress
   and corrected packages will be available in the near future.

MandrakeSoft

   MandrakeSoft distributes PHP in all distributions and we are currently
   working  on  patching  our  versions of PHP for Linux-Mandrake 7.1 and
   7.2;  Mandrake  Linux  8.0, 8.0/ppc, 8.1, and 8.1/ia64; Single Network
   Firewall 7.2; Corporate Server 1.0.1.

   We anticipate having the updates out by the end of the week.

Microsoft

   We do not use PHP in any products.

NCSA

   NCSA  does  not  include  PHP as an add-in or bundled component in any
   products distributed.

Red Hat

   Red  Hat  was  notified  of  this  issue  on  27th  February 2002. All
   supported  versions  of  Red Hat Linux ship with PHP packages that are
   affected by these vulnerabilities. We will shortly be releasing errata
   packages  which  contain patched versions that are not vulnerable. The
   errata  packages and our advisory will be available on our web site at
   the  URL  below. At the same time users of the Red Hat Network will be
   able  to  update  their  systems to patched versions using the up2date
   tool.

  http://www.redhat.com/support/errata/RHSA-2002-035.html
 _

   The  CERT Coordination Center thanks Stefan Esser, upon whose advisory
   this document is largely based.
 _

   Author: Shawn V. Hernan
 _

Appendix B. - References

1. http:/

[PHP] PHP and passwords

2002-02-28 Thread webmaster

Is there a way to connect to your database using php without hard coding
a password into the php file?  We run PostgreSQL 7.1 on a Linux 7.2
server with the latest version of apache.  I don't want to change the
authentication within Postgres to not require a password.  But I also,
for security reasons, don't want to have passwords coded into the php
scripts for accessing the database.  I'm very new to php, but very
excited about what I've learned so far.  Any help would be appreciated.

thanks,

Elkan


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




  1   2   >