TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Wamp working, but what next? Help! (http://www.talkphp.com/absolute-beginners/3938-wamp-working-but-what-next-help.html)

DotNetTim 02-04-2009 06:18 PM

Wamp working, but what next? Help!
 
Hi,

I've got Wamp working now, after I deleted my "Inetpub" folder (which is weird and I didn't find in any docs, but found with googling my install problems).

I'm not sure what IDE to use to develop my PHP Scripts? I have Netbeans IDE for PHP downloaded, and I think I've downloaded the correct Eclipse IDE, but I'm not sure how to get them to work and to use them while working with WAMP, and FTP, and I need to be able to Debug, and Netbeans recommends XDebug. I'm not sure Xdubug will work with WAMP? Anyone have any good tutorials that will help me find out how to get started with Wamp, PHP, SQL a good debugging tool to work with Wamp, SQLlite, etc? Also, I have a web host that offers PHP and mySQL and I need to be able to develop locally and then upload to the host, and so I need to learn how to develop on PHP and SQL site locally within WAMP? Sorry for all the questions.

Thanks in advance..
Tim

Dr John 02-06-2009 05:40 PM

You first create a folder in the htdocs folder which is inside your wamp folder, one folder for each project you are working on of course, and start the server service as required.

You don't use a debugger with wamp, as it just runs the server services that you need. Your debugger uses the IDE, as far as I known anyway.

Then to see what you have done, you point your web browser at the folder and file using localhost/foldername/filename

When it is all working, you upload the php files to your online server, and use a mysql dump to get a copy of your database to upload. Easy Peasy.

However, the name of your database, the username and password, for the online host will not be the same as those for your local server. What I do is put all that database connection info in a single file, and use an include to load it into each php file that needs it.

In more detail, I create one file called, say, fred-local.php and another called fred-remote.php, each with the appropriate database connection stuff in them. I then make a copy of fred-local.php and rename it to just fred.php, and it is fred.php that I include into the php files that need it. Then when it is time to upload to the remote server, I delete fred.php, make a copy of fred-remote.php and rename it as fred.php That way I don't have to alter ANY other php file, as they don't know that fred has undergone a transplant operation. And if I need to do more editing of the files, I copy and rename fred-local.php to fred.php and continue working. Very simple, very easy.

PS Use Eclipse - it rocks.

DotNetTim 02-07-2009 02:05 AM

Thank you so much. How hard is it to set up Eclipse? I don't know if I even downloaded the right file..

Dr John 02-07-2009 10:05 AM

RTFM

http://wiki.eclipse.org/FAQ_Where_do...all_Eclipse%3F

"To install Eclipse, all you do is unpack the zip file download in the desired directory. No further work is required (other than making sure you have a Java Runtime Engine installed). When you unzip the file, it creates a subdirectory called "eclipse", with multiple subdirectories under that. So, for example, in Windows you could unpack the zip file in the root directory (e.g., C:\) and Eclipse would be installed in C:\eclipse. Note that installing Eclipse does not change the Windows registry. "

If you have downloaded Eclipse, then you have the "right" version as it is an editor. To make it more suitable for PHP it has add-ins or plugins or whatever it calls them (can't remember at this moment), and if you don't have the ones you need, you just go and get them.

But just to help you, I spent 1 minute looking for the version you need and here it is
http://www.eclipse.org/pdt/

PS as for a de-bugger, it sounds as if you are just starting on this, and so your programs will be as simple as mine, and I don't use a de-bugger.


All times are GMT. The time now is 09:39 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0