I starting with php

Posted on 2016-08-17
Last Modified: 2016-11-27
Hi all,
im starting with php
how to run and compile, i be able to run  it microsoft visual studio?
or how is the best advice for star coding and publishing web pages  with php?
regards you experts
Question by:edo60
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +6
LVL 43

Assisted Solution

by:zephyr_hex (Megan)
zephyr_hex (Megan) earned 50 total points
ID: 41759875
Visual Studio doesn't support PHP.  You'll need a different editor.  There are a lot of good ones to choose from (just google it).  I personally use NetBeans.

PHP doesn't compile.  To run / publish it, you just put the PHP file on a server that has PHP installed.

I'm sure many experts will have different ideas on how to start.  My recommendation is that you learn HTML first, and learn the difference between server side and client side processing, as well as the fundamentals of what happens when a user navigates to a PHP file with their web browser (what happens on the server in order to allow the user to see the page?).

You should also understand the basics of web forms, and how to pass variables / data using forms ($_GET and $_POST).

Once you're able to create a basic web form, you'll probably want to delve into learning how to interact with a database from PHP.  MySQL is often used with PHP.

Oh, and I also recommend that you start reading PHP questions here at E-E and attempt to resolve other people's problems.  I've learned so much in working through various problems.
LVL 13

Assisted Solution

by:Abhijeet Rananaware
Abhijeet Rananaware earned 50 total points
ID: 41759891
For Windows install wamp or xamp server locally.

For wamp put your project code inside C:\wamp\www\PROJECT_NAME\filename.php

You can run it in browser using http://localhost/PROJECT_NAME/filename.php

For Xamp path will be different


LVL 29

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 50 total points
ID: 41759928
Visual Studio is the wrong vendor. There once were IronPython, IronRuby, and IronPHP involving the .NET Framework with these scripting languages, but I don't hear anything about these today.

You may also start more modern in the cloud age and use an online development environment like codeanywhere.

For starters, though, and to also learn a bit about all the tooling including web server, database server and IDE I'd recommend installing XAMPP. XAMPP not only lowers your work about the initial setup, it also includes an Add-On system from Bitnami to easily install Wordpress or other systems.

Once you're having that I'd rather start coding with a simple PHP capable editor like Notepad++. You should aim for PHPStorm as your IDE, but to make better use of the trial period you should learn some PHP first, also to see, whether it is for you at all.

Here's a very strong warning: While PHP is considered an easy beginner programming language, web development itself is involving many things and you may get overwhelmed by also having to learn HTML, CSS and Javascript, SQL and some knowledge in HTTP and web server configuration and other side knowledge to glue this together.

And that's also not the end, basic PHP knowledge will not bring jobs to you, you should also choose yet another thing. What framework in conjunction with PHP will you aim for? Today's two best candidates are Symfony and Laravel. And then it'll also help to know a CMS and Shop System, further things on your to-do list...

Bye, Olaf.
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.


Author Comment

ID: 41759945
oh man, so encouraging messages!
LVL 110

Accepted Solution

Ray Paseur earned 250 total points
ID: 41759954
There is a lot to learn.  Here's a good place to start, with links to best-of-breed learning resources.

Here are (some of) the things to avoid.

PHP depends on the client/server protocols.

The state-of-the-art PHP Editor / IDE is PhpStorm.
However, for just starting out with PHP, you're better off using a plain text editor and writing a few lines of code, just to see what the common errors and pitfalls are.  Then you will know how to spot them, and more importantly, how to avoid them.

You may already know this stuff from your work in other languages, but PHP has a reasonably good object model.

Patterns of test-driven development are popular among PHP professionals.

Some of the most common questions and misunderstandings arise about date/time processing.

Generally speaking, I would avoid Windows and jump right into Linux.  A week or two and you'll know most everything you need to know about the command line.  Without this knowledge, you find that a lot of good information is out of reach.  Personally I use Windows only as a text-editor platform.  I upload all my PHP scripts to a Linux server and run all my tests over the internet, getting the test environment to be a close match with the deployed environment.

Best of luck with your learning adventures!
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 50 total points
ID: 41760033
As you may figured out from the responses above, PHP is almost entirely different than coding with any of the languages supported by Visual Studio.  One of the most important things in my opinion is that PHP doesn't hide anything from you while language statements like 'runat server' in .NET languages are almost always hiding something from you that shows up differently in the browser.
LVL 12

Assisted Solution

jet-black earned 50 total points
ID: 41760152
I think you should start with a course like The Complete Web Developer Course - Build 14 Websites.
I think "learning by doing" approach is the best way to get experience on programming.

For the IDE choice, it is really hard to tell the best one. You'll need to try out several IDEs and choose your favorite one. I personally use NuSphere PhpED but there are other powerful IDEs like PhpStorm, Zend Studio, etc. (Here is the list of some of them)
If you want to use Visual Studio for PHP development, this is also possible: VS.Php, PHP Tools for Visual Studio
LVL 43

Expert Comment

by:zephyr_hex (Megan)
ID: 41796769
edo60 - did any of these responses answer your question?  If so, please close your question and mark the answer(s).

Author Closing Comment

ID: 41798604
thank you all

Expert Comment

ID: 41798643
I agree with Ray that Linux is the way to go about it. Install a linux operating system, then install Apache, MySQL, and PHP and you can start there.

The essential PHP and MySQL class on was the first class that really clicked for me. I've been working out of Larry Ullman's PHP and MySQL and that book has been helpful.

Other books I would recommend are Advanced PHP and Object Oriented Programming by Larry Ullman, PHP Objects Patterns and Classes, and Essential PHP Security. I would also highly recommend the book Modern PHP, I'm not there yet but I see the potential after skimming through it - PHP has evolved the past few years into a language that can support large scale enterprise applications and there are a lot of new features in it.

I realize this is a lot but once you get used to the idea that one book won't "teach" you PHP all the way through you kind of accept it and the more you do you have an idea of what you have to do - that's where I am now.

Good luck.

Expert Comment

ID: 41800082
Definitely get PHP Objects Patterns and Practice.

Once you complete Advanced PHP and Object Oriented Programming you will be able to work with frameworks, but Objects Patterns and Practice will allow you to evaluate frameworks and how well they are coded.

PHP and MySQL for Dynamic Websites is the place to start. If you have trouble with it start at PHP for the Web (same author) but that book is a little watered down so I would just start at PHP and MySQL for Dynamic Websites.

Expert Comment

ID: 41903601
Nowadays you can develop and debug PHP projects with Visual Studio using an extension called PHP Tools . There used to be another one called VS PHP but it seems its development is dead. There is a free version of PHP Tools that can work with Visual Studio Community Edition 2013, 2015 and 2017. There is a tutorial for PHP Tools extension here as well part 2 and part 3.

Anyway there are several other IDEs that work on Windows, just are not Visual Studio. Here is a comparison side by side of PHP IDEs actively being developed nowadays, some are commercial but others are free or have free versions.

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question