View Full Version : php3 for dummies
Benson
03-15-1999, 11:42 AM
How come no books on PHP???? I am going to try and PHPify a simple submission form soon, and reading the docs at php.net makes my brain reel!
------------------
I'd rather have a bottle in front
of me than a frontal lobotomy
Lots of us are waiting impatiently for books on PHP and on MySQL... there should be a couple of them out in May....
You are not alone in this wish http://www.aota.net/ubb/smile.gif Let's just hope they hurry.
Deb
WayneK
03-15-1999, 03:35 PM
I know what you mean Benson, I got a headache too.
Went to the local bookstore today.....no dice http://www.aota.net/ubb/frown.gif
Also tried searching amazon http://www.aota.net/ubb/frown.gif
And I can't figure out how to run Xitami's server software(MS PWS was even worse), install perl and php so i can debug locally.
Still kicking tho
WayneK
03-15-1999, 03:40 PM
I know what you mean Benson, I got a headache too.
Went to the local bookstore today.....no dice http://www.aota.net/ubb/frown.gif
Also tried searching amazon http://www.aota.net/ubb/frown.gif
And I can't figure out how to run Xitami's server software(MS PWS was even worse), install perl and php so i can debug locally.
Still kicking tho
Stephen
03-15-1999, 06:13 PM
Wayne,
here's some note on running Xitami that I kept when I first installed it. Now I remember next to nothing so make of it what you will!
##########################################
Things to do to get Xitami working:
(1) In my case, since MS FrontPage 98 was using port 80, I had to edit the defaults.cfg configuration file to override the default port setting. This was achieved by redefining the portbase parameter (under the Server section) like so:
[Server]
portbase=1000 # e.g. 1000 for port 1080
Note: You shouldn’t touch the xitami.cfg file. Instead make the modifications to defaults.cfg, just as they appear in the former file. Likewise, when modifying the security parameters, you’d leave xitami.aut alone and make your changes in defaults.aut (the "defaults" files should be retained on upgrading to a newer version of Xitami, whereas the "xitami" configuration files would be overwritten). If the two "defaults" files don’t appear in the topmost directory (where xiwin32.exe is found) just create them yourself.
(2) Place your scripts to be executed in /cgi-bin or subdirectories of it. To make it easy to follow Lincoln Stein’s "Official Guide to Programming with CGI.pm" I created a pair of directories that I placed in /cgi-bin, called /stein and /my-cgi. I place example scripts from the book in /stein and my own perl scripts in /my-cgi, with aliases to these (in defaults.cfg) given by (including comments):
[CGI-Alias]
stein=c:\Xitami\cgi-bin\stein
# e.g. in the browser Location field: http://localhost:1080/stein/someprog
my-cgi=c:\Xitami\cgi-bin\my-cgi
# e.g. in the browser Location field: http://localhost:1080/my-cgi/someprog
(3) To get your perl scripts under /cgi-bin to excute properly when called from the browser (instead of the browser simply trying to open them and giving you a "Save as?" message) add the shebang line to each script:
#! c:\perl\lib\perl.exe
or whatever the path is to your perl executable. Note the space between the ! and the "c". This is the format Xitami needs to determine that your perl script is indeed a script. Of course, when running your perl scripts from the command line in DOS the above line will be ignored since it begins with a # (signifying a commented line). So adding this first line won’t cause you any new problems.
(4) For administration purposes (to get access to the BBA--the Browser Based Administration--and the private directory) the security parameters were modified in the defaults.aut configuration file, like this (including comments):
[/Admin]
stephen=xitami # was admin="-"
# Now use userid 'stephen' and password 'xitami' to access the BBA
[Private]
stephen=private
# same format here, userid='stephen' and password='private'
# to access the private directory
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.