<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://wiki.asterix.co.za/html/index.php?action=history&amp;feed=atom&amp;title=Setting_up_a_PHP_project</id>
	<title>Setting up a PHP project - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.asterix.co.za/html/index.php?action=history&amp;feed=atom&amp;title=Setting_up_a_PHP_project"/>
	<link rel="alternate" type="text/html" href="http://wiki.asterix.co.za/html/index.php?title=Setting_up_a_PHP_project&amp;action=history"/>
	<updated>2026-05-20T16:47:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>http://wiki.asterix.co.za/html/index.php?title=Setting_up_a_PHP_project&amp;diff=7&amp;oldid=prev</id>
		<title>Prothumia: Created page with &quot;See [https://netbeans.org/kb/docs/php/quickstart.html NetBeans IDE PHP Quick Start Tutorial] for more.  == PHP Application ==  To start setting up a PHP project...   Inside NetBeans, you&#039;ll see a, &quot;Projects&quot; tab...  Inside this tab, right click and hit, &quot;New Project...&quot;  Then on the frame that open up, select &quot;PHP&quot;...  Then click on &quot;PHP Application&quot;...  The other options you see here, such as PHP Application with Existing Sources would also interest you, but lets ke...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.asterix.co.za/html/index.php?title=Setting_up_a_PHP_project&amp;diff=7&amp;oldid=prev"/>
		<updated>2023-11-18T19:06:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;See [https://netbeans.org/kb/docs/php/quickstart.html NetBeans IDE PHP Quick Start Tutorial] for more.  == PHP Application ==  To start setting up a PHP project...   Inside NetBeans, you&amp;#039;ll see a, &amp;quot;Projects&amp;quot; tab...  Inside this tab, right click and hit, &amp;quot;New Project...&amp;quot;  Then on the frame that open up, select &amp;quot;PHP&amp;quot;...  Then click on &amp;quot;PHP Application&amp;quot;...  The other options you see here, such as &lt;a href=&quot;/html/index.php?title=PHP_Application_with_Existing_Sources&quot; title=&quot;PHP Application with Existing Sources&quot;&gt;PHP Application with Existing Sources&lt;/a&gt; would also interest you, but lets ke...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;See [https://netbeans.org/kb/docs/php/quickstart.html NetBeans IDE PHP Quick Start Tutorial] for more.&lt;br /&gt;
&lt;br /&gt;
== PHP Application ==&lt;br /&gt;
&lt;br /&gt;
To start setting up a PHP project...&lt;br /&gt;
&lt;br /&gt;
 Inside NetBeans, you&amp;#039;ll see a, &amp;quot;Projects&amp;quot; tab...&lt;br /&gt;
 Inside this tab, right click and hit, &amp;quot;New Project...&amp;quot;&lt;br /&gt;
 Then on the frame that open up, select &amp;quot;PHP&amp;quot;...&lt;br /&gt;
 Then click on &amp;quot;PHP Application&amp;quot;...&lt;br /&gt;
&lt;br /&gt;
The other options you see here, such as [[PHP Application with Existing Sources]] would also interest you, but lets keep this simple for now ....one simple step at a time, where you and me stay on the same page&lt;br /&gt;
&lt;br /&gt;
After clicking on &amp;quot;PHP Application&amp;quot;, click on, &amp;quot;Next&amp;quot; to get to &amp;#039;&amp;#039;&amp;#039;New PHP Project&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Name and Location ==&lt;br /&gt;
&lt;br /&gt;
Each of you will fill in your own Project name in here, for example, [[fox|Fox.Asterix.co.za]]&lt;br /&gt;
&lt;br /&gt;
=== Sources Folder ===&lt;br /&gt;
&lt;br /&gt;
There&amp;#039;s something filled in here that you probably do not want to fiddle with!- unless you really know what you&amp;#039;re doing on a computer and that you have a clear vision of what data files you want stored where!&lt;br /&gt;
&lt;br /&gt;
The nice thing about NetBeans is that once you&amp;#039;ve decided to put a project somewhere on your computer, it stays there! ....with all the bits and pieces that you&amp;#039;ll want to add!- such as images and recordings and more web pages, etc etc&lt;br /&gt;
&lt;br /&gt;
So, bottom line, rather don&amp;#039;t fiddle with what, &amp;quot;Sources Folder&amp;quot; is set to!&lt;br /&gt;
&lt;br /&gt;
=== PHP Version ===&lt;br /&gt;
&lt;br /&gt;
Leave this set to, PHP 7.0.  If and when I start to teach you [[PHP]], you need to be sure that I have set your [[subdomain]] server, on the Internet, to deliver PHP 7 to your web pages.&lt;br /&gt;
&lt;br /&gt;
If I get this wrong on the server side, the [[PHP]] work you do might not work properly!&lt;br /&gt;
&lt;br /&gt;
=== Default Encoding ===&lt;br /&gt;
&lt;br /&gt;
[https://en.wikipedia.org/wiki/UTF-8 UTF-8] is fine.  Don&amp;#039;t change that.  This is rocket-science stuff waiting for you to discover AFTER I have finished a year with you!&lt;br /&gt;
&lt;br /&gt;
=== Put NetBeans metadata into a separate directory ===&lt;br /&gt;
&lt;br /&gt;
Leave this as it is .....no tick here!&lt;br /&gt;
&lt;br /&gt;
Just leave the metadata to do what it wants.  This is more rocket-science waiting for later, after I&amp;#039;ve finished a year with you!  You&amp;#039;ll find this in the world I&amp;#039;m taking you into.  If you see something, rather don&amp;#039;t touch!- unless I tell you to!&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s click, &amp;quot;Next&amp;quot; and see what happens...&lt;br /&gt;
&lt;br /&gt;
== Run Configuration ==&lt;br /&gt;
&lt;br /&gt;
....needs to be very carefully set!  There is a bit of work coming up for you here!- so do not rush through this!&lt;br /&gt;
&lt;br /&gt;
=== Run As ===&lt;br /&gt;
&lt;br /&gt;
Set this to, &amp;quot;Remote Web Site ([[FTP]], SFTP)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Be sure to be sitting down and all strapped in!  This is where you see the magic that replaces your need of something like [[FileZilla]]!  This is where you are going to point your [[NetBeans]] PHP project to your own place on the Internet!&lt;br /&gt;
&lt;br /&gt;
NOTE:  Don&amp;#039;t fuss about this being a, &amp;quot;PHP project&amp;quot;!  PHP is backwards compatible with HTML!- so all I am doing here is making sure that if and when I start to teach you PHP, you don&amp;#039;t need to make any changes to your NetBeans project!&lt;br /&gt;
&lt;br /&gt;
=== Project URL ===&lt;br /&gt;
&lt;br /&gt;
Set this to your own URL, for example, [http://fox.asterix.co.za/]&lt;br /&gt;
&lt;br /&gt;
=== Remote Connection ===&lt;br /&gt;
&lt;br /&gt;
You need to manage your remote ([[FTP]]) connections.  This is where you set setup and test your remote connections, and then ensure you have the correct connection associated with your project&lt;br /&gt;
&lt;br /&gt;
To ensure that you have the right [[FTP]] access codes connected to this PHP project, click on, &amp;quot;Manage&amp;quot; (on the line that says, &amp;quot;Remote Connection&amp;quot;).  You&amp;#039;ll have the, &amp;quot;Manage Remote Connections&amp;quot; panel in front of you.&lt;br /&gt;
&lt;br /&gt;
==== Manage Remote Connections ====&lt;br /&gt;
&lt;br /&gt;
This part is interesting and potential tricky, so do not rush and keep your wits about you!&lt;br /&gt;
&lt;br /&gt;
* Be sure to have your [[FTP]] access codes on hand!- the FTP username and password that I gave you for [[FileZilla]]!  You&amp;#039;ll need that same information here!&lt;br /&gt;
* Once you have told your project that it runs as a remote website, you have to ensure that you have the right FTP access codes connected to this PHP project.&lt;br /&gt;
&lt;br /&gt;
Click, &amp;quot;Add..&amp;quot; to get the, &amp;quot;Create New Connection&amp;quot; panel to pop up....&lt;br /&gt;
&lt;br /&gt;
[[Fox]], I want to set the, &amp;quot;Connection Name&amp;quot; (in your case) to, &amp;quot;fox.asterix.co.za&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is the same as your [[subdomain]] name and I&amp;#039;d like you to look at the style I am using here- all lower case and just the basic domain name without &amp;quot;http://&amp;quot; at the start or &amp;quot;/&amp;quot; at the end.  It is not critical you follow this style of naming your [[FTP]] connections, but this is the way I want you to do for now!&lt;br /&gt;
&lt;br /&gt;
Leave the, &amp;quot;Connection Type&amp;quot; set to, &amp;quot;FTP&amp;quot; and click OK&lt;br /&gt;
&lt;br /&gt;
=== Getting your connection to work ===&lt;br /&gt;
&lt;br /&gt;
Now you are in a place where you get to mess around with your [[FTP]] access codes, trying to do things like remember your username and password, and get a number of other settings right&lt;br /&gt;
&lt;br /&gt;
* Hostname : Your [[subdomain]] name- for example, &amp;quot;fox.asterix.co.za&amp;quot;&lt;br /&gt;
* Username : The same [[FTP]] username I gave you for [[FileZilla]]&lt;br /&gt;
* Password : The same [[FTP]] password I gave you for [[FileZilla]]&lt;br /&gt;
&lt;br /&gt;
 Be sure to press the, &amp;quot;Test Connection&amp;quot; button to make sure your connection works!&lt;br /&gt;
 If you connection does not work, that there is something wrong with your access codes.&lt;br /&gt;
&lt;br /&gt;
NOTE : This is where you build up your collection of [[FTP]] connections, when you are working with more than one website.  For example, this is where I will have a set of keys for each of you, so that I&amp;#039;ll be able to access any of your websites, if-and-when I need.&lt;br /&gt;
&lt;br /&gt;
WARNING : You must see, &amp;#039;&amp;#039;&amp;#039;&amp;quot;Connection succeeded&amp;quot;&amp;#039;&amp;#039;&amp;#039; when you test!&lt;br /&gt;
&lt;br /&gt;
Now let&amp;#039;s look at some of the other settings on this panel....&lt;br /&gt;
&lt;br /&gt;
=== Timeout ===&lt;br /&gt;
&lt;br /&gt;
I like to push this up from 30 seconds to 200 seconds!  Sometimes out Internet is slow in South Africa and I am hosting your domains somewhere between California and Virginia!  And don&amp;#039;t forget we have an undersea Internet cable to South Africa that might not be working properly&lt;br /&gt;
&lt;br /&gt;
=== Initial Directory ===&lt;br /&gt;
&lt;br /&gt;
This is a tricky one to get right!.  Let&amp;#039;s leave this as just, &amp;quot;/&amp;quot; for now, and see if we need to come back to fix this later.&lt;br /&gt;
&lt;br /&gt;
Now press, &amp;quot;OK&amp;quot; to get back to panel that is called, &amp;quot;New PHP Project&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== New PHP Project (continued) ==&lt;br /&gt;
&lt;br /&gt;
Don&amp;#039;t rush, there are still settings to look at here!&lt;br /&gt;
&lt;br /&gt;
The first thing you must do is ensure that the, &amp;quot;Remote Connection:&amp;quot; is now pointed to the right place&lt;br /&gt;
&lt;br /&gt;
=== Upload Directory ===&lt;br /&gt;
&lt;br /&gt;
Remove whatever you see there, leave just the, &amp;quot;?&amp;quot; ...this is also a tricky setting, that we might need to come back to later&lt;br /&gt;
&lt;br /&gt;
=== Upload Files ===&lt;br /&gt;
&lt;br /&gt;
Think about this one!  &amp;#039;&amp;#039;&amp;#039;CAREFULLY!&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
I like to set, &amp;#039;&amp;#039;&amp;#039;Upload Files:&amp;#039;&amp;#039;&amp;#039; to, &amp;#039;&amp;#039;&amp;#039;On Save&amp;#039;&amp;#039;&amp;#039;, but that&amp;#039;s because I have more data than I know what to do with!  &amp;#039;&amp;#039;&amp;#039;On Save&amp;#039;&amp;#039;&amp;#039; is telling my [[NetBeans]] that every time I hit Ctrl-S (or find and click the, &amp;quot;Save&amp;quot; button!), NetBeans will immediately synchronize whatever I am working on with my website on the Internet!&lt;br /&gt;
&lt;br /&gt;
This is a very clean way of working, where your website that is live on the Internet, is keeping up with you ....every single step of the way!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;.... OR ....&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If you are trying to save a bit of data, then leave &amp;#039;&amp;#039;&amp;#039;Upload Files:&amp;#039;&amp;#039;&amp;#039; set to, &amp;#039;&amp;#039;&amp;#039;On Run&amp;#039;&amp;#039;&amp;#039;.  This will tell [[NetBeans]] to only synchronize all your local work, with your website on the Internet, when you press,&amp;quot;Run&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is not such a clean way of working.  Sometimes this is confusing.  It&amp;#039;s almost like working the way you were before (with [[Notepad]] and [[FileZilla]]), where you first edit in one place, and then have to remember to upload all your work later&lt;br /&gt;
&lt;br /&gt;
At least you have an option!  If you have enough data, use the, &amp;#039;&amp;#039;&amp;#039;On Save&amp;#039;&amp;#039;&amp;#039; option&lt;br /&gt;
&lt;br /&gt;
Besides, the files you are going to be working with are not all that big .....just a couple of kilobytes per HTMP page perhaps.  Other big files, like images, you don&amp;#039;t go changing them every day, do you now!?&lt;br /&gt;
&lt;br /&gt;
Right, this is where it&amp;#039;s safe to hit, &amp;quot;Finish&amp;quot; ....but, just for fun, let&amp;#039;s see what pops up when we hit, &amp;quot;Next&amp;quot; instead!&lt;br /&gt;
&lt;br /&gt;
== PHP Frameworks ==&lt;br /&gt;
&lt;br /&gt;
Just all sorts of rocket-science stuff we don&amp;#039;t need!  So just hit, &amp;quot;Next&amp;quot; again....&lt;br /&gt;
&lt;br /&gt;
== Composer ==&lt;br /&gt;
&lt;br /&gt;
More stuff you don&amp;#039;t need!   Let&amp;#039;s just hit, &amp;quot;Finish&amp;quot; like I said we could!&lt;br /&gt;
&lt;br /&gt;
== All done! ==&lt;br /&gt;
&lt;br /&gt;
If you did everything right, your very first [[HTML|PHP project for HTML]] is up!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
[[Main Page]] |&lt;br /&gt;
[[Basic web design]] |&lt;br /&gt;
[[navigation table|Navigation]] |&lt;br /&gt;
[[Ranking]] |&lt;br /&gt;
[[support website|Support]] |&lt;br /&gt;
[http://www.asterix.co.za/ Asterix Home]&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Software]]&lt;/div&gt;</summary>
		<author><name>Prothumia</name></author>
	</entry>
</feed>