clean php files from eval infection
I needed to help a friend to clean all his files from an eval type attack so I used the code bellow to clean all his files. In $str var I put the virus code that was injected (in my … Continue reading
I needed to help a friend to clean all his files from an eval type attack so I used the code bellow to clean all his files. In $str var I put the virus code that was injected (in my … Continue reading
In order to send an email from command line with a custom subject and the content taken from a from file: sendmail -v [email protected] < /path/to/file where path/to/file is something like: Subject: my subject body that i want to send … Continue reading
Sometimes I need to reset all php fastcgi processes especially when I change the php version for users in their php-wrapper pgrep php-cgi | xargs kill -9
I was contacted by a friend which has the website hosted on my server. His website was pretty slow despite the fact the server is very powerful. After some debugging I optimized his tables and the website is instant fast … Continue reading
I hit this error using console of cakephp 2.3.8 but you can encounter this issue on other versions as well. The solution is to edit (command line arguments are not seen) app/Console/cake and on on the line: exec php -q … Continue reading
I wrote a simple batch script to help me export the modified files between two git commits and archive them. The commits can be branches or commit codes. 1. Please save the following code as gitexport.bat: ::simple script for exporting … Continue reading
I simpliefied the code as much as possible var intervalHandler; $(‘#’+obj_id).mousedown(function() { intervalHandler = setInterval(function() { doTheWork(); }, 100); return false; }) $(‘#’+obj_id).mouseup(function() { clearInterval(intervalHandler); }); function doWork() { //I am working here }
A more exact error is “An exception oftype System.Security.Crypthography.CryptographicException” and happened when I was trying to install SharePoint2010 on windows 7 x64 I tried to find a solution and fixed the problem by 1. give full control for NETWORK SERVICE … Continue reading
I installed it for the latest stable version of php 5.3 (5.3.21). Feel free to change the version to your own needs # download the latest stable version from http://pecl.php.net/package/xdebug wget http://pecl.php.net/get/xdebug-2.2.1.tgz # unarchive tar -xf xdebug-2.2.1.tgz cd xdebug-2.2.1 # … Continue reading
Check how many connections an ip has to your server, ordered by the most connections netstat -anp |grep ‘tcp\|udp’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n #check your tcp timeout time … Continue reading