Posts

Showing posts from June, 2010

DotNetNuke : Checking DNN version

The easiest way is listed first, thought alternatives are provided as well. Checking the version with "Super User" access If the site in question is up and running and you have a super-user login (typically the "host" user), the version information is displayed at the top of the "Host Settings" page under the "Host" menu. Checking the version from the database If the site isn't running properly, or you don't have a login, and you can access the database, you can query the "Version" table to find out the version. The following query will return the proper version number, assuming an objectQualifier was not used when DotNetNuke was installed. If it was, you'll want to look up the table name, which may be dnn_Version. select top 1 * from version order by createddate desc Checking the version from the file system Alternatively, you can find the DotNetNuke.dll in the website's bin directory and inspect its version. Right clic

SquirrelMail : "The requested URL /src/right_main.php was not found on this server."

This happens very oddly. The sitation is that you login to webmail, then can view, edit, delet move, read everything Okie, except when after you compose, then click on "Send" button, the error came out. it first asks for https verification, then the error. Further reading: http://sourceforge.net/tracker/index.php?func=detail&aid=1521299&group_id=311&atid=100311 http://readlist.com/lists/lists.sourceforge.net/squirrelmail-users/0/1876.html Seems the self-guess bu SquirelMail is wrong, as in requesting http://you.webmail.com/src/configtest.php You will see whats the requested URL. The fix? Im not sure whether its the fix, i believe its a config thingy. 1) vi to config/config.php 2) search for "config_location_base" 3) If you notice, on line 126, theres : $domain = $_SERVER['SERVER_NAME']; So, i have set my $config_location_base to like this: $config_location_base = 'http://'.$domain; then? Gao Dim! kudos jwchai hmlee google /alak

Warning: Cannot modify header information - headers already sent

Hi, this "Warning: Cannot modify header information - headers already sent General ... The "headers already sent" error i encountered all this while is caused by one thing only. And this one thing is that data already sent/echoed out PRIOR to header() function is called. Of course this can be two things also: 1) there is a 'whitespace' before your <?php sign. This may be caused by text editor that encodings is dif than UTF-8, this on is easily fixed, justs earch and delete the stupid fsking whitespaces. 2) Well, like i said, there already some data sent/echoed PRIOR to header() function. header() function hsould be the first thing sent out to browsers, before anything else. Well, lets have an example: require("include/class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail- > Host = "localhost"; $mail- > SMTPAuth = true; $mail- > SMTPDebug =2; $mail- >

Wali - Egokah Aku

Image
Ku… tak pernah merasa Gundah di hatiku, Ketika denganmu Saat kau, Kau belai rambutku Kau temani aku, Kau basuh lukaku Kini semua berlalu Karena engkau tak memilihku Salahkah aku mencintaimu Walau kutahu kutak dihatimu Egokah aku memilikimu Walau kutahu kau tak memilihku Kuharap tuhan cabut nyawamu Agar tak ada yang milikimu Sadarkah kini ku tak rela Iman ku telah sirna Mimpiku tak nyata Kini semua berlalu Karena engkau tak memilihku Salahkah aku mencintaimu Walau kutahu kutak dihatimu Egokah aku memilikimu Walau kutahu kau tak memilihku Kuharap tuhan cabut nyawamu Agar tak ada yang milikimu Kuharap tuhan cabut nyawamu Agar tak ada yang milikimu Source : http://adx21.wordpress.com/2008/07/12/lirik-lagu-wali-egokah-aku/ //alak

MySQL : ERROR 1452 (23000) at line 11426: Cannot add or update a child row: a foreign key constraint fails

So i am trying to restore a database from one server to another. Something like this: mysql -u username -p -D dbname < backup.sql Somehow there is this error: [root@ns46 mysql]# mysql -u haocheap -p -D haocheap < /tmp/ayam.sql Enter password: ERROR 1452 (23000) at line 11426: Cannot add or update a child row: a foreign key constraint fails (`haocheap/#sql-bb2_5ef8a`, CONSTRAINT `FK_EAV_ENTITY_ATTRIBUTE_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE) So where do i get the backup.sql file? i dump it from the old server's phpmyadmin export. using method "INSERT'. Open the file, add this line at top: SET AUTOCOMMIT=0; SET FOREIGN_KEY_CHECKS=0; and these lines at bottom: SET FOREIGN_KEY_CHECKS=1; COMMIT; SET AUTOCOMMIT=1; The theory is, the restore is restoring a database that need some foreign key constraints from another table which has NOT YET been restored. thus the "SET FOREIGN_KEY_CHECKS

SFTP user with limited access

Objective: create a sftp user but limited to certain directory ONLY! [root@web.local-01 ]# uname -a Linux web.local 2.6.18-164.6.1.el5 #1 SMP Tue Nov 3 16:12:36 EST 2009 x86_64 x86_64 x86_64 GNU/Linux [root@web.local-01 ]# adduser -d /home/limited/directory/path -g sftp-user username [root@web.local-01 ]# echo "/home/limited/directory/path" >> /etc/shells now testing: adam-othmans-computer:~ alak$ sftp -o Port=9321 username @web.local Connecting to web.local... username @web.local 's password: sftp> ls sftp> mkdir testdir sftp> ls testdir sftp> cd / sftp> ls Couldn't get handle: Permission denied sftp> exit Good! kudos: hmlee, http://www.itworld.com/network-access-control/66828/sftp-only-user-accounts //alak