By
Gunjan · February 27, 2010
I have faced a big problem while installing Drupal. I am receiving following error message
[Sun Feb 28 10:00:20 2010] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function _user_password_dynamic_validation() in /usr/share/drupal/install.php on line 710, referer: http://localhost/drupal/install.php?
profile=default&localize=true
To resolve above issue we need to manually update the table values
From shell run following commands.
root@theperfectarts.com[~]#mysql -u USER -p
Enter your mysql user password password
Or you can also
root@theperfectarts.com[~]#mysql
root@theperfectarts.com[~]#use drupal_databasename
Then run following sql statement
root@theperfectarts.com[~]#UPDATE system SET status = 1 WHERE name = ‘block’ OR name = ‘user’ OR name = ‘node’ OR name = ‘filter’;
Now try to install drupal
By
Gunjan · December 11, 2009
In now a days its very easy to inject any forum.You can secure your forum by using following code in your .htaccess
#spam bots SetEnvIfNoCase User-Agent “^EmailSiphon” bad_bot SetEnvIfNoCase User-Agent “^EmailWolf” bad_bot SetEnvIfNoCase User-Agent “^ExtractorPro” bad_bot SetEnvIfNoCase User-Agent “^CherryPicker” bad_bot SetEnvIfNoCase User-Agent “^NICErsPRO” bad_bot SetEnvIfNoCase User-Agent “^Teleport” bad_bot SetEnvIfNoCase User-Agent “^EmailCollector” bad_bot #plagarism bot SetEnvIfNoCase User-Agent “^TurnitinBot” bad_bot #IP bot SetEnvIfNoCase User-Agent “^NPBot” bad_bot #Worm sign SetEnvIfNoCase User-Agent “^LWP::Simple” bad_bot SetEnvIfNoCase User-Agent “^lwp-trivial” bad_bot SetEnvIfNoCase User-Agent “^lwp” bad_bot SetEnvIfNoCase User-Agent “^LWP” bad_bot #Worm sign Order Allow,Deny Allow from all Deny from env=bad_bot
By
Gunjan · November 4, 2009
You can patch openssl version by using following steps but make sure that you are able to SSH server as root user user.
root@gunjan[/usr/local/src]#cd /usr/local/src
root@gunjan[/usr/local/src]#wget http://www.openssl.org/source/openssl-0.9.8h.tar.gz
root@gunjan[/usr/local/src]#tar -zxf openssl-0.9.8h.tar.gz
root@gunjan[/usr/local/src]#cd openssl-0.9.8h
root@gunjan[/usr/local/src]#./Configure –prefix=/usr debug-linux-pentium (or choose right os)
root@gunjan[/usr/local/src]#make
root@gunjan[/usr/local/src]#make install
To check openssl version simply run openssl version
root@gunjan[/usr/local/src]#openssl version
By
Gunjan · October 7, 2009
How to access Awstats From Outside the control panel
Accessing Awstats from outside the control panel is easy.
Step 1.
Download awstats from http://awstats.sourceforge.net
Step 2.
Uncompress awstats-5.6.tgz
Step 3.
Copy the contents of the uncompressed cgi-bin folder from your hard drive to the user cgi-bin directory (this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories).
Step 4.
If necessary (should not be needed with most setups), edit the first (top-most) line of awstats.pl file that is
#!/usr/bin/perl
to reflect the path were your Perl interpreter is installed. Default value works for most of Unix OS, but it also might be #!/usr/local/bin/perl
Step 5.
Move AWStats icon sub-directories and its content into a directory readable by your web server, for example /home/users/public_html/icons
Step 6.
Copy awstats.model.conf file into a new file named awstats.myvirtualhostname.conf. This new file must be stored in /home/user/public_html/cgi-bin.
Step 7.
Edit this new config file with your own setup :
- Change LogFile value with full path of your web server log file (The path is: LogFile=”/usr/local/apache/domlogs/domain.com”).
- Check if LogFormat has the value “1″ (it means “NCSA apache combined/ELF/XLF log format”).
- Change DirIcons parameter to reflect relative path of icon directory. (DirIcons=”/icons”)
- Edit SiteDomain parameter with the main domain name or the intranet web server name used to reach the web site to analyze (Example: www.mydomain.com).
IMPORTANT!
- Change DirData to use the same Statics file than Cpanel Awstats and do not loose any entry.
(DirData=”/home/user/tmp/awstats/”)
Step 8.
Access AwStats by the URL:
www.yourdomain.com/
By
Gunjan · August 28, 2009
To avoid Joomla site to be hacked follow the following steps.
Disable RG_EMULATION for Joomla. When this option is enabled even the latest Joomla is
vulnerable to some variable injections. It can be disabled by placing the following line in
your configuration.php:
if(!defined(‘RG_EMULATION’)) { define( ‘RG_EMULATION’, 0 ); }
————-
Secure your administrator’s area. This will first prevent simple brute-force attacks. Along
with that, all components and modules’ code inside this directory will be safe. For this
purpose:
- Place an .htaccess inside Joomla’s ‘administrator’ directory. It should contain:
Deny from all
Allow from YourIP*
In case your IP changes, you should try securing the directory with Password Protection
If you are using PHP 5.2, make sure that the directive ‘allow_url_include’ is set to off;
If you are using PHP version below 5.2, make sure that the directive ‘allow_url_fopen’ is
set to off.
By
Gunjan · August 25, 2009
Following are the steps to install Magento manually from Shell.
wget http://www.magentocommerce.com/downl…19870.4.tar.gz
wget http://www.magentocommerce.com/downl…0.19870.tar.gz
tar -zxvf magento-1.0.19870.4.tar.gz
tar -zxvf magento-sample-data-1.0.19870.tar.gz
mv magento-sample-data-1.0.19870/media/* magento/media/
mv magento-sample-ta-1.0.19870/magento_sample_data_for_1.0.19870.sql magento/data.sql
cd magento
chmod o+w var var/.htaccess app/etc
chmod -R o+w media
mysql -u DBUSER -pDBPASS DBNAME < data.sql
./pear mage-setup .
./pear install -f magento-core/Mage_All_Latest
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* .htaccess.sample data.sql index.php.sample ../magento-1.0.19870.4.tar.gz ../magento-sample-data-1.0.19870/ ../magento-sample-data-1.0.19870.tar.gz
find . -type d -exec chmod 777 {} \;
If after installation you are facing the “500 Internal Error Server” problem then check Apache logs and correct the ownership and permission for the folders as per logs.