Then it is very likely in the site configuration file, usually at
/etc/apache/sites-available
you have directives such as
AllowOverride None
Change them to
AllowOverride All
and try again.
Monday, 30 July 2012
Tuesday, 6 March 2012
Tuesday, 30 August 2011
Sending UTF-8 mail with PHP
I was facing issues sending mail encoded as UTF-8 via PHP. In order to do it properly, you need to set UTF-8 as the encoding for the mail function (first line of code below). Then, mail can be sent (second line).
mb_internal_encoding("UTF-8");
mb_send_mail( 'myrecipient@wherever.com', 'Polite subject', $message, $headers );
Sunday, 26 June 2011
Apache module modwsgi 3.3 on Ubuntu Lucid
A bit of library hell on Linux. I tried to install modwsgi on Ubuntu Lucid. I downloaded the Debian version. However,
You cannot install Python 2.7 (easily, at least) on Lucid, but you can install Python 3.1. Use
root@virt251:/tmp# dpkg -i libapache2-mod-wsgi_3.3-2+b2_i386.deb
...
dpkg: dependency problems prevent configuration of libapache2-mod-wsgi:
libapache2-mod-wsgi depends on libpython2.7 (>= 2.7); however:
Package libpython2.7 is not installed.
dpkg: error processing libapache2-mod-wsgi (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libapache2-mod-wsgi
You cannot install Python 2.7 (easily, at least) on Lucid, but you can install Python 3.1. Use
apt-get
and that will do the trick.
Friday, 3 June 2011
Automatic creation of regular expressions in different computing languages
Regular expressions are a powerful tool, albeit they can become difficult to build. This page, text2re, helps you build complex re's and provides code in a number of computing languages such as Python, Perl, etc.
Wednesday, 4 May 2011
Modifying Xubuntu application menu
One of the most disturbing features of my Xubuntu desktop is the apparent inability to modify the application menu. In particular, I had a huge
So I edited the file
into
This is a simple example of what can be achieved if you (very carefully) edit the file.
settings
submenu with duplicated entries: many already appeared in the system
submenu.So I edited the file
/etc/xdg/menus/xfce-applications.menu
and changed the section
<Menu>
<Name>Settings</Name>
<Directory>xfce-settings.directory</Directory>
<Include>
<Category>Settings</Category>
</Include>
<Layout>
<Filename>xfce-settings-manager.desktop</Filename>
<Separator/>
<Merge type="all"/>
</Layout>
<Menu>
<Name>Screensavers</Name>
<Directory>xfce-screensavers.directory</Directory>
<Include>
<Category>Screensaver</Category>
</Include>
</Menu>
</Menu>
into
<Menu>
<Name>Settings</Name>
<Directory>xfce-settings.directory</Directory>
<Include>
<Category>Settings</Category>
</Include>
<Exclude>
<Or>
<Category>System</Category>
</Or>
</Exclude>
<Layout>
<Filename>xfce-settings-manager.desktop</Filename>
<Separator/>
<Merge type="all"/>
</Layout>
<Menu>
<Name>Screensavers</Name>
<Directory>xfce-screensavers.directory</Directory>
<Include>
<Category>Screensaver</Category>
</Include>
</Menu>
</Menu>
This is a simple example of what can be achieved if you (very carefully) edit the file.
Tweaking Xubuntu application menu
One of the things I find less appealing on my Xubuntu desktop is the apparent inability to modify your application menu. In particular, I had a huge settings submenu with duplicated entries, which already appeared in the system submenu.
So I edited the file
into
/etc/xdg/menus/xfce-applications.menuand changed the section
into
Settings
xfce-settings.directory
Settings
System
xfce-settings-manager.desktop
Screensavers
xfce-screensavers.directory
Screensaver
Subscribe to:
Posts (Atom)
About Me
- cjgb
- Madrid, Spain
- Powered by datanalytics