Tag Archives: Apache

register_globals

It can be considered as a flag that controls how you access form, server, and environment variables. By default this variable is set to Off, requiring you to use special arrays to access these variables. Its values are set in php.ini file .When the value is set to “on” , PHP will dynamically create global variable for many server variable as well as the query string parameters .

Its always better to set the value as “off”

Magic quotes

Magic quotes is a controversial feature of the PHP scripting language, which was introduced to help newcomers write functioning SQL commands without requiring manual escaping. It was later described and widely misinterpreted as help to prevent inexperienced developers from writing code which is vulnerable to SQL injection attacks. This feature is officially deprecated as of PHP 5.3.0, and removed in PHP 5.4 due to security concerns

Safe mode

Safe mode is a diagnostic mode of a computer operating system (OS). It can also refer to a mode of operation by application software. Safe mode is intended to fix most, if not all problems within an operating system. It is also widely used for removing Rogue security software.

Install Apache Solr on Ubuntu – multicore

1.  Install Tomcat on ubuntu 

sudo apt-get update && apt-get upgrade

sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples

sudo apt-get install libmysql-java

2) Download apache-solr-1.4.1.tar.gz

cd /home/<user-name>/Desktop/

wget -c http://apache.tradebit.com/pub/lucene/solr/1.4.1/apache-solr-1.4.1.zip

unzip apache-solr-1.4.1.zip

sudo cp apache-solr-1.4.1/dist/apache-solr-1.4.1.war /var/lib/tomcat6/webapps/solr.war

sudo cp -R apache-solr-1.4.1/example/solr/ /var/lib/tomcat6/solr/

3) Establish new Solr configuration in Tomcat6

sudo vim /etc/tomcat6/Catalina/localhost/solr.xml

and paste the below given code

<Context docBase=”/var/lib/tomcat6/webapps/solr.war” debug=”0″ privileged=”true” allowLinking=”true” crossContext=”true”>
<Environment name=”solr/home” type=”java.lang.String” value=”/var/lib/tomcat6/solr” override=”true” />
</Context>

4. Create Folder data and Change Solrconfig.xml (For single core) .  create folder in solr in /var/lib/tomcat6/solr/

mkdir data

Change path data in solr/conf/solrconfig.xml

<dataDir>/var/lib/tomcat6/solr/data</dataDir>

5. Enable MultipleCore in Solr 1.4.1

sudo cp -dR apache-solr-1.4.1/example/multicore /var/lib/tomcat6/solr

sudo cp apache-solr-1.4.1/example/multicore/solr.xml /var/lib/tomcat6/solr/solr.xml
sudo cp -R apache-solr-1.4.1/example/multicore/core0 /var/lib/tomcat6/solr/
sudo cp -R apache-solr-1.4.1/example/multicore/core1 /var/lib/tomcat6/solr/
sudo mkdir /var/lib/tomcat6/solr/core0/data
sudo mkdir /var/lib/tomcat6/solr/core1/data
sudo chown -R tomcat6:tomcat6 /var/lib/tomcat6/solr/core0/data/
sudo chown -R tomcat6:tomcat6 /var/lib/tomcat6/solr/core1/data/

6. And at last restart Tomcat

sudo service tomcat6 restart

7. Load  http://localhost:8080/solr/ in your browser

Install Apache Solr on Ubuntu

1.  Install Tomcat on ubuntu

sudo apt-get update && apt-get upgrade

sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples

sudo apt-get install libmysql-java

2) Download apache-solr-1.4.1.tar.gz

cd /home/<user-name>/Desktop/

wget -c http://apache.tradebit.com/pub/lucene/solr/1.4.1/apache-solr-1.4.1.zip

unzip apache-solr-1.4.1.zip

sudo cp apache-solr-1.4.1/dist/apache-solr-1.4.1.war /var/lib/tomcat6/webapps/solr.war

sudo cp -R apache-solr-1.4.1/example/solr/ /var/lib/tomcat6/solr/

3) Establish new Solr configuration in Tomcat6

sudo vim /etc/tomcat6/Catalina/localhost/solr.xml

and paste the below given code

<Context docBase=”/var/lib/tomcat6/webapps/solr.war” debug=”0″ privileged=”true” allowLinking=”true” crossContext=”true”>
<Environment name=”solr/home” type=”java.lang.String” value=”/var/lib/tomcat6/solr” override=”true” />
</Context>

4. Create Folder data and Change Solrconfig.xml (For single core) .  create folder in solr in /var/lib/tomcat6/solr/

mkdir data

Change path data in solr/conf/solrconfig.xml

<dataDir>/var/lib/tomcat6/solr/data</dataDir>

5. And at last restart Tomcat

sudo service tomcat6 restart

6) Load  http://localhost:8080/solr/ in your browser