Updating phpmyadmin for wamp server 2.2 - apache

Currently I am using wamp server 2.2 with phpMyAdmin version 3.x.x
I tried upgrading it to the latest version which is 4.1.9
The step that I followed -
1 downloaded the latest version.
2 extracted it in C:\wamp\apps
3 copied config.inc.php from older version to new version folder.
4 changed the C:\wamp\alias to point to the latest version.
5 restarted my wamp server.
now when i try to open phpMyAdmin it gives me http 403 forbidden error.
why is that ?

You might be better advised to keep the new config.inc.php as it uses a better login mechanism that does not require you storing the userid and password in the config.inc.php file, but instead throws you a login screen.
Also check your \wamp\alias\phpmyadmin.conf file. Make sure it has this for the Allow
Allow from 127.0.0.1 localhost ::1
Only add the ::1 ip address if your PC has IPV6 installed and your version of apache is IPV6 aware. Basically if it throws an error about ::1 dont us it it just means you apache is not IPV6 aware.
ANOTHER THOUGHT:
I suppose when you changed the phpmyadmin.conf file to change the
Alias /phpmyadmin "C:/wamp/apps/phpmyadmin4.1.9/"
you also changed the <Directory.....> setting accordingly?
<Directory "c:/wamp/apps/phpmyadmin4.1.9/">

Possibly the folder and files you downloaded don't have proper permissions on the file system. It's been a while since I've had a WAMP setup so I don't recall exactly what it should be, but the Apache user needs at least read permissions on the files and I believe read and execute for folders. (This is the file-system permissions and handled outside of the WAMP configuration).
Also, check your webserver error log for more details.

Related

Disable SSL on localhost using MAMP

Month ago I've installed MAMP (not PRO) and I set SSL for localhost following this tutorial. It works perfectly by the way:
https://torbjornzetterlund.com/how-to-get-ssl-working-on-mamp-for-os-x/
Today I removed MAMP and install it again, but I can't access localhost with http://localhost, it redirects to https:// and connection is not allowed.
The apache config is the default config.
How can I remove/disable the openSSL I set?
I tried solutions mentioned here without success
Wordpress always redirects to https after copying to localhost
But the only thing that worked was to change default MAMP ports under MAMP > Preferences
I ran into a similar issue. I set up a local host SSL environment for the one site as required to develop with the Facebook Api and instagram api.
When I went to update the site to a fresh directory with the newest version in production, it would fail because the SSL is not setup for the new directory yet. Redirecting me to https://www.localhost.
My solution was to backtrack using documentation on how to enable SSL on the site. What I found is this:
This is tested on MAMP Free version, possibly works on PRO but untested.
The instructions state:
Open /Applications/MAMP/conf/apache/httpd.conf and uncomment Include /Applications/MAMP/conf/apache/extra/httpd-ssl.conf.
So I navigated to that directory, opened the httpd-ssl.conf file in my text editor and located the uncommented line, commented this line using "#" and save. Doing this resulted in disabling the ssl behavior and retains all my previous configuration.
When your ready to go back to SSL, uncomment that line and make sure you have reconfigured your ssl to the new directory(Github below explains how to configure for ssl). Here is the github I reference for the work. Good luck!
https://gist.github.com/jfloff/5138826
Line #3
I am using MAMP Free version and accidentally launched the PRO version.
It changed ports for the Free version too... So suddenly localhost and other virtual hosts changed to SSL.
Reseting ports in the Free Version with the button "Set Web & MySQL ports to 80 & 3306" worked for me.

New Virtualhosts load default site since Apache/Ubuntu upgrade

I upgraded our web server from Ubuntu 12.04 to 14.04, which also upgraded Apache from 2.2 to 2.4.
The upgrade was successful and all existing virtualhosts are running great.
I created a new site yesterday and noticed that it was loading the default host instead of the one it should. I checked the .conf file in /etc/apache2/sites-enabled and it does look a little different than the other ones.
I understand that Apache 2.4 has some changes like "Require all granted" which shows in the new .conf file alongside the previous "allow from all". I tried commenting it out but that didn't do anything.
I guess I could try backing up this file and copying over an existing working .conf file and just modify the paths to see if that works - but having to do this for every new site I add in the future is not a solution.
Does anyone experience this during their upgrade process?
--- UPDATE ---
I looked again at the conf file and I noticed that all my other working conf files have 2 distinct differences:
They list the IP next to the port < VirtualHost 1.2.3.4:80 >, the broken one just had an asterisk *
They duplicate the < VirtualHost >, one for port 80, another for port 443
So I added the IP in the broken file in the <VirtualHost...> and duplicated the settings for port 443, restarted apache, and the site worked.
So now it comes down to where in the Virtualmin/Webmin settings would I make adjustments to fix this?
While creating, first option is which IP you want to bind you domain to. That is very IP you have defined against your domain DNS.
But that is only needed if you have bounded IP with port in your conf file.
By default its *:80. So no need to bind.

I am not able to Start Apache on XAMPP on my system windows 7 32 bit

I am not able to run/start Apache through XAMPP on my system windows 7 32 bit. The problem is after installing everything is working okay but Apache is not running or starting.
Getting the following error message:-
Initializing Control Panel Windows Version: Windows 7 Ultimate 32-bit
Initializing module...
Checking for module existence...
Checking for required tools...
Checking for service (name="Apache2.4"): Service installed
error message : Apache Service detected with wrong path
Change XAMPP Apache and Control Panel settings or
Uninstall/disable the other service manually first
Found Path: "C:\Apache24\bin\httpd.exe" -k runservice
Expected Path: "c:\xampp\apache\bin\httpd.exe" -k
Checking default ports...
Executing "net start "Apache2.4""
Return code: 0
I think my system is missing Port 80 which is used by Apache server to run - even I checked it on my system but there is no such port 80 on my system.
How to resolve this issue?
Terminate/exit the programs like skype and other programs that are using the port 80 then start the appache server hope this will start the server. Once appache server start then you can start the skype or other programs. Or even you can change the port of appache server. You can follow this link for changing the server port.
How to change XAMPP apache server port?
Hop this will help you.
port 80 is a virtual port. It is being used by some other Program. Try executing netsh on command prompt.
The most common issue is skype. Refer this question to resolve it.
Apache Service detected with wrong path Change XAMPP Apache and Control Panel settings or Uninstall/disable the other service manually first Found Path: "C:\Apache24\bin\httpd.exe" -k runservice Expected Path: "c:\xampp\apache\bin\httpd.exe" -k
Your answer is on error message. The installed apache loaction is not inside the xampp folder. Try to reinstall or change the configuration.
I've encountered this issue on my Windows 10 environment. I've found that I've configured C:\xampp\apache\conf\extra\httpd-xampp.conf with a new SSLCertificateFile or SSLCertificateKeyFile in one of my virtual hosts that was not existing.
So in my httpd-xampp.conf I have the following:
## mywebsite.local config
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/mywebsite.local"
ServerName mywebsite.local
ServerAlias *.mywebsite.local
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "C:/xampp/htdocs/mywebsite.local"
ServerName mywebsite.local
ServerAlias *.mywebsite.local
## these lines are for my local SSL, here is the issue
SSLEngine on
SSLCertificateFile "crt/mywebsite.local/server.crt" ## this path may not exist
SSLCertificateKeyFile "crt/mywebsite.local/server.key" ## or even this line may not exist
</VirtualHost>
I've found that the path from SSLCertificateFile and SSLCertificateKeyFile doesn't exist.
I've fixed it and not it's working.
All the best!
I had the exact same issue on my system, Windows 10 64bit. I realized that I had edited the httpd.conf file in accordance with a security course I was taking and it rendered my configuration erroneous.
My fix was to uninstall XAMPP from the XAMPP uninstaller located in the XAMPP folder to completely erase all associated files as well as registry files! This was important because I had to do this once before but the uninstaller did not function properly for some reason.
Anyways, completely uninstalling it and reinstalling it leaving all the default settings made it work again. I know how it sounds... delete and re-install, but it finally got my server running, so it might serve as a solution for you and anyone who finds this post. Image of the Apache and my SQL server running without throwing errors.
Also, I found this out recently:
If you are learning to use XAMPP through a website like stackskills, the modules may not alert you to common issues. For example, if you need to change a directory, from C:/XAMPP/Apache to C:/Hacking Software/XAMPP/Apache, (notice the space and lack of underscore in the first part of the directory "HackingSoftware", XAMPP will read the first "space" as the end of an argument, and so you need to have the entire directory written in quotes like this: "C:/Hacking Software/XAMPP/Apache" or write it with underscores C:/Hacking_Software/XAMPP/Apache.
This syntax also applies to the use of the "Alias" command. See this link for more info: http://httpd.apache.org/docs/2.4/mod/core.html#directory.
Use this as a resource for other issues: http://httpd.apache.org/docs/2.4/mod/directives.html

WAMP virtual host displays in Chrome, but Internet Explorer says "Page can't be displayed"

I installed WAMP and followed this guide to set up virtual hosts. In both Google Chrome and Internet Explorer, http://localhost gets me to "WAMPSERVER homepage" with my virtual host listed under "Your Projects."
Clicking that link to http://mysite.local in Chome brings me to my site as expected.
Clicking that link in Internet Explorer displays the following message instead.
This page can’t be displayed
•Make sure the web address http://mysite.local is correct.
•Look for the page with your search engine.
•Refresh the page in a few minutes.
Since I can see the WAMPSERVER homepage as expected in both browsers, I don't think there's a problem with my WAMP installation. Since my virtual host is working in Chrome, I think it must be configured properly in Apache and in my Windows hosts file.
I just don't understand why Internet Explorer isn't working with my virtual host like I expect it to, and the "Page can't be displayed" message doesn't give me anything helpful to work with.
Does anyone have any suggestions for me? I'd greatly appreciate any pointers or links to other guides I can try. Thanks in advance for any replies!
There's several reasons WAMP/MAMP may not work on a local environment, I'll try to list a few reasons here:
Which httpd.conf?
There are sometimes multiple httpd.conf files that can cause things to go a little bit funny. MAMP/WAMP usually tend to keep all their configuration files within a conf/ directory however, that doesn't mean to say some other httpd.conf file is being used...
You can also run this command on Linux based systems to see which one is being used:
apache2ctl -V | grep SERVER_CONFIG_FILE
vhosts definitions not included in httpd.conf
In the httpd.conf file, there's a line to include the vhosts definitions file, it should be uncommented:
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf // remove the #
Incorrect vhosts definitions
Vhosts need to be defined as follows:
<VirtualHost *>
DocumentRoot "C:/path/to/your/local/site"
ServerName mydomain.local
</VirtualHost>
Hosts file
On OS X/Linux systems this can be found at etc/hosts. Edit that to reflect below (note, you'll need to be root)
127.0.0.1 mysite.local
On windows systems, it can be found in %SystemRoot%\System32\drivers\etc\hosts.
Browser caches
Browser caches always cause an issue with local servers/development. It's worth working with incognito mode on, or deleting all browser caches each and every time you open it up. There's a few plugins available for most browsers that should help too.
Other points to note
Whenever you edit anything to do with httpd.conf, vhosts, hosts file - WAMP/MAMP/Apache needs to be restarted. It's a good idea to shut the server down before doing the changes.
You mentioned that there was a hardcoded link in one/some of your files. It's generally regarded as bad practise to do that for this exact reason. Your code is less portable and can 'break' on other systems. I'd suggest using PHP's __FILE__ or similar to achieve what you want.
Alternatively you could set up local configuration files for your app that are only included when they're present. Have a look at this for a good example of such a set up.
Log everything. Check the logs regularly too.

WAMP localhost and phpmyadmin setup

I have inherited a WAMP setup, but needed my http://localhost to point to a different directory "C:/Users/[user.name]/htdocs" due to many dependencies.
I made the following changes in httpd.conf
DocumentRoot "C:/Users/[user.name]/htdocs"
<Directory "C:/Users/[user.name]/htdocs">
where the original path was "c:/wamp/www/"
Now the WAMP default path for phpMyAdmin http://localhost/phpMyAdmin is not working anymore.
Is it possible to fix that via either C:\wamp\alias\phpmyadmin.conf or httpd-vhosts.conf somehow?
Can I suggest a better solution to your requirement to have a site running that does not live in the WAMPServer default location i.e. \wamp\www or \wamp\www\somefolder
If you revert all your httpd.conf changes to the out of the box state and then create a Virtual Host to run the site you have located in your \user.... folder.
Virtual Hosts are a standard Apache feature that allows you to run may sites from a single instance of Apache, a bit like a shared hosting package setup.
You would then have the benefits of the WAMPServer homepage running on localhost and all the other alias's tools as well.
You can then run your site using a nice url for example sitename.dev and the virtual host definition also allows you to setup any site specific requirements without effecting any other site you may want to run.
There is a HowTo Setup Virtual Hosts here on SO