Posted on 03 July 2001 by Demian Turner
SSH is a fairly extensive topic and I will only cover the basics of establishing a connection and transferring files here.
If you’re already on a UNIX/linux server, chances are SSH is already installed. You can check this by typing which ssh. To securely connect to another box, SSH is ideal because it provides an encrypted connection so your password cannot be snooped by any dubious ‘interlocutors’.
At the command prompt simply enter ssh -l username targetHost. The -l switch indicates it’s a login, specify your username and the target host and that’s it. If the remote host is not running SSH or you do not have logon rights of course this will not work.
Posted on 03 July 2001 by Demian Turner
Patch for PHP 4.0.6 memory limit problem posted
There is a bug in PHP 4.0.6 which affects PHP users who use the memory limit option. (i.e. developers who include –enable-memory-limit in their configure line).
The patch is posted at http://www.php.net/downloads.php. If you don’t use this option there is no need for you to download and apply the patch.
Posted on 03 July 2001 by Demian Turner
Tweaking Apache
Did you know you could use Apache’s httpd.conf to manipulate PHP’s magic quotes ? The following code will set magic_quotes_gpc to “off” for a specific directory, allowing you to bypass changing your php.ini which would affect all the virtual hosts.
Posted on 03 July 2001 by Demian Turner
If you have an ever growing list of virtual hosts in your httpd.conf
you may find this script useful as a default homepage.
Name this file index.php and use it to replace the index.html file
in the docroot of your Apache installation:
- Unix: /usr/local/apache/htdocs
- Windows: C:\Program Files\Apache Group\Apache\htdocs
Click read more for the code.
Posted on 03 July 2001 by Demian Turner
If you’re new to UNIX/linux or just starting out, you’ll be pleased to know you can customise your logon by modifying the .profile or .bash_profile files situated in your home directory.
I’ve added the following lines to mine to give me a bit more info about the system when I logon:
uname -a
who
uptime
lynx -dump http://www.onionbrain.com/demian/smallfortune.php3
Posted on 03 July 2001 by Demian Turner
Setting up a job to occur automatically on a regular basis (a cron job) is an immensely useful facility. This is stanard on UNIX-based systems and easy once you know the basics.
Here are a few example crontab entries:
0 2 * * * /home/redcurry/bin/rdf_grabber >& /dev/null
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/mrtg /usr/ins/intel/gui/bin/mrtg-cpu.cfg >& /dev/null
Just to translate into English, the first job fires off a script called ‘rdf_grabber’ everynight at 2 am.
The second entry fires off the app ‘mrtg’ using the config file mrtg-cpu.cfg every 5 minutes, 24 hours a day, 7 days a week.
The >& /dev/null bit at the end just takes care of any potential output that might result in case of an error and saves the sysadmin being bombarded by emails.
Posted on 03 July 2001 by Demian Turner
There are many places on the internet offering the luxurious service of monitoring your website – and letting you know when it’s down. And charging a pretty penny for it too! If you’ve got PHP on your machine, why not do it yourself ? The following tuturial will show you how.
Posted on 03 July 2001 by Demian Turner
The Basics
If you’re working on a UNIX/linux platform, being comfortable with the basics of file editing in VI is essential. If you’re not, you should be !
Posted on 03 July 2001 by Demian Turner
Surviving In the UK with DialUps
At the moment I’m signed up to BT Internet’s Anytime plan. I know what you’re thinking, isn’t there anyone else I could have chosen? The problem is I was spending too much time on the web and the phone bills were getting extraordinary … Actually, the first provider I tried was AOL, a big mistake.
Posted on 03 July 2001 by Demian Turner
As long as you didn’t ever need an answer to an email, these guys were okay. But the minute you had a requirement that fell outside their slow, automated system, you were left up to your own devices.
Initially, and certainly from the advertising, the One & One offering seems quite generous and full-featured for the money. The problems set in once you tried to get out of the box. Little details were quite frustrating like not being able to connect to remote mySQL servers (your own assigned DB is in a list of about 5000 which you have to comb through if you’re using phpMyAdmin).