You are here:

MySQL/Setting up environment for web development

Advertisement


Question
QUESTION: If anyone can help with this that will be great - I have put some screenshots to better show what is happening.

I'm trying to set up my working environment to work with PHP JavaScript MySQL. I am using the following tutorial http://lpmj.net/ch02.pdf I have a Mac OS.

I've gotten to page 20. I believe I have successfully followed all the steps to install MAMP. Now that I tried to test the installation I keep getting errors. I type into my browser the url it suggests. http://www.tinyuploads.com/images/Po5pGY.png

the error says - Oops! Google Chrome could not connect to 127.0.0.1 http://www.tinyuploads.com/images/iNbCP0.png

Any ideas on what could be happening? The server is running. http://www.tinyuploads.com/images/yEV7WG.png

ANSWER: Dear sir

The first thing I can spot is that you are not using a public IP address. 127.0.0.1 is an internal ip address and to access the server via an internet browser you will need to asign a public ip address.

I build a large amount of servers daily which are VPS and dedicated servers using linux and installing cpanel, php and mysql.

If you would like help constructing a linux based server and you have a public static ip please let me know and I would be happy to guide you through these steps

---------- FOLLOW-UP ----------

QUESTION: How can it be fixed? I'm just trying to learn some php and I need to set up my development environment. The link of instructions is based off a book that I'm learning from.

Answer
Dear Sir

Its not just a simple answer and can become very costly. First before any web environment can be set up you need to have a static IP address, internet service providers do not give these out for free they charge and not all of them will even allow you to have one.

Once you have a internet service provider that allows you to have a static IP address and you have agreed the monthly fee you can then configure your router. In your router settings you will need to port forward web traffic to your servers mac address. this means that all web traffic pointed to your static IP address will be forwarded to your server once it reaches your router. If your router does not allow this you will need to buy a router that can handle this function. (Not all routers do).

Finally once this has been done in the connection settings of the server you will need to assign the static ip address to the server and also you will need to assign the first and second resolvers.

This is the basics and point in a very short point. I have only ever come across one book that that explains and lets you set up a web server correctly. Books tend to miss out some very big points which leave people standard.

I would like to point you to an alternative. This will save you some big money and a lot of time.

As you said you would like to learn PHP and I assume mysql. for this all you need is a good web hosting package. http://www.webreger.com offers web hosting at 19.99 per year. you will also need a domain name. this will give you tec support and a web environment so that you can learn php, mysql, jquery and much more.

If you would like to learn the server environment as well as coding you will need a VPS package http://www.webreger.com offer these at 13.99 per month, I would also recommend adding cpanel to the server. this will give you everything you will need.

The above two options will have you setup within an hour and save you a lot of money.

MySQL

All Answers


Answers by Expert:


Ask Experts

Volunteer


stuart gregory

Expertise

PHP html, xhtml, css coding and MySQL

Experience

My experiance is all first had as I am web developer and I have, and do build many websites all using php and mysql. This ranges from building a simple search engine to secure php login scripts. Some websites like http://www.web-application-development.info are complete database driven websites.

Organizations
I have a large number of websites which I host and maintain, such as. http://www.webreger.com http://www.universalscience.co.uk http://www.modellingelectronics.co.uk

Education/Credentials
Web application development. (Open University) BSC Honers Computing and development (Open University)

©2016 About.com. All rights reserved.