php-windows Digest 2 Feb 2001 22:06:45 -0000 Issue 425

Topics (messages 5331 through 5354):

Re: FORMATTING HTML IN AND OUT OF MYSQL
        5331 by: phobo
        5336 by: Tom Mathews

Text Area
        5332 by: Mangiola Nunzio         Datavia
        5333 by: Yoann Chevalier

How to buid PHP4
        5334 by: Nobuhide Tsuda
        5347 by: Yoann Chevalier
        5351 by: Ingo Baab

Tab Seperated Data
        5335 by: Ben Cairns
        5338 by: Tom Mathews
        5341 by: Keith Stevenson

About each .dll
        5337 by: Antonio Lopez

Re: passing arrays of objects
        5339 by: Tom Mathews

include woes
        5340 by: Matt Williams

Problem with flush() on win machine
        5342 by: Jonat Brander
        5349 by: Toby Miller

For My Information
        5343 by: Dan Malcolm
        5344 by: Tom Mathews
        5345 by: Dan Malcolm

Re: PHP vs. JSP ?
        5346 by: Julian Easterling

forking processes
        5348 by: Jason Hoover

Setting up a text file database
        5350 by: Honey Gastauer
        5354 by: phobo

PHP and mail server
        5352 by: Francois Allard

Reading CSV data into a database
        5353 by: Ben Cairns

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]


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


see http://www.php.net/manual/en/function.nl2br.php

siggy


----- Original Message -----
From: "Bikes" <[EMAIL PROTECTED]>
To: "'Robert Trembath '" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, February 02, 2001 7:38 PM
Subject: [PHP-WIN] FORMATTING HTML IN AND OUT OF MYSQL


> I have a little problem.
>
> I need to allow my clients to update the news on their website via a form.
>
> The form is supposed to allow them input Latest news etc. and then it is
> written into a database, and taken out on the other end by then index
page.
>
> The problem now, is that I when I put the text into the database, it is no
> more formatted when I am pulling the info out of the database. All the
> paragraphs, and line breaks are lost, and the whole text is lumped
together.
> I need to be able to write the HTML of what the user typed into the
database
> so I can "echo" out the info, representing <BR> with line breaks etc.
>
> Also, in the event that I do not use a database, is it possible to use
files
> to achieve the same results? Eg "include files"?
>
>
>
> Thanks
>
> Bikes da Bikerider
>
> -------
> Riding into the next century
> -------
>





.. or www.mysql.com/downloads/contributions - there's a whole class in there to
handle HTML with MySQL

phobo wrote:

> see http://www.php.net/manual/en/function.nl2br.php
>
> siggy
>
> ----- Original Message -----
> From: "Bikes" <[EMAIL PROTECTED]>
> To: "'Robert Trembath '" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, February 02, 2001 7:38 PM
> Subject: [PHP-WIN] FORMATTING HTML IN AND OUT OF MYSQL
>
> > I have a little problem.
> >
> > I need to allow my clients to update the news on their website via a form.
> >
> > The form is supposed to allow them input Latest news etc. and then it is
> > written into a database, and taken out on the other end by then index
> page.
> >
> > The problem now, is that I when I put the text into the database, it is no
> > more formatted when I am pulling the info out of the database. All the
> > paragraphs, and line breaks are lost, and the whole text is lumped
> together.
> > I need to be able to write the HTML of what the user typed into the
> database
> > so I can "echo" out the info, representing <BR> with line breaks etc.
> >
> > Also, in the event that I do not use a database, is it possible to use
> files
> > to achieve the same results? Eg "include files"?
> >
> >
> >
> > Thanks
> >
> > Bikes da Bikerider
> >
> > -------
> > Riding into the next century
> > -------
> >
>
> --
> 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'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?




Try this :
<textarea name="notes" rows="6" cols="30"></textarea>

Yoann.

----- Original Message ----- 
From: Mangiola Nunzio Datavia <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 29, 2001 11:08 AM
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]
> 
> 





Hi all,


   I'm a Japanese Developer and would like to build PHP 4.0.4
on Visual C++ 6.0 on Windows 2000.
I thought the document to do it was on 
www.php.net/version4/win32build.php, but I can't get the document
from the URL now.

So, could anyone tell me where the document is.



regards,
N.Tsuda
http://i.am/tsuda/
http://www.vivi-vine.org/
http://vivi.dyndns.org/




I found this file :
http://www.php.net/extra/win32build.zip
at this adress :
http://www.php.net/FAQ.php#3
I hope it can help you

Yoann.


----- Original Message ----- 
From: Nobuhide Tsuda <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 02, 2001 10:11 AM
Subject: [PHP-WIN] How to buid PHP4


> Hi all,
> 
> 
>    I'm a Japanese Developer and would like to build PHP 4.0.4
> on Visual C++ 6.0 on Windows 2000.
> I thought the document to do it was on 
> www.php.net/version4/win32build.php, but I can't get the document
> from the URL now.
> 
> So, could anyone tell me where the document is.
> 
> 
> 
> regards,
> N.Tsuda
> http://i.am/tsuda/
> http://www.vivi-vine.org/
> http://vivi.dyndns.org/
> 
> -- 
> 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]
> 
> 





http://www.mm4.de/php4win/article.php3?id=2&language=en
ingo baab

Yoann Chevalier schrieb:

> I found this file :
> http://www.php.net/extra/win32build.zip
> at this adress :
> http://www.php.net/FAQ.php#3
> I hope it can help you
>
> Yoann.
>
> ----- Original Message -----
> From: Nobuhide Tsuda <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, February 02, 2001 10:11 AM
> Subject: [PHP-WIN] How to buid PHP4
>
> > Hi all,
> >
> >
> >    I'm a Japanese Developer and would like to build PHP 4.0.4
> > on Visual C++ 6.0 on Windows 2000.
> > I thought the document to do it was on
> > www.php.net/version4/win32build.php, but I can't get the document
> > from the URL now.
> >
> > So, could anyone tell me where the document is.
> >
> >
> >
> > regards,
> > N.Tsuda
> > http://i.am/tsuda/
> > http://www.vivi-vine.org/
> > http://vivi.dyndns.org/
> >
> > --
> > 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 have a file where the data is Tab Seperated (instead of CSV) For example:

data    data    data    data

on so on....

What I need to do is to read this file, parse it, and put each field into a 
unique varible, so obviosly, I must be able to rename the variable that it 
goes into.

Does that make sense?


-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com

"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK......"





Can't remember the syntax off hand, but if you look under the file handling
stuff in the manual, you will see that there is a function which allows you to
put a tab delimited file into an array. From there you can do what you want
with each of the elements.

Ben Cairns wrote:

> I have a file where the data is Tab Seperated (instead of CSV) For example:
>
> data    data    data    data
>
> on so on....
>
> What I need to do is to read this file, parse it, and put each field into a
> unique varible, so obviosly, I must be able to rename the variable that it
> goes into.
>
> Does that make sense?
>
> -- Ben Cairns - Head Of Technical Operations
> intasept.COM
> Tel: 01332 365333
> Fax: 01332 346010
> E-Mail: [EMAIL PROTECTED]
> Web: http://www.intasept.com
>
> "MAKING sense of
> the INFORMATION
> TECHNOLOGY age
> @ WORK......"
>
> --
> 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]




 

isnt it something like
use explode("\t", $whatever) to put all the tab delimited fields in an 
array called $whatever. 

-----Original Message-----
From: Tom Mathews [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 02, 2001 10:28 AM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Tab Seperated Data


Can't remember the syntax off hand, but if you look under the file handling
stuff in the manual, you will see that there is a function which allows you
to
put a tab delimited file into an array. From there you can do what you want
with each of the elements.

Ben Cairns wrote:

> I have a file where the data is Tab Seperated (instead of CSV) For
example:
>
> data    data    data    data
>
> on so on....
>
> What I need to do is to read this file, parse it, and put each field into
a
> unique varible, so obviosly, I must be able to rename the variable that it
> goes into.
>
> Does that make sense?
>
> -- Ben Cairns - Head Of Technical Operations
> intasept.COM
> Tel: 01332 365333
> Fax: 01332 346010
> E-Mail: [EMAIL PROTECTED]
> Web: http://www.intasept.com
>
> "MAKING sense of
> the INFORMATION
> TECHNOLOGY age
> @ WORK......"
>
> --
> 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 have downloaded the "php4_0_4-dev-win32-20001123.zip" file.


But, how can I know what are the purposes or utilities of each .dll ???

Is there any index that gives me this information ???


Thank you.


===================================================
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





Hmm - this old chestnut again.

Be very careful when passing arrays, sometimes it seems to work swimmingly
well, othertimes not so well!
There was a lot of discussion about this about a month ago, with people
trying the serialise / urlencode techniques and then running into GET
problems over the length and such like (I think that Navigator imposes its
own restrictions here). Then when you try to POST instead, and pass the
array through as a hidden for instance you will find that it may not
unserialise properly.....
I know its complete overkill, but the only truly reliable ways that I have
found have been to use the array as a global (make sure globals are set!) or
to put it into a temporary db table and then pull it out again from the page
that needs it!

Tom

Doug Brewer wrote:

> try
> $foo  //array with serialized objects in it
> $foo = rawurlencode($foo);
> $url = "something/something/foobar.php?foo=$foo";
>
> and on the next page
>
> $foo = rawurldecode($foo);
> $foo = unserialize($foo);
>
> disclaimer: I didn't run thru these to see if it works
>
> although it might be better to pass it as a post arg--isn't there a
> length limitation on stuff passed via GET (?)
>
> DB
>
> | -----Original Message-----
> | From: Conover, Ryan [mailto:[EMAIL PROTECTED]]
> | Sent: Thursday, February 01, 2001 1:22 PM
> | To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> | Subject: [PHP-WIN] passing arrays of objects
> |
> |
> | I was wondering if I can pass an array that has serialized
> | objects to next
> | page via url encoding
> |
> | $foo  //array with serialized objects in it
> |
> | with the following encoding
> |
> | something/something/foobar.php?foo=echo($foo)
> |
> | and be able too unserialize $foo on the next page(foovar.php)
> |
> | 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]
> |
>
> --
> 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 All

For some reason wer'e trying to set up php4 running on IIS3.

Install and configuration went ok until I try to include files.

If I call an include in index.php, if I go to the directory ie. /temp/ it
will include the file. But if I call the file directly. ie /temp/index.php I
get a CGI error. and no error log (typical)

I've tried setting include_path in php.ini to . ./ with quotes and without

I've tried using include"./include.php"; include "include.php" with no
success

Can anyone shed some light on this or do I have bin it and install Apache??

TIA

M@

Matt Williams
Web Development Manager
Yewlands School
[EMAIL PROTECTED]
------------------------





Hi,

i have wrote a script that read a textfile and output the stuff via
flush() on the browser (is for a chat).

is works on linux php4, but on php4 for windows not correct. flush()
are not work. can anyone help me?

-------------------------------- code here.... -----------------------

<?
 # Initialize
 $trexxRulez   = true;
 $oldMaxLines  = 0;
 $maxLines     = 0;
 $firstLoop    = true;

 # modify these values
 $fileLocation = "jobra.txt";       /* file location */
 $howMany      = 5;                 /* how many messages on first loop */
 $autoScroll   = false;             /* set true/false to enable/disable
Auto-Scroll */
?>

<html>
<head>
<title>:: jobra.com : chat / content ::</title>

<? if( $autoScroll ) { ?>
 <script language="javascript" type="text/javascript">
  <!--
   
  function scrollDown() { 
    scrollBy(0,15);
        setTimeout( "scrollDown()", 20 );
  }
  //-->
 </script>
<? } ?>
</head>

<body bgcolor="#211818" text="#808080" link="#00FF00" vlink="#008000"
alink="#00FF00" topmargin="0" leftmargin="0" marginwith="0"
marginheight="0" background="/designimages/backgrounds/content_bg.gif">

<?
# Activate Autoscroll?
if( $autoScroll )
 print "<script> scrollDown(); </script>\n";

# Loop 'til dooms-day
while( $trexxRulez ) {

    # Read file & count of lines
    $chatData = file( $fileLocation );
    $maxLines = count( $chatData );

        # ERROR-Check
        if( !is_array( $chatData ) ) {
          print( "couldn't open required file. Abort... " );
          exit();
        }
        
        # display only $howMany Messages on first Loop
    if( $firstLoop ) {
          $firstLoop   = false;
          if( ( $oldMaxLines = $maxLines - $howMany ) < 0 ) {
            $oldMaxLines = 0;
          }
        }
                
        # if there are new lines
        if( $maxLines > $oldMaxLines ) {

        $lineCount = 0;
                while( list( $key, $chatOutput ) = each( $chatData ) ) {
          
                  # begin output if there is a new line
                  if( $lineCount > $oldMaxLines ) {          
                          $chatOutput = str_replace( "Server:", " ", $chatOutput );
                          $chatOutput = trim( str_replace( "Client:", '<b
style="color:#ffffff;">Jobra um '.date("H:i:s")." Uhr:</b><br>",
$chatOutput ) );
                          print "$chatOutput<br><br>\n";
                      flush();
          }
                  $lineCount++;
                }
        $oldMaxLines = $maxLines;
    }
        sleep(2);
}
?>

-------------------------------- code here.... -----------------------

what are the problem? have you a idea? is possibel, that must some stuff
add in the php.ini?

thnx & bye from switzerland

-- 
Jonat Brander
mailto:[EMAIL PROTECTED]




Jonat,

I'm not sure what the flush problem could be, but you have an endless while
loop in your code. $trexxRulez never exits out. This shouldn't work in Linux
or Windows. Can you give us a URL where this is actually working?

Toby

----- Original Message -----
From: "Jonat Brander" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 02, 2001 6:16 AM
Subject: [PHP-WIN] Problem with flush() on win machine


> Hi,
>
> i have wrote a script that read a textfile and output the stuff via
> flush() on the browser (is for a chat).
>
> is works on linux php4, but on php4 for windows not correct. flush()
> are not work. can anyone help me?
>
> -------------------------------- code here.... -----------------------
>
> <?
>  # Initialize
>  $trexxRulez   = true;
>  $oldMaxLines  = 0;
>  $maxLines     = 0;
>  $firstLoop    = true;
>
>  # modify these values
>  $fileLocation = "jobra.txt";       /* file location */
>  $howMany      = 5;        /* how many messages on first loop */
>  $autoScroll   = false;     /* set true/false to enable/disable
> Auto-Scroll */
> ?>
>
> <html>
> <head>
> <title>:: jobra.com : chat / content ::</title>
>
> <? if( $autoScroll ) { ?>
>  <script language="javascript" type="text/javascript">
>   <!--
>
>   function scrollDown() {
>     scrollBy(0,15);
> setTimeout( "scrollDown()", 20 );
>   }
>   //-->
>  </script>
> <? } ?>
> </head>
>
> <body bgcolor="#211818" text="#808080" link="#00FF00" vlink="#008000"
> alink="#00FF00" topmargin="0" leftmargin="0" marginwith="0"
> marginheight="0" background="/designimages/backgrounds/content_bg.gif">
>
> <?
> # Activate Autoscroll?
> if( $autoScroll )
>  print "<script> scrollDown(); </script>\n";
>
> # Loop 'til dooms-day
> while( $trexxRulez ) {
>
>     # Read file & count of lines
>     $chatData = file( $fileLocation );
>     $maxLines = count( $chatData );
>
> # ERROR-Check
> if( !is_array( $chatData ) ) {
>   print( "couldn't open required file. Abort... " );
>   exit();
> }
>
> # display only $howMany Messages on first Loop
>     if( $firstLoop ) {
>   $firstLoop   = false;
>   if( ( $oldMaxLines = $maxLines - $howMany ) < 0 ) {
>     $oldMaxLines = 0;
>   }
> }
>
> # if there are new lines
> if( $maxLines > $oldMaxLines ) {
>
>         $lineCount = 0;
> while( list( $key, $chatOutput ) = each( $chatData ) ) {
>
>   # begin output if there is a new line
>   if( $lineCount > $oldMaxLines ) {
>   $chatOutput = str_replace( "Server:", " ", $chatOutput );
>   $chatOutput = trim( str_replace( "Client:", '<b
> style="color:#ffffff;">Jobra um '.date("H:i:s")." Uhr:</b><br>",
> $chatOutput ) );
>   print "$chatOutput<br><br>\n";
>          flush();
>           }
>   $lineCount++;
> }
>         $oldMaxLines = $maxLines;
>     }
> sleep(2);
> }
> ?>
>
> -------------------------------- code here.... -----------------------
>
> what are the problem? have you a idea? is possibel, that must some stuff
> add in the php.ini?
>
> thnx & bye from switzerland
>
> --
> Jonat Brander
> mailto:[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 see in the posts, that a lot of people are using Apache on NT instead of the built 
in IIS.  Is there a reason?  I have PHP up and running with dBase tables converted to 
MySQL and ODBC connected to Access 2000, on an NT 4 box with IIS 4 and it runs very 
well.  Performance is great.  My only problem is automating the conversion to update 
tables in MySQL.  I would like like to convert the Access 2000 tables also but the 
converters either don't seem to work with Access 2k, or not much at all, or are not 
such that a timed batch file can be generated using them.  I just looked at what I've 
written and it's a little jumbled.  Mega-Sigh.  Let me summarize.

  1.. Why Apache on NT 4.0?
  2.. Is there a good way to automatically convert Access 2000 to MySQL to keep MySQL 
data up to date?  The data needs to be updated several times a week.  No I can't just 
switch everything over and not have to convert again.
  3.. A way to do #2 for dBase would be good too, but less critical because the data 
only gets updated every couple months.
Thanks in advance.

Dan Malcolm
[EMAIL PROTECTED]
[EMAIL PROTECTED]





1) I think that people use Apache as old versions of IIS were crap. In addition, it is 
about the widest used server out there in the commercial world (Linux running Apache 
with PHP3 is I believe the most common config at the moment) so if you're developing 
something to put on such a site, it's more likely to work if you develop with 
something close to that setup (note probs with case sensititivity and so on on with 
Apache that won't necesarily be exposed on IIS)

2) Check out the MySQL (www.mysql.com) site and look to download myaccess2000_1_4.zip, 
this is an Access plug-in that someone has kindly written to convert data and 
structure from Access 2000 MDB to MySQL (I've not tried them, but I think it also 
allows dbase conversion and a few others).

Tom

Dan Malcolm wrote:

> I see in the posts, that a lot of people are using Apache on NT instead of the built 
>in IIS.  Is there a reason?  I have PHP up and running with dBase tables converted to 
>MySQL and ODBC connected to Access 2000, on an NT 4 box with IIS 4 and it runs very 
>well.  Performance is great.  My only problem is automating the conversion to update 
>tables in MySQL.  I would like like to convert the Access 2000 tables also but the 
>converters either don't seem to work with Access 2k, or not much at all, or are not 
>such that a timed batch file can be generated using them.  I just looked at what I've 
>written and it's a little jumbled.  Mega-Sigh.  Let me summarize.
>
>   1.. Why Apache on NT 4.0?
>   2.. Is there a good way to automatically convert Access 2000 to MySQL to keep 
>MySQL data up to date?  The data needs to be updated several times a week.  No I 
>can't just switch everything over and not have to convert again.
>   3.. A way to do #2 for dBase would be good too, but less critical because the data 
>only gets updated every couple months.
> Thanks in advance.
>
> Dan Malcolm
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]




Tom,
Thanks.  I believe myaccess2000_1_4 is one of the ones I've tried.  I'll try
again to make sure I didn't miss anything. I used dbtools to do the dBase
conversion.


Agree that the older versions of IIS were crap, but newer one (version 3 and
4) seems to be pretty good.

Dan
----- Original Message -----
From: "Tom Mathews" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, February 02, 2001 6:09 AM
Subject: Re: [PHP-WIN] For My Information


> 1) I think that people use Apache as old versions of IIS were crap. In
addition, it is about the widest used server out there in the commercial
world (Linux running Apache with PHP3 is I believe the most common config at
the moment) so if you're developing something to put on such a site, it's
more likely to work if you develop with something close to that setup (note
probs with case sensititivity and so on on with Apache that won't necesarily
be exposed on IIS)
>
> 2) Check out the MySQL (www.mysql.com) site and look to download
myaccess2000_1_4.zip, this is an Access plug-in that someone has kindly
written to convert data and structure from Access 2000 MDB to MySQL (I've
not tried them, but I think it also allows dbase conversion and a few
others).
>
> Tom
>
> Dan Malcolm wrote:
>
> > I see in the posts, that a lot of people are using Apache on NT instead
of the built in IIS.  Is there a reason?  I have PHP up and running with
dBase tables converted to MySQL and ODBC connected to Access 2000, on an NT
4 box with IIS 4 and it runs very well.  Performance is great.  My only
problem is automating the conversion to update tables in MySQL.  I would
like like to convert the Access 2000 tables also but the converters either
don't seem to work with Access 2k, or not much at all, or are not such that
a timed batch file can be generated using them.  I just looked at what I've
written and it's a little jumbled.  Mega-Sigh.  Let me summarize.
> >
> >   1.. Why Apache on NT 4.0?
> >   2.. Is there a good way to automatically convert Access 2000 to MySQL
to keep MySQL data up to date?  The data needs to be updated several times a
week.  No I can't just switch everything over and not have to convert again.
> >   3.. A way to do #2 for dBase would be good too, but less critical
because the data only gets updated every couple months.
> > Thanks in advance.
> >
> > Dan Malcolm
> > [EMAIL PROTECTED]
> > [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]





Actually, you are missing one tier......
In a Three-Tier application, you have the browser (which is the Presentation
Tier), the Web Server (which is the Business and Logic Tier) and the
Database server (which is the Data Tier)

I think that what you are trying to say is that JSP in addition to
Three-Tier applications, can also do n-tier applications. In n-tier
application, you separate the Business Rules and the Logic tiers. In JSP,
you can have Enterprise Java Beans separate from the "script" the make up
the JSP page. I don't know of any equivalent in PHP unless PHP has the
ability to instantiate COM components. Although you might consider writing
you own PHP modules as being a n-tier application.

As is said in every single discussion when you ask a question like this is
that you must use the language which is more comfortable to you. If you have
never used either language, you might want to look at more than just the
language.  Questions like: How much does the server software cost me?, What
kind of hardware must it run on?, What kind of User Support Groups does it
have?, etc.

And of course, It ALWAYS depends on what kind of project and what it's
deadline is.

......................................................
Julian Easterling                 Senior Web Developer
The CDM Group



-----Original Message-----
From: Tom Mathews [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 9:09 AM
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] RE: PHP vs JSP ?


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]





I have a form that launches an e-mail message to numerous people as
determined by the user filling out the form (user picks people from select
lists...e-mail addresses are kept in database,etc..).

When the form is submitted the user is forced to wait until the script that
launches the e-mails finishes it's job, before he/she is redirected to
another page in the application.

Question:  Is there a way to launch this e-mail script as a separate
process, so the user isn't forced to wait through this script before being
redirected.?  I know in Java you can do this, but is is possible in
Interpreted languages? 


Jason Hoover
Web Application Programmer

Entolo
2299 Territorial Road
St. Paul, MN  55114
Phone:  763.847.8022
Fax:  763.642.1600
[EMAIL PROTECTED]
www.entolo.com





I am working on a multiple page/multiple form web survey (still). It is set
up on a host server that does not allow any type of SQL database.  So, I
want to send my results to a text file instead.  There is no need to "query"
the database (as I understand query).  I just want to collect data and use
the submitted data to determine the content of the next form and the next.
It is also necessary to display data from form1 on form2 and form3.  Does
this require a query?  Can I use a text database to do this?  If so where
can I find information on how to do this?

I have been unable to find any reference on the web to setting up a text
database or using php with a text database. Maybe I haven't looked in the
right place.

I may have gotten the cart before the horse when building this web survey.
My web prescense provider (Mindspring turned Eathlink) has been giving me
pits and pieces of information at a time which I have used in the order it
was feed to me. First, they don't support asp, but they do support php for
databasing (change direction), but they don't support php4 just php2 and 3
(change direction), though they support databasing they don't support SQL
databases (change direction).  I feel like I'm searching for the corner in a
round room.

Can anyone direct me?  

BTW: I'm have no formal training in scripting/programming. I am learning as
I go--driven by necessity. Please provide any information in a "for
Dummies"--no wait more like a "for idiots" format.





Don't support SQL databases? What *do* they support?

>I just want to collect data and use
>the submitted data to determine the content of the next form

If thats all you want to do; you don't even need a database or a text file
at all, eg:


--Page1.php---
Name [         ]
Email [         ]
etc .....
<<button to go to next page, <FORM ACTION=page2.php>>
------------


--Page2.php--
All the things they just sent are now variables. Eg, if the Email text input
was written like: <INPUT TYPE=TEXT NAME=EmailAddr> then you can use
$EmailAddr as a variable now.
-------------

And finally, when the user gets to page5, yuo can have those results EMAILED
to you (or to them!) or something ... see www.php.net/mail


Siggy

----- Original Message -----
From: "Honey Gastauer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 03, 2001 6:46 AM
Subject: [PHP-WIN] Setting up a text file database


> I am working on a multiple page/multiple form web survey (still). It is
set
> up on a host server that does not allow any type of SQL database.  So, I
> want to send my results to a text file instead.  There is no need to
"query"
> the database (as I understand query).  I just want to collect data and use
> the submitted data to determine the content of the next form and the next.
> It is also necessary to display data from form1 on form2 and form3.  Does
> this require a query?  Can I use a text database to do this?  If so where
> can I find information on how to do this?
>
> I have been unable to find any reference on the web to setting up a text
> database or using php with a text database. Maybe I haven't looked in the
> right place.
>
> I may have gotten the cart before the horse when building this web survey.
> My web prescense provider (Mindspring turned Eathlink) has been giving me
> pits and pieces of information at a time which I have used in the order it
> was feed to me. First, they don't support asp, but they do support php for
> databasing (change direction), but they don't support php4 just php2 and 3
> (change direction), though they support databasing they don't support SQL
> databases (change direction).  I feel like I'm searching for the corner in
a
> round room.
>
> Can anyone direct me?
>
> BTW: I'm have no formal training in scripting/programming. I am learning
as
> I go--driven by necessity. Please provide any information in a "for
> Dummies"--no wait more like a "for idiots" format.
>
>
> --
> 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]
>
>





Good morning

I am wandering, in PHP 4 is there any way I can setup PHP to use a different
smtp server or I have to use absolutely the linux one (sendmail, qmail).
I'm on a linux server and I would like to tell PHP to use another smtp
server.

Thanks

Franck





I have this script:
<?

$row = 1;
$fp = fopen ("test.txt","r");
while ($data = fgetcsv ($fp, 1000, "\t")) {
    $num = count ($data);
    $row++;
    for ($c=0; $c<$num; $c++) {
        print $data[$c] . "<br>";
    }
}
fclose ($fp);
     
?>
It reads a csv file (actually its tab seperated) into an array called $data.

When I call this in my browser, this is fine. But what I need to do is to 
put this information into a MySQL database...

The file contains these fields:
region
event_type
event_date
title
info
times
venue
price
event_id (this is auto_incrementing)

How do I read this file into the database?

Any help appreciated, as I have RTFM but I still no idea......




Reply via email to