Showing posts with label WAMP. Show all posts
Showing posts with label WAMP. Show all posts

Friday, 14 February 2020

How to increase database file upload limit(import database file) in phpMyAdmin.

The default upload limit is 2MB to import any database in phpMyAdmin. So if have any file larger than 2MB to import, we would not be able to import the file to database.

You can increase this limit to upload any file size supported to server.

To increase file size, you have to open file php.ini

In Linux, this file can found in /etc directory.

In Windows, It can be opened by  click on WAMP server icon on Windows taskbar/ System tray.

Just click on WAMP icon -----> PHP -----php.ini






Find two entries in this file-

1.  upload_max_filesize
2.  posr_max_size

And change these values to your required file size e.g. 10M




Friday, 22 March 2019

How to recover data/databases/tables from mysql in WAMP server.

Suppose you are running WAMP server on your local system and due to bad luck your WAMP server got corrupted or unable to start. You must have created some databases and tables in your MYSQL, then you would be unable to access these data. So, now here question arises that, any how we can get this data/databases/tables and recover our databases and tables.

Answer is "yes".

There might be several ways to recover data, but what I applied was very simple and hassle free. Let see, how I recovered my data.

I have applied this method on WAMP Server 3.1.7 on 64 bit Windows Server 2016.

Copy your old WAMP server data of location your_root_wampserver_folder\bin\mysql\mysql5.7.24\data ( in my case it was D:\wamp64\bin\mysql\mysql5.7.24\data ). Copy either data folder or data of data folder for recovery to any location.

Note:- You can see your all databases name as folder in data folder, you have been previously created.

Now back up your new installed WAMP server MYSQL data folder (location your_root_wampserver_folder\bin\mysql\mysql5.7.24\data) data to any safe location.

 After backing up after data folder of your new system, copy the old data folder to new data folder.

Important :- Both WAMP versions should be same.

Thursday, 21 March 2019

Allow access of WAMP server from another system (Forbidden : You don't have permission to access / on this server.)

When we install WAMP server on new system, if it is installed successfully, it works fine on system, but when we try to access it from another system we got error like-



Let see how it can be resolved ?

For WAMP server > 3

Click on WAMP icon in the tray of icons situated in right hand side of task bar. Then click on Apache -------> httpd-vhosts.conf



httpd-vhosts.conf file will be opened with following text -

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
  </Directory>
</VirtualHost>

Change Requie local line to Require all granted

Now httpd-vhosts.conf will look like -

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
   Require all granted
  </Directory>
</VirtualHost>

Then save the file and restart the server.

You should also check the colour of WAMP server icon in tray, it should be green.

For WAMP server < 3


If you have installed WAMP server version less than 3, the you have to change in httpd.conf file and search offlineonline tag in the file and replace it from

#   onlineoffline tag - don't remove
    Order Deny, Allow
    Deny from all

to


#   onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from all

and save the file then restart the server.

Another way to resolve it to check that server is offline or online.

Click on WAMP icon in tray and the click on Put Online (See the WAMP icon in Offline Mode and Online mode, there is a change in icon)





Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...