Updates from announcement.

This commit is contained in:
gleblanc 2000-05-15 15:22:06 +00:00
parent 12dee7bdf3
commit ff5c1c0d5e
3 changed files with 270 additions and 135 deletions

View File

@ -1,4 +1,3 @@
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
]>
<article>
@ -603,16 +602,21 @@ of Y2K issues.
<title id="docbook-version-of-the-faq">
How Is the DocBook Version of the FAQ Produced?</title>
<para>
At present, the Linux FAQ is being translated into the OASIS DocBook
SGML DTD. HTML output is produced using James Clark's
<application>Jade</application> DSSSL parser with modified versions of
Norman Walsh's modular style sheets. The text version is formatted
with lynx, and split in to the segments by GNU text utilities, and are
posted to Usenet . The DocBook Tools are being developed by Cygnus
Software, and are located at
At present, the Linux FAQ uses the OASIS DocBook SGML DTD. HTML
output is produced using James Clark's <application>Jade</application>
DSSSL parser with modified versions of Norman Walsh's modular style
sheets. Question numbers are generated with
<application>Perl</application>. The text version is formatted with
lynx, and split in to segments using the standard GNU text utilities,
and are posted to Usenet. The DocBook Tools are being developed by
Cygnus Software. They are located at
<ulink url="ftp://sourceware.cygnus.com/">
<literal>ftp://sourceware.cygnus.com/</literal></ulink>.
</para>
<para>
If you are interested in learning more about this process, which
is still under development, please contact the FAQ maintainer.
</para>
</sect2>
</sect1>
@ -7080,3 +7084,7 @@ as educators and learners.
</sect1>
</article>
--
To UNSUBSCRIBE, email to ldp-submit-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

View File

@ -43,7 +43,7 @@ PHP HOW-TO
" name="
alavoor@yahoo.com
">
<date>v4.0, 27 April 2000
<date>v5.0, 14 May 2000
<abstract>
This document tells you howto develop PHP programs and also to migrate all the
Windows 95 GUI applications to powerful PHP + HTML + DHTML + XML + Java applets + Javascript.
@ -77,7 +77,7 @@ the same way you normally create regular HTML pages.
PHP was kept the <bf>"top secret and strictly confidential"</bf>
computer language by many companies in the world, but now had become
the most well-known and most widely used programming language for
the most well-known and most widely used scripting language for
web, internet, e-commerce and business-to-business projects.
Even today many competing companies keep PHP language as a
highly confidential matter not disclosing to outsiders (competitors).
@ -96,7 +96,7 @@ It has object oriented features and takes the best features from Java,
C++, PERL and "C" langauges. PHP language is a <it>marriage</it> of
best features from Java, C++, PERL and C.
PHP is the <bf>real gem</bf> of all the programming/scripting languges
PHP is the <bf>real gem</bf> of all the scripting/programming languges
and will soon become the "MECCA" for programmers world-wide!!
PHP has a huge user base and a large
developer base as it runs on both window95/NT and all flavors of unixes.
@ -132,6 +132,143 @@ for your e-commerce projects.
-->
<sect1> PHP Installation<label id = "PHP Installation">
<p>
See the installation guide and instructions at
PHP main site <url url="http://www.php.net"> or INSTALL file
in the downloaded package itself.
<!--
*******************************************
************ End of Section ***************
*******************************************
<chapt> PHP Tutorial <label id = "PHP Tutorial">
-->
<sect> PHP Tutorial <label id = "PHP Tutorial">
<p>
In this tutorial we assume that your server has support for PHP activated
and that all files ending in .php3 are handled by PHP.
Your first PHP-enabled page:
Create a file named hello.php3 and in it put the following lines:
<code>
<html>< head>< title >PHP Test< /title >< /head >
< body>
<?php echo "Hello World<P>"; ?>
< /body>< /html>
</code>
Note that this is not like a CGI script.
Think of it as a normal HTML file which happens to have a set of
special tags available to you.
If you tried this example and it didn't output anything, chances are that
the server you are on does not have PHP enabled. Ask your administrator to
enable it for you.
The point of the example is to show the special PHP tag format. In this
example we used &lt ?php to indicate the start of a PHP tag. Then we put the
PHP statement and left PHP mode by adding the closing tag, ? &gt . You may jump
in and out of PHP mode in an HTML file like this all you want.
We are going to check what sort of
browser the person viewing the page is using. In order to do that we check
the user agent string that the browser sends as part of its request. This
information is stored in a variable. Variables always start with a
dollar-sign in PHP. The variable we are interested in is $HTTP_USER_AGENT.
To display this variable we can simply do:
<code>
<?php echo $HTTP_USER_AGENT; ?>
</code>
For the browser that you are using right now to view this page, this
displays:
Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
There are many other variables that are automatically set by your web
server. You can get a complete list of them by creating a file that looks
like this:
<code>
<?php phpinfo()?>
</code>
Then load up this file in your browser and you will see a page full of
information about PHP along with a list of all the variables available to
you.
You can put multiple PHP statements inside a PHP tag and create little
blocks of code that do more than just a single echo.
<code>
<?php
if(strstr($HTTP_USER_AGENT,"MSIE")) {
echo "You are using Internet Explorer<br>";
}
?>
</code>
We can take this a step further and show how you can jump in and out of PHP
mode even in the middle of a PHP block:
<code>
<?php
if(strstr($HTTP_USER_AGENT,"MSIE"))
{
?>
< center>< b>You are using Internet Explorer< /b>< /center>
<?
}
else
{
?>
< center>< b>You are not using Internet Explorer< /b>< /center>
<?
}
?>
</code>
Instead of using a PHP echo statement to output something, we jumped out of
PHP mode and just sent straight HTML. The important and powerful point to
note here is that the logical flow of the script remain intact. Only one of
the HTML blocks will end up getting sent to the viewer. Running this script
right now results in:
You are using Internet Explorer
Dealing with Forms
One of the most powerful features of PHP is the way it handles HTML forms.
The basic concept that is important to understand is that any form element
in a form will automatically result in a variable with the same name as the
element being created on the target page. This probably sounds confusing, so
here is a simple example. Assume you have a page with a form like this on
it:
<code>
<form action="action.php3" method="POST">
Your name: <input type=text name=name>
You age: <input type=text name=age>
<input type=submit>
< /form>
</code>
There is nothing special about this form. It is a straight HTML form with no
special tags of any kind. When the user fills in this form and hits the
submit button, the action.php3 page is called. In this file you would have
something like this:
<code>
Hi <?php echo $name?>. You are <?php echo $age?> years old.
</code>
Surprise!! The $name and $age variables are automatically set for you by PHP !!
<!--
*******************************************
************ End of Section ***************
*******************************************
<chapt> IDE tools for PHP <label id = "PHP IDE">
-->
<sect> IDE tools for PHP <label id = "PHP IDE">
@ -159,7 +296,7 @@ In near future every HTML editors and XML editor will be supporting PHP
<chapt> ctags for PHP !! <label id = "ptags">
-->
<sect> ctags for PHP !! <label id = "ptags">
<sect> ctags for PHP ! Surprise!!! <label id = "ptags">
<p>
Tags are extremely valuable and are used for navigation of source code inside the
editors like vi, emacs, CRiSP, NEdit etc... If you had
@ -168,8 +305,8 @@ might have used the <bf>ctags</bf> program to create tags.
To see the online manual page, type 'man ctags' at linux/unix bash prompt.
The <bf>ptags</bf> program for PHP is given below, which you can
use to create the tags for PHP source code. Your productivity will
improve <bf>3 to 4 times</bf> if you use <bf>ptags</bf>.
use to create the tags for PHP source code. Your <bf>productivity will
improve 3 to 4 times</bf> if you use <bf>ptags</bf>.
See also Vim color text editor for PHP, C, C++
at <url url="http://metalab.unc.edu/LDP/HOWTO/Vim-HOWTO.html">
@ -410,7 +547,8 @@ a line like
?>
</code>
To output debug values, in your PHP source code files, put
To output debug values, in your PHP source code files, put debug2_() calls
as illustrated below:
<code>
<?php
include ("debug2.inc");
@ -425,12 +563,15 @@ function aa()
</code>
When you run the PHP program the output will be traced in the file called
debug.out.
debug.out giving the filename, linenumber, variable name and it's value.
Use the debug2_() generously in your code. The usage of debug2_() calls
in your program will <bf>NOT</bf> any impact on the final production code and
in your program will <bf>NOT</bf> have any impact on the
final production code and
also has no impact on the performance because they will be filtered out
as described below.
as described below. You can use copy and paste to save time
of typing debug2() calls
or use the 'yank to buffer' feature of Vi editor and paste.
When you are done development and testing and when you are ready to
deploy on the production server, filter out the debug2_ calls from
@ -456,121 +597,51 @@ And now copy the files from production to the deployment area.
<chapt> PHP Tutorial <label id = "PHP Tutorial">
<chapt change> Limitations of PHP
-->
<sect> PHP Tutorial <label id = "PHP Tutorial">
<sect> Limitations of PHP
<p>
In this tutorial we assume that your server has support for PHP activated
and that all files ending in .php3 are handled by PHP.
Everything has limitations or disadvantages and PHP is no exception.
The following are the limitations of PHP (so be <bf>WARNED !!</bf>)
<enum>
<item> PHP is NOT 100 % pure Object Oriented scripting language.
PHP is good if your PHP code size does not exceed 3,00,000 lines.
Maintainence of PHP code greater than 1,00,000 lines becomes more difficult.
<item> PHP will NOT give the performance of "C" or "C++" language. Because
it is scripting language and is interpreted it will be a bit slower than
the optimized "C++" programs. For top performance, you should use "C++" and
fast-CGI with database/webserver
connection pooling and use C++ compiler optimizer "-O3" options.
Zend optimizer in PHP 4 will speed up the performance of PHP to certain extent.
</enum>
Your first PHP-enabled page:
Create a file named hello.php3 and in it put the following lines:
<code>
<html>< head>< title >PHP Test< /title >< /head >
< body>
<?php echo "Hello World<P>"; ?>
< /body>< /html>
</code>
On the other hand, PHP has lot of advantages and it's advantages outweigh it's
limitations -
<enum>
<item> You can very rapidly develop web applications in PHP as compile and link
is eliminated in PHP scripting language.
<item> PHP applications are very stable and do not depend on the browser
technologies unlike Javascript applications which depend on browsers.
PHP will give you the freedom to select any server platform and browser does
not know that the HTML page is generated by PHP!!
<item> PHP has excellent database conectivity to all SQL database servers.
<item> PHP has partial support for Object oriented features
<item> PHP has C++, Perl, Javascript like syntax features and has programs like
'ptags/ctags' to navigate the source code
<item> PHP has Zend optimizer which speeds up the performance
<item> PHP runs on all unixes, linux, Windows 95/NT/2000 and is more
powerful than ASP, JSP and others.
<item> PHP has a very large user base and developer base.
</enum>
Note that this is not like a CGI script.
Think of it as a normal HTML file which happens to have a set of
special tags available to you.
If you tried this example and it didn't output anything, chances are that
the server you are on does not have PHP enabled. Ask your administrator to
enable it for you.
The point of the example is to show the special PHP tag format. In this
example we used &lt ?php to indicate the start of a PHP tag. Then we put the
PHP statement and left PHP mode by adding the closing tag, ? &gt . You may jump
in and out of PHP mode in an HTML file like this all you want.
We are going to check what sort of
browser the person viewing the page is using. In order to do that we check
the user agent string that the browser sends as part of its request. This
information is stored in a variable. Variables always start with a
dollar-sign in PHP. The variable we are interested in is $HTTP_USER_AGENT.
To display this variable we can simply do:
<code>
<?php echo $HTTP_USER_AGENT; ?>
</code>
For the browser that you are using right now to view this page, this
displays:
Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
There are many other variables that are automatically set by your web
server. You can get a complete list of them by creating a file that looks
like this:
<code>
<?php phpinfo()?>
</code>
Then load up this file in your browser and you will see a page full of
information about PHP along with a list of all the variables available to
you.
You can put multiple PHP statements inside a PHP tag and create little
blocks of code that do more than just a single echo.
<code>
<?php
if(strstr($HTTP_USER_AGENT,"MSIE")) {
echo "You are using Internet Explorer<br>";
}
?>
</code>
We can take this a step further and show how you can jump in and out of PHP
mode even in the middle of a PHP block:
<code>
<?php
if(strstr($HTTP_USER_AGENT,"MSIE"))
{
?>
< center>< b>You are using Internet Explorer< /b>< /center>
<?
}
else
{
?>
< center>< b>You are not using Internet Explorer< /b>< /center>
<?
}
?>
</code>
Instead of using a PHP echo statement to output something, we jumped out of
PHP mode and just sent straight HTML. The important and powerful point to
note here is that the logical flow of the script remain intact. Only one of
the HTML blocks will end up getting sent to the viewer. Running this script
right now results in:
You are using Internet Explorer
Dealing with Forms
One of the most powerful features of PHP is the way it handles HTML forms.
The basic concept that is important to understand is that any form element
in a form will automatically result in a variable with the same name as the
element being created on the target page. This probably sounds confusing, so
here is a simple example. Assume you have a page with a form like this on
it:
<code>
<form action="action.php3" method="POST">
Your name: <input type=text name=name>
You age: <input type=text name=age>
<input type=submit>
< /form>
</code>
There is nothing special about this form. It is a straight HTML form with no
special tags of any kind. When the user fills in this form and hits the
submit button, the action.php3 page is called. In this file you would have
something like this:
<code>
Hi <?php echo $name?>. You are <?php echo $age?> years old.
</code>
Surprise!! The $name and $age variables are automatically set for you by PHP !!
<bf>WARNING: </bf> If you want 100% pure Object Oriented scripting language
than you MUST consider <bf>Python</bf>. The 'Python' is a object
oriented scripting
language from ground up. You would be using the Python Web Application server
called 'Zope' which is available at -
<url url="http://www.zope.org">
and python is at
<url url="http://www.python.org">
<!--
*******************************************
************ End of Section ***************

View File

@ -40,7 +40,7 @@ Covers PostgreSQL Version 6.5.3
<author>Al Dev (Alavoor Vasudevan)
<htmlurl url="mailto:alavoor@yahoo.com"
name="alavoor@yahoo.com">
<date>v20.0, 21 April 2000
<date>v21.0, 14 May 2000
<abstract>
This document is a "practical guide" to very quickly setup a SQL Database
engine and
@ -1727,6 +1727,13 @@ it at
-->
<sect> Setting up multi-boxes PostgreSQL with just one monitor
<p>
If you do want to spend money on hardware switches than
you can <bf>use VNC (Virtual Network Computing) Technology</bf> from the telecom
giant AT &amp T. VNC is GPLed and is a free software. Using VNC you can run
PostgreSQL programs on computers without monitors and display on remote boxes with
monitors!! But the boxes must be connected via ethernet Network Interface Cards.
VNC is at <url url="http://www.uk.research.att.com/vnc">
You can stack up multiple CPU-boxes and connect to just one monitor and use
the KVM (Keyboard, Video, Monitor) switch box to select the host.
This saves space and avoids a lot of clutter and also eliminates monitor,
@ -1783,9 +1790,26 @@ Using KVM switch you can control many cpu boxes by just one monitor and one keyb
<chapt>Zope Web-Application-Server for PostgreSQL
-->
<sect>Zope Web-Application-Server for PostgreSQL
<p>
Python is becoming immensely popular "pure" object-oriented scripting language.
Zope is a Web-Application server and provides interfaces to PostgreSQL.
Zope is available at <url url="http://www.zope.org">
Python is at <url url="http://www.python.org">
<!--
*******************************************
************ End of Section ***************
*******************************************
<chapt>Applications and Tools for PostgreSQL
-->
<sect>Applications and Tools for PostgreSQL
<p>
<sect1>PostgreSQL 4GL for web database applications - AppGEN Development System
<p>
AppGEN can be downloaded from
@ -2090,12 +2114,43 @@ automatically keep session data of any size.
-->
<sect1>America On-line AOL Web server for PostgreSQL
<p>
The no-cost commercial webserver, AOLserver version 2.3
supports database connections to PostgreSQL 6.2.1 and higher.
for more info see
The no-cost commercial webserver, AOLserver supports database connections to PostgreSQL
for more information see
<itemize>
<item> AOL Web Server <url url="http://www.aolserver.com">
<item> AOL Web Server home <url url="http://www.aolserver.com">
<item> Introduction to AOLserver by Philip Greenspun
<url url="http://photo.net/wtr/aolserver/introduction-1.html">
</itemize>
AOLserver is a fast, fully multithreaded, Tcl enabled webserver. But
not only that, it is a complete database-backed web development
platform.
With AOLserver you can have multiple pooled connections to PostgreSQL
(and other RBDMSs) that can be shared among different threads. AOLserver
has a Tcl and C APIs that allow you to develop powerful dynamic
websites. All this since 1995. It is licensed under the APL (AOLserver
Public License) or the GPL, thus being totally free software.
The Tcl API is the most useful for web sites. AOLserver has a set of
powerful Tcl calls, such as ns_sendmail (to send e-mail), ns_httpget (to
fetch a URL), ns_schedule (a cron-like feature to schedule procedures to
run at specific times), etc. You can also extend AOLserver's
capabilities very easily with the Tcl API. Each AOLserver virtual server
can have its own "library" of private Tcl scripts that are parsed by
AOLserver and become accessible to any page within that virtual server.
You can develop pages for AOLserver in three ways:
- Plain HTML
- .tcl pages -- these are tcl programs that can return HTML via the
ns_write call.
- .adp pages -- AOL Dynamic Pages. You develop your pages in plain HTML
but you can scape to Tcl code by using <% %> or <%= %> much alike PHP or
ASP.
While AOLserver is a great webserver with a superb architecture, where
it really shines is in database connectivity. AOLserver has its own
database abstraction layer that enables you to have it connected to
different RDBMSs without changing your code at all. The connections do
the RDBMS are pooled, persistent and are shared among different threads.
This allows for very fast connections and efficient use of resources.
AOLserver has drivers for all major RDBMSs: PostgreSQL, Oracle, Sybase,
Informix, Illustra, Solid, Interbase, MySQL.
<!--
*******************************************
************ End of Section ***************
@ -2888,7 +2943,8 @@ The authors of Windows NT port of PostgreSQL are -
<item> Download
<url url="ftp://go.cygnus.com/pub/sourceware.cygnus.com/cygwin/latest/full.exe">
<item> Run full.exe and install in c:\Unix\Root directory.
<item> Run Cygwin, and then run "mount c:/Unix/Root /"
<item> Run Cygwin, Type 'mount --help' for docs. You can use -f switch to force mount.
And then run "umount / " and "mount c:\Unix\Root /"
</enum>
<!--
*******************************************