New forum, Global Friends Online
September 4th, 2008You can now discuss with us at http://globalfriendsonline.com ![]()
You can now discuss with us at http://globalfriendsonline.com ![]()
If you try to remove huge amounts of files from a folder (for example bounch emails etc) through command line using rm your remove command may return the following:
-bash: /bin/rm: Argument list too long
Chmod value calculation is very simple, here is a quick tutorial for those who doesn’t know how to do it or tend to forget (like I sometimes do).
Put images you want to protect to one folder and to that folder create a new text file and put the following code to it (replace yourdomain.com with your domain), name it .htaccess :
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]
Easiest way to install SQLite as php extension is to run a command
pecl install sqlite
Often this fails though as if tmp folder is secured (mounted as noexec) with following or similar error:
/bin/sh: bad interpreter: Permission denied
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.ERROR: `phpize’ failed
In this case download sqlite module pack from http://pecl.php.net/package/SQLite , easiest way to download this is to use command:
Elements can be centered using css with:
margin-left: auto;
margin-right: auto;
Quick quide to moving files from one server to another by using wget
With linux shell (over ssh for example) you can easilly chop big .sql or other text filesin pieces with for example following command:
Lets assume your sql file is example.sql. With this command the sql file will be choped to 50m pieces. CD to the directory where the sql file is located and execute following command:
split -b 50m example.sql example_
You will get files example_aa , example_ab and so on.
now you can open any of those files, edit and save. When you are done you can combine those files with a command like for example:
cat example_[aa-bb] > example.sql