MAMP could not find folder [closed] - php

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I’ve been using MAMP for many years and after I created a clean install of my Mac. So I installed MAMP again. But this time it will not work.
I installed the program and put my files in htdocs. Started the program and started the server and Apache and MySQL is green. MAMP start page opens and everything works. When I navigate to http://localhost:8888 then the root folder comes up and list existing files & folders.
When I then try to navigate to my test site redirected me to http://www.localhost:8888 and get the message that the page cannot be found.
What can I do about this?
MAMP start page works fine.
Apache & MySQL works fine (Green lights).
MAMP loads htdocs and listing it but can not navigate to further in to the folders in htdocs.

It sounds like your .htaccess file needs changing, as you've got a re-write code in there that will take whatever is in the URL field, and add www. infront of it.
This is usually used in live environments to redirect someone going to http://domain.com to http://www.domain.com
What does your .htaccess file look like?

Related

Cant load PHP files on MAMP localhost [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have a project folder that I've been working on with with WAMP on Windows, but I moved everything over to MAMP on the Mac. I've got the project file uploaded to a webspace and everything works fine, so I know the code is fine. I've imported all the MYSQL data from WAMP.
I can access the .html files with no problems on the Mac but when I try to run a .php file I receive the message localhost is currently unable to handle this request. and the error code 500.
I've been searching for hours and can't find a fix for this.
Any ideas as to why I am seeing these messages and cant access any .php files?
Some extra info on the mamp setup:
Apache port: 8888
MYSQL port: 8889
The first thing that comes to mind is making sure that you hit the correct folder. The easiest way is probably by adding a test.php file in your project public root and putting something like <?php echo "hello world"; in there. And then you just browse to localhost:8888/my-project/test.php and check if the world gets greeted.
The second thing I would do is check the error logs. "localhost is currently unable to handle this request." is not very helpful for debugging. You should be able to find apache_error.log and php_error.log inside /Applications/MAMP/logs
Feel free to ask if that didn't help locating the issue, or if you are still stuck...

How can I get PHP to work on Cpanel when using godaddy after I have purchased the host and domain [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I purchased a host and domain from godaddy and I'm using Cpanel on godaddy for my website. On cpanel, I have added all of my html files with javascript and css on them, and separate javascript and css files as well. However, whenever I add php code, the php does not run. I tried testing simple code such as
<?php
echo "My first PHP script!";
?>
to check, however, "My first PHP script!" does not display on my webpage. Everything else on the webpage using html, javascript, and css works perfectly. Therefore, I am wondering if there is anything else I need to include on the page such any php source code, or is there anything I need to download first before running the code?
As I mentioned in the above comment, make sure that your php code is saved in a .php file and not in a .html file. Also, add your PHP code into the /public_html folder on your server. PHP comes by default with all GoDaddy packages. You don't need to include or install anything.
If it still does not work contact customer service. I found them very helpful whenever I had trouble with my hosting account.

wampserver is preventing me from changing config files [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
i have windows 7 home premium 64bit.
So i decided to try out some php, so i downloaded wampserver. First, i tried to change the index file in the www directory, but even when i quit wampserver by right clicking and clicking exit on the wampserver icon, notepad++ says the file is still open in an other application.
So i tried following this tutorial (How to create a Virtual Host in WampServer) but i cant edit the httpd-vhosts.conf file because of the same issue.
thanks in advance
PS:clicking "stop all services" doesnt work either.
edit:
computer restart did not resolve my issue.
notepad says access denied when trying to save the file.
permissions are read/write
Exit wampserver and run again by right clicking the wampserver and choose run as administrator. Then you should be able to stop and start the services.
Open notepad the same way by right clicking it and choosing Run as Administrator. Then you should be able to save the files.
thanks to raouf Athar. later in the tutorial it said that notepad++ needs to run as administrator to change these files, and it seems that instead of saying "needs administrator", notepad simply says that another program is using the file.
thanks to all who tried to help me

Issues with Apache and PHP [ubuntu] [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I just installed PHP and Apache2 on my laptop (ubuntu 12.04), but I can't get my PHP files to load. I have followed this tutorial: http://www.howtogeek.com/howto/ubuntu/installing-php5-and-apache-on-ubuntu/ , and the index.html file works, but when I try any php, I get a server error.
I looked online for a few hours, and I added "AddType application/x-httpd-php .php" to my httpd.conf (but I don't think I'm supposed to be editing that file for the ubuntu version??) in /etc/apache2/, which somehow let ONE php file load (which just contains phpinfo()). I then tried making a new php file with the same code, but that one won't load (server error). I have no idea why it only loads that specific file. I have tried restarting apache and opening the other one first, but for some reason, it only loads the first file. I also tried to move the file to another directory in /var/www/, but not dice. I hope this makes sense, because I'm a beginner here.
any help would be appreciated!!
I think you didn't install the last version of php, try to install php5
apt-get install php5

PHP Wamp doesn't run [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am trying to run WAMP under my XP. I installed it to C:/wamp, than copied old php files for example like test.php to the www folder in wamp folder, than run it throungh browser from adress file:///C:/wamp/www/test.php. It includes
< ?echo("a");? >
but it still run like html without running code and showing php in source code.
What am I doing wrong?
I was thinking if there exist some browser which will automatically executes php and includes mysql database apache.
Is there something?
And at best run ajax and asp serverside parts
You are showing the file directly by the browser, nothing related to wamp.
What you should do is start wamp (maybe need some config, for example the path, the port .)
Then access your page like : http://localhost/test.php.

Categories