php-windows Digest 31 Jan 2001 13:10:22 -0000 Issue 421

Topics (messages 5264 through 5281):

Re: PHP vs JSP ?
        5264 by: Tom Mathews

Re: Text area
        5265 by: Mike Flynn
        5272 by: Woods Ron   Contr SA-ALC/FMIS
        5277 by: Mangiola Nunzio         Datavia

PDF Questions
        5266 by: Conover, Ryan
        5271 by: Alain Samoun

How  can I make PHP  to work on Win98 ?
        5267 by: nastaran kashani
        5281 by: Leon Santos Filho

QMAIL
        5268 by: Francois Allard

Problem with Oracle
        5269 by: Asendorf, John
        5278 by: Jean-Christophe Le Brun

Re: Error in a remote computer with IIS and windows 200 0
        5270 by: Gaspar ARias

cgi error
        5273 by: Paolo Saxton

General Protection Faults
        5274 by: phobo
        5280 by: Ingo Baab

A device attached to the system is not functioning
        5275 by: Ari Pramono (HRM-HO)

Re: A question
        5276 by: Bikes

File download after page is displayed
        5279 by: Andris Jancevskis

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]


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


I agree with Simon

It is actually possible to work three tiers with PHP, but not so obviously as
JSP does.
The hit you take is performance, so it depends on what the application is
whether to use JSP or PHP.

Personally, for any e-commerce work I use PHP. It's very easy to get it hosted
and those few seconds difference in making the scripts immediately available
instead of caching them all could be the difference between a customer
continuing or hitting the back button.
For intranet applications, I've found a definite benefit in JSP (and dare I say
it ASP!). Performance is never such an issue, but scaleability might be, as is
the ability to use the windows API etc - you can of course write C modules for
PHP to do pretty well anything you fancy on any platform, but this may be too
much hassle for you.

Simon Willison wrote:

> I think it depends mainly on the scale of the project.  PHp and JSP can both
> be used to achieve exactly the same things (i.e dynamically generated pages,
> tied in with databases, user interaction etc) - it's a lot easier to learn
> and develop in PHP because you don't have to learn Java first.
>
> The big advantage of JSP (and if anyone knows better feel free to shoot me
> down on this one) is that it can be used within a 'three tiered' web server
> system.  PHP only really works on two tiers - you have your web server
> running PHP which talks to your database server.  JSP solutions such as
> Dynamo offer a full on triple tiered system with web servers pushing out
> content, application servers sitting in the middle generating dynamic pages
> and database servers on the back end.  This is hugely scalable, which the 2
> tiered PHP solution isn't.
>
> On the performance side a noticeable element of JSP is that the scripts are
> compiled the first time they are run, and then remain in memory as compiled
> code after that.  The result is that although the first request to a JSP
> script will take a whle, after that they will be lightning fast.
>
> In answer to your question then:  Both can be used to create powerful
> dynamic web pages, but PHP has the edge when it comes to speed and ease of
> development, while JSP is better if you are developing an extremely high
> load  application which will need to be scaled.
>
> -----Original Message-----
> From: Antonio Lopez [mailto:[EMAIL PROTECTED]]
> Sent: 29 January 2001 11:08
> To: [EMAIL PROTECTED]
> Subject: PHP vs JSP ?
>
> PHP or JSP ?
>
> I need to know what language is better to develop powerful dinamic web
> pages.
>
> Thankyou!!
>
> ===================================================
> Antonio López Luna
> Ingeniería e Integración Avanzadas (Ingenia), S.A.
> Parque Tecnológico de Andalucía
> 29590  - Málaga (Spain)
>
> Tel. 34-952029300 Ext. 386
> Fax. 34-952029309
> Web: http://www.ingenia.es
>
> --
> 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]




At 08:24 AM 1/30/01 +0200, you wrote:
>It  does work on the face of it. But when you 
>query the database the field is empty even if you filled
>it in.
>

Try something like this...

<?php
        print "                      <textarea cols=\"60\" rows=\"7\"
name=\"LongDesc\">";
        if ($editing) {
          print "$desc_long";
        }
        print "</textarea>\n";
?>

Note that there's no blank lines between the <textarea> and </textarea>
tags besides those present in the $desc_long string that was retrieved from
the database.  That avoids adding undesired blank lines and spaces.

-Mike


 Come the millennium month 12, in the home of the greatest power,
 the village idiot will come forth to be acclaimed the leader.
                                   (Nostradamus, 1555)
 I do know I'm ready for the job.
 And, if not, that's just the way it goes.
                                   (George W. Bush, 2000)





Your problem is probably not with the form passing the data; it's in your
storing it in the db. Remember there's probably lots of \n characters in a
text field. If you try to put these into a db field your results are
unpredictable; meaning the db software may or may not handle them properly.

Try using addslashes ($TextField=addslashes($TextField)) before writing and
stripslahes ( ($TextField=stripslashes($TextField)) after the db write to
return the data to it's original values.

Ron Woods/GAI
Sr. Software Engineer
1777 N.E. Loop 410
Suite 600
San Antonio, TX 78217
Tel: 210-820-2615
Fax: 210-832-0487
http://www.gai-inc.com

-----Original Message-----
From: Mangiola Nunzio Datavia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 12:24 AM
To: [EMAIL PROTECTED]; David Harrison
Subject: RE: [PHP-WIN] Text area


It  does work on the face of it. But when you 
query the database the field is empty even if you filled
it in.



> ----------
> From:         David Harrison[SMTP:[EMAIL PROTECTED]]
> Sent:         Tuesday, January 30, 2001 8:22 AM
> To:   [EMAIL PROTECTED]
> Subject:      RE: [PHP-WIN] Text area
> 
> Try using the TEXTAREA tag instead: 
> 
> <TEXTAREA ROWS="5" COLS="55" NAME="boop">
> 
> --dave
> 
> > -----Original Message-----
> > From: Mangiola Nunzio Datavia [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, 30 January 2001 4:13 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] Text area
> > 
> > 
> > Hi
> > 
> > I'm trying to or half succeeded in creating
> > a guestbook on my intranet site. 
> > 
> > Now my problem is this:
> > When creating the form I have
> > trouble creating a text area larger
> > than one line. 
> > I use at the moment <input type="text" blah blah
> > That gives me one line and it appears in
> > MySQL database. But if I try to add rows="6"
> > cols="70" it still gives me one line.
> > 
> > Any suggestions?
> > 
> > 
> > -- 
> > 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]




I thought it might be that as well but luckily Yoann sorted
it out for with this solution:

<"----I'm note sure the attribute "value" works with the tag "textarea".
Try this :
<textarea name="notes" rows="6" cols="30">
   <?php echo $myrow["notes"] ?>
</textarea>

Yoann.-----">

But thanks for the help.



> ----------
> From:         Woods Ron   Contr SA-ALC/FMIS[SMTP:[EMAIL PROTECTED]]
> Sent:         Tuesday, January 30, 2001 6:02 PM
> To:   Mangiola Nunzio         Datavia; [EMAIL PROTECTED]
> Subject:      RE: [PHP-WIN] Text area
> 
> Your problem is probably not with the form passing the data; it's in your
> storing it in the db. Remember there's probably lots of \n characters in a
> text field. If you try to put these into a db field your results are
> unpredictable; meaning the db software may or may not handle them
> properly.
> 
> Try using addslashes ($TextField=addslashes($TextField)) before writing
> and
> stripslahes ( ($TextField=stripslashes($TextField)) after the db write to
> return the data to it's original values.
> 
> Ron Woods/GAI
> Sr. Software Engineer
> 1777 N.E. Loop 410
> Suite 600
> San Antonio, TX 78217
> Tel: 210-820-2615
> Fax: 210-832-0487
> http://www.gai-inc.com
> 
> -----Original Message-----
> From: Mangiola Nunzio Datavia [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 30, 2001 12:24 AM
> To: [EMAIL PROTECTED]; David Harrison
> Subject: RE: [PHP-WIN] Text area
> 
> 
> It  does work on the face of it. But when you 
> query the database the field is empty even if you filled
> it in.
> 
> 
> 
> > ----------
> > From:       David Harrison[SMTP:[EMAIL PROTECTED]]
> > Sent:       Tuesday, January 30, 2001 8:22 AM
> > To:         [EMAIL PROTECTED]
> > Subject:    RE: [PHP-WIN] Text area
> > 
> > Try using the TEXTAREA tag instead: 
> > 
> > <TEXTAREA ROWS="5" COLS="55" NAME="boop">
> > 
> > --dave
> > 
> > > -----Original Message-----
> > > From: Mangiola Nunzio Datavia [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, 30 January 2001 4:13 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP-WIN] Text area
> > > 
> > > 
> > > Hi
> > > 
> > > I'm trying to or half succeeded in creating
> > > a guestbook on my intranet site. 
> > > 
> > > Now my problem is this:
> > > When creating the form I have
> > > trouble creating a text area larger
> > > than one line. 
> > > I use at the moment <input type="text" blah blah
> > > That gives me one line and it appears in
> > > MySQL database. But if I try to add rows="6"
> > > cols="70" it still gives me one line.
> > > 
> > > Any suggestions?
> > > 
> > > 
> > > -- 
> > > 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]
> 




Does anyone know of where I could to get more information on pdflib and how
it works.

Ryan




www.pdflib.com

Alain

On Tue, Jan 30, 2001 at 09:26:40AM -0500, Conover, Ryan wrote:
> Does anyone know of where I could to get more information on pdflib and how
> it works.
> 
> Ryan
> 
> -- 
> 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]






   Hi,
 I work with Winows98  , and I want to make my system 
a really server.I have two questions :
 
1}What component  I should install on my system to 
  make it a really server ? IIS3 ? or IIS4 ?
2)Where can I get this component (IIS3 or IIS4
  for Windows98) ?


    Thanks a lot
     Atieh Kashani

__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




To use IIS you need NT or windows 2000. If you really want to use win98, use
Personal Web Server instead.

----- Original Message -----
From: nastaran kashani <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 4:13 PM
Subject: [PHP-WIN] How can I make PHP to work on Win98 ?


>
>
>    Hi,
>  I work with Winows98  , and I want to make my system
> a really server.I have two questions :
>
> 1}What component  I should install on my system to
>   make it a really server ? IIS3 ? or IIS4 ?
> 2)Where can I get this component (IIS3 or IIS4
>   for Windows98) ?
>
>
>     Thanks a lot
>      Atieh Kashani
>
> __________________________________________________
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
>
> --
> 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]





Hi everybody

I'a having some little problem configuring qmail, I'm not sure if it is
qmail who not well configure but all the message I'm trying to send does'nt
appear anywhere.  My PHP code is returning me 1 as response when I call the
mail() fonction, so I believe that PHP did process the function.

I did the usual INSTALL procedure that is give with QMAIL but nothing
append.  Did someone did have this problem or did configure qmail right???

Thanks in advance

Franck





I'm trying to run some SQL in Oracle that returns a single value...

$sql_getID = "SELECT max(CUSTID_NUM) from cfull2.tbl_dl_customers";

how the hell do I get that number into a variable?

I've tried a dozen different things, but the documentation is so sparse and
it's all about getting rows of data...

        $stmt_getID = OCIParse ( $connection , $sql_getID );
        OCIExecute ( $stmt_getID , OCI_DEFAULT );
        $Max_ID = 1;
        echo "Max_ID (check1) = $Max_ID <br />\n";    //echoes 1
        while (OCIFetchInto($stmt_getID, $row, OCI_ASSOC)) {
                $Max_ID = $row[CUSTID_NUM];
                echo "Max_ID (check2) = $Max_ID <br />\n";    //echoes
nothing
        }
        $Max_ID++;
        echo "Max_ID (check3) = $Max_ID <br />\n";   // echoes 1

This WHILE statement is just the last thing I've tried...  All I want to do
is put the result of the SQL line above in to a variable....

Thanks in advance all

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631

The benefit to the government of replacing all $1 Federal Reserve notes with
$1 coins would be $522.2 million per year, according to estimates of the
General Accouting Office released on April 7, 2000.





Hi !

> I'm trying to run some SQL in Oracle that returns a single value...
>
> $sql_getID = "SELECT max(CUSTID_NUM) from cfull2.tbl_dl_customers";
>
> how the hell do I get that number into a variable?
>
> I've tried a dozen different things, but the documentation is so sparse
and
> it's all about getting rows of data...

Do this :

$Requete = "SELECT max(CUSTID_NUM) MAX_ID from cfull2.tbl_dl_customers";
OCIDefineByName($Requete, "MAX_ID", &$Max_Id);
OCIExecute($Requete, OCI_DEFAULT);
while (OCIFetch($Requete))
{
  echo $Max_Id;
}

the While is not necessary here cause your query send only one row...

if (OCIFetch($Requete))
{
  echo Max_Id;
}

is better !

JCLB Soft
Jean-Christophe Le Brun
[EMAIL PROTECTED]
http://www.multimania.com/jclb





------- Start of forwarded message -------
 
Subject: RE: [PHP-WIN] Error in a remote computer with IIS and windows 200 0
To: [EMAIL PROTECTED]
From: Gaspar ARias <[EMAIL PROTECTED]>
Date: 30 Jan 2001 13:44:26 PST

Well I have configured IIS with the UNC \\computer_name\share , but when I test PHP 
from command line type php C:\prueba.php it display the "hello World" but when I type 
php \\computer_neme\share\prueba.pl, nothing appear, does somebody where I can 
configure PHP to resolve this problem, I did the test from the same computer and 
others computers anothers programs like perl don't have problems.

Regards 
gaspar
On Mon, 29 January 2001, Bikes wrote:

> 
> That is the actual error I get whenever I do not point my script to the
> correct location, or when my script is not under the home directory of my
> webserver.
> To make sure you are in the correct home directory, save a simple "Hello
> world" in the same folder where you saved the php file, give it the
> extension .html, if it runs, them you are in the correct home directory.
> Also, make sure the URL you are pointing to is correct. Eg.
> http://localhost/index.html might be stored physically in c:\program
> files\Apache\htdocs\index.html
> 
> Get it?
> 
> Bikes
> 
> -------------
> Knowledge is Limited, Imagination encompasses it all
> -------------
> 
> 
> 
> 
> -----Original Message-----
> From: Ryan Grove
> To: [EMAIL PROTECTED]
> Sent: 1/28/01 2:57 AM
> Subject: Re: [PHP-WIN] Error in a remote computer with IIS and windows 2000
> 
> This is the error that the PHP CGI module returns under IIS when it
> can't find the page you requested. Make sure the page you're trying to
> access actually exists at the location you're requesting it from.
> 
> Of course, it could be that PHP doesn't handle remote scripts
> properly...
> 
> -- 
> Ryan Grove
> [EMAIL PROTECTED]
> http://wonko.com/
> ---------------------------------------------------------------------
> If we weren't meant to eat animals, then why are they made of meat?
> 
> 
> [Gaspar]
> > I'm configuring a webserver with IIS 5.0 and PHP 4.0 and when I did
> > test with a local disk I don't have problems but when I try to
> > execute remote scripts this send me a error the error is "CGI Error
> > The specified CGI application misbehaved by not returning a complete
> > set of HTTP headers. The headers it did return are:" and I don't
> > found nothing in manuals
> 
> > could someone help me?
> 
> 
> 
> -- 
> 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]


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
                     
------- End of forwarded message -------


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com




NECESITO saber si tienen alguna referencia con un error cgi que me ocurre al utilizar 
NT-IIS-PHP4.0
especificamente:
"cgi error 
the specified CGI application misbehaved by not returning a complete set of HTTP 
headers.the headers it did return 
are:

este error ocurre en forma aleatoria el sitio se encuentra bien como por 
aproximadamente 5 horas ocurre y tenemos que reiniciar la maquina para que se vuelva a 
subir el servicio iis o si no no sube con win sock error el puerto ya esta ocupado
una forma que encontramos fue cambiando la password de IUSR_xxx y funciono subio 
nuevamente el sitio pero persiste el problema
si me pudieran ayudar se los agradeceria
atte 
Paolo Saxton




It appears to me that PHP.EXE keeps General Protection Faulting rather than
reporting the error message to me. Things such as doing
str_repeat("blah", -123) do GPF occasionally, rather than report a txt msg.
Do other people have this problem ?

It happens only when I'm working on a rather large project (several 1000
lines of code), which has many included files, I assume that has something
to do with it.

On IIS5, or Apache (v .14) with CGI PHP v4.0.3pl1, on Windows 2000. No
changes have been made to php.ini other than to the sendmail directives :)

Siggy





Hello Siggy,
I get "Warning: Second argument to str_repeat() has to be greater than or equal
to 0 in d:/apache/htdocs/baum/gpf.php on line 11"
(apache 1.3.14, php4.0.4pl1 as apache-mod)
ingo baab

phobo schrieb:

> It appears to me that PHP.EXE keeps General Protection Faulting rather than
> reporting the error message to me. Things such as doing
> str_repeat("blah", -123) do GPF occasionally, rather than report a txt msg.
> Do other people have this problem ?
>
> It happens only when I'm working on a rather large project (several 1000
> lines of code), which has many included files, I assume that has something
> to do with it.
>
> On IIS5, or Apache (v .14) with CGI PHP v4.0.3pl1, on Windows 2000. No
> changes have been made to php.ini other than to the sendmail directives :)
>
> Siggy
>
> --
> 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've already installed PHP 4.0.4 on my PWS 4.0
But when I ran my homepage (default.php) on IE 4.0, it said "A device
attached to the system is not functioning"
Anybody know how to fix it ?

Trims
Ary 
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 




Rename your "hosts.sam" to "hosts"

Easy

Bikes
---------------------------------------------------------------------
The Ultimate measure of a man is not where he stands in moments of comfort,
but where he stands in moments of challenges and controversy.
----------------------------------------------------------------------




-----Original Message-----
From: ATU
To: [EMAIL PROTECTED]
Sent: 1/29/01 9:54 AM
Subject: [PHP-WIN] A question

   I am now learning PHP,I have already installed it,and have modified 
the 'httped.conf'in Apache.But when I run 'apache.exe',it didn't work.I
checked it in Ms-dos,it said:
  'APACHE.EXE:cannot determine local host name.
   Use the SeverName directive to set it manually.'

    I think i shouldn't do some local area network setup, and I have 
 checked the directory: 'c:\windows\hosts.sam' ,it was all 
 right.'localhost 127.0.0.1',<--is that right? Do I have to install 
 'Dcom95.exe'?
So I need some help.Can you help me? Thank you very much!




       A PC fan from Shanghai China.
            ATU
            [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]




Hi,

  does anybody know how to start file downloading after page is
  displayed. File's location is out of web server files area.
  I'm interested to know for win32 and linux.
  
  php 4.0.3

TIA,
-- 
Andris
mailto:[EMAIL PROTECTED]




Reply via email to