Setting up development environment
0Goals:
- A local DNS server which handles any requests for *.dev
- An Apache webserver which can translate any *.dev request into a website
- Enable PHP debugging for local sites
- Setup a local MTA to send emails from PHP
- SVN/Subversion server which is accessible through Apache
PHP Warning: svn_cat(), Too many open files
0While working on a release system which takes a SVN-tag and turns it into a downloadable zip file I ran into the following error:
PHP Warning: svn_cat(): svn error(s) occured\n180001 (Couldn't open a repository) Unable to open an ra_local session to URL\n180001 (Couldn't open a repository) Unable to open repository '***'\n24 (Too many open files) Can't open file '***': Too many open files\n in *** on line ***
After the mandatory Google search, most signs pointed towards changing the limits in /etc/security/limits.conf
These, however, don’t apply to start-stop-daemons, like the one Apache uses.
(more…)
Ubuntu 11.10: working remote on Asrock ION 330 HT
0First setup LIRC with a basic configuration
For a new install sudo apt-get install lircIf LIRC is already installed sudo dpkg-reconfigure lircRemote control configuration:
Windows Media Center Transceivers/Remotes (all)
IR transmitter, if present:
None
Change the default configuration to work with the Nuvoton remote
sudo vi /etc/lirc/hardware.conf
Change the following 3 lines
REMOTE="Windows Media Center Transceivers/Remotes (all)" into this
REMOTE_MODULES="lirc_dev mceusb"
REMOTE_DRIVER=""REMOTE="Nuvoton Transceivers/Remotes"
REMOTE_MODULES="lirc_dev nuvoton-cir"
REMOTE_DRIVER="default"
Restart LIRC to apply the changes
sudo service lirc restart
Install Nvidia drivers Ubuntu
0sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current
Resolve hostnames within a local network
0Switching from windows to linux I noticed I couldn’t use the machine names within my local network to access my machines.
Something like “ping server-name” wouldn’t work while “ping 192.168.1.2″ would.
There’s a simple fix for this problem:
[code]sudo apt-get install winbind[/code]
[code]sudo vi /etc/nsswitch.conf[/code]
Add “wins” to the line starting with “hosts:”
Changing the configuration of a VirtualHost generated by Plesk
0When you use Plesk to manage your websites, the VirtualHost configuration files are generated by Plesk itself.
So if change anything in the configuration file, changes are going to be lost when Plesk re-generates these files.
Instead, you should create a new configuration file vhost.conf in the conf directory of the VirtualHost, usually located at /var/www/vhosts/yourdomain.com/conf.
As an example, say you want to change the open_basedir directive.
<Directory /var/www/vhosts/yourdomain.com/httpdocs/>
php_admin_value open_basedir "/var/www/vhosts/yourdomain.com/httpdocs:/some/shared/dir"
</Directory>
After you have added the file, Plesk needs to be aware of the new file.
To do this, issue the following command:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<yourdomain.com>
This will add a line to the Plesk generated configuration file which loads the newly created file.
Changes will take effect immediately, so there’s no need to reload Apache.
How to get a working remote for your ASRock ION 330 HT on XBMC-Live
0You know how they say “If it ain’t broke, don’t fix it”
Well… I should have listened.
Yesterday i did a full update of my XBMC-Live box, and with it I got a new kernel version.
This broke my remote, again, which basically makes it unusable as a HTPC.
Here’s how to fix it.
(more…)
Posting your website updates to twitter using Zend Framework
1Tweeting your website updates can be done in 4 simple steps
Zend_Search_Lucene Tips
0Found a good article with some tips on implementing Zend Framework’s search engine: Lucene
http://robertelwell.info/blog/zend_search_lucene-tips/
The article has a link to a list of English stop words.
Here you can find stop words for a few other languages as well.
Just open up [language]/stop.txt
Using virtual users to login to a ProFTPD server, using MySQL
0Using MySQL to store your ProFTPD users, makes it much easier to manage them.
Just fire up you favorite MySQL client and add a new user.
Besides making it easy to manage users it also allows for some additional features.
I’ll be showing you how to implement the following:
- Keeping a login counter
- Tracking last login and last update activity
- Creating temporary user accounts
If you need to set up ProFTPD, see my previous post.
Let’s get started
(more…)