[Solved] Phpmyadmin Vs commandline mysql import

Phpmyadmin allows GUI interface to import but it also depends on the browser because it runs on localhost, that is webserver so when importing huge amount of data the GUI of phpmyadmin seems to freeze, that browser stops responding.

  • If the file is of small size say around 10-20 MB it wouldn’t make any difference but if the file is of huge i.e. around 100+ MB, at that time it makes difference

As a solutions, we can increase the filesize import limit and execution time limit through php.ini.

And the other solution would be to use the mysql command line to import that is very efficient compared to the GUI for import i.e. in phpmyadmin.

The command is

$ mysql -u root -p -h localhost -D "databasename" < import.sql

Then you’ll be asked for password of mysql, supply your mysql password and wait for few seconds/minutes. The amount of time one has to wait depends on the amount of data which is being dumped. The higher the amount of data means higher the waiting time.

When your data has been successfully dumped you will get a command prompt, without any error messages, which means the data has been successfully dumped.

Above command works for both Windows as well as Linux. I have tried importing the 150 MB of file and it took me around 10 sec.

Hope this helps someone.

Xampp : Session Error

Below are the error in php due to session. This happens usually when server is unable to save the sessions data temporarily due to the improper path settings in session.save_path = “\xampp\tmp”.
Solution is to set the session.savepath correctly to point to directory where server can find it easily.

Warning: session_start() [function.session-start]: open(\xampp\tmp\sess_nsvvoh9f5l55g063d7qka1lq72, O_RDWR) failed: No such file or directory (2) in D:\htdocs\bull_ext\access_control\main.inc on line 39

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at D:\htdocs\bull_ext\access_control\main.inc:39) in D:\htdocs\bull_ext\access_control\main.inc on line 39

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at D:\htdocs\bull_ext\access_control\main.inc:39) in D:\htdocs\bull_ext\access_control\main.inc on line 39

Warning: Cannot modify header information - headers already sent by (output started at D:\htdocs\bull_ext\access_control\main.inc:39) in D:\htdocs\bull3\framework\application.inc on line 589

This settings is stored inside the php.ini file, which can be found under c:\xampp\php\ directory.

First stop the Xampp Server.

session.save_path = "\xampp\tmp"

and change it to look like this

session.save_path = "C:\xampp\tmp"

Restart the Xampp Server. That’s it now your session should work as expected.

Hope this was useful for someone.

[Solved] FAILED ERROR: Magento is already installed

Explanation:
We get this error when re-trying to install magento. This happens because magento stores the log of the previous installation date and before carrying out installation process again it checks for previous installations and it does so by checking the date which is stored inside the xml file → app/etc/local.xml.

Code Snippet from local.xml file

<config>
    <global>
        <install>
            <date><![CDATA[Tue, 15 Mar 2011 15:14:24 +0000]]></date>
        </install>
        <crypt>
            <key><![CDATA[83bf8a0a3ed2788db79e121c00f1cebb]]></key>
        </crypt>
        <disable_local_modules>false</disable_local_modules>
        <resources>
            <db>
                <table_prefix><![CDATA[]]></table_prefix>
            </db>
            <default_setup>
                <connection>
                    <host><![CDATA[localhost]]></host>
                    <username><![CDATA[root]]></username>
                    <password><![CDATA[]]></password>
                    <dbname><![CDATA[magento]]></dbname>
                    <active>1</active>
                </connection>
            </default_setup>
        </resources>
        <session_save><![CDATA[db]]></session_save>
    </global>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[admin]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>

Solutions:
There are two solutions for this problem.

  1. Delete the local.xml file entirely, Re-installation will create this file again.
  2. Edit the file local.xml and delete the date portion (line 4)

Make this portion of code snippet

 <date><![CDATA[Tue, 15 Mar 2011 15:14:24 +0000]]></date>

to look like this, See the difference, I just delete d everything in between CDATA[].

 <date><![CDATA[]]></date>

Re-installing the magento will fill it again. That’s it. Now you should be able to install magento as usual visiting the page http://magentotest.com/magento/install.php

Hope this helps you.

[Solved] WordPress Visual Editor Not Working or Not Appearing

This might be due to the broken ftp upload. Well Mine was due to the broken ftp uploads due to slow internet connection. When I faced this problem I went for usual solutions like checking

  • If Visual Editor is Enable or not ( Users → Authors & Users )
  • Looking for options to enable Visual Editor ( User → Select user → uncheck mark Disable Visual Editor )

But those solutions didn’t seem to have any effect. Then I went for digging, as I was curious what might be the problem, when I compared my wordpress local folder tree for tinyMCE (Visual Editor Used for WordPress) I found that some folders and files were. I suspected if they were the problem. Then rather than using the FireFtp Addons for firefox I used the browser based FTP service, link is given below:

  • http://www.net2ftp.com to upload my files which also supports zip upload and decompression

Once I uploaded all files, I just made confirmation that everything was ok, and came back to wordpress dashboard and Created New Post Voila !!! It was there tinyMce Working as expected.

Other problem that I notice was

Add/Edit Image Pop-up was not working in Add New Post.

This problem was due to the missing javascript files, which after uploading worked well. This problem usually happens when you are upgrading wordpress from lower version to newer version. So after upgrading we have to have make sure that everything is working as expected, and before going live its always better to have check it locally i.e. test in localhost.

I wrote made a little note here so that it might be helpful for other having the same problem. If you find it helpful you can help me too by click on the link above where it says ads by google.

References : http://wordpress.org/support/topic/addedit-image-pop-up-not-working-in-post