localhost error #500 MAMP - php

Yesterday I transferred a live WordPress site and successfully setup my local dev environment using MAMP. I was able to get my database exported from my live site and imported locally. I was able to login and see my site, but to my surprise this morning, I am not able to access the site anymore. I am however able to access my localhost, but once I select and enter the root folder I get the always unwelcome "localhost is currently unable to handle this request. error 500".
I am not sure what's happened since yesterday to cause this and I've searched the forums, but I'm at a loss. I am new to local PHP development, so I might be missing something simple. I appreciate any and all help.

Related

After deploying wordpress project to server not loading wordpress

I am working on a WordPress project, the job is to deploy everything from the old server to the new server.
So I downloaded everything from the old server.
I deployed a WordPress project to paid hosting, I deployed manually by pushing all the public_html folder to the server.
First, without a database connection, it was showing me a database connection error but after the database connection, it is showing me a hosting page instead of my WordPress project page.
How can I fix it and is there a configuration that needs to be fixed?
Kindly guide me and help me in this matter.
Also is it a domain configuration issue?
The domain is configuration is on the old server and I didn't set it up for the new server yet.
Thanks.
I faced similar issues yesteday when i tried to move my woocommerce exercise from localhost to my domain(live hosting),broken all links,images,routes etc ...There is no way to fix all that whithout paid plugins, maybe someone can go through whole db and change URL-s,i cant,and after that, the question remains whether I have problems elsewhere in the local WP code,who know where in code i also have embed "localhost" URL.
I cant give you solution but i must share my frustration with this tehnology which doesnt allow normall development process like 1)development -> 2)testing -> 3)deployment .

PhpMyAdmin Switch Localhost Account

A few months back, I had one website hosted on localhost, via WAMP. I was able to perform everything I needed with no issues. I was able to connect to PhpMyAdmin via localhost/phpmyadmin with the default user and pass.
At that point, I started a new project, and moved the localhost to point to this new project. Along with this, I switched the phpmyadmin used to use this new project's database.
I've now tried to resume development on the original project, but anytime I go to localhost/phpmyadmin and log in, it's still pointing to the 2nd project. Both usernames and passwords for localhost/phpmyadmin are still the default root and empty password.
I've tried to go through the .conf files within wamp but have not found anything that has helped.
I can access the correct site via localhost, but localhost/phpmyadmin logs me into the wrong database.
Any help would be appreciated! I'm sure it's just one of the .conf files, but I'm unsure which one.

Why curl Couldn't resolve host intermittently?

I have a web service application that works fine in my local. I have even installed ngrok and I'm able to call it on the public web. But as I put my code on our production server I keep getting the 'Couldn't resolve host' error. I'm using different APIs in my service and intermittently I get this error. (I use apache in my local and nginx on prod)
For example I work with googleapis.com and sometimes it works and sometimes it doesn't on the server. The exact same code works just fine on my local.
It's worth mentioning that I've had this application for few months on this server and it's only this past few days that I've started to get these type of errors.
BTW I've noticed that the Curl version in my local and production and their settings are different but I don't know if that could be the source of the problem because it was working just fine.
I would appreciate any kind of guidance.

laravel localhost base_url 500

I've had an app built for me using laravel and I'm trying to get it running on my local machine (MacBook pro running MAMP).
The lead developer is currently away so i was hoping someone could help me with my problem!
No matter what I do, I only get a white page when trying to run the app from a browser, even though I believe I've set the config and htaccess file correctly.
Mamp is running on port 8888 and the app is in the 'event' directory. The config file has the base url as:
$config['base_url'] = 'http://localhost:8888/event/';
but all I get is a white page. I have checked php and thats running fine, and if I call other files outside of the laravel app they all work.
I'm wondering if there's a way I can diagnose the issue using the developer bar or some other tool? At the moment all I can see is a 500 error.
Thanks!

transferred laravel from godaddy to hostgator and routes don't seem to work

laravel was working fine when I am hosting with GoDaddy but recently I transferred my domain to hostgator first time on hostgator and so I moved all laravel contents from GoDaddy to Hostgator by downloading everything from ftp then transferred all files over. Database with godaddy and hostgator are different and so I created database in hostgator and implement everything needed but somehow when I load up my page in hostgator my page loads but when I click on any of the links in the page I keep on getting the 404.html.
At first I thought it was because my database info isn't set correctly because it's my first using using hostgator and their database uses localhost instead of like GoDaddy it has an ip for me to use as a host.
Anyways then I uploaded some other things into hostgator which isn't using laravel just normal php with database info and this works fine. So now I am confused if it is because of laravel or it is hostgator? I have no idea where to start looking for what the problem is
I was told by hostgator that they can migrate contents at a charge and everything will work perfectly the same as it was with godaddy but I figured this is a time I can learn if anything happens
I am sorry if this a stupid question. Can someone please give me a hand? Thanks a lot
my folder structure
-root
-public_html
-user-login (laravel folder)
P.S. I have a free account with aws ec2 and I tried transferring all the files into aws-ec2 and I can see other pages fine just that let's say if I try to login it gives me errors which is normal since I didn't have database setup correctly but at least the links works
Alright, I found out why and pretty much my stupidity I believe.
Somehow, as I said using hostgator (without a domain) I was loading the page using http://ip/myname/laravel/public and I can only see the index page any other links gives me error404.
I was still waiting for my domain transfer at that time so I had to load my page with my ip/username in order to load my pages.
Somehow after my domain is transferred and namespace is set in place.
For example my domain is www.domain.com after the transfer is complete and namespace is setup in hostgator now I can load the page as http://www.domain.com/laravel/public AH~ and all links are working fine as before.
No idea what's the real reason behind this but after this, everything works like a charm now
If anyone has an idea the reason why, I wouldn't mind you posting / commenting here to gain my knowledge

Categories