Go to Control Panel->Programs and Features->Turn Windows features on or off, select FTP Service and IIS Management Console under Internet Information Services and press OK button:
Installing and configuring FTP server on Ubuntu
Install FTP server:
apt-get install proftpd
To jail all users in their home directories uncomment line
DefaultRoot ~
in /etc/proftpd/proftpd.conf. To jail all but one users modify this line as follows:
DefaultRoot ~ !<user1>
note that there is a space after ‘~’.
How I configured sendmail for PHP on Ubuntu Server 12.04
Preventing sendmail from been very slow
The first thing that I did after installing sendmail with
aptitude install sendmail
is I put “gate.localhost” (gate is my server name) to /etc/hosts so it looks like this:
127.0.0.1 localhost.localdomain localhost 127.0.1.1 gate.localhost gate # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
With default /etc/hosts containing only “gate” and “localhost” sendmail hangs up for a while and writes to /var/log/mail.log the following message:
My unqualified host name (gate) unknown; sleeping for retry.
Painful bug with apache2-mpm-itk –Apache randomly returns 403 Forbidden
Today to my great surprise I notices that my Apache web server randomly returns 403 Forbidden HTTP error code to search engine robots. Yandex Search Engine reported that on my favorite website 263 pages are OK and 210 pages has 403 status and some other site has 394/139 pages respectively.
In Apache error logs I found the following messages:
Permission denied: /home/<site-name>/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
as far as I see they appears whenever this 403 error is reported.
Oracle Database Cold Backup and Restore Script
In 2008 when I worked with some Oracle databases under Solaris and AIX, I spent some time to figure out how to make the database backup and restore and decided to use cold backup as the most straightforward method. As far as I remember, to backup the database I shutted down Oracle and then simply archive the database files using “zip” command. To restore the database I used the following shell script that extracts archived files and adjust some Oracle settings:
Restricting the access to phpmyadmin in Apache 2 on Ubuntu
By default Apache 2 is configured in a way that phpmyadmin is automatically included to all the hosted web sites. For example, if I create a new site ‘site.com’, and then navigate to this address:
http://site.com/phpmyadmin
the phpmyadmin login page appears.
How to remove ID from URL in Joomla 2.5-3.7
There is a new option in Joomla 3.8.2 allowing to get rid of ID in URLs (thanks to Ian who discovered it). If you have an older Joomla version and unable to update to 3.8.2 or higher follow the steps provided below:
Open components\com_content\router.php in an editor and make a small changes:
in function ContentBuildRoute(&$query) replace line 27
$advanced = $params->get('sef_advanced_link', 0);
with
$advanced = $params->get('sef_advanced_link', 1);
in function ContentParseRoute($segments) replace line 208
$advanced = $params->get('sef_advanced_link', 0);
with
$advanced = $params->get('sef_advanced_link', 1);
How to setup Eclipse with PHP Developer Tools and FTP support
Using Eclipse as PHP IDE
After working a little with phpDesigner, I felt that, probably, I need more complex PHP IDE. Because I previously worked with Java applications using Eclipse I decided to add PHP support to my existing Eclipse for Java EE (Helios) installation previously downloaded from http://www.eclipse.org/downloads/. I navigated to Help->Install New Software in Eclipse, selected “–All Available Sites—“, searched for “php” and got the same plugin in three different categories:
Change the size of virtual memory under Widows 7
On my PC with 6GB of RAM under Windows 7 the paging file size is set to 6014 MB by default (its initial size is equal to amount of RAM, as follows from article Change the size of virtual memory on Microsoft’s website):
Using ADO.NET Entity Framework with MySQL
In general, getting EF work with MySQL is a fairly simple task, that could be accomplished by downloading and installing ADO.NET driver for MySQL. But what concerns to me, it taken me about four hours to clarify some MySQL-specific details that affect generation of associations in Model Designer. Also after doing an experimentation with the code I realized that ADO.NET driver for MySQL, as well as other third party ADO.NET drivers, do not support “MARS” and, as far as I see, this significant restriction makes EF unusable with MySQL in large real-life projects. Please read below if you interested in more information on this questions.
(more…)