Common Xampp Errors {resolved}

While testing with Xampp we know most of you have come across these errors which make it a bit tough for you to create a local web server for...
Common Xampp Errors

While testing with Xampp we know most of you have come across these errors which make it a bit tough for you to create a local web server for testing and deployment purposes.

Xampp is nothing but an open free and open source cross-platform web server solution stack package developed by Apache Friends.

It mainly consisting mainly of the Apache HTTP ServerMariaDB database, and interpreters for scripts written in thePHP and Perl programming languages. XAMPP stands for Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P).

Before venturing into the errors of Xampp we will first discuss the usage as well as applications of Xampp.

XAMPP was designed as a development tool, to allow website designers and programmers to test their work on their own computers without any access to the Internet.

XAMPP also provides support for creating and manipulating databases in MariaDB and SQLite among others.

While working with XAMPPrunning into issues is normal, especially if you’re working with it for the first time.

When using XAMPP a lot of things might go wrong

  • installation,
  • installing a plugin,
  • importing a large database, and
  • creating a backup of your local website
  • PHP errors and port conflicts are the most common examples of the bugs XAMPP developers run into.

Problem 1: Maximum PHP Execution Time Exceeded

Well!If you are familiar with XAMPP then it might be possible that you already are familiar with this issue i.e. to try to install a large plugin or update the WordPress core and you’re almost guaranteed to see a fatal error message letting you know that the Maximum execution time of 30 seconds was exceeded.

The good news is, this is a really simple problem to fix.

 

So this is what is happening behind the curtains, the settings controlling the version of PHP running on your XAMPP installation are limiting script execution time to 30 seconds. However, it takes longer than 30 seconds to install large plugins, update the WordPress core or perform many other common WordPress operations.

To fix the issue, you need to adjust a single PHP setting in your XAMPP installation’s php.ini file.

There are two ways to get to this file.

  • Open up XAMPP control panel
  • click on Configin the Apache row,
  • Select PHP (php.ini). This will open the file in a text editor.

Or

  • Navigate to your root XAMPP folder
  • Open the php directory and look for the file titled php.ini.
  • Then open that file with your preferred text editor.

Notifications:

Open php.ini in a text editor

find the line maximum execution time (If you’re running the latest version of XAMPP, it should appear on line 368 of the file).

Anytime you make a change to php.ini you must save the file, close it, and then stop and restart Apache in the XAMPP control panel.

Apache only reads the values in php.ini when it starts up. So any changes made to php.ini while Apache is already running won’t take effect until Apache restarts and reads the new values.

Problem 2: Maximum File Size Exceeded

This error again has various reasons for appearance in the XAMPPbut the most common way to run into this error is when attempting to use the media uploader in WordPress to upload an image file larger than 2 MB and while attempting to import a database using phpMyAdmin.

Follow the steps that have been discussed in the above section and look for upload_max_filesize.

. By default, this value is set to 2 megabytes.

Increase the value to a number that will accommodate the size of the file or database you are trying to upload

Notification

Keep the values in the power of 2.

 

Also Before closing php.ini, look for the line that defines post_max_size. This value works hand-in-hand with upload_max_filesize. Increasing one without increasing the other will cause the smaller of the two to be applied as the maximum upload able file size.

 

 

Problem 3: Fixing Apache Port Conflicts

Going by two most profound errors found in Xampp the third will undoubtedly be a notification in the XAMPP control panel that the ports Apache needs to use, ports 443 and 80, are already being used by another application.

Solutions:

  • Once you come across the message close Skype completely and restart XAMPP to solve the problem.
  • Stop World Wide Web Publishing Service, a utility application pre-installed on many Windows computers. To stop it, open up Administrative Tools > Servicesin the Windows Control Panel, look for the application, select it, and click Stop
  • Use Windows Firewall to force the ports to remain unblocked. Do this by opening the Windows Control Panel and navigating to Windows Firewall > Advanced Settings. Then add a new inbound rule forcing ports 80 and 443 to remain unblocked.

To make this change, open the XAMPP control panel but don’t start MySQL or Apache. Now click on Configurein the Apache row and select theApache (httpd.conf) option or use  C:\xampp\apache\conf\httpd.conf to open the file.

Once you have the file open

Locate the line that says LISTEN 80and change it to listen 8080

Next, find the line that says servernam localhost: 80 and change that value to servernamelocalhost:8080.

Save the changes and close the file.

With those changes made, restart XAMPP and start up Apache and MySQL..

 

 

 

Problem 4: stack overflow

Another frequent occurring problem is that of stack overflow with Apache unexpected shutdown

Solution:

From the XAMPP Control Panel

Click the Config button, and

Select the Apache (httpd.conf).

Inside it you will encounter a line saying” httd.conf –listen 80” change it to listen 8080(or any port you prefer).

Repeat same procedure for serverlocalhost

 

From the XAMPP Control Panel

Click the Config button again,

But this time select the Apache (httpd-ssl.conf) and make preferred changes to listen port.

Still from the httpd-ssl.conf file repeat the procedure for <virtualhost_default_:443>&servernamelacalhost.

 

Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.

 

Hope these solutions were of use to you!

Categories
TechTech Tricks

UI/UX DEVELOPER| Author at Anantsoftcomputing.com
No Comment

Leave a Reply

*

*

advertisment

RELATED BY