After upgrading to symfony version 1.0.16 from 1.0.8 I started to get this error:
Unable to write config cache for "config/config_handlers.yml"
I tried to chmod 777 the cache and it didn't work. The solution for me was to disable SELinux.
How to do that? edit your /etc/sysconfig/selinux file, and set SELINUX=disabled:
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcinfg - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled
This kind of errors are what make debugging sometimes a very frustrating part of the developement, if you're suffering a blank page when trying to make a header('Location..'), give this a try:
I was getting an 500 Internal Server Error when trying to access Drupal after installing it, when I checked the http error log it said : .htaccess: order not allowed here.
After adding this to the httpd.conf and restarted apache it worked:
Apache doesn't start and the error log contains: [emerg] (28)No space left on device: Couldn't create accept lock or [crit] (28)No space left on device: mod_rewrite: could not create rewrite_log_lock Configuration Failed
After checking your disk it shows that you have plenty of space. The problem is that apache didn't shut down properly, and it's left myriads of semaphore-arrays left, owned by 'apache' user.
Run: ipcs -s | grep apache
Removing these semaphores immediately should solve the problem and allow apache to start. ipcs -s | grep apache | perl -e 'while () { @a=split(/\s+/); print `ipcrm sem $a[1]`}'
where 'apache' is the owner of the apache process, if that's not the name of the user on your server change it.
You want to know what query is slowing the database or want to check what's going on with a query you just run, well in mysql just need to type 'show processlist;', but in postgres you must enable two variables to check this and other stats.
Edit your postgres.conf which should be on /var/lib/pgsql/data/postgresql.conf for *nix installations and add or change this: stats_start_collector = true
This must be set to true for the statistics collector to be launched at all. stats_command_string = true
This enables monitoring of the current command being executed by any server process. The statistics collector subprocess need not be running to enable this feature.
After restarting postgres the following query will show currently running queries /etc/init.d/postgresql restart
psql -U postgres template1 -c "select * from pg_stat_activity"
If your router/modem is set in bridge mode and you need to dial to make a connection you must use pppoE (Point to Point Protocol Over Ethernet) it's similar to the usual modem dial-up connection, but the difference is that you use the network an not the land line to connect.
In ubuntu you can run a little script called:
# pppoeconf
Just accept the defaults an make sure you give the right username/password.
it will edit this file:
# cat /etc/ppp/peers/dsl-provider
# Minimalistic default options file for DSL/PPPoE connections
For some unknown reason my web developer and delicious firefox toobars disappeared, I could see the space where they used to be but no icons or anything was there. I tried with the view toolbars menu , checking and unchecking to hide and show them, but that didn't work. Finally I found the solution, firefox have an option called firefox safemode http://kb.mozillazine.org/Safe_mode which allows us to troubleshoot some problems (like this one), all you have to do is:
1. Close any running intance of firefox. 2. Type this command :
firefox -safe-mode
For more info for different OSs check here 3. Then check the box for "Reset toolbars and controls" 4. Click on "Make changes and restart"
That's it... your toolbar icons should appear again.
Oditt it's a community-based site focused on ranking podcast episodes. It's very useful if you want to find specific podcast episodes about very narrow subjects, you can use tags, categories, or just keywords. Also, you can find RSS feeds for tags, categories, popular and recent episodes.
Ctrl + Alt + Drag the mouse : rotate the cube to any direction in the space.
Ctrl + left/right arrow key : rotate the cube to the left or right direction
Windows key + Pause : shows the window thumbnails or also called window picker , you can also place the mouse in the top right corner for the same action.
Remember that any shortcut can be changed in the beryl manager.
A memory error occurred when I was trying to install symfony using the "pear install" command: root@cam-desktop:/home/cam# pear install symfony/symfony-beta downloading symfony-1.0.2.tgz ... Starting to download symfony-1.0.2.tgz (1,903,264 bytes) ......................................................................................................................................................................................................................................................................................................................................................................................done: 1,903,264 bytes
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 8192 bytes) in /usr/share/php/PEAR/Installer.php on line 518
The solution was to increase the memory to allocate for php to 32Mb:
Syntax color highlighting enables parts of text (tags, functions, etc) to be shown in a different color to ease the visualization of the text file, this is done based on the file extension (.php,.sql,.html,etc).
To enable this function in Ubuntu or other distros edit or create the file .vimrc which must be located in the user home directory:
Ubuntu Feisty Fawn (7.04) release, doesn't include php4 in their repositories, php5 is the default version for php. If you want to use php4 applications you better install Ubuntu Dapper Drake (6.06).
If you come from a red-hat based distro and are using ubuntu for the first time (just like me) one thing you may have noticed is that ll alias is not set by default, to do that just edit your ~/.bashrc and uncomment or add the line "alias ll='ls -l'" now the next time you start a shell window that alias will be loaded.
# some more ls aliases alias ll='ls -l' #alias la='ls -A' #alias l='ls -CF'
mysql> select * from t1; +-------+------+ | t1_id | col2 | +-------+------+ | 1 | a | | 2 | b | | 3 | c | +-------+------+ 3 rows in set (0.01 sec)
mysql> select * from t2; +-------+-------+------+ | t2_id | t1_id | col2 | +-------+-------+------+ | 1 | 1 | d | | 2 | 1 | f | | 3 | 2 | g | | 4 | 3 | f | | 5 | 3 | h | | 6 | 3 | i | | 7 | 3 | j | +-------+-------+------+ 7 rows in set (0.00 sec)
mysql> select *,(select group_concat(col2) from t2 where t1_id = t.t1_id) from t1 as t; +-------+------+-----------------------------------------------------------+ | t1_id | col2 | (select group_concat(col2) from t2 where t1_id = t.t1_id) | +-------+------+-----------------------------------------------------------+ | 1 | a | d,f | | 2 | b | g | | 3 | c | f,h,i,j | +-------+------+-----------------------------------------------------------+ 3 rows in set (0.17 sec)
Postgres as you may have noticed doesn't have a function like this, so I created my own approach:
Remember that you should have enabled pspgsql for your database previously:
In the shell you must type : createlang plpgsql -Upostgres -d template1
template1=# CREATE FUNCTION concat (text, text) RETURNS text AS ' template1'# DECLARE template1'# result text; template1'# BEGIN template1'# IF $1 is not null THEN template1'# result := $1 || $2; template1'# END IF; template1'# template1'# RETURN result; template1'# END; template1'# ' LANGUAGE plpgsql; CREATE FUNCTION
template1=# insert into t1 values (1,'a'); INSERT 0 1 template1=# insert into t1 values (2,'b'); INSERT 0 1 template1=# insert into t1 values (3,'c'); INSERT 0 1
INSERT 0 1 template1=# insert into t2 values (1,1,'d'); INSERT 0 1 template1=# insert into t2 values (2,1,'f'); INSERT 0 1 template1=# insert into t2 values (3,2,'g'); INSERT 0 1 template1=# insert into t2 values (4,3,'f'); INSERT 0 1 template1=# insert into t2 values (5,3,'h'); INSERT 0 1 template1=# insert into t2 values (6,3,'i'); INSERT 0 1 template1=# insert into t2 values (7,3,'j'); INSERT 0 1
template1=# select *,(select row_concat(col2) from t2 where t1_id = t.t1_id) from t1 as t; t1_id | col2 | ?column? -------+------+---------- 1 | a | df 2 | b | g 3 | c | fhij (3 rows)
I didn't want to set a comma as the default separator so the user can customize easily the string. Another important thing is that if there is a null value in any row then the result will be null, like most of the aggregate functions.
template1=# select *,(select row_concat(coalesce(col2,'') || ' , ') from t2 where t1_id = t.t1_id) from t1 as t; t1_id | col2 | ?column? -------+------+------------------ 1 | a | d , f , 2 | b | g , 3 | c | f , h , i , j , (3 rows)
I recently installed Ubuntu (Edgy Eft) on my home desktop. I wanted to try the Beryl window manager because of all the eye candy effects: 3d workspaces, window thumbnails, etc.
Beryl has a lot of plugins that you can play with, some of them are maybe very experimental but I think this project will be big in the future. I haven't seen much about Vista aero but I think, Beryl has to nothing to envy. Mac users would say "deja vu" but this is linux, free and open source and surely it will become something very interesting.
I must say that I thought the process of installing Beryl would be very frustrating (it's just 0.2.0 version), but it just run flawlessly at the first try (following this how-to wiki ). Now I use Beryl as the default window manager, it's running smoothly so far. I think it's all about the video card and the driver, I have an nvidia GeForce 6200 using this driverand also with it you can easily set the dual monitor configuration ( Xinerama ).
I tried to capture my two screens using Xvidcap but to get a decent frame rate all I could capture was a 40 x 40 pixels frame of the screen :(. Instead I used my camera pointing to one monitor and this is what I got:
This is a really cool video about Web 2.0. It summarizes in about 4 minutes how the web has evolved and how it's helping us to be more connected, more citizens of the world and there are now less and less boundaries...
Firefox 2.0 has a nice command to recover a closed tab. In case you have accidentally closed a tab , just press ctrl+ shift+ t , and it will get back the tab. Very useful for people that have a lot of open tabs at the time (just like me).
I read or heard somewhere about this two linux commands: apropos and ctrl + r. And I found it very userful. apropos : apropos searches for a keyword in some internal database(s) and displays a list of commands related to the searched keyword. This is helpful when you don't know the exact name of a command or have no clue of the command to perform certain task. You can also google for it, but you have this additional choice. [root@devel2 ~]# apropos mail
aliases (5) - aliases file for sendmail clamav-milter (8) - milter compatible mail scanner fetchmail (1) - fetch mail from a POP, IMAP, ETRN, or ODMR-capable server formail (1) - mail (re)formatter hesiod_free_postoffice [hesiod_getmailhost] (3) - Hesiod functions for retrieving user to postoffice mappings hesiod_getmailhost (3) - Hesiod functions for retrieving user to postoffice mappings htnotify (1) - sends email notifications about out-dated web pages discovered by htmerge logrotate (8) - rotates, compresses, and mails system logs mail (1) - send and receive mail mailaddr (7) - mail addressing description mailcap (4) - metamail capabilities file mailq (1) - print the mail queue mailstats (8) - display mail statistics makemap (8) - create database maps for sendmail mutt (1) - The Mutt Mail User Agent muttrc (5) - Configuration file for the Mutt Mail User Agent newaliases (1) - rebuild the data base for the mail aliases
Ctrl +r : When pressing this in a shell you will filter you history of typed commands by the letters you type after pressing the keys.
(reverse-i-search)`apr': man apropos
I typed here "apr" after pressing ctrl+r and it gave me "man apropos".
If you type Ctrl+r again it will move to the next match for the typed letter(s).