The Blog

Uncategorized

.htaccess for PHP errors

Posted on

DirectoryIndex index.html index.htm index.php

# PHP error handling for development servers
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
php_flag log_errors on
php_flag ignore_repeated_errors off
php_flag ignore_repeated_source off
php_flag report_memleaks on
php_flag track_errors on
php_value docref_root 0
php_value docref_ext 0
php_value error_log /var/www/vhosts/twang.com/httpdocs/PHP_errors.log
php_value error_reporting 999999999
php_value log_errors_max_len 0

<Files /var/www/vhosts/twang.com/httpdocs/PHP_errors.log>
 Order allow,deny
 Deny from all
 Satisfy All
</Files>

Posted in Uncategorized Leave a comment

Remote restart into safe mode

Posted on

If you have admin rights on the remote machine then it’s possible.

You need to edit the boot.ini file (usually found on the root of the C: drive)

Open a command prompt on your local machine

add this to the boot.ini of that machine.

/safeboot:network

example:

multi(0)disk(0)rdisk(0)partition(1)WINDOWS="Microsoft Windows XP Professional"   
/noexecute=optin /fastdetect /safeboot:network 

or try this link

http://support.microsoft.com/kb/239780

you won't be able to remote unless you can remotly execute VNC

Posted in Uncategorized Leave a comment

MySQL tricks

Posted on

The LENGTH() function in MySQL returns the length of a string in bytes. Multi-byte characters will count as multiple bytes. The examples in this post will use the LENGTH() function but you can substitute them with the CHAR_LENGTH() function instead if you want to count the number of characters rather than bytes. Note that CHAR_LENGTH will treat a character that uses two bytes a one single character and would return 1.Read More

Posted in Uncategorized Leave a comment

Restoring Linux System from Backup

Posted on

Terminal Commands

Mount the partition your Ubuntu Installation is on. If you are not sure which it is, launch GParted (included in the Live CD) and find out. It is usually a EXT4 Partition. Replace the XY with the drive letter, and partition number, for example: sudo mount /dev/sda1 /mnt.

sudo mount /dev/sdXY /mnt

Now bind the directories that grub needs access to to detect other operating systems, like so.

Now we jump into that using chroot.

Now install, check, and update grub.

This time you only need to add the drive letter (usually a) to replace X, for example: grub-install /dev/sda, grub-install –recheck /dev/sda.

grub-install /dev/sdX
grub-install --recheck /dev/sdX

Now grub is back, all that is left is to exit the chrooted system and unmount everything.

Shut down and turn your computer back on, and you will be met with the default Grub2 screen.

You may want to update grub or re-install burg however you like it.

Congratulations, you have just Repaired/Restored/Reinstalled Grub 2 with a Ubuntu Live CD!

Type at the command prompt

tar xvzf file-1.0.tar.gz – for a gzip compress tar file (.tgz or .tar.gz)
tar xvjf file-1.0.tar.bz2 – for a bzip2 compressed tar file (.tbz or .tar.bz2)
tar xvf file-1.0.tar – for uncompressed tar file (.tar)Read More
Posted in Uncategorized Leave a comment

Linux XBMC Atom 330 Nvidia ION

Posted on

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:nvidia-vdpau/ppa
sudo add-apt-repository ppa:team-xbmc

The Xorg build in Karmic seems to have the composite extension turned on by default which caused horrible tearing on my build. This can be disabled by adding the following to your xorg.conf file:

Code:
Section "Extensions"
          Option "Composite" "Disable"
EndSection

This fixed the problem with xbmc but caused some ugly problems with gdm which caused the display to not refresh properly when the xsplash animations played. 

 How to:
http://www.springydevelopment.co.uk/2009/11/08/minimal-install-of-xbmc-on-ubuntu-karmic-koala/
http://www.webupd8.org/2009/08/how-to-install-nvidia-190xx-drivers-in.html <– Nvidia drivers

Posted in Uncategorized Leave a comment
« Previous PageNext Page »