php-windows Digest 27 Oct 2001 10:47:26 -0000 Issue 824

Topics (messages 10055 through 10064):

Re: Sendmail...
        10055 by: Ross Fleming

Re: Redirect stderr/Suppress imap_open error
        10056 by: Ross Fleming

PATH_INFO doesn't work -- resolution?
        10057 by: ajames.sdyn.com

Help!!!
        10058 by: Alejandro Viana

Help with dbase!!!
        10059 by: Alejandro Viana
        10060 by: Alejandro Viana
        10061 by: Alejandro Viana
        10062 by: Alejandro Viana

Re: Page Not Found
        10063 by: Erins Fan Club

What is a class
        10064 by: Jack

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]


----------------------------------------------------------------------


OK people, it appears to work now without a sendmail replacement.  I've no
idea what went wrong before but

[mail function]
SMTP= mail.totalise.co.uk ; for Win32 only
sendmail_from= [EMAIL PROTECTED] ; for Win32 only

seems to work just fine and dandio now.

Thanks to everyone who helped.

Ross



> > > > > > >-----Original Message-----
> > > > > > >From: Ross Fleming [mailto:[EMAIL PROTECTED]]
> > > > > > >Sent: 24 October 2001 23:29
> > > > > > >To: [EMAIL PROTECTED]
> > > > > > >Subject: [PHP-WIN] Sendmail...
> > > > > > >
> > > > > > >
> > > > > > >Hello, I'm probably just being a bit thick, but how
exactly do I get the
> > > > > > >mail function to work?..
> > > > > > >
> > > > > > >Do I need a sendmail replacement? (I downloaded blat
to see if that would
> > > > > > >help but can't see that it does.)
> > > > > > >
> > > > > > >------
> > > > > > >php.ini
> > > > > > >
> > > > > > >
> > > > > > >[mail function]
> > > > > > >; For Win32 only.
> > > > > > >SMTP= mail.totalise.co.uk ; for Win32 only
> > > > > > >
> > > > > > >; For Win32 only.
> > > > > > >sendmail_from= [EMAIL PROTECTED] ; for Win32 only
> > > > > > >
> > > > > > >----------
> > > > > > >
> > > > > > >Do I need to have this in?..
> > > > > > >
> > > > > > >; For Unix only.  You may supply arguments as well (default:
> > > > > > >'sendmail -t -i').
> > > > > > >;sendmail_path=
> > > > > > >
> > > > > > >I tried uncommenting the sendmail_path and pointed to
c:\windows\blat.exe
> > > > > > >
> > > > > > >Called it from within a php page
> > > > > > >mail("[EMAIL PROTECTED]", "My Subject", "Line
1\nLine 2\nLine 3");
> > > > > > >
> > > > > > >Got:
> > > > > > >Warning: Server Error in C:\Program Files\Apache
> > > > > > >Group\Apache\htdocs/email.php on line 11
> > > > > > >
> > > > > > >whether I uncommented the sendmail_path line or not.
> > > > > > >
> > > > > > >Any help appreciated.  I'm running Windows 98.
> > > > > > >
> > > > > > >Thanks
> > > > > > >
> > > > > > >Ross
> > > > > > >
> > > > > > >
> > > > > > >--
> > > > > > >PHP Windows Mailing List (http://www.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 Windows Mailing List (http://www.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 Windows Mailing List (http://www.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 Windows Mailing List (http://www.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 Windows Mailing List (http://www.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 Windows Mailing List (http://www.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 Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>







Not tried this specific function before, but whenever I want to suppress an
error I put an @ sign in front of the function?

If this doesn't help you then I hope it helps others, I find it useful when
trying to connect to a database:
$dbase = @mysql_connect("XXX", "XXX", "XXX");

If the database is not available it would dump an error to the screen
without the @ in front of the command.

Ross

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 26 October 2001 09:48
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirect stderr/Suppress imap_open error


--- Received from FPU.WHITES1 799 3703                       26-10-01 09:46

  -> [EMAIL PROTECTED]

Ahah... sorted.

Setting:

error_reporting = E_ALL & ~E_NOTICE

in php.ini does the trick, though quite why imap decides to flag it up as a
"notice" (described as Warning in the message) just because the mailbox is
empty beats me! 8-)

-Steve

---------------------------------------------------------------------------

From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirect stderr/Suppress imap_open error

--- Received from FPU.WHITES1 799 3703                    26-10-01 09:17

  -> [EMAIL PROTECTED]

Anyone know how to redirect stderr so it doesn't appear on the screen?

I'm battling with imap_open writing an error to the screen when the
(valid) mailbox is empty.

Cheers - Steve

This e-mail may contain confidential information and/or copyright
material. This e-mail is intended for the use of the addressee
only. Any unauthorised use may be unlawful.

If you receive this e-mail by mistake please advise the sender
immediately by using the reply facility in your e-mail software.

Friends Provident Marketing Group consists of the following
companies:

Friends Provident Life and Pensions Limited.
Registered number 4096141.
Friends' Provident Unit Trust Managers Limited.
Registered number 970641
FP Life Assurance Limited.
Registered number 782698
Friends Provident Pensions Limited.
Registered number 475201
Friends Ivory & Sime Managed Pensions Funds Limited.
Registered number 1020044
Registered and Head Office of each of the above companies is at Pixham End,
Dorking, Surrey RH4 1QA.
Registered in England. Incorporated companies limited by shares.
Ivory & Sime Trustlink Limited. Registered number 151198
Registered and Head Office: One Charlotte Square, Edinburgh EH2
4DZ.  Registered in Scotland. Incorporated company limited by
shares.

Companies within this Group transact life assurance, pension,
permanent health, unit trust and investment trust business

All are regulated by the Personal Investment Authority.
Friends' Provident Unit Trust Managers Limited is also regulated
by IMRO.

--
PHP Windows Mailing List (http://www.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 e-mail may contain confidential information and/or copyright
material. This e-mail is intended for the use of the addressee
only. Any unauthorised use may be unlawful.

If you receive this e-mail by mistake please advise the sender
immediately by using the reply facility in your e-mail software.

Friends Provident Marketing Group consists of the following
companies:

Friends Provident Life and Pensions Limited.
Registered number 4096141.
Friends' Provident Unit Trust Managers Limited.
Registered number 970641
FP Life Assurance Limited.
Registered number 782698
Friends Provident Pensions Limited.
Registered number 475201
Friends Ivory & Sime Managed Pensions Funds Limited.
Registered number 1020044
Registered and Head Office of each of the above companies is at Pixham End,
Dorking, Surrey RH4 1QA.
Registered in England. Incorporated companies limited by shares.
Ivory & Sime Trustlink Limited. Registered number 151198
Registered and Head Office: One Charlotte Square, Edinburgh EH2
4DZ.  Registered in Scotland. Incorporated company limited by
shares.

Companies within this Group transact life assurance, pension,
permanent health, unit trust and investment trust business

All are regulated by the Personal Investment Authority.
Friends' Provident Unit Trust Managers Limited is also regulated
by IMRO.

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







Hello,

I have noticed messages dating back to last year discussing whether 
PATH_INFO works on Windows servers.

BACKGROUND:
PATH_INFO is the original term given to the environment variable that 
contains extra path information supplied after the end of the (in those 
days) executable file, such that:

http://www.foobar.com/cgi-bin/test.cgi/more/foobar/filename.html

Would actually execute /cgi-bin/test.cgi on the target server, and the 
$PATH_INFO environment variable would contain 
"/more/foobar/filename.html".  In addition, PATH_TRANSLATED would contain 
that same path prefixed by the context's document root, making it a fully 
qualified UNIX filename.

PROBLEM:
PHP seems to support this functionality on a UNIX server I run.  A request 
for http://www.foobar.com/hello.php/more/foobar/filename.html works 
exactly as the above describes, stuffing "/more/foobar/filename.html" into 
the $PATH_INFO php variable.

However, the problem is that when the same code is moved to a production 
server, it fails with a status code 500.  A request for hello.php works 
fine; a request for hello.php/ fails, as does hello.php/anything.  I am 
trying to find out if the prod. server is in fact Windows.  We have a 
workaround whereby we make the php a perl cgi and it works fine; i.e. 
hello.cgi/anything runs fine, hello.php/anything yields a 500.

HELP!
Can someone who is familiar with this component of PHP please let us know 
if there are any specific configuratoin parameters that would affect the 
way PHP resolves the target resource, or if this is a bug that was fixed 
in a certain release?  I did search and found many similar problems but no 
answers.  There is one relative post in the faqts, but it states PATH_INFO 
doesn't work on Windows, which is clearly not true per above CGI 
workaround.

Thank you in advance.

..
Kind Regards,
Albert James




I'm trying to read a record from a dbase data base so I've previously
opened it successfully. The problem is that I call the function
dbase_get_record, but it returns no records. The database is ok because I
call the funcion dbase_numfields and dbase_numrecords and they give me
correct information. Would you help me, please?. Here is the source code
that fails.

[EMAIL PROTECTED]


Estoy intentando leer un registro de una base de datos dbase, por lo que
antes la he abierto con éxito. el problema residen en que llamo a la función
dbase_get_record, pero no me devuelve ningún registro. La base de datos está
bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan
información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código
fuente:

[EMAIL PROTECTED]



Source code- Código fuente:

<?
$based="articulo.dbf";
if (($descriptor=dbase_open ($based, 0))==0){
   printf ("<br>Error al abrir la base de datos");
}else{
   printf ("<br>Base de datos abierta");
   $num_registros=dbase_numrecords($descriptor);
   $num_campos=dbase_numfields($descriptor);
   for ($i=1;$i<=$num_registros;$i++){
      $registro= dbase_get_record ($descriptor, $i);
      for ($j=0;$j<$num_campos;$j++){
 printf ("<br>Fila %d,Campo %d vale %S", $i, $j, $registro[$j]);
      }
   }
   dbase_close($descriptor);
   printf ("<br>Base de datos cerrada");
}
?>










I'm trying to read a record from a dbase data base so I've previously
opened it successfully. The problem is that I call the function
dbase_get_record, but it returns no records. The database is ok because I
call the funcion dbase_numfields and dbase_numrecords and they give me
correct information. Would you help me, please?. Here is the source code
that fails.

[EMAIL PROTECTED]


Estoy intentando leer un registro de una base de datos dbase, por lo que
antes la he abierto con éxito. el problema residen en que llamo a la función
dbase_get_record, pero no me devuelve ningún registro. La base de datos está
bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan
información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código
fuente:

[EMAIL PROTECTED]



Source code- Código fuente:

<?
$based="articulo.dbf";
if (($descriptor=dbase_open ($based, 0))==0){
   printf ("<br>Error al abrir la base de datos");
}else{
   printf ("<br>Base de datos abierta");
   $num_registros=dbase_numrecords($descriptor);
   $num_campos=dbase_numfields($descriptor);
   for ($i=1;$i<=$num_registros;$i++){
      $registro= dbase_get_record ($descriptor, $i);
      for ($j=0;$j<$num_campos;$j++){
 printf ("<br>Fila %d,Campo %d vale %S", $i, $j, $registro[$j]);
      }
   }
   dbase_close($descriptor);
   printf ("<br>Base de datos cerrada");
}
?>












I'm trying to read a record from a dbase data base so I've previously
opened it successfully. The problem is that I call the function
dbase_get_record, but it returns no records. The database is ok because I
call the funcion dbase_numfields and dbase_numrecords and they give me
correct information. Would you help me, please?. Here is the source code
that fails.

[EMAIL PROTECTED]


Estoy intentando leer un registro de una base de datos dbase, por lo que
antes la he abierto con éxito. el problema residen en que llamo a la función
dbase_get_record, pero no me devuelve ningún registro. La base de datos está
bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan
información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código
fuente:

[EMAIL PROTECTED]



Source code- Código fuente:

<?
$based="articulo.dbf";
if (($descriptor=dbase_open ($based, 0))==0){
   printf ("<br>Error al abrir la base de datos");
}else{
   printf ("<br>Base de datos abierta");
   $num_registros=dbase_numrecords($descriptor);
   $num_campos=dbase_numfields($descriptor);
   for ($i=1;$i<=$num_registros;$i++){
      $registro= dbase_get_record ($descriptor, $i);
      for ($j=0;$j<$num_campos;$j++){
 printf ("<br>Fila %d,Campo %d vale %S", $i, $j, $registro[$j]);
      }
   }
   dbase_close($descriptor);
   printf ("<br>Base de datos cerrada");
}
?>












I'm trying to read a record from a dbase data base so I've previously
opened it successfully. The problem is that I call the function
dbase_get_record, but it returns no records. The database is ok because I
call the funcion dbase_numfields and dbase_numrecords and they give me
correct information. Would you help me, please?. Here is the source code
that fails.

[EMAIL PROTECTED]


Estoy intentando leer un registro de una base de datos dbase, por lo que
antes la he abierto con éxito. el problema residen en que llamo a la función
dbase_get_record, pero no me devuelve ningún registro. La base de datos está
bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan
información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código
fuente:

[EMAIL PROTECTED]



Source code- Código fuente:

<?
$based="articulo.dbf";
if (($descriptor=dbase_open ($based, 0))==0){
   printf ("<br>Error al abrir la base de datos");
}else{
   printf ("<br>Base de datos abierta");
   $num_registros=dbase_numrecords($descriptor);
   $num_campos=dbase_numfields($descriptor);
   for ($i=1;$i<=$num_registros;$i++){
      $registro= dbase_get_record ($descriptor, $i);
      for ($j=0;$j<$num_campos;$j++){
 printf ("<br>Fila %d,Campo %d vale %S", $i, $j, $registro[$j]);
      }
   }
   dbase_close($descriptor);
   printf ("<br>Base de datos cerrada");
}
?>












I'm trying to read a record from a dbase data base so I've previously
opened it successfully. The problem is that I call the function
dbase_get_record, but it returns no records. The database is ok because I
call the funcion dbase_numfields and dbase_numrecords and they give me
correct information. Would you help me, please?. Here is the source code
that fails.

[EMAIL PROTECTED]


Estoy intentando leer un registro de una base de datos dbase, por lo que
antes la he abierto con éxito. el problema residen en que llamo a la función
dbase_get_record, pero no me devuelve ningún registro. La base de datos está
bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan
información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código
fuente:

[EMAIL PROTECTED]



Source code- Código fuente:

<?
$based="articulo.dbf";
if (($descriptor=dbase_open ($based, 0))==0){
   printf ("<br>Error al abrir la base de datos");
}else{
   printf ("<br>Base de datos abierta");
   $num_registros=dbase_numrecords($descriptor);
   $num_campos=dbase_numfields($descriptor);
   for ($i=1;$i<=$num_registros;$i++){
      $registro= dbase_get_record ($descriptor, $i);
      for ($j=0;$j<$num_campos;$j++){
 printf ("<br>Fila %d,Campo %d vale %S", $i, $j, $registro[$j]);
      }
   }
   dbase_close($descriptor);
   printf ("<br>Base de datos cerrada");
}
?>












Hmm, just a suggestion but check if it is actually named "test.php.txt" in
your
directory! Switch explorer on to show all extensions including those that
are
registered (it is safer that way with and OS anyway).

The clue is in the "Page not found", as in http://<server>/test.php cannot
be found.

Cheers, Jerry

----- Original Message -----
From: "Peter Vertes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 25, 2001 4:00 PM
Subject: [PHP-WIN] Page Not Found


> Hello All,
>
>     I'm having trouble installing PHP on a W2K workstation.  I've got
mySql
> and Apache working on it fine but I can't get it to display a PHP test
page.
> When I do http://localhost/ it shows the test HTML page fine.  When I do
> http://localhost/test.php I get an error message saying that the page can
> not be found.  Now the page is there, it is called test.php and it
contains
> the following line:
>
> <? phpinfo() ?>
>
> Now, in my httpd.conf file I have the following:
>
>     AddType application/x-httpd-php .php
>     AddType application/x-httpd-php-source .phps
>     AddType application/x-httpd-php .phtml
>     AddType application/x-httpd-php .phtml
>
>     AddType application/x-tar .tgz
>
>     Action application/x-httpd-php "/php/php.exe "
>
>     Can anyone hit at what could be wrong ?  Thanks in advance...
>
> -Pete
>






Dear all
I'm fresh on PHP, there is a question which i don't understand , even i had
read the book about PHP.
There is a Class and object in PHP, but i don't quite understand what is
that for.
I had look at some of the Example in PHP.net and i know most of it, but
there is a operator :
$this->edible = $edible;
What is the "$this -> " stand for?

Could someone please tell me more???
Thx

jack
[EMAIL PROTECTED]




Reply via email to