Archive for the 'tips' Category
why use php5?
By Justin Silverton
New Object-orientated features
In the previous versions of PHP, objects and classes were supported, but only on a limited basis. Missing was the ability to de-reference objects that are returned from a method and implicit object cloning resulted in unexpected behavior.
The following are new features within php5
A) Public, private, protected class modifiers
These modifiers may be used on both properties and methods, and restrict access.
B) Interfaces and abstract classes and methods.
C) Object cloning
The scripting engine never automatically clones objects in PHP 5, whether they are assigned, passed by-value, or returned by-value. If you do need to clone an object, then you can use the following syntax: “clone $newobject” or a method called __clone() can be implemented, which will be called after an object’s properties has been cloned.
D) Design Patterns
Supported in PHP 4, but now has new and improved features such as static properties and methods, private/public/protected modifiers, and interfaces.
E) XML and Soap
The soap protocol is becoming increasingly popular for communicating with web services. Many companies are implementing it to allow for easy access to data.
Improved mysql functionality
A new library, called mysqli, offers the following improvements over the old library:
A) SSL connectivity
B) prepared statements
C) Bound Input and Out parameters
D) Object orientated interface
Exceptions allow you to have a greater degree of control over error handling, by separating the program logic. You no longer have to check the return value from a function.
Complete function list can be found here
No commentsUsing the iis 6 ftp service

By Justin Silverton
Install Internet Information Services and the FTP Service
Because FTP depends on Microsoft Internet Information Services (IIS), IIS and the FTP Service must be installed on the computer. To install IIS and the FTP Service, follow these steps.
NOTE: In Windows Server 2003, the FTP Service is not installed by default when you install IIS. If you already installed IIS on the computer, you must use the Add or Remove Programs tool in Control Panel to install the FTP Service.
1. Click Start, point to Control Panel, and then click Add or Remove Programs.
2. Click Add/Remove Windows Components.
3. In the Components list, click Application Server, click Internet Information Services (IIS) (but do not select or clear the check box), and then click Details.
4. Click to select the following check boxes (if they are not already selected):
Common Files
File Transfer Protocol (FTP) Service
Internet Information Services Manager
5. Click to select the check boxes next to any other IIS-related service or subcomponent that you want to install, and then click OK.
6. Click Next.
7. When you are prompted, insert the Windows Server 2003 CD-ROM into the computer’s CD-ROM or DVD-ROM drive or provide a path to the location of the files, and then click OK.
8. Click Finish.
IIS and the FTP service are now installed. You must configure the FTP Service before you can use it.
Configure The FTP Service
To configure the FTP Service to allow only anonymous connections, follow these steps: 1. Start Internet Information Services Manager or open the IIS snap-in.
2. Expand Server_name, where Server_name is the name of the server.
3. Expand FTP Sites
4. Right-click Default FTP Site, and then click Properties.
5. Click the Security Accounts tab.
6. Click to select the Allow Anonymous Connections check box (if it is not already selected), and then click to select the Allow only anonymous connections check box.
When you click to select the Allow only anonymous connections check box, you configure the FTP Service to allow only anonymous connections. Users cannot log on by using user names and passwords.
7. Click the Home Directory tab.
8. Click to select the Read and Log visits check boxes (if they are not already selected), and then click to clear the Write check box (if it is not already cleared).
9. Click OK.
10. Quit Internet Information Services Manager or close the IIS snap-in.
The FTP server is now configured to accept incoming FTP requests. Copy or move the files that you want to make available to the FTP publishing folder for access. The default folder is drive:\Inetpub\Ftproot, where drive is the drive on which IIS is installed.
adding a virtual directory
This is probably one of the most confusing issues with the IIS ftp service. To create a virtual directory, do the following:
1) right click your new ftp server that you created from above (in iis manager) and go to new->virtual directory.
2) it will ask you for the alias (how people will access this directory and the location (which is the actual physical directory on your harddrive).
3) after this is created, you may try to login to your ftp server and see if your directories are listed. They won’t be there.
4) Most FTP server use the actual file structure of your system to determine what directories to display to the user.
To allow your virtual directories to be seen, go into the home directory of your ftp site and create an empty directory with same name as your virtual one (the alias).
This works virtual directories take precidence over file-system directories.
No comments




