Re: [PHP] error-catching

2002-05-09 Thread Herbert Mraz

Gert,

to prevent PHP to output any error messages, you can prefix the expression
with @, i.e.
$db = @mysql_connect( $host, $user, $password) or die ('Sorry, server is
down!');

Greetings,
Herb

- Original Message -
From: Gert Mellak [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 4:00 PM
Subject: [PHP] error-catching


 Hi!

 When I open a database connection and i. e. the db-server is down,
 I get a very long, long error message telling me that the server is down.

 What I want to do is just echo a text, i. e. DB-Server down and leave
out
 the error message.

 Does anyone have an idea how to manage this?




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




Re: [PHP] Re: How do I Install PHP on Apache 2, on win32

2002-05-03 Thread Herbert Mraz

Vincent,
as register_globals is off, I use
echo $SERVER['PHP_SELF'];
which works fine...
though everything has to be uppercase, what surprised me!

Herb

- Original Message -
From: Vincent Kruger [EMAIL PROTECTED]
To: Herbert Mraz [EMAIL PROTECTED]
Sent: Friday, May 03, 2002 1:22 AM
Subject: Re: [PHP] Re: How do I Install PHP on Apache 2, on win32


 Dude.
 Are you able to echo $PHP_SELF; with your installation and apache server ?

 I'm having endless trouble with this.




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




Re: [PHP] Re: How do I Install PHP on Apache 2, on win32

2002-05-02 Thread Herbert Mraz

No problem here (Apache 2 / PHP 4.2.0 / win2k):

Following went to httpd.conf:

LoadModule php4_module c:/PHP/experimental/apache2filter.dll
AddType application/x-httpd-php .php

Dropped the 'AddModule' - line, seems not to be needed anymore!

BTW, for those who read my postings about $_POST[]-vars being truncated with
PHP 4.2.0 and IIS:
Solved the problem by installing Apache 2 :-)), works great!

Byebye IIS,
Herb

- Original Message -
From: vins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 02, 2002 4:07 PM
Subject: [PHP] Re: How do I Install PHP on Apache 2, on win32


 It doesn't look like it works.
 move back to 1.3.24
 there are no probs there



 Philip Newman [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]...
  How do I Install PHP on Apache 2, on win32?
 
  I would like to install the ISAPI module?




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




[PHP] $_POST[] - last character cut away!!

2002-04-29 Thread Herbert Mraz

Strange problem here (win2k - iis 5.0 - php 4.2.0):

whenever I send formdata by POST-method, the last character gets
stripped...everything's fine when I use GET!
I tried various different (HTML-) input types, same everywhere...

register_globals is off, which shouldn't make a difference?

Anybody?

Herb



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




Re: [PHP] $_POST[] - last character cut away!!

2002-04-29 Thread Herbert Mraz

HTML - body contains:
 form method=post action=test.php
 input type=text name=foo
 input type=submit
 /form

 test.php contains:
 ?
 echo $_POST['foo'];
 ?
 when I type in:   'example'
 test.php echoes :   'exampl'
string-length doesn't matter...




 On Mon, 29 Apr 2002, Herbert Mraz wrote:
  Strange problem here (win2k - iis 5.0 - php 4.2.0):
  
  whenever I send formdata by POST-method, the last character gets
  stripped...everything's fine when I use GET!
  I tried various different (HTML-) input types, same everywhere...
 
 Can you show a self-contained sample that shows the simplest case where 
 this occurs (ideally a 3- or 4-line program)?
 
 miguel




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