Showing posts with label Xampp. Show all posts
Showing posts with label Xampp. Show all posts

Monday 24 February 2014

Installing xampp 1.8.3 on cent os 6.4

1. Download Xampp 1.8.3 for linux
2. Copy "xampp-linux-x64-1.8.3-3-installer.run" into Computer/Filesystem/opt folder
3. Open terminal from opt folder
4. Type below commands

    [root@localhost opt]# chmod +x xampp-linux-x64-1.8.3-3-installer.run
    [root@localhost opt]# ./xampp-linux-x64-1.8.3-3-installer.run

5. Window installation wizard will appear
















6. Complete the installation process

Sunday 3 November 2013

localhost is not working in Xampp after updating Avast

Open Avast
1) Go to "Settings"
2) Go to "Troubleshooting"
3) Expand "Redirect Settings"
4) Under "WEB" look for ignored address
5) Add localhost
6) Open browser and visit your localhost page.

Friday 12 July 2013

Cannot access xampp from internet in Cent OS

Issue

I have xampp installed on Cent OS. I started the xampp server and tried to access it with localhost, it is working. But i cant access it using the system IP. I can ping the server.But I can't  access the server from any other computer on the network.

Solution

The default firewall of CentOS permits ssh input(tcp 22) and icmp(ping). Open a terminal and type


[root@ ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
Try at first stopping your firewall issuing the following command:

[root@ ~]# /etc/init.d/iptables stop
Now, test if you can access your XAMPP server.
Go to File System -> etc - >sysconfig
Open iptables. Remove the below line


-A INPUT -j REJECT --reject-with icmp-host-prohibited
 Add the below new line

iptables -A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 80,443 -j ACCEPT
It enables the ports you need to access(80 , 443).
Now your iptables looks like


# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 80,443 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
Save the file and close it.
Start your firewall issuing the following command:


[root@ ~]# /etc/init.d/iptables start
Now  you can access your XAMPP server using your macine ip address


Monday 29 April 2013

XAMPP is currently only available as 32 bit application. Please use a 32 bit compatibility library for your system.

XAMPP is currently only available as 32 bit application. Please use a 32 bit compatibility library for your system.

This issue mainly faces when you are trying to install xampp in CentOS. It is because CentOS distro and installation lack many of the libraries  including 32 bit compatibility libraries. So it requires more work to get XAMPP running than on other distros like Ubuntu.

Steps to resolve the issue
1. To get 32 bit compatibility libraries type the below command in terminal
     yum -y install glibc* libstd* ld-linux.so.2
2. Start the xampp from terminal
    /opt/lampp/lampp start 

 

Wednesday 13 March 2013

MySQL: The total number of locks exceeds the lock table size

When you are trying to run an update or insert query in a database which contains huge amount of data (crore) in xampp - MySQL, you might see this error

ERROR 1206 (HY000): The total number of locks exceeds the lock table size

Running out of space for locks usually indicates that the small default size of the InnoDB buffer pool is being used or operations on very large tables are being attempted with a huge number of row locks, perhaps comparing several large tables. The only way to fix it for sure is to adjust innodb_buffer_pool_size and restart MySQL. By default, this is set to only 8MB, which is too small for anyone who is using InnoDB to do anything.

Solution
1. Stop MySQL and open my.cnf file which is located in  /opt/lampp/etc/my.cnf  in Linux
2. increase the values of innodb_buffer_pool_size and innodb-log-file-size
for example :

innodb_buffer_pool_size = 2G
innodb-log-file-size = 512 M

innodb-log-file-size should be 25% of innodb_buffer_pool_size

In a dedicated system you can use up to 80% of the total RAM in the system for the InnoDB buffer pool.   
3. Delete the log files ib_logfile0, ib_logfile1 which is located in /opt/lampp/var/mysql 
4. Start MySQL 

Monday 11 March 2013

New XAMPP security concept:fixed

When you download XAMPP 1.8.0. and got the error at
localhost/phpmyadmin


New XAMPP security concept:

Access to the requested object is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".

If you think this is a server error, please contact the webmaster.

Error 403

localhost


Solution

1) Open httpd-xampp.conf which is at /opt/lampp/etc/extra/
2) Find <Directory "/opt/lampp/phpmyadmin">
3) Now just add Require all granted before </Directory>

    <Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
    Require all granted
   </Directory>


4) Find  <LocationMatch and change
  Deny from all 
to 
Allow from all

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|
server-status|server-info))">
        Order deny,allow
        Allow from all
        Allow from ::1 127.0.0.0/8 \
                fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
                fe80::/10 169.254.0.0/16

        ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.
var
</LocationMatch>


5) restart xampp 

Thursday 26 July 2012

MySQL said: Documentation #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

After successfully installed  xampp and type http://localhost/phpmyadmin/ it opens up a page with erroe message:

MySQL said: Documentation #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)


Fix for the issue:
1. open the file config.inc.php in the folder C:\xampp\phpMyAdmin
2. add the following code in the file
   $cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
   (don't forget to save a local copy of config.inc.php before editting)
3. Clear the history of the browser and refresh it.

Thursday 29 March 2012

How to change the apache port for xampp?

By default, Apache Server listens on port 80.
But if that port is already being used by some other application and you dont want to stop that application
or port 80 is blocked by your network admin, you have to change the port of Xampp.

To change it follow the steps:

1. Stop the xampp server, if it is already running.
2. Go to folder "C:\xampp\apache\conf". (By default apache is installed in C folder)
3. Open the file httpd.conf.
4. Search the string "Listen" in the file.
5. Replace port number 80 to any other unused port number.
6. Search for "ServerName" in the file.
7. Replace port number 80 to any other unused port number in the ServerName.
8. Save the httpd.conf.
9. Start the xampp server.

Monday 9 January 2012

Connecting MySQL in xampp with java

phpMyAdmin in xampp server is used  to manage MySQL database.We can connecting java with mysql xampp using the below code:

Prerequisite
Xampp should be installed.


In the java code 
  String url = "jdbc:mysql://localhost:3306/"; ( MySQL server in xampp is installed in port 3306)
  String dbName = "test";
  String driver = "com.mysql.jdbc.Driver";
  String userName = "root";
  String password = "";
  try {
      Class.forName(driver).newInstance();
      Connection con =DriverManager.getConnection(url+dbName,userName,password);

  }
We need to put mysql-connector-java-5.1.18-bin.jar in the classpath.





Monday 17 October 2011

Need to import my database - Error 1046

Issue : I am trying to import a copy of a my website sql database(developed using mysql 5) . When I try to import the backup.sql file via phpmyadmin in xampp 1.7.4, I get the following error.

MySQL said: 

#1046 - No database selected

Resolution:

For the database import, before we attempt to import the "flat" file data in, we need to goto our phpAdmin and create new database and import tables to that database.

CREATE DATABASE DATABASE_NAME


 



Thursday 13 October 2011

Installing XAMPP on Linux

XAMPP is an easy to install Apache distribution containing  Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin. XAMPP is  very easy to install in Linux

Installation steps
1. Download the latest binary of XAMPP from the Apache Friends Web site
    http://www.apachefriends.org/en/xampp-linux.html#374
2. Copy the zip file (xampp-linux-1.7.4(2).tar.gz)in to a folder
3. Open the terminal within the folder.
4. Login as Root.
    cluster3@cluster3-desktop ~/Public/Lekshmi $ su
    Password:
4. Untar it to /opt using the following command:

    tar xvzf xampp-linux-1.7.4.tar.gz -C  /opt

5. XAMPP is now installed in /opt/lampp folder.
6. Open the /opt/lampp folder.
7. Open the terminal in the lampp folder and login as root
8. Start the lampp server using the command

     /opt/lampp/lampp start
      
     cluster3@cluster3-desktop /opt/lampp $ su
     Password:
     cluster3-desktop lampp # /opt/lampp/lampp start
     Starting XAMPP for Linux 1.7.4...
     XAMPP: Starting Apache with SSL (and PHP5)...
     XAMPP: Starting MySQL...
     XAMPP: Starting ProFTPD...
     XAMPP for Linux started.
9. XAMPP is now up and running.
10. Open a browser and type locahost in the address bar and hit the enter key.
      You should be redirected into Xampp home page.