Jump to content

PHP file read by webserver?


eduard

Recommended Posts

I don´t understand it! Is it so difficult to explain to a simple computer user who is just a beginner in programming how things work???
What do you think they've been doing? :)They're trying to explain it to you. You can't just run a PHP file from anyplace on your computer. It has to be in the web root somewhere. You need to figure out where your webroot is, and save your PHP files there.
Link to comment
Share on other sites

  • Replies 71
  • Created
  • Last Reply
What do you think they've been doing? :)They're trying to explain it to you. You can't just run a PHP file from anyplace on your computer. It has to be in the web root somewhere. You need to figure out where your webroot is, and save your PHP files there.
A webroot? What is a webroot?
Link to comment
Share on other sites

I don´t understand it! Is it so difficult to explain to a simple computer user who is just a beginner in programming how things work???
Well, apparently it is. I don't know where you installed MAMP. You should know where you installed it. If you don't, then you weren't paying attention when you installed it. You need to figure out where MAMP put the Apache files, and you need to save your PHP files where Apache is looking for them. It's your computer, you need to be able to find that location and use it. I can't do that for you.
Link to comment
Share on other sites

dsonesuk and justsomeguy basically said the same thing, but differently... considering you thanked dsonesuk... did you tried what he said? Did it worked? What part of THAT explanation didn't you understand?

Link to comment
Share on other sites

A webroot? What is a webroot?
The webroot is the directory tree on your computer where the server looks for PHP files (among others). This is what everyone has been trying to get you to locate. Like jsg said, we can't know where you installed MAMP. You need to figure that out.
Link to comment
Share on other sites

Do you know how I call this: PREJUDIGE I hate prejudiges!
chill out. did you even bother reading my post exmplaining this entire time what you have been looking for? I even explained to you the terms you are confused about.
tried what?the post showed you how to test documents once you found out where your webroot is. That URL in the Apache tab is just where you can set the path to your webroot, which is the same as typing in localhost into your web browser. You need to be more specific about what you tried other than opening a menu option. A couple things: * you may need to specify a port. The start stop tab might have one shown, in which case your browser URL may need to look like
http://localhost:8888/

* also in the the start/stop tab, there is an option to open the root directory in the browser automatically. You could try turning checking that. Then it should open that each time you run MAMP.* check these things, make sure there is an example .php page in the webroot folder from the Apache tab like ApocolypseX showed you, and come back with the status.[/b]

all you need to do is just relax and really just read all this posts thoroughly. Everything you need to know has been explained multiple times in a couple of different threads.
Link to comment
Share on other sites

and for the record, as many times as you've asked questions, I've given you honest and good information to help you each time. After all that, calling me prejudiced because I'm trying to make you realize that you have to be more pro-active in establishing your own career if you really want to make it in this industry, I think is totally missing the point. If you were just one of the many other people who come on here looking for help because they are doing this as a hobby or something on the side, that's different. It's a whole different ballgame when you come here to establish yourself as someone who wants to make a living off their work. Expect people to be honest and critical, unless you don't mind getting away with hack work. You may get away with a couple of jobs before anyone catches on, but eventually someone's going to figure it out. At my job, my boss is always suggesting different and better ways I could have done my work, but I don't get frustrated with it (usually) because almost always he's right. But now that he's shown me how to make my work better, I'm grateful and I make sure I do it better the next time. But he's not paying me to teach him. I have to present serious work everyday. A lot of it I learn as I go, and reading books and other people's code. You always have to be wanting to learn and be motivated in this industry. Stuff changes all the time.

Link to comment
Share on other sites

I´ve installed MAMP, but the Apache server is not running! I cannot read my PHP files! Should I also change the numbers of my ports?

Link to comment
Share on other sites

maybe. I said something about that in my last post in your other thread. :)More importantly, the server needs to be running though. You should probably do that first before you can expect to read PHP files.

Link to comment
Share on other sites

and for the record, as many times as you've asked questions, I've given you honest and good information to help you each time. After all that, calling me prejudiced because I'm trying to make you realize that you have to be more pro-active in establishing your own career if you really want to make it in this industry, I think is totally missing the point. If you were just one of the many other people who come on here looking for help because they are doing this as a hobby or something on the side, that's different. It's a whole different ballgame when you come here to establish yourself as someone who wants to make a living off their work. Expect people to be honest and critical, unless you don't mind getting away with hack work. You may get away with a couple of jobs before anyone catches on, but eventually someone's going to figure it out. At my job, my boss is always suggesting different and better ways I could have done my work, but I don't get frustrated with it (usually) because almost always he's right. But now that he's shown me how to make my work better, I'm grateful and I make sure I do it better the next time. But he's not paying me to teach him. I have to present serious work everyday. A lot of it I learn as I go, and reading books and other people's code. You always have to be wanting to learn and be motivated in this industry. Stuff changes all the time.
Thanks! But that´s the point I´ve always been motivated (and I´ll always be!). I think the difference is, that you are (moderators) experienced and I am a beginner!
Link to comment
Share on other sites

I think the difference is, that you are (moderators) experienced and I am a beginner!
I think the difference is that you don't do your own research. You can do plenty of Google searches to figure out how MAMP works. You can post questions on the MAMP forums about how to get it set up. You can read the MAMP documentation and installation instructions. I don't think you've done any of that, you're just asking us. One of the best skills you can develop is being able to do the research to find the answers yourself.
Link to comment
Share on other sites

dsonesuk and justsomeguy basically said the same thing, but differently... considering you thanked dsonesuk... did you tried what he said? Did it worked? What part of THAT explanation didn't you understand?
I tried everything dsoneuk said, but it doesn´t work! My Apache server is not running! Why???Do I have to configure the ports of MAMP?
Link to comment
Share on other sites

I think the difference is that you don't do your own research. You can do plenty of Google searches to figure out how MAMP works. You can post questions on the MAMP forums about how to get it set up. You can read the MAMP documentation and installation instructions. I don't think you've done any of that, you're just asking us. One of the best skills you can develop is being able to do the research to find the answers yourself.
Sorry, I did read the installation instructions!
Link to comment
Share on other sites

I tried everything dsoneuk said, but it doesn´t work! My Apache server is not running! Why???Do I have to configure the ports of MAMP?
good grief, did you read my post yet?. I explicitly addressed your issues of ports. But you didn't give feedback. When you start MAMP, it should have colored lights to tell you the server's started. I also said that there's an option to check in MAMP's preference so that your browser will automatically open to localhost in your browser when MAMP is started. Combined with me telling you how to find your webroot, you should be able to put a test file in that directory, call it index.php, start MAMP, and it should automatically launch the page.dsonsuk gave you the likeliest path to your webroot (which I said can be set/referenced from MAMP preferences):Applicatations/MAMP/htdocsJust open Finder and Applications should be clickable in the left hand column.
Link to comment
Share on other sites

I think I know what the problem is! If I use my wordprocessor (text-editor) I can´t save .php files properly (name remains grey not black as it should be!)So the first thing I´ve to know how do I save .php files right!

Link to comment
Share on other sites

you could just manually change the extension after you save it. But it would probably be easier to get a nice text editor for your work. Get something like textWrangler or Smultron.edit: whoa, that was weird. posted mid-merge! :)

Link to comment
Share on other sites

you could just manually change the extension after you save it. But it would probably be easier to get a nice text editor for your work. Get something like textWrangler or Smultron.edit: whoa, that was weird. posted mid-merge! :)
But the question always is: Is it compatible with Mac? (Whatever I do I can´t open the file!)
Link to comment
Share on other sites

But the question always is: Is it compatible with Mac? (Whatever I do I can´t open the file!)
both of those are for Mac. I used textWrangler and then I switched to Smultron a few months ago. Everyone on this forum knows you own a Mac by now.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...