Seeing PHP code instead of install on Mac localhost using MAMP - php

iMac running Mavericks (10.9.5)
MAMP server (Version 3.2.1)
Installed MAMP about 2 months ago changed default root folder from 8888 (Applications folder/MAMP/ht_docs) to the Sites folder on my iMac. Installed WordPress and built a website. Deleted website and built another one.
When I tried to install WordPress the second time was only seeing the PHP raw page code and not the install page. I worked around this by altering the files but can't really remember what I did. Site was built and all running fine.
I learned now that I can have more than one WP site running on my iMac so have gone through the creation process (new database etc…) but once again am faced with the raw PHP code instead of the install.php.!
Can someone help me? I want to install through the WP installer page as normal.
PHP is ok as I have another site running from the Sites folder.

Related

MAMP 6 - PHP Files being downloaded on a clean install

I don't know what I did, but MAMP just started to download any PHP file I try to access.
So after a good amount of trying to debug, I just decided to do a clean slate. So I uninstalled MAMP 5, and installed MAMP 6 (With the Pro Trial)
So now with a clean slate, I still get the bug. http files seems to run fine.
Right now I'm working on a WP site, and the downloaded file is the index.php at the root of WP.
So what could be forcing MAMP to download files instead of executing PHP?

Windows 10 uninstall Mamp - cannot find C:\MAMP\unins000.exe

Short backstory: Recently I've installed MAMP as I want to start learning PHP. I got version 4.1.1 from the MAMP homepage, Apache didn't start. This seems to be a common bug for that version, I found a solution in downloading version 4.1.0. Both servers started but the Open WebStart Page didn't work.
My Problem: I wanted to try reinstalling it, I deleted the MAMP folder, as I thought that would be sufficient, instead of deleting it in the system settings. Now when I download it again and start the installer it says
MAMP setup has detected existing MAMP installation. You need to remove existing installation before proceeding. Do you want to uninstall it now?
Clicking either yes or no gives me
MAMP setup will now exit and the existing MAMP installation will not be removed.
In the system settings I find
MAMP & MAMP PRO 4.1.0 version 4.1.0 (1.47 GB)
When trying to uninstall it it gives me this error
Windows cannot find 'C:\MAMP\unins000.exe'. Make sure you typed the name correctly, and then try again.
Is there any way, other than reinstalling my whole OS, to solve this problem or do I have to turn to a different web server app?
I just encountered this problem and I hope my solution works for you as well:
Just download the .exe file into another device and install the MAMP.
After a successful installation, just copy the folder to your original device that has the problem.
And then you should find a file with a name starting with "uni" meaning it is for uninstallation. Just run that file and then everything should be fine!
I had the same problem (on OS is windows 10).
I browse the web and found a way:
You can download the ccleaner and use it, it can delete the MAMP.

Wordpress index.php doesn't load on local server

I have a working wordpress site online, running on an Ubuntu 16.04 VPS. I've typically just edited the files via FTP, but I'm trying to get more organized. I'm setting up a development machine with VirtualBox running Ubuntu 16.04 (with Windows as the host OS) so I can experiment. I'm having trouble getting wordpress to load.
I've copied the website files into the VM. I have PHP 7.0.12 installed in the VM. I have the database copied over and it's running fine in the VM. I start the PHP server with
cd /path/to/website/public
php -S 0.0.0.0:8080
When I visit localhost:8080 from Chrome in Windows, I get a Page not found error in chrome. However, I create a public/info.php file with <?php phpinfo(); ?>, and then visit localhost:8080/info.php, I get the correct PHP info page.
I also tried configuring Nginx inside the VM like I have it on the real server. I get the exact same results as with the built in PHP server.
When I visit localhost:8080/wp-admin, I get redirected to the admin page of the live server.
Any idea on what I'm missing or how I might go about debugging the issue?
When move WordPress to another domain, Instead of directly copying Database, we have to use Database migration plugins or manually updating content on DB.
https://wordpress.org/plugins/wp-migrate-db/
https://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs
Then use this updated DB and copied files. That will solve your issue.

Issues with WAMP server after installing OSGeo4W

I recently downloaded WAMP server to get started developing a website locally on my Windows 7 32 bit computer. It was working fine.
Not long after, I downloaded a few different OSGeo4W packages mainly to use QGIS and develop plugins. This is when I began having issues accessing the phpmyadmin local host (page not found error).
I tried uninstalling WAMP in order to re-install it, and now it seems to be taking a very long time to extract files, blocking on the apache 2.4.9 files. Does anyone have any idea if this may be because OSGeo4 installed another version of Apache on my computer? How can I solve this issue?
This is because apache is already running via OSGeo4W application. You can turn it off by launching OSGeo4W-Apache-Monitor and stopping the services. (start/all programs/Apache/OSGEO4W-Apache-Monitor.
Then restart wamp and it should work fine.

Localhost not displaying same components as in the server

Okay so a few days ago I had my localhost running off of Wamp to where the files I was working on were connected to my server (through bitbucket to where I can use git in aptana) and everything was working fine (whatever displayed on my localhost off of Wamp server displayed on my bluehost server of course when everything was up to date).
I had to re-install Wamp and I cloned my project again from bitbuckit into my www directory (through aptana) to where my localhost would be connected to my server again and also imported the database to where the setup should be exactly as on the server.
This time when I go to my localhost on my computer to display the components/webpages it doesn't display everything. It only displays the background of my pages and components being used on all across the entire site.
Since everything on the localhost is exactly the same as server (code and database) it should display like it does on the server.
What could be causing this?
Are there configurations in Wamp that could be causing components to not display?
I have re-installed Wamp multiple times as well as trying this on Xampp and the same thing is happening.
Any help will be much appreciated!
So it turns out that the Wamp/Xampp version I was installing (which were the new versions) had php versions which wasn't compatible with the php version that is off of bluehost server (which is currently at 5.2.17).
So I installed Xampp version 1.7.1 (which supports php version 5.2.8).
And now my local is working exactly as my server...EVERYTHING is displaying as it should!

Categories