This WebPage is from my earlier days. Just some notes....really.

PHP is a server-side scripting language. When a browser requests a PHP page from a PHP-enabled server, the server interprets the PHP code and sends the resulting HTML to the requesting browser.
(The browser receives only HTML, not PHP code.)

PHP: Hypertext Preprocessor is the current definition.
The original definition was Personal Home Pages.

JavaScript & PHP:
JavaScript runs on the client's computer (in their browser).
PHP runs server-side and therefore has no access to JavaScript variables.


December 18, 2001
PHP and Apache PHP gets installed if you select it durning the installation by using (mod_php4). Now then, the key directory (at least in my SuSE setup) is /usr/local/httpd/htdocs. This directory is called the apache document root dir.

*** Dir location changed to /srv/www/htdocs in later versions.

You can test your PHP installation by putting <? phpinfo() ?> in a file called phpinfo.php and store it in the htdocs dir mentioned above. Afterwards, you get into your browser and enter the following in the URL (or address) box on your Browser: http://localhost/phpinfo. (Caution: If localhost doesn't work, it could be because that name, localhost, wasn't used in the httpd.conf file as the ServerName. On your own PC it could possibly be your machine's host name.) Refer: PHP4 Installation Overview


** On SuSE **
httpd.conf has ServerName dusty-tr.trcomputing
rc.config has FQHOSTNAME="dusty-tr.trcomputing"

Ok. So now what did that buy us?? Well, we more or less found out where the PHP scripts apparently must be stored, and then how to execute one. Now I'm sure you realize that there is more to it than just this. So let's figure out how to do something a little more useful.
=============================


February 02, 2002 - (02/02/02)
Back on this PHP thing. The above was fine, but in order to do that you must be root. Now I know from previous experiences that there are ways to do some of this as yourself. However, some areas are restricted to the SuperUser .. like CGI-BIN. Now I'm not sure if PHP falls into this category or not. So lets find out... according to my books and the Web.

  1. PHP is a server-side, cross-platform, HTML embedded scripting language. PHP Intro
  2. Create an htpasswd file.
    htpasswd -c /usr/local/httpd/uhtpasswd ctaylor (-c is only needed for first entry)
  3. Create/Make a Web page in your home area. Now in order to do this .. well in order to make it readable by your Browser .. you must do the following in apache. Now, which and where, httpd.conf file to use will depend on your version of Linux. SuSE does it inside a file of their own. And the use of this file is determined by values in other files. So you get a lot of chasing around. But the important info is basically the same in all. Just have to see how your version wants to set it up. This is the important info in apache:
    <IfModule mod_userdir.c>
        UserDir public_html
    </IfModule>
    
    <Directory /home/*/public_html>
        AllowOverride FileInfo AuthConfig Limit
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        <Limit GET POST OPTIONS PROPFIND>
            Order allow,deny
            Allow from all
        </Limit>
        <LimitExcept GET POST OPTIONS PROPFIND>
            Order deny,allow
            Deny from all
        </LimitExcept>
    </Directory>
    
    The above values will allow you to execute your page from your home public_html area.
    Now:
    1. Make your Home Dir publicly executable (and maybe readable??).
    2. Create a public_html dir and make it publicly readable and executable.
    3. Create an index.html file within the public_html dir. This will be your home page.
    4. Make each file you create publicly readable. (executable if necessary.)
    5. Accessed via Browser by http://hostname/~username (ie: http://dusty-tr/~ctaylor)

  4. In order to execute PHP from within HTML I had to add the following to httpd.conf:
    AddType application/x-httpd-php .htm
    AddType application/x-httpd-php .html
Now then, that last item shouldn't be necessary. It will slow down your site cause all of the files will go thru the PHP parser. There must be a better way.
First discovery is that you can leave the httpd.conf file alone (which you probably won't have access to anyway) and place the items in a .htaccess file. This file will be placed in your public_html dir in your home dir.
Unfortunately, I still had to put in those "extra AddTypes" in order to get my PHP to operate from within my HTML. Hmmmm.. so much for embedded scripts. But let's don't give up yet.
Well ... guess I didn't read everything that I should have. I can set the index file that we normally look for, index.html, to index.php as long as I include that in the DirectoryIndex line in httpd.conf.
=============================

February 5, 2002
Had a minor problem. I set the DOCTYPE to XHTML a little to soon. Caused me to get different operations when I was changing the file extension. Also misinterpreted my HTML comments.
However, the industry is going to XML type documents and XHTML is an interim to that. So I need to make it work with the XHTML types of operation. The main reason that this change is being made is that HTML code allowed to much sloppiness. So we are now going to have forced cleanness.

Well now, this is interesting. I took out all the comments and then the XHTML worked!!! Hmmm.. guess I need to find out what the difference is in comments. AH HA!!! Can't have any comments between the DOCTYPE and the html tag.

Well, now we have a new problem. I wasted a lot of time trying to get the font sizes to work. I was making changes here in Homesite on Win2K, but I was testing the results in Netscape on Linux. There seems to be a problem with the fonts on Linux. Now I had that before and I kept getting told to use style sheets. Well here I am using style sheets and the fonts are still a problem. Hmmmmm..
=============================

February 6, 2002
Ok, I went out and downloaded the latest Mozilla. With it I can get the larger fonts but I still can't get the Script style. There is a problem here with the Linux version.


I grabbed this off the net during my searches for possible reference.
Soothing fonts
Netscape for Linux is most infamous for its crazy font scaling. They are very small to 
start with. Then you goto :
Edit > Preferences > Appearance > Fonts, and set it to say size 18, and yet, the results are 
pathetic. The ugly scaled fonts do have a solution. Get the Mozilla fonts package at 
http://fox.mit.edu/skunk/xwin/#mozilla_fonts. Unpack the archive and read the 
included README file(s).

Create a new directory
mkdir /usr/X11R6/lib/X11/fonts/moz
Edit the Makefile to include this directory.

Become "root" on your system and run
make pcf
make install

Edit /etc/X11/fs/conf and add the new directory to the font paths.
Run xset fp+ /usr/X11/lib/X11/fonts/moz/. Restart the browser. Go to the font choosing menu, 
select the Mozilla fonts, and a font size of something like 9 - 12 will be just fine.

February 12, 2002
Well, I checked the Netscape site and brought down their latest version. It still doesn't produce the larger fonts. Also no script. So today I am going to try to concentrate on this problem and either get it resolved or at least know why I can't .. or something.

I will be heavily using the tutorial by Steve Molder at WebMonkey. At first looks it appears to be a good one. We'll see ... we'll see.
=============================

February 18, 2002
Well, Netscape 6 understands cursive. I used it instead of the script-MT-bold and was able to get larger text in Netscape 6. Not quite what I wanted but it is a start.
================================