Category Archives: Server Administration

Plesk ProFTPd no longer accepting connections after daemon update

A recent update to Plesk ProFTPd package version 1.3.6-8.el6.art left ftp connectivity broken on a Plesk Panels 11.5.3 on CentOS 6.5 server. The update appended the following line to the tail of the /etc/proftpd.conf config file:

Include /etc/proftpd.d/*.conf

However, on the problematic server, the /etc/proftpd.d/ directory did not exist. The log file /var/log/messages was showing the following errors when attempting to start the xinetd service that runs ProFTPd.

Sep 8 11:30:54 triton xinetd[5803]: START: ftp pid=6085 from=::1
Sep 8 11:30:54 triton proftpd[6085]: error: cannot read configuration path ‘/etc/proftpd.d’: Not a directory
Sep 8 11:30:54 triton proftpd[6085]: fatal: Include: error including ‘/etc/proftpd.d/*.conf’: Invalid argument on line 95 of ‘/etc/proftpd.conf’
Sep 8 11:30:54 triton xinetd[5803]: EXIT: ftp status=1 pid=6085 duration=0(sec)

The simple solution is to comment the line out in the config file or create the /etc/proftpd.d/ directory.

Error Creating Snapshot On virtual Machine: Cannot Write To MultiExtents

You may receive a “disk is full” error when trying to create a snapshot of a virtual machine in vSphere ESXi 5. If the machine is powered on, it will also crash and be powered off. Any attempts to power on will result in disk read failures.

The operation on the file “/vmfs/devices/multiextent/42b5fd59-Ad Server-0000010s001.vmdk” failed (Invalid argument). The file system where disk “/vmfs/devices/multiextent/42b5fd59-Ad Server-0000010s001.vmdk” resides is full.

You may see an event log similar to this one:

VMware ESX cannot synchronize with the disk before canceling. Disk /vmfs/devices/multiextent/42b5fd59-Ad Server-000001-s001.vmdk may be inconsistent.

The cause of the problem is not having a working directory set in your virtual machine configuration file. In my case, the virtual machine was moved from VMware Server 2 to ESXi 5. Because of this move, the working directory was not specified. To repair, shut down your VM and add the following to your VMX config file Continue reading Error Creating Snapshot On virtual Machine: Cannot Write To MultiExtents

PHP Warning: date_default_timezone_get(): It is not safe to rely on the system’s timezone settings

Error:

PHP Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /var/www/vhosts/adserver/httpdocs/lib/OX/Admin/Timezones.php on line 158

Fix:

Edit php.ini and add appropriate timezone.

date.timezone=America/New_York

List of timezones are available here: http://www.php.net/manual/en/timezones.php

Optimizing Website Performance On Apache

There are three easy things that you can do to optimize a website’s load time on an Apache server. The first thing is to compress the web page output that is sent to the client with mod_deflate. The second thing is to enable or allow browser caching on the client’s end. The third is to enable http keep-alive requests. The following will be a brief example of how to enable these features. Continue reading Optimizing Website Performance On Apache

Prevent *Zone.Identifier* Files From Windows On Samba Shares

If you have a Samba file server and windows client network, you’ve come across these annoying files at some point. They are added by windows and some say it is for “Security” purposes. Windows may show these files as ‘WDFGH~8’ as the files name. Since that is not the true file name on the Samba system, the files will be untouchable except by the server os. On the Samba server, the file names will appear as ‘:encryptable:$DATA’ ‘:favicon:$DATA’ or ‘:zone.identifier:$DATA’.

To prevent these files from being a problem, you need to add this line to your smb.conf somewhere in the [GLOBAL] section.

vfs objects = streams_xattr

Once added, simply restart and the problematic files will no longer be visible. If you wish to delete these files from the actual file system on the server, you will need to do that manually or problematically if you have the skill to.

Install ioncube and zend optimizer on linux and plesk

To install Zend Optimizer and Ioncube Loader, you will need to download the packages according to your version of PHP on Linux. In this case, the PHP version is 5.2.

Download these packages and extract them to a place of your choice on your Linux server. I chose to save them to /usr/local/lib/zend/ and /usr/local/lib/ioncube/ respectively.

Continue reading Install ioncube and zend optimizer on linux and plesk

php include_path configuration problems

I recently updated my plesk server and it broke the php.ini configuration. I was working with an OSCommerce site and it was giving me all sorts of errors.

Warning: main(includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/ocdpellets.com/httpdocs/shop/includes/application_top.php on line 28

Warning: main(includes/configure.php): failed to open stream: No such file or directory in /var/www/vhosts/ocdpellets.com/httpdocs/shop/includes/application_top.php on line 28

Fatal error: main(): Failed opening required ‘includes/configure.php’ (include_path=’\’) in /var/www/vhosts/ocdpellets.com/httpdocs/shop/includes/application_top.php on line 28

Continue reading php include_path configuration problems