[PHP] benchmarking php scripts

2002-01-16 Thread Eugene Lee

Is there a way to benchmark a PHP script to see how intensive it is?
For example, execution time, CPU/RAM/disk usage, etc.  Thanks in advance.


-- 
Eugene Lee
[EMAIL PROTECTED]

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




[PHP] disable_functions... Was: about your mail on php list

2002-01-16 Thread Berthold

Hello,

disable_functions still works ONLY via setting in php.ini.
I think this is a bug.

ini_set(disable_functions, phpinfo);
has no effect,

php_value_admin disable_functions phpinfo
shows the correct output from phpinfo with one line for
disable_functions phpinfo...
At least this is a bug.

prune wrote:

 Hi,
 
 I'm having the same problem as you mentionned.
 I can't find any answer on the list archives...
 
 is the problem still happening with php 4.1 ?
 is this a bug, or a feature ?
 
 Thanks,
 Cheers,
 
 Prune
 
 
 --
 List: php-general
 Subject:  [PHP] Problem with disable_functions
 From: Berthold Tenhumberg [EMAIL PROTECTED]
 Date: 2001-09-20 9:29:53
 [Download message RAW]
 
 Hi all!
 
 Did I find a bug?
 
 Disabling the function 'system' per php.ini works well. OK.
 
 Disabling the same function per Apache-directive does not. Why?
 
 php_admin_value disable_functions system
 --=20
 =20
 (live long and prosper...)
 
 
 
 


-- 
Berthold


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




[PHP] HTTP AUTHENTICATION Solution

2002-01-16 Thread Bharath

Here is a solution I developed for the HTTP AUTHENTICATION on that buggy
Internet Explorer.
I want some feedbacks, improvements, Comments...


Bharath
(B. h.  Loh.)
bharath_b_lohray (at) yahoo.com



Please correspond via email for my convinience and
also on the News Group for the benifit of the Php Developers...


=== START OF SOURCE CODE [lohauthsol.php]===
?php
//Username and password verification function
//takes (username,password) returns TRUE/FALSE
function verify($un,$pw)
{
//Verify against a database etc
if
((($un==bharath)($pw==password1))||(($un==tom_dick_harrypotter)($p
w==password2)))
{
$ok=TRUE;
}
else
{
$ok=FALSE;
}
return $ok;
}

//Procedure to display a standard error if login
//fails
function er($err)
{
echo htmlheadtitle$err/title/headbody bgcolor=\#FF\
text=\#00\pfont face=\Courier New, Courier, Terminal\
size=\3\font size=\5\$err/fontbrbrCould not log you in. a
href=\lohauthsol.php\TRY AGAIN/a/font/p/body/html;
}

//Procedure to ask username and password by
//HTTP AUTHENTICATION
function ask()
{
header(WWW-Authenticate: Basic realm=\1024x1024.net
Administration\);
header(HTTP/1.0 401);
er(Unauthorized);
exit;
}

//BEGIN MAIN PROGRAMME
if ((!isset($PHP_AUTH_USER))||(!verify($PHP_AUTH_USER,$PHP_AUTH_PW)))
{
ask();
}
else
{
echo OK;
exit;
}
?
=== END OF SOURCE CODE ===



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




[PHP] Re: benchmarking php scripts

2002-01-16 Thread Yasuo Ohgaki

Eugene Lee wrote:
 Is there a way to benchmark a PHP script to see how intensive it is?
 For example, execution time, CPU/RAM/disk usage, etc.  Thanks in advance.
 


Try APD.

http://apd.communityconnect.com/

It's a degugger and profiler.
It does not show all of bench you want,
but it works well for profiling.

For CPU/RAM/DISK, you can take system bench
while you are accessing scripts.

-- 
Yasuo Ohgaki


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




[PHP] Beginner: Open URL

2002-01-16 Thread Tommi Trinkaus

Hi over there,

i'm just beginning with php and i wonder if it is possible to show another
url in the current window like the a Tag in HTML.
Thanks for any answer...

tommi



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




[PHP] StripSlashes() quotes in text boxes

2002-01-16 Thread Robert MacCombe

Hi,
I have had a few problems retrieving MySql entries that contain quote marks.
Slashes have been added before storing an item description such as:
17 SVGA Monitor.
They've been removed before display too - and the description appears
correctly on a page except when displaying in a text box (for an
administrator to edit the item description. When displayed in a text box the
description just shows 17. The only solution I can find is to swap the quote
marks for quot; when storing the item initially and when any update has
been submitted by the user.
Is this the best way, and are there any other characters waiting to cause
the same problem that I don't know about yet?
Thanks,
Robert MacCombe



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




[PHP] Lazy evaluation?

2002-01-16 Thread Alexander Deruwe

Hey all,

Does PHP support lazy evaluation? Meaning that if:

if (isset($HTTP_POST_VARS['submit']) 
 $HTTP_POST_VARS['submit'] == 'create')

does PHP stop evaluating after the first condition if $HTTP_POST_VARS is
not set?

(please CC me in replies)

Thanks in advance,

--
Alexander Deruwe ([EMAIL PROTECTED])
AQS-CarControl

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




Re: [PHP] Beginner: Open URL

2002-01-16 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 16-01-02 at 09:50 
* Tommi Trinkaus said

 Hi over there,
 
 i'm just beginning with php and i wonder if it is possible to show another
 url in the current window like the a Tag in HTML.
 Thanks for any answer...

I'm not sure what you mean can you be a little more detailed?
I can tell however that PHP is *not* a substitute for HTML. If you want
something like the a tag then *use* the a tag.

HTH
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8RUEkHpvrrTa6L5oRAhHHAJ49g3T89zgjW2wxypuqkt3Qwz5cqwCfd0sF
RpYr1yo504a7JW9VN+uAbXQ=
=at90
-END PGP SIGNATURE-

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




Re: [PHP] Lazy evaluation?

2002-01-16 Thread Jimmy

Hi Alexander,

 Does PHP support lazy evaluation? Meaning that if:

Yes, it does.

--
Jimmy

Got a dictionary?  I want to know the meaning of life.


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




[PHP] Re: Authentication Question

2002-01-16 Thread Bharath Bhushan Lohray

Create another table with info of accounts.

Auth_table
username(varchar)
password(varchar)
acno(int)

accounts_info_table
acno(int)
info1
info2()

Pass a query
==
select * from accounts_info_table where acno==$abc
==
here $abc is the info you extract from the fauth_table during the login
process.

Hope this is what you wanted to know
I am intrested in your problem.
Please correspond.

Bharath Bhushan Lohray

bharath_b_lohray (at) yahoo.com


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




[PHP] Re: Authentication Question

2002-01-16 Thread Bharath Bhushan Lohray

Create another table with info of accounts.

Auth_table
username(varchar)
password(varchar)
acno(int)

accounts_info_table
acno(int)
info1
info2()

Pass a query
==
select * from accounts_info_table where acno==$abc
==
here $abc is the info you extract from the fauth_table during the login
process.

Hope this is what you wanted to know
I am intrested in your problem.
Please correspond.

Bharath Bhushan Lohray

bharath_b_lohray (at) yahoo.com



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




Re: [PHP] Re: benchmarking php scripts

2002-01-16 Thread Eugene Lee

On Wed, Jan 16, 2002 at 05:41:34PM +0900, Yasuo Ohgaki wrote:
: 
: Eugene Lee wrote:
:  
:  Is there a way to benchmark a PHP script to see how intensive it is?
:  For example, execution time, CPU/RAM/disk usage, etc.  Thanks in advance.
: 
: Try APD.

Thanks.  It'll be a decent start.  Getting a few million hits per day is
really taking a toll on our server.


-- 
Eugene Lee
[EMAIL PROTECTED]

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




php-general Digest 16 Jan 2002 09:13:19 -0000 Issue 1114

2002-01-16 Thread php-general-digest-help


php-general Digest 16 Jan 2002 09:13:19 - Issue 1114

Topics (messages 80630 through 80671):

Re: Another question - not exactly what i was looking for
80630 by: mike cullerton
80631 by: R'twick Niceorgaw
80633 by: Christopher William Wesley

mysql_insert_id?
80632 by: Wee Chua
80639 by: DL Neil
80640 by: DL Neil

Re: sql question
80634 by: Janet Valade
80636 by: Darren Gamble

Re: splitting up an array into lines ...
80635 by: Martin Towell

PHP, LDAP and OS X
80637 by: Quinn Perkins

Re: 404 Redirection
80638 by: FiShcAkE

Re: Search Engine
80641 by: Greg Schnippel
80648 by: J Smith

compiling and *translating* template class
80642 by: Wolfram Kriesing

php modify my javascipt code before output
80643 by: Vincent Ma
80645 by: Bogdan Stancescu
80646 by: Tino Didriksen

session problems not finding my variables..
80644 by: Peter Lavender

base64_encode problem while using IMAP
80647 by: Kathy

Re: Extending PHP
80649 by: Yasuo Ohgaki
80652 by: Anas Mughal
80657 by: Yasuo Ohgaki

Re: NEWBIE IN DISTRESS:  Install Instructions are not work for PHP 4.1.1!!!
80650 by: Floyd Baker

Question about HTTP_ENV_VARS, PHP, and Apache
80651 by: Michael Sims
80653 by: Michael Sims
80659 by: Rasmus Lerdorf

KISGB Version 3.1 Released - PHP Guest Book
80654 by: Gaylen Fraley

php 4.1 and DOMXML question.
80655 by: Aaron
80656 by: Aaron

dynamic module or static?
80658 by: Cary Mathews

benchmarking php scripts
80660 by: Eugene Lee
80663 by: Yasuo Ohgaki
80671 by: Eugene Lee

disable_functions... Was: about your mail on php list
80661 by: Berthold

HTTP AUTHENTICATION Solution
80662 by: Bharath

Beginner: Open URL
80664 by: Tommi Trinkaus
80667 by: Nick Wilson

StripSlashes()  quotes in text boxes
80665 by: Robert MacCombe

Lazy evaluation?
80666 by: Alexander Deruwe
80668 by: Jimmy

Re: Authentication Question
80669 by: Bharath
80670 by: Bharath

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---

how 'bout something like

$query = 'select * from table_name where ';
$and = '';
if ($lastname != '') {
 $query .= lastname = $lastname;
 $and = ' and ';
}
if ($firstname != '') {
 $query .= $comma.firstname = $firstname;
 $and = ' and ';
}

and so on

on 1/15/02 1:53 PM, Phil Schwarzmann at [EMAIL PROTECTED] wrote:

 Yo, thanks for all your help.  But it isn't exactly what im looking for.
 
 Let's say you had a database with the following four columns...
 
 -LastName
 -FirstName
 -Age
 -Weight
 
 ...and you wanted a page that would allow a user to search for one or
 more of these fields within the database.
 
 It would be easy if the user could only pick just one of the fields.
 But let's say that want to search only lastname and firstname, or maybe
 all four, or maybe just one.  How could this be done?
 
 If I have code that looks like this...
 
 $query = select * from table where lastname='$lastname' and
 firstname='$firstname' and age='$age' and weight='$weight';
 
 $result  = mysql_query ($query);
 $num_results = mysql_num_rows($result);
 
 ...the $num_results is ALWAYS zero unless I typed in all four fields.
 
 Any help?
 
 Thanks!
 


 -- mike cullerton   michaelc at cullerton dot com



---End Message---
---BeginMessage---

construct your query like
$query = select * from table where ;
lastname='$lastname' and
 firstname='$firstname' and age='$age' and weight='$weight';

if (isset($lastname) and $lastname !=) then
$query.= lastname=$lastname ;
if (isset($firstname) and $firstname !=) then
$query.= and firstname=$firstname ;
and so on...

You may need to do some more checking like if there already been a field
selected earlier  if so then add AND  before the current field else don't
add the AND .
Hope that helps.

- Original Message -
From: Phil Schwarzmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, January 15, 2002 3:53 PM
Subject: [PHP] Another question - not exactly what i was looking for


 Yo, thanks for all your help.  But it isn't exactly what im looking for.

 Let's say you had a database with the following four columns...

 -LastName
 -FirstName
 -Age
 -Weight

 ...and you wanted a page that would allow a user to search for one or
 more of these fields within the database.

 It would be easy if the user could only pick just one of the fields.
 But let's say that want to search only lastname and firstname, or maybe
 all four, or maybe just one.  How could this be done?

 If I 

Re: [PHP] StripSlashes() quotes in text boxes

2002-01-16 Thread Jimmy

Hi Robert,

 administrator to edit the item description. When displayed in a text box the
 description just shows 17.
 The only solution I can find is to swap the quote marks for quot;
 when storing the item initially

you can use htmlspecialchars() function to convet all the html chars.
The issue is, when do you convert it, either when you want to display
them on browser, or when user INSERT/UPDATE.

I think it's better to convert it only when displaying to the browser.
so in the DB, the data is still stored as it is, because you might
want to display the data somewhere else other than browser, for
example email or printing.

--
Jimmy

All work and no pay makes a housewife.


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




[PHP] RE: Beginner: Open URL

2002-01-16 Thread Tim Ward

If you mean redirection, then try the header() function in the on-line
manual.

Tim
www.chessish.com http://www.chessish.com 

--
From:  Tommi Trinkaus [SMTP:[EMAIL PROTECTED]]
Sent:  16 January 2002 08:04
To:  [EMAIL PROTECTED]
Subject:  Beginner: Open URL

Hi over there,

i'm just beginning with php and i wonder if it is possible to show
another
url in the current window like the a Tag in HTML.
Thanks for any answer...

tommi



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




Re: [PHP] Beginner: Open URL

2002-01-16 Thread Tommi Trinkaus

Hi Nick

 I'm not sure what you mean can you be a little more detailed?
 I can tell however that PHP is *not* a substitute for HTML. If you want
 something like the a tag then *use* the a tag.

in fact i want something like the a tag, but the new url should be opened
within a php if-statement, not by user-clicking. Is that more detailed for
you?

thanks, tommi



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




[PHP] Is there Any way to call Non-Existent function in PHP

2002-01-16 Thread S. Murali Krishna

Hai ALL
Is there any way to capture function call in PHP 
and redirect to some other function if that function doesn't exists.

Perl programmers remind   AUTOLOAD method in a package.


S.Murali Krishna
[EMAIL PROTECTED]  
= 
We grow slow trying to be great

   - E. Stanley Jones
-


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




Re: [PHP] Is there Any way to call Non-Existent function in PHP

2002-01-16 Thread Neil Freeman

You can use function_exists() to check whether a function actually exists:

eg:
if (function_exists('imap_open')) {
echo IMAP functions are available.br\n;
} else {
echo IMAP functions are not available.br\n;
}

HTH

Neil

S. Murali Krishna wrote:

 Hai ALL
 Is there any way to capture function call in PHP
 and redirect to some other function if that function doesn't exists.

 Perl programmers remind   AUTOLOAD method in a package.

 S.Murali Krishna
 [EMAIL PROTECTED]
 =
 We grow slow trying to be great

- E. Stanley Jones
 -

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

 ***
  This message was virus checked with: SAVI 3.52
  last updated 8th January 2002
 ***

--

 Email:  [EMAIL PROTECTED]
 [EMAIL PROTECTED]





Re: [PHP] Beginner: Open URL

2002-01-16 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 16-01-02 at 10:47 
* Tommi Trinkaus said

 Hi Nick
 
  I'm not sure what you mean can you be a little more detailed?
  I can tell however that PHP is *not* a substitute for HTML. If you want
  something like the a tag then *use* the a tag.
 
 in fact i want something like the a tag, but the new url should be opened
 within a php if-statement, not by user-clicking. Is that more detailed for
 you?

?
if(this happens) {
print(a href=\somepage.php\Some page/a);
} else print (a href=\anotherpage.php\Another page/a);
?

Try that.
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8RVlEHpvrrTa6L5oRAtxcAKCFoKa/m9R+/QcueGWbMY+j3MqVvwCgtRIg
FXlIsiEa72gnAJ13cJg4tto=
=so9Q
-END PGP SIGNATURE-

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




Re: [PHP] Is there Any way to call Non-Existent function in PHP

2002-01-16 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 16-01-02 at 11:21 
* S. Murali Krishna said

 Hai ALL
   Is there any way to capture function call in PHP 
 and redirect to some other function if that function doesn't exists.
   
 Perl programmers remind   AUTOLOAD method in a package.
 

You'll have to check the manual but I'm pretty sure there's a
func_exist() function that should do the trick.

I checked the manual myself but they must have changed the way it works
as I couldn't find a damn thing!
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8RVqlHpvrrTa6L5oRAsGGAJ9Ksw7oUt1JNzAQpr5zFsJVcdfoCQCfWMsf
UaBUo13DzZ36/zSb1MzPSTQ=
=m5BB
-END PGP SIGNATURE-

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




RE: [PHP] php and sqlserver2000

2002-01-16 Thread Jon Haworth

 i have many problems with my web site.
 i have sql server 2000 and php4 but i not connect with my server and the
 result pages don't show.
 somebody  help me  :-(

I use PHP 4.1 and SQL Server 2000 together with no problems - please post
your code and explain exactly what you're trying to do.

Cheers
Jon

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




[PHP] ImagePSText antialiasing

2002-01-16 Thread Michal Kalanski

Hello,


I try to write text (barcode font) with function ImagePSText.
But I don't want antialiasing with barcodes.
How to do it ?

--
Thanks in advance!


Micha³ Kalañski
[EMAIL PROTECTED]




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




Re: [PHP] quit me off the php list

2002-01-16 Thread TD - Sales International Holland B.V.

On Tuesday 15 January 2002 19:40, Ben Turner stuffed this into my mailbox:

If you could just try and drag your lazy ass to the bottom of this lists 
email you'll find how to unsubscribe yourself without bugging us



 /Quit Thyago Consort

 :D

 Hey I tried!

 - Original Message -
 From: Thyago Consort [EMAIL PROTECTED]
 To: Adam Baratz [EMAIL PROTECTED]; PHP List
 [EMAIL PROTECTED]
 Sent: Tuesday, January 15, 2002 12:00 PM
 Subject: [PHP] quit me off the php list

  -Original Message-
  From: Adam Baratz [mailto:[EMAIL PROTECTED]]
  Sent: sexta-feira, 11 de janeiro de 2002 01:40
  To: PHP List
  Subject: Re: [PHP] PHP Parsing Database Text
 
   Is it possible to have PHP parse text queried from
   a database (security issues notwithstanding)?
   If so, how?
 
  Yes.  Pull out the text with your method of choice and then use the eval
  function passing it the string of text to parse as its only parameter.
 
  -Adam
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




[PHP] variable problem - help!

2002-01-16 Thread Dani

Hi!

I 'm trying not to hard code my php coding and I'm trying to pass a
variable name into the $row[coloumname_$variable];

I get an error message for this code.

I'm just wondering if I could do this trick using other ways of writing
it.

Thanks for reviewing!

regards,
Dani


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




Re: [PHP] variable problem - help!

2002-01-16 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 16-01-02 at 12:45 
* Dani said

 Hi!
 
 I 'm trying not to hard code my php coding and I'm trying to pass a
 variable name into the $row[coloumname_$variable];
 
 I get an error message for this code.
 
 I'm just wondering if I could do this trick using other ways of writing
 it.
 

I'm not sure of the syntax but you need to be looking ar variable
variables, there's a whole section on it in the manual.

HTH
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8RWi2HpvrrTa6L5oRAimZAJ4kWwE6Fz9VZgzFZv/1Xl9rfvBZVgCgss/C
veKKxbVcUnV493/ykZzoLXw=
=G3iP
-END PGP SIGNATURE-

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




Re: [PHP] variable problem - help!

2002-01-16 Thread Stefan Rusterholz

 Hi!

 I 'm trying not to hard code my php coding and I'm trying to pass a
 variable name into the $row[coloumname_$variable];
$row[columname_$variable] should do it.
$row[constant] is threaten as constant which is normally not the programmers
intention (set_error_reporting(0) and you'll see PHP's complaints about it)
so PHP converts it to $row['constant'].
You may now understand, that PHP translates your code to
$row['coloumname_$variable'] whre $variable is a string and not a variable.

I hope, I could express myself understandable :)
best regards
Stefan Rusterholz



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




[PHP] CONTINUE - variable problem - help!

2002-01-16 Thread Dani

hi again!

I tried it but it desn't give me any result back.
It dosn't print any error message but it desn't print my result either.

this is how I place the code:


echo ...some html code...;
$row[somename_$var];
echo ...the continuation of the html code;

thanks!

Stefan Rusterholz wrote:

  Hi!
 
  I 'm trying not to hard code my php coding and I'm trying to pass a
  variable name into the $row[coloumname_$variable];
 $row[columname_$variable] should do it.
 $row[constant] is threaten as constant which is normally not the programmers
 intention (set_error_reporting(0) and you'll see PHP's complaints about it)
 so PHP converts it to $row['constant'].
 You may now understand, that PHP translates your code to
 $row['coloumname_$variable'] whre $variable is a string and not a variable.

 I hope, I could express myself understandable :)
 best regards
 Stefan Rusterholz

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


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




Re: [PHP] CONTINUE - variable problem - help!

2002-01-16 Thread Stefan Rusterholz

 hi again!

 I tried it but it desn't give me any result back.
 It dosn't print any error message but it desn't print my result either.

 this is how I place the code:


 echo ...some html code...;
 $row[somename_$var];
 echo ...the continuation of the html code;

 thanks!

I think this indice in $row is empty then...
try
echo (isset($row[somename_$var]  $row[somename_$var] !== ) ?
$row[somename_$var] : Sorry, but \$row[\somename_$var\] is not set.);

I'll explain, what this code does:
it first checks isset($var) - if this variable (or in this case the indice
of the array) exists, this is true. so if $row[somename_$var] exists and
is not empty, it does 'echo' the stuff behind the ?, else it does 'echo' the
stuff behind the :

and please don't set your priority to important on the list - thank you.

best regars
Stefan Rusterholz


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




Re: [PHP] CONTINUE - variable problem - help!

2002-01-16 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 16-01-02 at 13:43 
* Dani said

 hi again!
 
 I tried it but it desn't give me any result back.
 It dosn't print any error message but it desn't print my result either.
 
 this is how I place the code:
 
 
 echo ...some html code...;
 $row[somename_$var];
 echo ...the continuation of the html code;
 

Shouldn't that be 
print($row[somename_$var]);


Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8RXiAHpvrrTa6L5oRAp6QAJoCidqiFfKxF+m6+XDB28TSW/huegCgrIK0
daDZlxoGSLLyJSivT4WNrWI=
=LQ2R
-END PGP SIGNATURE-

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




Re: [PHP] Lazy evaluation?

2002-01-16 Thread Miles Thompson


For or statements it does, but not  or xor. I don't know about you, but 
I wouldn't want lazy evaluation on a conditional statement involving and.

The manual ref is 
http://www.php.ca/manual/en/language.operators.logical.php and the 
following page on operator precedence.

Have a great one - Miles Thompson
http://www.cqagroup.ca

At 09:53 AM 1/16/2002 +0100, Alexander Deruwe wrote:
Hey all,

Does PHP support lazy evaluation? Meaning that if:

if (isset($HTTP_POST_VARS['submit'])
  $HTTP_POST_VARS['submit'] == 'create')

does PHP stop evaluating after the first condition if $HTTP_POST_VARS is
not set?

(please CC me in replies)

Thanks in advance,

--
Alexander Deruwe ([EMAIL PROTECTED])
AQS-CarControl

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


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




Re: [PHP] CONTINUE - variable problem - help!

2002-01-16 Thread Stefan Rusterholz

whoops, typo:
echo (isset($row[somename_$var])  $row[somename_$var] !== ) ?
$row[somename_$var] : Sorry, but \$row[\somename_$var\] is not set.;

above code should be correct :) (notice: it's only 1 line - email could
display it on multiple lines).

and here a smaller explanation of the ternary operator (?:):
echo (condition) ? condition is true : condition is false;
if conditions evaluates to true then PHP interprets it like
echo condition is true;
else
echo condition is false;

best regards
Stefan Rusterholz



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




[PHP] PHP as a cron job

2002-01-16 Thread Tiago Luchini

I have been trying to use some PHP scripts as a Linux cron job.

It tries to run but replies that:
Unable to open /home/admin/webmin-0.85/ in Unknown on line 0

I have no idea why PHP parser is making this confusion. 
Could anyone bring some light to this mistery please?

Atenciosamente,

Tiago Luchini
Diretor Técnico-Comercial
Galluch Soluções Internet
Tel.: 0xx11 6912-3255
Cel.: 0xx11 7839-7740



[PHP] PLEASE SIGN-ME OFF !

2002-01-16 Thread treiger

PLEASE SIGN-ME OFF !

I've sent already all emails requested to sign-me off this list, but I keep
receiving emails


Sergio Treiger

- Original Message -
From: Stefan Rusterholz [EMAIL PROTECTED]
To: Dani [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 11:09 AM
Subject: Re: [PHP] CONTINUE - variable problem - help!


 whoops, typo:
 echo (isset($row[somename_$var])  $row[somename_$var] !== ) ?
 $row[somename_$var] : Sorry, but \$row[\somename_$var\] is not set.;

 above code should be correct :) (notice: it's only 1 line - email could
 display it on multiple lines).

 and here a smaller explanation of the ternary operator (?:):
 echo (condition) ? condition is true : condition is false;
 if conditions evaluates to true then PHP interprets it like
 echo condition is true;
 else
 echo condition is false;

 best regards
 Stefan Rusterholz



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



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




[PHP] GetHostByName

2002-01-16 Thread Nicolas Costes

Hi all !!!

I've made a PHP script which takes IP's of my network (x.x.x.2 - x.x.x.254)
and then uses GetHostByName() to resolv names of the machines if they exist.
(This is in order to check for free IP's and redo my DHCP config)

But this only works for my own machine, because I filled my /etc/hosts with 
it's address and name... PHP (Or Linux) doesn't try to check outside 

What can i do ???
Do I have to lauch any kind of daemon to resolve names ???
Most of my machines are addressed by DHCP.

Note : Same kind of program written with C++ returns  Unknown Host

Thanx,
-- 
 ( ° Nicolas Costes
 //\\  IUT de La Roche / Yon
/ \/ ) [EMAIL PROTECTED]
'-  http://luxregina.free.fr

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




[PHP] PLEASE SIGN-ME OFF !

2002-01-16 Thread treiger

PLEASE SIGN-ME OFF !

I've sent already all emails requested to sign-me off this list, but I keep
receiving emails


- Original Message -
From: Nicolas Costes [EMAIL PROTECTED]
To: PHP ((E-mail)) [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 12:01 PM
Subject: [PHP] GetHostByName


 Hi all !!!

 I've made a PHP script which takes IP's of my network (x.x.x.2 -
x.x.x.254)
 and then uses GetHostByName() to resolv names of the machines if they
exist.
 (This is in order to check for free IP's and redo my DHCP config)

 But this only works for my own machine, because I filled my /etc/hosts
with
 it's address and name... PHP (Or Linux) doesn't try to check outside

 What can i do ???
 Do I have to lauch any kind of daemon to resolve names ???
 Most of my machines are addressed by DHCP.

 Note : Same kind of program written with C++ returns  Unknown Host

 Thanx,
 --
  ( ° Nicolas Costes
  //\\  IUT de La Roche / Yon
 / \/ ) [EMAIL PROTECTED]
 '-  http://luxregina.free.fr

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



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




[PHP] phpMyAdmin problem...

2002-01-16 Thread Philip Jeffs

Hi,

I've got a MySQL problem.

I'm running MySQL on my local machine and my web server (housed elsewhere).
I need to use phpMyAdmin to administer the databases on my local machine and my remote 
server.

I've set the config in phpMyAdmin to connect to both servers, but when i try to 
administer the remote server, i get an accessed denied message.

I've tried using my root username and password and i have also created a new user with 
full privileges. Neither of these user/pass combinations allows me to get in.

The remote machine is running 2000 server with IIS 5.
The local machine is windows 2000 with IIS 5.

Any help would be good.

Thanks,

Phil.


-

Philip Jeffs

The Tickle Group
The Gate House
Summerseat
Bury
Lancashire
BL9 5PE
United Kingdom
W: http://www.tickle.co.uk
T: 01706 823456
F: 01706 829500
E: [EMAIL PROTECTED] (daytime)
[EMAIL PROTECTED] (evening)

-

-

Philip Jeffs

The Tickle Group
The Gate House
Summerseat
Bury
Lancashire
BL9 5PE
United Kingdom
W: http://www.tickle.co.uk
T: 01706 823456
F: 01706 829500
E: [EMAIL PROTECTED] (daytime)
[EMAIL PROTECTED] (evening)

-




RE: [PHP] session problems not finding my variables..

2002-01-16 Thread Jaime Bozza

Peter,
   I had a similar problem, and I believe there's a bug report already
filed about it.  PHP doesn't seem to save session variables if you use
the Location: header.  What I do in my scripts when I need to set a
location redirect is run 'session_write_close()' before I use the header
function.  This assures me that the data is written.

Jaime Bozza


-Original Message-
From: Peter Lavender [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 15, 2002 7:35 PM
To: php-general
Subject: [PHP] session problems not finding my variables..


Hi everyone,

I'm not sure what I have done wrong here.  I haven't been sucessful in
finding anything that points to what the cuase could be.

What I find interesting is that I have used session in another area of
the web site with out problems.  The only difference between it and the
way I have done it here is that I'm using the header function in this
bit of code, where as the session is started and variables registered
and the processing is done on another page.

Anyway here is the code for the log in page:

?php
session_start();
file://session_unset();

include('./connectDB.php');
include('./commonfunctions.php');
?

function checkdetails($db, $HTTPVARS) {
//check if allowed access
$user = $HTTPVARS['uid'];
$passwd = $HTTPVARS['passwd'];

$sql = select * from tbl_maxware where loginID = '$user' and
password = '$passwd';;
$result = $db-query($sql);
checkError($result, $db, Error in checkDetails);

if ($result-numrows() == 0) {
echo htmlbody;
echo h2Error Loging In/h2;
echo brNot a valid login try again or contact the adminbr;
echo a href=\./login.php\Try Again/a;
echo /body/html;
exit();
} else {
// matched in the maxware table
$result-fetchinto($success);
$UID = $success[0];
$logUID = $success[1];
$logName = $success[2];
//echo session_save_path();
session_register(UID, logUID, logName);
// send them to the main page
header(Location: ./supportau.php);
}

} // end checkdetails

if (array_key_exists( uid, $HTTP_POST_VARS ) ) {
checkdetails($db, $HTTP_POST_VARS);
} else {
login();
}
?



Code for the following main page

?php
session_start();
include( './connectDB.php' );
include('./commonFunctions.php');
?
html
head
title/title
DEFANGED_style
!--
@import url(./max.css);
@import url(./supportAU.css);
@import url(./link.css);
--
/DEFANGED_style
/head
body
h2Support Database/h2
center
table width=90% border=1
trtd rowspan=2 width=30%
!--table width=100% border=1 bgcolor=#887766
trtd --
?php
echo Name= $logName;



DEFANGED_snip

This returns an error:

 PHP Warning: Undefined variable: logName in
c:\inetpub\wwwroot\supportau\supportau.php on line 25

Thanks,

Pete




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




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




RE: [PHP] phpMyAdmin problem...

2002-01-16 Thread Kees Hoekzema

A couple of things:
does mysql accept remote locations?
iow, is your host set?

further: always flush privileges :)

But first, add a user, host: webserver, user foo, pass bar (whatever ;))
flush it and try again.

- Kees

 -Original Message-
 From: Philip Jeffs [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 16, 2002 2:43 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] phpMyAdmin problem...
 
 
 Hi,
 
 I've got a MySQL problem.
 
 I'm running MySQL on my local machine and my web server (housed 
 elsewhere).
 I need to use phpMyAdmin to administer the databases on my local 
 machine and my remote server.
 
 I've set the config in phpMyAdmin to connect to both servers, but 
 when i try to administer the remote server, i get an accessed 
 denied message.
 
 I've tried using my root username and password and i have also 
 created a new user with full privileges. Neither of these 
 user/pass combinations allows me to get in.
 
 The remote machine is running 2000 server with IIS 5.
 The local machine is windows 2000 with IIS 5.
 
 Any help would be good.
 
 Thanks,
 
 Phil.
 
 
 -
 
 Philip Jeffs
 
 The Tickle Group
 The Gate House
 Summerseat
 Bury
 Lancashire
 BL9 5PE
 United Kingdom
 W: http://www.tickle.co.uk
 T: 01706 823456
 F: 01706 829500
 E: [EMAIL PROTECTED] (daytime)
 [EMAIL PROTECTED] (evening)
 
 -
 
 -
 
 Philip Jeffs
 
 The Tickle Group
 The Gate House
 Summerseat
 Bury
 Lancashire
 BL9 5PE
 United Kingdom
 W: http://www.tickle.co.uk
 T: 01706 823456
 F: 01706 829500
 E: [EMAIL PROTECTED] (daytime)
 [EMAIL PROTECTED] (evening)
 
 -
 
 

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




Re: [PHP] security benefits of predefined variables

2002-01-16 Thread Erik Price

Kirk,

That was enlightening, thank you.  I think that I had better set 
register_globals OFF !  However there is still one last nagging question 
in my mind:  What is the purpose of the $_GET (or $HTTP_GET_VARS) 
predefined variable?  It seems that in the case of get variables, 
malicious variables could still be set in the querystring and even using 
$_GET['variablename'] wouldn't be able to stop this from happening.  
That is, from what I understand, the advantage of using get variables 
in the first place.

So does using $_GET actually confer any additional security?  If so, how?

Thank you all,


Erik


On Tuesday, January 15, 2002, at 03:55  PM, Johnson, Kirk wrote:

 Give this a read first, then come back if you still have questions ;)

 http://www.securereality.com.au/studyinscarlet.txt

 Kirk

 -Original Message-
 From: Erik Price [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 15, 2002 1:50 PM
 To: PHP
 Subject: [PHP] security benefits of predefined variables


 Hi,

 I was hoping that someone could point me to a page or
 resource where I
 can find more information about using the predefined variables
 introduced in PHP 4.1.0.


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




Re: [PHP] PHP as a cron job

2002-01-16 Thread Dennis Moore

Please provide more information on how you have set up PHP to run your cron
jobs.  Are you trying to execute via LYNX or directly via a PHP script?

/dkm


- Original Message -
From: Tiago Luchini [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 8:20 AM
Subject: [PHP] PHP as a cron job


I have been trying to use some PHP scripts as a Linux cron job.

It tries to run but replies that:
Unable to open /home/admin/webmin-0.85/ in Unknown on line 0

I have no idea why PHP parser is making this confusion.
Could anyone bring some light to this mistery please?

Atenciosamente,

Tiago Luchini
Diretor Técnico-Comercial
Galluch Soluções Internet
Tel.: 0xx11 6912-3255
Cel.: 0xx11 7839-7740



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




[PHP] Time calculation after UNIX

2002-01-16 Thread Olav Drageset

Hi

I have a database that is supposed to last more than 30 years

Could someone advice me how to calculate (add and subtract) time in a maner that willl 
be correct 
after 2030 when Unix Time stop working?

ragards

[EMAIL PROTECTED]






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




Re: [PHP] phpMyAdmin problem...

2002-01-16 Thread Philip Jeffs

I flushed the privileges and its worked! 

Thanks,

Phil


- Original Message - 
From: Kees Hoekzema [EMAIL PROTECTED]
To: Philip Jeffs [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 2:04 PM
Subject: RE: [PHP] phpMyAdmin problem...


 A couple of things:
 does mysql accept remote locations?
 iow, is your host set?
 
 further: always flush privileges :)
 
 But first, add a user, host: webserver, user foo, pass bar (whatever ;))
 flush it and try again.
 
 - Kees
 
  -Original Message-
  From: Philip Jeffs [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 16, 2002 2:43 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] phpMyAdmin problem...
  
  
  Hi,
  
  I've got a MySQL problem.
  
  I'm running MySQL on my local machine and my web server (housed 
  elsewhere).
  I need to use phpMyAdmin to administer the databases on my local 
  machine and my remote server.
  
  I've set the config in phpMyAdmin to connect to both servers, but 
  when i try to administer the remote server, i get an accessed 
  denied message.
  
  I've tried using my root username and password and i have also 
  created a new user with full privileges. Neither of these 
  user/pass combinations allows me to get in.
  
  The remote machine is running 2000 server with IIS 5.
  The local machine is windows 2000 with IIS 5.
  
  Any help would be good.
  
  Thanks,
  
  Phil.
  
  
  -
  
  Philip Jeffs
  
  The Tickle Group
  The Gate House
  Summerseat
  Bury
  Lancashire
  BL9 5PE
  United Kingdom
  W: http://www.tickle.co.uk
  T: 01706 823456
  F: 01706 829500
  E: [EMAIL PROTECTED] (daytime)
  [EMAIL PROTECTED] (evening)
  
  -
  
  -
  
  Philip Jeffs
  
  The Tickle Group
  The Gate House
  Summerseat
  Bury
  Lancashire
  BL9 5PE
  United Kingdom
  W: http://www.tickle.co.uk
  T: 01706 823456
  F: 01706 829500
  E: [EMAIL PROTECTED] (daytime)
  [EMAIL PROTECTED] (evening)
  
  -
  
  
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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




Re: [PHP] PLEASE SIGN-ME OFF !

2002-01-16 Thread Kurth Bemis

At 08:17 AM 1/16/2002, treiger wrote:

maybe if you wern't totally retarded you read the footer of this email and 
EVERY other email that passed through this list.

~kurth

PLEASE SIGN-ME OFF !

I've sent already all emails requested to sign-me off this list, but I keep
receiving emails


Sergio Treiger

- Original Message -
From: Stefan Rusterholz [EMAIL PROTECTED]
To: Dani [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 11:09 AM
Subject: Re: [PHP] CONTINUE - variable problem - help!


  whoops, typo:
  echo (isset($row[somename_$var])  $row[somename_$var] !== ) ?
  $row[somename_$var] : Sorry, but \$row[\somename_$var\] is not set.;
 
  above code should be correct :) (notice: it's only 1 line - email could
  display it on multiple lines).
 
  and here a smaller explanation of the ternary operator (?:):
  echo (condition) ? condition is true : condition is false;
  if conditions evaluates to true then PHP interprets it like
  echo condition is true;
  else
  echo condition is false;
 
  best regards
  Stefan Rusterholz
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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


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




Re: [PHP] dynamic module or static?

2002-01-16 Thread Cary Mathews

If I put the AddModule line before the LoadModule line, I get the
following error from apachectl configtest:
Cannot add module via name 'mod_php4.c': not in list of loaded modules

If I put the AddModule line after the LoadModule line, I get the original
error.  Seems like a Catch-22 if you ask me!

Cary


On Wed, 16 Jan 2002, Bhavin Modi wrote:

 Date: Wed, 16 Jan 2002 15:52:52 +0530
 From: Bhavin Modi [EMAIL PROTECTED]
 To: Cary Mathews [EMAIL PROTECTED]
 Subject: Re: [PHP] dynamic module or static?

 Have you done the following in your httpd.conf ?

 AddModulemod_php4.c

 I had a similar error with Apache-PHP4 on Win2K.
 After checking the logs I came to know that I have not added the addmodule
 directive in httpd.conf.
 As far as I know on linux the make install command adds AddModule
 directive in httpd.conf.

 Regards,
 Bhavin Modi.


 - Original Message -
 From: Cary Mathews [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 16, 2002 11:11 AM
 Subject: [PHP] dynamic module or static?


  I am attempting to build a dynaminc module loadable by apache 1.3.x. But
  once the (./configure, make, make install, cp php.ini-dist, configure
  httpd.conf) process is complete, I restart apache, and try to access a php
  page (? phpinfo() ?) and I am asked if I would like to download the
  page, which is not the expected or desired behavior. :/
 
  Reading through the INSTALL file and the php.net FAQs, I did notice that
  there was a mention of copying the compiled httpd directly over the
  existing one. Would that not indicate a static module had been compiled?
  Else where it appears a libphp4.so is created and placed in the modules/
  directory. When I attempt to put a LoadModule directive in my httpd.conf
  file to tell apache about the module, I get the following error from
  apachectl configtest:
   Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
   API module structure `php4_module' in file
   /usr/local/apache/modules/libphp4.so
   is garbled - perhaps this is not an Apache module DSO?
  I read this one of two ways, a) 'php4_module' is not the correct way to
  refrence this module, or b) the libphp4.so module is corrupted, somehow.
  Is either one of these right?
 
  I've recompiled twice now, and still no luck.  If I comment out the
  LoadModule directive, it starts, but my browser asks if I want to download
  the php page instead of displaying it.
 
  Has anyone encountered this before?
 
  Cary Mathews
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]




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




Re: [PHP] Time calculation after UNIX

2002-01-16 Thread Shane Wright


Use 64bit integers!  They'll count up to a much higher number and will last 
way beyond 2038.

In the database, set the correct type (INT8 in PostgreSQL, dont know about 
the others).  Dont worry about PHP as I'm sure there'll be a few newer 
versions supporting wider int formats before then (if it doesn't already??)

--
Shane

On Wednesday 16 Jan 2002 9:33 am, Olav Drageset wrote:
 Hi

 I have a database that is supposed to last more than 30 years

 Could someone advice me how to calculate (add and subtract) time in a maner
 that willl be correct after 2030 when Unix Time stop working?

 ragards

 [EMAIL PROTECTED]

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




Re: [PHP] NEWBIE IN DISTRESS: Install Instructions are not work for PHP 4.1.1!!!

2002-01-16 Thread Erik Price

Take notes.



On Tuesday, January 15, 2002, at 10:22  PM, Floyd Baker wrote:




 I'm stuck here too.  Don't know that much in the first place except
 that I did get it together once.  Apache/php4/mysql on win32...  Now
 to upgrade it's all new again.

 I'm sure php config files are ok to the point where apache picks it
 up.  There is no 4.1.1 file as called for in the apache loadmodule
 line.  Instead of /sapi/php4dll, the closest I find is
 /sapi/apache/php4dsp.  I can also remember some file extensions being
 renamed but can't find anything on that now..  Any clue where I'm
 losing it will be very helpful I'm sure.

 Thanks.

 Floyd








 On Sun, 6 Jan 2002 00:35:39 -0600, you wrote:

 Nothing noted in the error log.  The lines I have tried using are the 
 EXACT
 ones stated in the install.txt file.  I basically copied them from the
 install doc and pasted it into the httpd.conf file.

 Mark

 Brian Clark [EMAIL PROTECTED] wrote in message
 20020105034518.GH17616@ganymede">news:20020105034518.GH17616@ganymede...
 * Mark ([EMAIL PROTECTED]) [Jan 04. 2002 12:14]:

 [...]

 the Module version (Get a Requested Operation Failed message).  can
 someone please help?  My system is as follows:

 Windows 2000 SP2
 Apache 2.0.28 (I have also tried version 1.3.22 with same results as

 People had problems in that past with 2.x; I don't know if the 
 php-dev's
 have worked that out yet.

 mentioned above)
 PHP 4.1.1
 MDAC 2.7
 MySQL 3.23.46a

 Are there any hints in Apache's error_log? What is your exact 
 LoadModule
 line you're using in httpd.conf?

 --
 Brian Clark | Avoiding the general public since 1805!
 Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
 In politics, stupidity is not a handicap.


 --


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



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




[PHP] How to protect JavaScript?

2002-01-16 Thread Martin Thoma

Hello! I want to protect a JavaScript: It should only be readable out of
the document, where it is included (with script language=javascript
src=/myjs.js). But it should not be possible to read it directly with
www.myserver.de/myjs.js.

I thought I could do this with PHP (f.e. check the HTTP_REFERER, but
this only works with IE, because NS doesnÄt set the referer for the
script-tag).

Any good ideas?

Martin



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




Re: [PHP] dynamic module or static?

2002-01-16 Thread Erik Price

I'm no guru on the topic, but I found that when configuring the DSO with 
MySQL (--with-mysql=/usr/local/mysql), it would always garble the PHP 
module.  Eventually I got it all set up by not specifying a directory 
(in other words, just using --with-mysql) in that configure argument.  
But this meant using PHP's internal MySQL abilities, which work fine but 
apparently aren't compatible with mod_perl.  So I re-did everything, and 
it seems that the smoothest way to do it is to install PHP as a static 
module and use the original --with-mysql=/path/to/mysql (YMMV), but when 
compiling Apache be sure to --enable-so so that you still can load DSOs 
if you want.

Note, though, that I haven't tested or even installed mod_perl yet, so I 
can't verify the long-term success of this experiment.  But PHP has been 
working fine with MySQL and Apache since then.

Also make sure that you didn't just cp php.ini-dist /usr/local/lib, 
you also have to rename it php.ini (but I'm sure you did that).


Erik

On Wednesday, January 16, 2002, at 12:41  AM, Cary Mathews wrote:

 I am attempting to build a dynaminc module loadable by apache 1.3.x. But
 once the (./configure, make, make install, cp php.ini-dist, configure
 httpd.conf) process is complete, I restart apache, and try to access a 
 php
 page (? phpinfo() ?) and I am asked if I would like to download the
 page, which is not the expected or desired behavior. :/

 Reading through the INSTALL file and the php.net FAQs, I did notice that
 there was a mention of copying the compiled httpd directly over the
 existing one. Would that not indicate a static module had been compiled?
 Else where it appears a libphp4.so is created and placed in the modules/
 directory. When I attempt to put a LoadModule directive in my httpd.conf
 file to tell apache about the module, I get the following error from
 apachectl configtest:
  Syntax error on line 205 of /usr/local/apache/conf/httpd.conf:
  API module structure `php4_module' in file
  /usr/local/apache/modules/libphp4.so
  is garbled - perhaps this is not an Apache module DSO?
 I read this one of two ways, a) 'php4_module' is not the correct way to
 refrence this module, or b) the libphp4.so module is corrupted, somehow.
 Is either one of these right?

 I've recompiled twice now, and still no luck.  If I comment out the
 LoadModule directive, it starts, but my browser asks if I want to 
 download
 the php page instead of displaying it.

 Has anyone encountered this before?

 Cary Mathews





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



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




[PHP] Parsing?

2002-01-16 Thread Tony Arnold

I'm wondering if it's possible to parse a .php-file so i looks exactly as if
I just were looking at the source trough a browser with all the
environment-variables intact and so on?

/ Tony...



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




RE: [PHP] How to protect JavaScript?

2002-01-16 Thread Bart Brinkmann

This would only be true if your javascript files were parsed with php. If
not, then php can't do anything about it of course. Look into mod_rewrite. I
haven't used it in the sense that you're looking for, but I don't see why
you couldn't.

http://httpd.apache.org/docs-2.0/misc/rewriteguide.html


/bart

-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 9:29 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How to protect JavaScript?


Hello! I want to protect a JavaScript: It should only be readable out of
the document, where it is included (with script language=javascript
src=/myjs.js). But it should not be possible to read it directly with
www.myserver.de/myjs.js.

I thought I could do this with PHP (f.e. check the HTTP_REFERER, but
this only works with IE, because NS doesnÄt set the referer for the
script-tag).

Any good ideas?

Martin



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



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




[PHP] Re: User authentacation

2002-01-16 Thread Martin Wickman

[EMAIL PROTECTED] wrote:

 Hello,
 
 I need to allow a client, named: A, to give their clients access to a remote page 
on A's server.  This is the problem: 
 1. I need to record who has accessed this page on A's server


grep stuff /var/log/httpd/access.log

 2. password protect this page


Create suitable .htaccess file if you are using apache.


 3. and copy the pages contents to A's clients server.

cron + shell script (using ftp client)


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




[PHP] Re: Parsing?

2002-01-16 Thread Martin Thoma

Hi Tony,

you could do this by getting the file through http, which means not open it with
fopen(filename.php4, r) but with fopen(http://servername/filename.php4;,
r). Then you get exactly the way to browser sees it. But this is very slow if
you fetch a lot of files.

Martin



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




[PHP] Dynamic map tutorial wanted

2002-01-16 Thread JawjB


I am looking for a guide or tutorial (preferably not OO) to help me do the 
following.

A client views a map of a country and clicks on his location.
Location stored on database.

A visitor enters makes a selection (e.g. Hotels) then views a map of the 
country 
modified to reflect those locations (clickable hot spots with mouse over 
information highlighted)  that meet his needs.

This would mean either generating a map for every request or somehow 
overlaying the  country image.

There would appear to be many tutorials but I would appreciate a pointer to 
one which would be applicable to my needs.

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




Re: [PHP] How to protect JavaScript?

2002-01-16 Thread Martin Thoma

Hi Bart,

I think it's the same problem as with php: You could only protect it, when a
HTTP_REFERRER is send (which Netscape does not do):

Description:
  Assume we have under http://www.quux-corp.de/~quux/ some pages with
inlined GIF graphics. These graphics are nice, so others directly
  incorporate them via hyperlinks to their pages. We don't like this
practice because it adds useless traffic to our server.

 Solution:
  While we cannot 100% protect the images from inclusion, we can at
least restrict the cases where the browser sends a HTTP Referer header.



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




RE: [PHP] How to protect JavaScript?

2002-01-16 Thread Bart Brinkmann

Here's a good primer on mod_rewrite:

http://www.freebsddiary.org/rewrite.php

I used it to accomplish the following...
A user hits a url of say: http://foo.com/84838

I then want to return an object out of our database who's id is 84838. A 404
handler will not help in this case. So, I chose to use mod_rewrite. Anytime
/\d+$ is requested, I use mod rewrite to redirect to a php page that fetches
the object.

Thus a request for:
http://foo.com/84838   redirects to:
http://foo.com/object?id=84838

The user does not see the redirect, their url will remain
http://foo.com/84838;.

Check out the primer above, it's pretty straght-forward.

/bart

-Original Message-
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 16, 2002 9:47 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] How to protect JavaScript?


Hi Bart,

thanx for your answer.

 This would only be true if your javascript files were parsed with php.If
 not, then php can't do anything about it of course.

This is possible, I tried it out.

 Look into mod_rewrite. I
 haven't used it in the sense that you're looking for, but I don't see why
 you couldn't.

 http://httpd.apache.org/docs-2.0/misc/rewriteguide.html

This is a lot of stuff... Could you give me a hint where the way leads to?

Martin



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



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




Re: [PHP] Time calculation after UNIX

2002-01-16 Thread Jimmy

Hi Olav,

 I have a database that is supposed to last more than 30 years
 Could someone advice me how to calculate (add and subtract) time in a maner
 that willl be correct after 2030 when Unix Time stop working?

if you are using MySQL, then use datetime or date column type.
they can support date range from '1000-01-01' to '-12-31'.

and for calculation, you can use MySQL function:
ADDDATE() or SUBDATE()

--
Jimmy

Bigamy is having one spouse too many.  Monogamy is the same.



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




Re: [PHP] How to protect JavaScript?

2002-01-16 Thread Martin Thoma

Hi Bart,

thanx for your answer.

 This would only be true if your javascript files were parsed with php.If
 not, then php can't do anything about it of course.

This is possible, I tried it out.

 Look into mod_rewrite. I
 haven't used it in the sense that you're looking for, but I don't see why
 you couldn't.

 http://httpd.apache.org/docs-2.0/misc/rewriteguide.html

This is a lot of stuff... Could you give me a hint where the way leads to?

Martin



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




Re: [PHP] Parsing?

2002-01-16 Thread Miles Thompson

Doing this:

cp  file_i_want_to_look_at.php   file_i_want_to_look_at.phps
http://www.domain.name/file_i_want_to_look_at.phps

will display coloured source listing in the browser. Is that what you want?

This is referenced somewhere in the docs, and even if you only rename a 
file to phps it is sometimes useful for tracking down a peculiar bug.

HTH - Miles

At 03:40 PM 1/16/2002 +0100, Tony Arnold wrote:
I'm wondering if it's possible to parse a .php-file so i looks exactly as if
I just were looking at the source trough a browser with all the
environment-variables intact and so on?

/ Tony...



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


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




Re: [PHP] Lazy evaluation?

2002-01-16 Thread mike cullerton

on 1/16/02 5:57 AM, Miles Thompson at [EMAIL PROTECTED] wrote:

 For or statements it does, but not  or xor. I don't know about you, but
 I wouldn't want lazy evaluation on a conditional statement involving and.

i'm new to all this stuff, so i'll bite. hopefully someone can explain what
i'm missing.

if i have a statement like

 if (($a == 'a')  ($b == 'b')) blahblahblah();

and, $a != 'a'. 

why should php even look at the value for $b while evaluating this line?
shouldn't the if fail after evaluating $a?

thanks,
mike

 -- mike cullerton   michaelc at cullerton dot com



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




Re: [PHP] Time calculation after UNIX

2002-01-16 Thread Bogdan Stancescu

An excerpt from the mysql manual:
---
1.7 Year 2000 Compliance
MySQL itself has no problems with Year 2000 (Y2K) compliance:

MySQL uses Unix time functions and has no problems with dates until 2069
---

However, it seems to me that this is the way to go indeed, because you can always
upgrade MySQL in on December 31st, 2068 (if you're 30 now, you'll be 96 then, so
no problems - just leave some installation instructions your will). :-)

Bogdan

Jimmy wrote:

 Hi Olav,

  I have a database that is supposed to last more than 30 years
  Could someone advice me how to calculate (add and subtract) time in a maner
  that willl be correct after 2030 when Unix Time stop working?

 if you are using MySQL, then use datetime or date column type.
 they can support date range from '1000-01-01' to '-12-31'.

 and for calculation, you can use MySQL function:
 ADDDATE() or SUBDATE()

 --
 Jimmy
 
 Bigamy is having one spouse too many.  Monogamy is the same.

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



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




Re: [PHP] mysql_insert_id?

2002-01-16 Thread mike cullerton

on 1/16/02 7:42 AM, Martin Wickman at [EMAIL PROTECTED] wrote:

 Dl Neil wrote:
 
 2 because the (function argument) controlling feature is the connection, it
 is not possible for another
 concurrent user to 'steal' your ID or influence the ID returned to you - it's
 all yours!
 
 Ok, assume you are correct, but what if you are using persistent
 connections (ie pconnet)?
 

it's still 'your' persistent connection that's being queried though. from
the manual on mysql_pconnect

 Returns a positive MySQL persistent link identifier on success

this is why you use the link identifier in things like mysql_query, and lets
mysql 'know' what 'your' last insert was.

hope this helps,
mike

 -- mike cullerton   michaelc at cullerton dot com



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




[PHP] header(Location: question

2002-01-16 Thread Simos Varelakis

Hello everybody 

This works

header(Location: http://www.foo.com/data/register.php?exist=1;);

How can I  pass exist value as parameter ??? 

Tia 

SImos




[PHP] WDDX...

2002-01-16 Thread Tony Arnold

I'm doing a website which I want to be easily updated so I made it using
wddx, now I wonder how fast or slow it is? How many people can connect to my
website without seeing any slowdowns? Anyone knows?

/ Tony...



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




Re: [PHP] Lazy evaluation?

2002-01-16 Thread Miles Thompson

SHWLHAP! (Sound of dead fish hitting me in the side of the head.)

Of course - if the first condition is false, PHP doesn't bother to evaluate 
the second argument.
I was thinking that if the first condition is true I don't want evaluation 
to stop there.

Miles

At 08:18 AM 1/16/2002 -0700, mike cullerton wrote:
on 1/16/02 5:57 AM, Miles Thompson at [EMAIL PROTECTED] wrote:

  For or statements it does, but not  or xor. I don't know about you, but
  I wouldn't want lazy evaluation on a conditional statement involving and.

i'm new to all this stuff, so i'll bite. hopefully someone can explain what
i'm missing.

if i have a statement like

  if (($a == 'a')  ($b == 'b')) blahblahblah();

and, $a != 'a'.

why should php even look at the value for $b while evaluating this line?
shouldn't the if fail after evaluating $a?

thanks,
mike

  -- mike cullerton   michaelc at cullerton dot com



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


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




Re: [PHP] Lazy evaluation?

2002-01-16 Thread Jimmy

 For or statements it does, but not  or xor.

Are you sure only or which do lazy evaluation?
as far as i remember, the last time I use  operator it do
lazy evaluation.
And if you look at the online manual, some users also confirmed
that PHP implement lazy evaluation for logical operator.
http://www.php.net/manual/en/language.operators.logical.php

 I don't know about you, but I wouldn't want lazy evaluation on
 a conditional statement involving and.

Would you share the reason with us why you dont want lazy
evaluation in AND?

 if i have a statement like
  if (($a == 'a')  ($b == 'b')) blahblahblah();
 and, $a != 'a'.
 why should php even look at the value for $b while evaluating this line?

i believe PHP implement lazy evaluation, so it won't evaluate $b=='b'

--
Jimmy

Success only comes before work in the dictionary.



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




[PHP] HTTP_IL_PAD global variable?

2002-01-16 Thread bill

What does this global variable stand for?

HTTP_IL_PAD


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




Re: [PHP] Lazy evaluation?

2002-01-16 Thread Bogdan Stancescu

LOL! He asked if PHP supports lazy evaluation, not buggy evaluation!

Bogdan

Miles Thompson wrote:

 SHWLHAP! (Sound of dead fish hitting me in the side of the head.)

 Of course - if the first condition is false, PHP doesn't bother to evaluate
 the second argument.
 I was thinking that if the first condition is true I don't want evaluation
 to stop there.

 Miles



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




Re: [PHP] mysql_insert_id?

2002-01-16 Thread Jimmy

Hi Martin,

 2 because the (function argument) controlling feature is the
 connection, it is not possible for another concurrent user to
 'steal' your ID or influence the ID returned to you - it's all

 Ok, assume you are correct, but what if you are using persistent 
 connections (ie pconnet)?

don't worry, persistent connection is per-child-process basis,
so concurrent users will use different connection to DB.

the only problem i can think of might occur with pconnect is,
last_insert_id() will return you the last inserted ID from
previous 'session', not current 'session'.
to prevent this, you should call last_insert_id() only when
your INSERT query executed succesfully.


--
Jimmy

Right thinking leads to right living



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




[PHP] fixing mail for broken Outlook

2002-01-16 Thread Hank Marquardt

I've got an app that sends emails, not complicated emails, their just
text, the mail text is stored in text files on the server so they can be
edited independant of the code, I've then got a function that reads the
file (using file()) ... iterates the array, chop(), append \r\n and
builds a message.

This text gets sent using mail() -- works great for everything but
Outlook which seems to lose all the line breaks and generally mungs the
formatting to heck.  I've tried sending a Content-type: text/plain;
header ... doesn't help.

The only thing that keeps me from losing my mind is that I accidently
had the wrong header Content-type: text/text; at first and while it
created an attachment in Outlook, the attachemnt was properly formatted.

Anyone else have this problem and solved it?
-- 
Hank Marquardt [EMAIL PROTECTED]
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C

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




Re: [PHP] Parsing?

2002-01-16 Thread TD - Sales International Holland B.V.

On Wednesday 16 January 2002 16:14, you wrote:

You will need to appropiate lines in your apache config for that to work tho'

AddType application/x-httpd-php-source .phps

if I'm not mistaken, as long as your PHP is running, you already have the 
other necessary lines in there

regards

 Doing this:

 cp  file_i_want_to_look_at.php   file_i_want_to_look_at.phps
 http://www.domain.name/file_i_want_to_look_at.phps

 will display coloured source listing in the browser. Is that what you want?

 This is referenced somewhere in the docs, and even if you only rename a
 file to phps it is sometimes useful for tracking down a peculiar bug.

 HTH - Miles

 At 03:40 PM 1/16/2002 +0100, Tony Arnold wrote:
 I'm wondering if it's possible to parse a .php-file so i looks exactly as
  if I just were looking at the source trough a browser with all the
 environment-variables intact and so on?
 
 / Tony...
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

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




Re: [PHP] Redirect?

2002-01-16 Thread Ben Sinclair

header(Location: http://www.blah.com;);

Just be sure that output hasn't already started before you send the header.

--
Ben Sinclair
[EMAIL PROTECTED]


- Original Message - 
From: Henrik Johansson [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 10:01 AM
Subject: [PHP] Redirect?


 Hi!
 How do I do a redirect to a different location in PHP?
 
 Regards
 Henrik Johansson
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] Mulitple Attachments using php

2002-01-16 Thread Sam

Hi all,

I know I hear you all groan with this topic...
I know this topic has been asked before...

But looking through the archives there have been a lot of advice, URLs,
classes given out, yet I haven't really found anything that can easily be
implemented so that I can send muliple attachments in an single email.


I have managed it with one code but it always introduced an ATT01583.ATT
file, which I do not understand.
Any guidence would be very useful,

Thanks
Sam



[PHP] Re: Redirect?

2002-01-16 Thread J Smith


If this isn't in the PHP FAQ (I couldn't find it), it definitely should be, 
because somebody asks this question at the very least once a week on this 
list.

J



Henrik Johansson wrote:

 Hi!
 How do I do a redirect to a different location in PHP?
 
 Regards
 Henrik Johansson


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




Re: [PHP] Re: Redirect?

2002-01-16 Thread val petruchek

 If this isn't in the PHP FAQ (I couldn't find it), it definitely should
be,
 because somebody asks this question at the very least once a week on this
 list.

Very useful feature, i think :) and better to add it to the manual III.
Features section
(with file apploading, image functions etc)

Valentin Petruchek (aki Zliy Pes)
http://zliypes.com.ua
mailto:[EMAIL PROTECTED]






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




[PHP] Job Needed !!!

2002-01-16 Thread Prachait Saxena

Hello !!

I am free now a days and Needed a job in Web Development. I am fluent in PHP
+ MySql Combination.

Any on can hire me. Wating for reply.



--

Bye, and  Have a nice day.

Prachait Saxena
---
Phone :-  +91 - 712 - 544476
Email   :-  [EMAIL PROTECTED] (Official)
   [EMAIL PROTECTED](Official)
   [EMAIL PROTECTED] (Personal)
ICQ :-  71855637
MSN   :-  prachait
Yahoo Messenger :- getprachait

 If you do for other's !
 Other's will do for you !!



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




Re: [PHP] Lazy evaluation?

2002-01-16 Thread mike cullerton

aha! see, i didn't understand the whole picture. so, let me see if i can
create another question. suppose

 if (($a_good = ($a == 'a'))  ($b_good = ($b == 'b'))) blahblahblah();

are you saying, that $b_good should always have the result of ($b == 'b')
even if $a != 'a'? that's not what my test shows (hi bogdan :)

so, is there something other than  that forces the other half to be
evaluated?

interesting...
mike

on 8/23/01 5:19 PM, TD - Sales International Holland B.V. at [EMAIL PROTECTED]
wrote:

 On Wednesday 16 January 2002 16:18, you wrote:
 
 I think the cause is, which is lacking in the reply below, that if you have
 like
 if ((function1(val, val))  (function2(val, val)) blabla();
 
 you still want function2 to be executed because it does things necessary for
 your script, however, if one of them returns false you don't want blabla() to
 be executed. If that isn't the case you should use or or one of the other
 operators
 
 not too sure about that tho' but i'm sure I'll be corrected if that isn't the
 case :-)
 
 on 1/16/02 5:57 AM, Miles Thompson at [EMAIL PROTECTED] wrote:
 For or statements it does, but not  or xor. I don't know about you,
 but I wouldn't want lazy evaluation on a conditional statement involving
 and.
 
 i'm new to all this stuff, so i'll bite. hopefully someone can explain what
 i'm missing.
 
 if i have a statement like
 
 if (($a == 'a')  ($b == 'b')) blahblahblah();
 
 and, $a != 'a'.
 
 why should php even look at the value for $b while evaluating this line?
 shouldn't the if fail after evaluating $a?
 
 thanks,
 mike
 
 -- mike cullerton   michaelc at cullerton dot com
 


 -- mike cullerton   michaelc at cullerton dot com



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




Re: [PHP] Mulitple Attachments using php

2002-01-16 Thread Jon Farmer

 But looking through the archives there have been a lot of advice, URLs,
 classes given out, yet I haven't really found anything that can easily be
 implemented so that I can send muliple attachments in an single email.


 I have managed it with one code but it always introduced an ATT01583.ATT
 file, which I do not understand.
 Any guidence would be very useful,

Forget classes and PHP code.. install mutt (assuming you are on a *nix) and
call exec() to send via mutt.. You can do it all in one line of code, it
works great and not a class or include insight!


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





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




Re: [PHP] Job Needed !!!

2002-01-16 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 16-01-02 at 17:25 
* Prachait Saxena said

 Hello !!
 
 I am free now a days and Needed a job in Web Development. I am fluent in PHP
 + MySql Combination.
 
 Any on can hire me. Wating for reply.

Well, I'd like a new bicycle, a house with a swimming pool and several
million $'s but I'm not likely to get that here either.

And the 'small plastic trumpet' award for ridiculous postings goes
to... Prachait Saxena!


- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8RausHpvrrTa6L5oRAleBAJ0a6TRtN3iu01oFtA9yHo4WfqxAMgCfVhYG
RlZ2pMI/Mco5JSBdN2xRyw4=
=NhlC
-END PGP SIGNATURE-

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




Re: [PHP] Lazy evaluation?

2002-01-16 Thread Bogdan Stancescu

A few comments:
1. (and the most important) I was trying to be helpful, rather than arrogant as you
most probably perceived me.
2. My answer was directed to the original poster, not to you. However, it is true
that I was mistaken in posting the message as a reply to your message.

mike cullerton wrote:

 on 1/16/02 8:32 AM, Bogdan Stancescu at [EMAIL PROTECTED] wrote:

  Dude, why don't you just check it out yourself? You'll never be 100%
  certain by asking people around anyway, because most people have
  distinct opinions on most issues. So then:

 dude, i'm not sure what distinct opinions have to do with whether or not php
 evaluates the second half of my example. and, believe it or not, i already
 had done the test. (and i use this feature all the time in my code)

Me too (both). What distinct opinions?! Well, check this out:
For or statements it does, but not  or xor. (Miles Thompson, same thread).
I was trying to break the circle of opinions by showing the original poster a way
to have hard evidence instead of relying on stupid messages, such as Miles'. For
what the poster knows, you or me are just as informed as Miles, so why believe
either of us? Please note I didn't even post my opinion on what my code would
echo.

 i was trying to be cool and let folks know in a polite way that there may be
 a problem with the statement mr thompson made.

Me too.

 however, in the spirit of debate, i'll respond to your question.

 one of the reasons i ask (simple) questions like this on the list is because
 i may not understand the whole picture, and therefore, i may not be able to
 construct a valid test for my concern.

 one of the things i've noticed about the blow-hards on this list (and pretty
 much any other list) is that they all assume you already know the answer to
 your question when they answer you. and then, they ridicule you when you
 don't understand some obscure reference they've made. folks forget what it's
 like to start out.

If you're trying to suggest that's what I did, please re-read my e-mail. I've sent
a very simple, clear and relevant piece of code. What's wrong with that?!

 sometimes, what folks need is the hello world example.

Your example didn't prove anything. You just SAY it won't evaluate $b=='b', but you
don't prove it. My example proves it. IOW, I completely agree. That's why I posted
that piece of code - it's exactly Hello world for the poster's question.

Don't start a flame over a little familiarity (Dude, why don't you...). Start it
if I say you stupid fuck, haven't you read the latest PHP newsletter?. And that
will never happen.

Bogdan




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




Re: [PHP] fixing mail for broken Outlook

2002-01-16 Thread DL Neil

Hank,
You say just text and text/plain. 
What do you mean by mungs the formatting? What formatting in plain text?
=dn


 I've got an app that sends emails, not complicated emails, their just
 text, the mail text is stored in text files on the server so they can be
 edited independant of the code, I've then got a function that reads the
 file (using file()) ... iterates the array, chop(), append \r\n and
 builds a message.
 
 This text gets sent using mail() -- works great for everything but
 Outlook which seems to lose all the line breaks and generally mungs the
 formatting to heck.  I've tried sending a Content-type: text/plain;
 header ... doesn't help.
 
 The only thing that keeps me from losing my mind is that I accidently
 had the wrong header Content-type: text/text; at first and while it
 created an attachment in Outlook, the attachemnt was properly formatted.
 
 Anyone else have this problem and solved it?
 -- 
 Hank Marquardt [EMAIL PROTECTED]
 http://web.yerpso.net
 GPG Id: 2BB5E60C
 Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


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




Re: [PHP] WDDX...

2002-01-16 Thread Jimmy

Hi Tony,

 I'm doing a website which I want to be easily updated so I made it using
 wddx, now I wonder how fast or slow it is?
 How many people can connect to my website without seeing any slowdowns?
 Anyone knows?

I use WDDX in my project to exchange data between application
(which is what WDDX mainly for).
In average, in all my script there will be one call to
wddx_serialize_vars() function, and everything seems to be ok to
me...there's no significant slow down.
though, still we can not conclude that WDDX is fast/slow,
since my app is not so WDDX-intensive.

btw, it's interesting that you can use WDDX to help you update your
website easily. would you mind sharing with us how?

Thanks

--
Jimmy

The past is present in the future



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




RE: [PHP] security benefits of predefined variables

2002-01-16 Thread Johnson, Kirk

 What is the purpose of the $_GET (or $HTTP_GET_VARS) 
 predefined variable?  It seems that in the case of get variables, 
 malicious variables could still be set in the querystring and 
 even using 
 $_GET['variablename'] wouldn't be able to stop this from happening.  
 That is, from what I understand, the advantage of using get 
 variables 
 in the first place.
 
 So does using $_GET actually confer any additional security?  
 If so, how?

Scenario 1: When register_globals is on, all POST, GET, COOKIE, SERVER and
ENVIRONMENT variables get copied *automatically* to global variables. So, if
someone passes admin=1 on the query string, then effectively these two
assignments are *made by PHP*:

$HTTP_GET_VARS['admin'] = 1;
$admin = 1;

If $admin is a session variable, then the value of $admin gets saved
*automatically* to the session when the page finishes. So, if the programmer
has not been careful, a cracker can set themself up with admin privileges.
Read that all again: the programmer has made no assignments, yet there is a
session variable named $admin set to 1. The two key steps are done
automatically by PHP: create a global version of the GET variable, and write
that global version to the session.

Scenario 2: When register_globals is off, only the first assignment above is
made by PHP when the cracker passes admin=1 on the query string. And that's
where the cracker's input sits harmlessly, unless the programmer does
something silly like writing a loop that assigns all variables in
$HTTP_GET_VARS[] to global variables. The session variables sit in
$HTTP_SESSION_VARS[], and the only way to get a value into there is to
assign it. So, the *programmer* would have to *write* this line of code to
get to the same point as in Scenario 1 (admin set to 1 in the session):

$HTTP_SESSION_VARS['admin'] = $HTTP_GET_VARS['admin'];

And no programmer is that silly, right ;)

Crackers can still pass malicious stuff on the the query string. The
security benefits of register_globals off have to do with what happens to
that malicious stuff inside PHP.

If you are careful, you can defend against Scenario 1 with register_globals
on, but you need to understand all the stuff that PHP is doing with the
data, and that is a fairly complicated picture. Your application can still
work even if you don't understand that picture, and that is how unsecure
applications come about. With register_globals off, the data movement
picture is much simpler, and this is more of a fail-safe mode: if you
don't understand how the data moves around in PHP, your application simply
breaks ;)

HTH

Kirk

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




RE: [PHP] Extending PHP

2002-01-16 Thread Simon Ritchie

For what they are worth, here are some notes that I took.  I don't think
they answer the actual question you asked, but they may be useful.

Extensions to PHP are written in C.  (I haven't seen a statement to that
effect anywhere in the documentation, but I mave missed something.)

Assume that your package is called mybit.

Need libtool 1.4 or better - get it from www.gnu.org or a mirror

You need to write a set of interface functions.  Function names must be ALL
lower case.  Before you do that, prepare a prototype file - can be just the
names of the functions, one per line, no semicolons, NO BLANK LINES.  The
entries can be full C prototypes, but complicated prototypes screw it up
(char thing() is OK, but char * thing() is not).

run ext_skel  --extname=mybit –proto=file containing prototypes

That creates a directory ext/mybit containing a Makefile, skeleton C
source and a header (.h)file.

edit config.m4 to switch on the lines that enable mybit.  Until you do
that, nothing will work.

cd .. (root of PHP source)

./buildconf

./configure –with-mybit

make

The first time I did this, the make failed because of problems in the .h
file.  These were caused by stuff in the proto file that the tools couldn't
handle.

./php -f ext/mybit/mybit.php confirms that the skeleton has been added.

Reinstall your PHP module.  (make install as root)

In the ext/mybit you now have lots of files including mybit.c and
php_mybit.h.  mybit.c contains a set of wrapper functions, one for each
name that you put into your prototype list.

Write a test script to call the functions.  At this stage, you should get a
warning telling you that the function is not yet implemented.  This is
printed by the skeleton wrapper function.

You now need to edit each function.  Take out the line that prints the not
implemented warning and replace it with the code that you want.

BEWARE.  If you find half-way through the work that you got the prototype
file wrong (say, you want to put an extra function in), you have to start
all over again.  Change the name of the mybit directory, create a new one
and manually copy the stuff you have produced into it.  To avoid this, I put
my code into a separate file, got that working in isolation (so that I knew
what the function names were going to be) and then made my interface
functions very simple wrappers.

I could not make any sense of the stuff about parameter passing in the zend
documents.  I suspect that it doesn't match the standard released PHP.
(Somebody said elsewhere in this thread to use a different distribution.
That may help.)  I figured out how to pass parameters by looking at working
examples, such as the LDAP extension.

Simon



  -Original Message-
  From: Anas Mughal [mailto:[EMAIL PROTECTED]]
  Sent: 15 January 2002 21:12
  To: [EMAIL PROTECTED]
  Subject: [PHP] Extending PHP
 
 
  I am looking into building a dynamically loadable
  module under PHP4. The documentation on extending PHP4
  is unclear or is missing instructions on how to
  generate dynamic loadable module file. I have followed
  the instructions but I can't seem to be able to create
  the module.
  (I even looked at Sterling Hughes article on
  WebTechniques.)
  Is there a step that I am missing or what?
  Do I need to modify the m4 file or the makefile?
  Please advise...
 
  =
  Anas Mughal
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
  Tel: 973-249-6665
 
  __
  Do You Yahoo!?
  Send FREE video emails in Yahoo! Mail!
  http://promo.yahoo.com/videomail/
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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




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




Re: [PHP] fixing mail for broken Outlook

2002-01-16 Thread Hank Marquardt

basically tabs and line breaks disappear ... almost like it's treating
the message as html .. whitespace is history.

On Wed, Jan 16, 2002 at 04:29:03PM -, DL Neil wrote:
 Hank,
 You say just text and text/plain. 
 What do you mean by mungs the formatting? What formatting in plain text?
 =dn
 
 
  I've got an app that sends emails, not complicated emails, their just
  text, the mail text is stored in text files on the server so they can be
  edited independant of the code, I've then got a function that reads the
  file (using file()) ... iterates the array, chop(), append \r\n and
  builds a message.
  
  This text gets sent using mail() -- works great for everything but
  Outlook which seems to lose all the line breaks and generally mungs the
  formatting to heck.  I've tried sending a Content-type: text/plain;
  header ... doesn't help.
  
  The only thing that keeps me from losing my mind is that I accidently
  had the wrong header Content-type: text/text; at first and while it
  created an attachment in Outlook, the attachemnt was properly formatted.
  
  Anyone else have this problem and solved it?
  -- 
  Hank Marquardt [EMAIL PROTECTED]
  http://web.yerpso.net
  GPG Id: 2BB5E60C
  Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
Hank Marquardt [EMAIL PROTECTED]
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild 
*** Beginning PHP -- Starts January 7, 2002 
*** See http://www.hwg.org/services/classes

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




Re: [PHP] Job Needed !!!

2002-01-16 Thread Bogdan Stancescu

LOL! Great posting! Made my day. You'd get the 'big gold trumpet' award of the day
if I could spare the money :-)

However, have you considered that this guy was maybe offering to help in a free
software project?

Bogdan

Nick Wilson wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 * On 16-01-02 at 17:25
 * Prachait Saxena said

  Hello !!
 
  I am free now a days and Needed a job in Web Development. I am fluent in PHP
  + MySql Combination.
 
  Any on can hire me. Wating for reply.

 Well, I'd like a new bicycle, a house with a swimming pool and several
 million $'s but I'm not likely to get that here either.

 And the 'small plastic trumpet' award for ridiculous postings goes
 to... Prachait Saxena!

 - --

 Nick Wilson

 Tel:+45 3325 0688
 Fax:+45 3325 0677
 Web:www.explodingnet.com

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.0.6 (GNU/Linux)
 Comment: For info see http://www.gnupg.org

 iD8DBQE8RausHpvrrTa6L5oRAleBAJ0a6TRtN3iu01oFtA9yHo4WfqxAMgCfVhYG
 RlZ2pMI/Mco5JSBdN2xRyw4=
 =NhlC
 -END PGP SIGNATURE-

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



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




Re: [PHP] Mulitple Attachments using php

2002-01-16 Thread DL Neil

Sam,

 I know I hear you all groan with this topic...
 I know this topic has been asked before...

 But looking through the archives there have been a lot of advice, URLs,
 classes given out, yet I haven't really found anything that can easily be
 implemented so that I can send muliple attachments in an single email.

 I have managed it with one code but it always introduced an ATT01583.ATT
 file, which I do not understand.
 Any guidence would be very useful,


=check out the classes available for email/MIME processing at phpguru.org. These 
contain examples to
illustrate/document the class-code's facilities, including attachments (simply repeat 
the requisite steps).

=beyond that, and the recommendation contained in the above, check out the RFCs for 
email/MIME formatting.

=dn



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




Re: [PHP] Newbie question on deleting directories using web Explorer

2002-01-16 Thread Embrace DaPain

I am trying to delete files using web explorer  THere is a section in the 
code that states the following...

Can I include a shell script into it?  Or it is neccessary.  I know I have 
permissions,but I might be wrong.  If someone could help me I would
appreciate it.

Thanks

Al
case del:
### The user has comfirmed the deletion
if ($confirm)
{
### Object is a directory
if(is_dir($basedir.$file))
{
   // I thought this part would work
   //but it didn't budge by infusing a shell
#system(rmdir -rf $basedir.$file);
rmdir($basedir.$file);
}

### Object is a file
else
{
unlink($basedir.$file);
}
$lastaction = Deleted $file;
html_header();
displaydir();
}

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


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




Re: [PHP] Job Needed !!!

2002-01-16 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* On 16-01-02 at 17:47 
* Bogdan Stancescu said

 LOL! Great posting! Made my day. You'd get the 'big gold trumpet' award of the day
 if I could spare the money :-)
 
 However, have you considered that this guy was maybe offering to help in a free
 software project?

Hadn't even occured to me, but I suspect this is not the case.
Have a good evening.

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8Ra9sHpvrrTa6L5oRAkZiAJ4j/yhNIWG/I6Vu65TsfdRbZifWcACfeyEv
R5XoWfuwLRsbsn4TbVDdboE=
=iHSQ
-END PGP SIGNATURE-

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




RE: [PHP] security benefits of predefined variables

2002-01-16 Thread Rasmus Lerdorf

 If you are careful, you can defend against Scenario 1 with register_globals
 on, but you need to understand all the stuff that PHP is doing with the
 data, and that is a fairly complicated picture. Your application can still
 work even if you don't understand that picture, and that is how unsecure
 applications come about. With register_globals off, the data movement
 picture is much simpler, and this is more of a fail-safe mode: if you
 don't understand how the data moves around in PHP, your application simply
 breaks ;)

In your scenario setting your error_reporting level to E_ALL will throw a
warning when you use an uninitialized $admin variable.  That will prompt
you to initialize $admin correctly and thus be fine with register_globals
turned on.

I don't think it is quite as hard as everyone says to write
register_globals-safe code.

-Rasmus


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




[PHP] Newbie: Ending Sessions

2002-01-16 Thread Lee P Reilly

Hi,

I wonder if someone could tell me what I am doing wrong with the
following? I am trying to end a session (logout), but am having a
problem...


I register a new session as follows:

authenticate.php (snippet)

// if the user has just tried to login
if ($username  $password)
{
  // if the user is present in the database, register the username in
the session
  if (login($username, $password)==1)
  {
$valid_user=$username;
session_register(valid_user);
  }
}

^ This works okay. BTW, session_start() is present - just not shown
above. I then have a hyperlink to a logout function:


logout.php (snippet)

session_start();
include(sasdap_fns.php);
$result = session_unregister(valid_user);
session_unset();
session_destroy();

^ $result always returns 1, but when I return to /reload /refresh the
login screen I see that I am still logged in i.e. the session is still
active.

Can anyone see a problem anywhere? Thanks very much in advance.

- Best regards,

Lee



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




[PHP] Web Explorer

2002-01-16 Thread Embrace DaPain

Hello:

Also I am getting this stupid error.  How is that when I see the file and 
directory staring in front of me?



Warning: Unlink failed (No such file or directory) in 
/web/sites/embracedapain/thenameofmysite.com/index.php on line 1049


Thanks

Al

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: [PHP] PHP as a cron job

2002-01-16 Thread Tiago Luchini

I am trying to run directly via PHP.

I have tried setting 755 to the script and adding #!/usr/bin/php -q to it
and also tried to change my cron line to run /usr/bin/php sending the script
as a parameter. Both options run normally when logged on a TTY.

Tiago


- Original Message -
From: Dennis Moore [EMAIL PROTECTED]
To: Tiago Luchini [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 16, 2002 12:18 PM
Subject: Re: [PHP] PHP as a cron job


 Please provide more information on how you have set up PHP to run your
cron
 jobs.  Are you trying to execute via LYNX or directly via a PHP script?

 /dkm


 - Original Message -
 From: Tiago Luchini [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 16, 2002 8:20 AM
 Subject: [PHP] PHP as a cron job


 I have been trying to use some PHP scripts as a Linux cron job.

 It tries to run but replies that:
 Unable to open /home/admin/webmin-0.85/ in Unknown on line 0

 I have no idea why PHP parser is making this confusion.
 Could anyone bring some light to this mistery please?

 Atenciosamente,

 Tiago Luchini
 Diretor Técnico-Comercial
 Galluch Soluções Internet
 Tel.: 0xx11 6912-3255
 Cel.: 0xx11 7839-7740



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




[PHP] URGENT : PHP install error on Solaris 7

2002-01-16 Thread R'twick Niceorgaw

Hi all,
I have a Sparc Solaric 7 system on which I'm trying to install php 4.0.6.
the installation works fine. But, when I try to restart Apache I get the
following error. I have Apache 1.3.22

Has any one experienced the same problem ? Or any fix to this ? I'm not a
unix guy so have no idea as to what this error means.

ANy help will be greatly appreciated :)

Erro msg

==apachectl configtest
Syntax error on line 205 of /usr/apache/conf/httpd.conf:
Cannot load /usr/apache/libexec/libphp4.so into server: ld.so.1:
/usr/apache/bin
/httpd: fatal: relocation error: file /usr/apache/libexec/libphp4.so: symbol
ap_block_alarms: referenced symbol not found

-
R'twick Niceorgaw ( [EMAIL PROTECTED] )
http://www.niceorgaw.com

98C Cedar Lane
Highland Park, NJ 08904
USA
732-246-1434 (R)
732-801-3826 (M)
-




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


[PHP] Re: SMS

2002-01-16 Thread LaserJetter

Site which offer SMS are also closing down / becoming unreliable as the UK
networks are charging other network operators for sending messages to phones
on their network.
This doesnt really affect mobile phone users because the costs cancel out
over time but discrimnates against web sites who dont earn revenue from
recieving messages.

Yogesh Mahadnac [EMAIL PROTECTED] wrote in message
004101c19d88$517527b0$[EMAIL PROTECTED]">news:004101c19d88$517527b0$[EMAIL PROTECTED]...
Hi everyone! I'd be grateful if someone could please tell me a link
where I can find a good tutorial on how to develop a SMS tool with PHP, or
if somebody has already developed something like it, or if there are any
experts around, please give me some information about it.

Thanks and regards,
Yogesh Mahadnac.




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




Re: [PHP] PHP as a cron job

2002-01-16 Thread mike cullerton

 Unable to open /home/admin/webmin-0.85/ in Unknown on line 0

this is possibly a path or env issue. have you tried using absolute
filenames?

mike

on 1/16/02 10:07 AM, Tiago Luchini at [EMAIL PROTECTED] wrote:

 I am trying to run directly via PHP.
 
 I have tried setting 755 to the script and adding #!/usr/bin/php -q to it
 and also tried to change my cron line to run /usr/bin/php sending the script
 as a parameter. Both options run normally when logged on a TTY.
 
 Tiago
 
 
 - Original Message -
 From: Dennis Moore [EMAIL PROTECTED]
 To: Tiago Luchini [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Wednesday, January 16, 2002 12:18 PM
 Subject: Re: [PHP] PHP as a cron job
 
 
 Please provide more information on how you have set up PHP to run your
 cron
 jobs.  Are you trying to execute via LYNX or directly via a PHP script?
 
 /dkm
 
 
 - Original Message -
 From: Tiago Luchini [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 16, 2002 8:20 AM
 Subject: [PHP] PHP as a cron job
 
 
 I have been trying to use some PHP scripts as a Linux cron job.
 
 It tries to run but replies that:
 Unable to open /home/admin/webmin-0.85/ in Unknown on line 0
 
 I have no idea why PHP parser is making this confusion.
 Could anyone bring some light to this mistery please?
 
 Atenciosamente,
 
 Tiago Luchini
 Diretor Técnico-Comercial
 Galluch Soluções Internet
 Tel.: 0xx11 6912-3255
 Cel.: 0xx11 7839-7740
 
 


 -- mike cullerton   michaelc at cullerton dot com



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




[PHP] Maintenance of POP3 accounts

2002-01-16 Thread HENDERSON, Roy

Hi,

I would like to be able to maintain ( ie create or delete ) POP3 accounts
via PHP but my ISP says this cannot be done.

I find this confusing since they provide me a PHP-based control panel which
I use to do this manually ...

I confess I don't know much about the implementation of POP3 on Linux and
would appreciate any general comments to enlighten me.  However, please
don't send me any RTFMs because I have already searched in vain ...

Thanks in advance,

Roy


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.atlantic-e.com (or www.atlantic-telecom.com for europe)
**

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




RE: [PHP] security benefits of predefined variables

2002-01-16 Thread Johnson, Kirk

I wrote:

  If you are careful, you can defend against Scenario 1 with 
 register_globals
  on, but you need to understand all the stuff that PHP is 
 doing with the
  data, and that is a fairly complicated picture. Your 
 application can still
  work even if you don't understand that picture, and that is 
 how unsecure
  applications come about. With register_globals off, the 
 data movement
  picture is much simpler, and this is more of a fail-safe 
 mode: if you
  don't understand how the data moves around in PHP, your 
 application simply
  breaks ;)

And Rasmus added:
 
 In your scenario setting your error_reporting level to E_ALL 
 will throw a
 warning when you use an uninitialized $admin variable.  That 
 will prompt
 you to initialize $admin correctly and thus be fine with 
 register_globals
 turned on.

This is a good point, Rasmus. At the same time, it reenforces the point at
the top: there is more one needs to know in order to write safe code with
register_globals. Not much more, but it is more: one needs to know what the
problem is, what E_ALL is, and how E_ALL helps address the problem. And
clearly, there are a lot of people on this list who are not yet to that
level.

 I don't think it is quite as hard as everyone says to write
 register_globals-safe code.

I agree, completely do-able, if one just knows a little bit more.

Kirk

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




[PHP] parsing xml/string

2002-01-16 Thread Sandeep Murphy

Hi,

I have an xml output with tags like sessionid123/sessionid
usersands/sands  

I could parse the output using expat to display it the way i want or as a
string but what I need is to store the values separately in different
variables like $id for sessionid, $user for user and so on.. to be
manipulated later...

Any suggestions??

TIa,

sandeep

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




Re: [PHP] parsing xml/string

2002-01-16 Thread Hank Marquardt

I guess I'd setup a global array $TAGS, create an entry in the array
with your open_tag handle, $TAGS[$tagnamepassedtohandler], use the data
handler to populate it $TAGS[$currenttag].=$data; 

When you're done parsing the xml you have one big array with all the
tags that you can either use extract() on or use the $$ (variable
variable notation to create individual namespace entries.

On Wed, Jan 16, 2002 at 05:25:48PM -, Sandeep Murphy wrote:
 Hi,
 
 I have an xml output with tags like sessionid123/sessionid
 usersands/sands  
 
 I could parse the output using expat to display it the way i want or as a
 string but what I need is to store the values separately in different
 variables like $id for sessionid, $user for user and so on.. to be
 manipulated later...
 
 Any suggestions??
 
 TIa,
 
 sandeep
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 

-- 
Hank Marquardt [EMAIL PROTECTED]
http://web.yerpso.net
GPG Id: 2BB5E60C
Fingerprint: D807 61BC FD18 370A AC1D  3EDF 2BF9 8A2D 2BB5 E60C
*** Web Development: PHP, MySQL/PgSQL - Network Admin: Debian/FreeBSD
*** PHP Instructor - Intnl. Webmasters Assn./HTML Writers Guild 
*** Beginning PHP -- Starts January 7, 2002 
*** See http://www.hwg.org/services/classes

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




Re: [PHP] PHP as a cron job

2002-01-16 Thread Mehmet Kamil ERISEN

Hi,
I have to sweat my way through
/usr/bin/php if that does not work try /usr/local/bin/php
or ask the Unix Sysadmin.

one problem I still have to overcome is that everything
works,( I mean DB Connection etc.) but I can not use mail()
function. 

Any body have any ideas why I can't use mail()?
--- mike cullerton [EMAIL PROTECTED] wrote:
  Unable to open /home/admin/webmin-0.85/ in Unknown on
 line 0
 
 this is possibly a path or env issue. have you tried
 using absolute
 filenames?
 
 mike
 
 on 1/16/02 10:07 AM, Tiago Luchini at
 [EMAIL PROTECTED] wrote:
 
  I am trying to run directly via PHP.
  
  I have tried setting 755 to the script and adding
 #!/usr/bin/php -q to it
  and also tried to change my cron line to run
 /usr/bin/php sending the script
  as a parameter. Both options run normally when logged
 on a TTY.
  
  Tiago
  
  
  - Original Message -
  From: Dennis Moore [EMAIL PROTECTED]
  To: Tiago Luchini [EMAIL PROTECTED];
 [EMAIL PROTECTED]
  Sent: Wednesday, January 16, 2002 12:18 PM
  Subject: Re: [PHP] PHP as a cron job
  
  
  Please provide more information on how you have set up
 PHP to run your
  cron
  jobs.  Are you trying to execute via LYNX or directly
 via a PHP script?
  
  /dkm
  
  
  - Original Message -
  From: Tiago Luchini [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, January 16, 2002 8:20 AM
  Subject: [PHP] PHP as a cron job
  
  
  I have been trying to use some PHP scripts as a Linux
 cron job.
  
  It tries to run but replies that:
  Unable to open /home/admin/webmin-0.85/ in Unknown on
 line 0
  
  I have no idea why PHP parser is making this
 confusion.
  Could anyone bring some light to this mistery please?
  
  Atenciosamente,
  
  Tiago Luchini
  Diretor Técnico-Comercial
  Galluch Soluções Internet
  Tel.: 0xx11 6912-3255
  Cel.: 0xx11 7839-7740
  
  
 
 
  -- mike cullerton   michaelc at cullerton dot com
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

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




  1   2   3   >