Archive for the ‘Linux’ Category
Find Apache Document Root
solution: Find Apache Document Root
# grep -i 'DocumentRoot' httpd.conf
# find / -name httpd.conf
or
# locate httpd.conf
(if file here /etc/httpd/conf/httpd.conf)
# grep -i 'DocumentRoot' /etc/httpd/conf/httpd.conf
solution: ffmpeg, libogg, libvorbis, freetype, gcc, faad2, faac
These are the basic tools/libs for video encoding:
sudo yum -y install \
SDL* glew glew-devel libmad-devel tre tre-devel \
libogg libogg-devel libvorbis libvorbis-devel \
boost boost-devel bzip2-devel bzip2-libs fribidi* \
lzo lzo-devel mysql-libs mysql-devel jasper jasper-devel \
faac faac-devel enca enca-devel hal hal-devel hal-libs \
cmake gperf nasm libXmu-devel fontconfig-devel \
freetype-devel libXinerama-devel pcre-devel gcc-c++ \
sqlite-devel curl-devel libsamplerate-devel libcdio-devel \
pulseaudio-libs-devel avahi-devel ffmpeg-devel libmad-devel \
a52dec-devel libdca faad2-devel libmpeg2-devel libass-devel \
libvorbis-devel libogg-devel libmpcdec-devel flac-devel \
wavpack-devel python-devel subversion
Install Fonts in Fedora
- Log in as root or use su at command line
$ su - Go to the font storage directory:
# cd /usr/share/fonts - Create a subdirectory for the Arial fonts:
# mkdir arial - Copy the Arial fonts into this directory from font sites or windows FONTS folder.
- Make the font files accessible systemwide:
# chmod 0775 -R arial - Run fc-cache to cache the arial fonts on system:
# fc-cache arial
http://www.myvirtualdisplay.com/2009/06/28/installing-fonts-in-fedora/
Protect file uploads via PHP
Check server-side MIME type of uploaded files
The PHP form variable $_FILES['file']['type'] does not return correct mime type, so we have to use some php functions like…….
> finfo_file()
> getimagesize()
> exif_imagetype()
if(version_compare(substr(PHP_VERSION,0,1),5) == -1)
{
$san = finfo_open(FILEINFO_MIME);
$mime = finfo_file($san,$FileName);
$tmpvar = explode(";", $mime);
finfo_close($san);
if($mime == "image/jpeg")
{
echo "this is jpeg";
}
else
{
echo "this is not jpeg";
}
}
One can use getID3 [http://getid3.sourceforge.net/] classes to get mime type other than images….
Don’t upload to a web accessible directory
Protect your directory to execute perticular file type by putting a .htacces file in directory
AddType text/plain .php .js .cgi
more help here:
http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html
doc2pdf – unoconv
Convert between any document format supported by OpenOffice
unoconv is a utility which can be used for can be used to convert any OpenOffice supported file to and from to other format…..
<code>/usr/bin/unoconv --server localhost --port 2002 --stdout -f pdf input.doc</code>
Reference:
http://dag.wieers.com/home-made/unoconv/
http://www.lampdeveloper.co.uk/tag/unoconv/
http://www.livedocx.com/
LAMP useful Resources
http://www.canavese.org/resume
http://thinkd2c.blogspot.com/2006_03_01_archive.html
http://www.sajithmr.com/smpp-library-in-php/
http://www.kannel.org/ (SMS)
http://developer.apple.com/internet/webservices/soapphp.html
http://www.vueling-sc.com/SMS-testPost.asp (SMS)
http://www.blogohblog.com/top-10-javascripts-for-image-manipulation/ (js img)
http://jquery.khurshid.com/ifixpng.php
http://phaedo.cx/archives/2007/07/25/tools-for-optimizing-your-website-etag-and-expire-headers-in-django-apache-and-lighttpd/
http://www.ultramegatech.com/blog/2008/12/creating-upload-progress-bar-php/2/
http://www.bigresource.com
http://www.mysqltutorial.org/ (mysql)
http://www.mysqlperformanceblog.com/2007/10/16/ (Mysql)
http://www.mysql-apache-php.com/ (LAMP)
http://myy.helia.fi/~karte/kurssit/lamp-linux-apache-mysql-php-quickstart.html (lamp)
http://www.thegeekstuff.com/2008/09/how-to-install-or-upgrade-lamp-apache-mysql-and-php-stack-on-linux-using-yum/
http://www.mysql-apache-php.com/website_screenshot.htm
http://www.mysql-apache-php.com/apf-firewall.htm (Firewall)
http://www.mysqlperformanceblog.com/2007/10/16/ (Mysql)
http://pingability.com/ (Monitor)
http://www.mysql-apache-php.com/dns-server-tutorial.htm (DNS)
http://www.linuxjournal.com/article/7327 (SPF spam/junk for hotmail, aol etc.)
http://www.onlamp.com/pub/a/onlamp/2008/05/13/creating-applications-with-amazon-ec2-and-s3.html (EC2)
http://ibiblio.org/g2swap/byteofpython/read/what-programmers-say.html (Python)
http://jyotirmaya.blogspot.com/2008/11/xampp-python-django.html (xampp + python)
http://blog.chomperstomp.com/?p=150 (xampp + python)
http://www.prosoxi.gr/2008/12/11/xampp-settings-with-plain-text-configuration-files/ (xampp + php)
http://www.cyberciti.biz/tips/redhat-enterprise-linux-4gb-plus-ram-support.html (more RAM)
http://www.yolinux.com (Articles)
http://www.solarenergyhost.com/content/view/157/155/ (Joomla)
http://fonefinder.net/ (us phone no)
http://www.tp2location.com/ (Phone finder)
http://ffmpeg-php.sourceforge.net/ (ffmpeg-php)
http://www.crucialp.com/resources/tutorials/server-administration/how-to-install-ffmpeg-centos-rhel-redhat-enterprise-easy-way.php (cenOS 4.7 Final)
http://www.cyberciti.biz/faq/explain-mx-record-mx-priority/ (MX Record)
http://www.tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap29sec295.html (FTP user)
http://www.crucialp.com/blog/2008/09/27/how-to-install-webmin-on-ubuntu-7-or-8-by-using-ubuntu-deb-packages/ (Webmin)
http://blog.getasysadmin.com/2009/02/more-apache-benchmarks-using-ec2.html (scalr + EC2 + ubuntu)
http://doxfer.com/Webmin/ProFTPDServer#Configuring_logging (Webmin)
http://dev.sellingsource.com/2006/12/07/sending-wap-push-messages-with-kannel-php/ (Wap Push)
http://www.passitto.com/
http://techandother.wordpress.com/2006/02/01/rapid-web-prototyping-with-open-source-part-5/ (Joomla)
http://wiki.triangle-solutions.com/index.php/SMS_WAP
http://mu.wordpress.org/forums/topic.php?id=10540 (Paypal API)
http://valet.webthing.com/link/ (broken links)
http://codex.wordpress.org/Changing_File_Permissions
http://www.zimbio.com/PHP/articles/144/Htaccess+Example+Codes
http://codex.wordpress.org/htaccess_for_subdirectories (stop script execution)
http://www.bigresource.com/PHP-Stop-Direct-Execution-kZxnWn2H.html
http://www.artzstudio.com/2008/08/using-modconcat-to-speed-up-render-start/ (Combine css, js etc.)
http://aciddrop.com/php-speedy/
http://www.ejeliot.com/blog/72
http://bizrules.info/weblog/2005/08/database_vs_rulebase_vs_knowle.html (DB vs KB)
http://www.securityfocus.com/infocus/1818 (SSL)
http://www.vanemery.com/Linux/Apache/apache-SSL.html (SSL)
http://www.tc.umn.edu/~brams006/selfsign_ubuntu.html (SSL)
http://developer.apple.com/internet/opensource/php.html (PHP on MAc)
http://www.databaseanswers.org/data_models/
http://dhtmlkitchen.com/scripts/tabs/Tabs/demo/dual.html#content4 (key Tabs)
http://jquery.khurshid.com/ifixpng.php
http://blog.scubetech.in/?p=107
Linux Help
Choosing a Boot LoaderEvery operating system provides a tiny program called a boot loader whose job is to load the rest of the operating system into your computer’s memory at boot time. It is typical of the Linux personality that it gives you a choice of boot loaders.
If you will be running Linux on a computer by itself, there is no need to read any further, you want to use LILO as your boot loader. You can skip ahead to the section about LILO. If you are planning for Linux to share your computer with Windows, DOS, or another operating system, your choice will involve a little more discrimination.
When setting up a multiple boot PC with Linux, you have three choices about how to get it loaded: LILO, Loadlin, or floppy. Let’s examine each separately.
Remote Desktop to a Windows Machine in Xubuntu « customising life
Remote Desktop to a Windows Machine in Xubuntu « customising life
Remote Desktop to a Windows Machine in Xubuntu
Published Monday October 23, 2006 Dapper , Windows , Work , XubuntuTo my great surprise, delight and somewhat shame, it was very easy to set up a PPTP connection to my work VPN, should I ever feel the strange need to do some work of a weekend.
Now to setting up a remote desktop connection so I can actually use my work PC.
I’m gonna need two packages to do this; rdesktop (the client application) and grdesktop (a GUI frontend for rdesktop)
Leave a Comment
Leave a Comment
Leave a Comment