Current Issue


Table of contents

CD-ROM

Sys Admin and The Perl Journal CD-ROM version 12.0

Version 12.0 delivers every issue of Sys Admin from 1992 through 2006 and every
issue of The Perl Journal from 1996-2002 in one convenient CD-ROM!

Order now!

Sys Admin Magazine > Topics > Languages > PHP

PHP

BIND Management Using ProBIND
Mark Barrow
I was recently hired to sort out the management of a clients BIND DNS servers. They had deployed multiple BIND DNS servers running on Solaris to serve both internal and external DNS for themselves as well as primary and secondary DNS services for many of their customers. The current solution involved editing the zone files on each master server (Internal/External), then reloading the DNS into a test namespace to check for errors (using nslookup, etc.) before deploying to the production namespace and running a Perl script to reload all of the servers. Although extremely stable, it was necessary that skilled sys admins spend a lot of time managing the solution. They wanted a solution that that could be maintained by other office staff.
Thu, 30 Dec 2004

Insecure by Default
Lukasz Wojtow
It seems so easy -- download Apache, throw PHP together with some database, and you have a new server for dynamic Web pages. It's true; building Web servers has never been easier or cheaper. The price paid for ease of use and installation, however, is loose configuration -- designed not to create problems on startup but not to be the most secure. This article describes how configuring MySQL, PostgreSQL, PHP, and Apache with their default settings can lead to security breaks. Some of the issues covered can be applied only to shared hosting, where an attacker owns a virtual host and has unprivileged, local access to the system.
Thu, 30 Dec 2004

Checking Email with PHP
Russell Dyer
As a consultant I'm often away from my office and will miss email from clients. With Web access to my email server, I can read and send mail; however, I don't have time to keep checking email when I'm working. Instead, I've written a program in PHP that checks email for me. I have cron run it every 15 minutes. If there's a message, PHP sends a text message to my cellular telephone letting me know. In this article, I will review this PHP script as a learning opportunity.
Sat, 30 Oct 2004

Using PHP to Back Up MySQL
Russell Dyer
The importance of backing up data can't be stressed enough, and this also applies to backing up MySQL databases. One of the keys to making regular backups is to automate the process. You could buy a backup program that will copy the data files from a filesystem to archive media. However, for more dependable backups, MySQL would have to be shut down before a backup program were run, which could make MySQL unavailable to users for quite a while. A better alternative is to write a PHP script that will use a utility like mysqldump.
Wed, 29 Sep 2004

PHP and XML
Russell Dyer
XML is very useful in standardizing data that's shared between diverse systems. Most databases and programs can export and import plain text and that's all XML is. So if you've been asked to interface data from your organization's system with the system of another organization, consider using XML for the exchange. It's an agreeable medium.
Mon, 30 Aug 2004

PHP and MySQL
Russell Dyer
One of the most popular programming language and database engine combinations for the Web is PHP with MySQL. This combination works well for many reasons: primarily the speed, the stability, and the simplicity of both applications. The two are used extensively on a variety of Web sites. As a systems administrator, you can use the pair for storing data on users, hardware, and system documentation, for example. In this article, I will explain the basics of how to connect to MySQL and how to query MySQL with PHP.
Fri, 30 Jul 2004

Scanning Apache Logs with PHP
Russell Dyer
On my Web site, I have a few key Web pages located in a directory requiring user authentication. For some documents, though, I want to know when they are accessed and who accessed them. For instance, I might put a business proposal in a private directory and send emails to several prospects asking them to read my proposal. So I can learn whether the document was viewed and which prospects viewed it, a PHP script scans my Apache access log regularly and sends an email to my cell phone telling me if it discovers a match. In this installment of my series on PHP, I will describe this PHP script to explain a little PHP programming and to give you some ideas on how PHP might be used for systems administration and log monitoring.
Tue, 29 Jun 2004

Apache User Maintenance with PHP
Russell Dyer
For a sys admin managing a Web site, especially an intranet site, the maintenance of Apache users can be bothersome. Sometimes it may be preferable to allow department managers to maintain their own users: adding and deleting usernames, changing passwords on the Linux server, etc. Unfortunately, it is not feasible to give non-technical managers server access to Apache's htpasswd program or to the user file for managing usernames. However, by configuring Apache and writing a simple set of PHP scripts, you can set up a fairly secure Web interface through which non-technical administrators can maintain Apache users.
Sun, 30 May 2004

Remotely Monitoring Files with PHP
Russell Dyer
Although we may enjoy working with computers, it's nice to be able to walk away from them. To keep from worrying about them, however, we need to be able to monitor our servers remotely. In this series on PHP, I will present scripts useful to systems administrators for monitoring and maintaining servers, and teach a little PHP in the process. For this first article, I will examine a PHP script that scans for files on an FTP server as an example of how to write a PHP script to monitor a server.
Thu, 29 Apr 2004

Deleting Temporary Files Created by Web Sites Using PHP
Bruno Pedro
Many Web sites use temporary files for one reason or another. Sometimes they generate images, send them to the browser, and then remove them. What if the user clicks on the "STOP" button? The script will abort and all those temporary files will become permanent. You could delete them manually, or periodically with crontab, or you could automate this task using PHP. The solution presented in this article takes advantage of PHP's ability to execute a specific task whenever a script terminates.
Wed, 30 Jan 2002

Using PHP and MySQL as a Weblog

In this article, I will show how the embedded server-side scripting language PHP and the fast MySQL database can work as a Weblog.
Sun, 29 Apr 2001




MarketPlace

Instant Answers to Your IT & Business Questions
Sign Up & Get Full Access To The Definitive Online Book Collection With SkillSoft's Books24x7�.

Build IT Knowledge with Current & Trusted Content
Helps Employees Develop & Hone New Technical Programming Skills. Sign Up & Get Full Access.

Online Crash Analysis
Automatically capture customer crash data, no debugger required. Support for .NET, C++, OS X, Java.

WinDev 11 - Powerful IDE
Develop 10 times faster ! ALM, IDE, .Net, RAD, 5GL, Database, 5GL, 64-bit, etc. Free Express version

Wanna see your ad here?