NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Configuring NetBeans to work with PHP

 
Post new topic   Reply to topic    NetBeans Forums -> PHP Users
View previous topic :: View next topic  
Author Message
oscarwww



Joined: 16 Jun 2009
Posts: 7

PostPosted: Tue Jun 16, 2009 11:59 pm    Post subject: Configuring NetBeans to work with PHP Reply with quote

OK, I am an "ex-spurt" web developer. ex=has been. Spurt=drip under pressure but new to NetBeans. So, I have an existing legacy project PHP 5, mySQL 4 and Apache 2.2 server. I installed NetBeans 6.5.1 All Bundles. I program in many languages and NetBeans seemed to fit the IDE bill. Firstly, there is no option to choose Apache 2.2 Server under Tools > Servers with this version. OK, it doesn't claim it is included but cannot find anything "correct" on the web to setup NetBeans to be aware of my Apache 2.2 server.

Anyhow, http://localhost refers to my local Apache 2.2 web server. Project source files are kept in a separate location. If I use Dreamweaver when I modify a file and press run, the modified source file is automatically copied to the testing server ie. under http://localhost. In NetBeans I do <Shift>F6 but the file is not copied to the testing server and I don't see any facility to configure Project Properties > Run Configuration to make this happen either as you can't specify the loaction of the testing server.

I cannot find anything on the web about how to configure NetBeans to support an existing PHP installation.

Please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Back to top
Tomas Mysik
Posted via mailing list.





PostPosted: Wed Jun 17, 2009 10:25 am    Post subject: Configuring NetBeans to work with PHP Reply with quote

Hi,

Dne středa 17 června 2009 01:59:47 oscarwww napsal(a):
Quote:
there is no option to choose Apache 2.2 Server under Tools > Servers with
this version. OK, it doesn't claim it is included but cannot find anything
"correct" on the web to setup NetBeans to be aware of my Apache 2.2 server.

not needed.

Quote:
Anyhow, http://localhost refers to my local Apache 2.2 web server. Project
source files are kept in a separate location. If I use Dreamweaver when I
modify a file and press run, the modified source file is automatically
copied to the testing server ie. under http://localhost. In NetBeans I do
<Shift>F6 but the file is not copied to the testing server and I don't see
any facility to configure Project Properties > Run Configuration to make
this happen either as you can't specify the loaction of the testing server.

Open Project Properties dialog and select Sources category - there you will
find what you are looking for.

Quote:
I cannot find anything on the web about how to configure NetBeans to
support an existing PHP installation.

What exactly do you mean? To create a PHP project from existing sources, just
invoke New Project Wizard and select PHP category, you fill find such wizard
there. Or do you mean anything else?

HTH,
Tomas
PS: BTW I would recommend you to use NB 6.7, RC3 is available right now.
--
Tomas Mysik
address-removed
Back to top
oscarwww



Joined: 16 Jun 2009
Posts: 7

PostPosted: Wed Jun 17, 2009 10:44 am    Post subject: Configuring NetBeans to recognise existing Apache/PHP/mySQL Application Reply with quote

Thanks for the reply. Community, please keep the answers coming and re-read my original post which should be clear as this is a show-stopper.
Back to top
Tomas Mysik
Posted via mailing list.





PostPosted: Wed Jun 17, 2009 10:51 am    Post subject: Configuring NetBeans to work with PHP Reply with quote

Hi,

Dne středa 17 června 2009 12:44:27 oscarwww napsal(a):
Quote:
as this is a show-stopper.

what is a show-stopper?

Thanks for clarification,
Tomas
--
Tomas Mysik
address-removed
Back to top
Filip Zamboj
Posted via mailing list.





PostPosted: Wed Jun 17, 2009 10:55 am    Post subject: Configuring NetBeans to work with PHP Reply with quote

Hi.

where do you see show-stopper, please?

There are many possible configurations in installation of php and apache
that the best thing is to install and configure on your own and then use
ide to write code and run using existing installation of php and apache.
If you have it properly configured then you just need to run your php
file under http://localhost/yourfile.php and have yourfile.php in
webroot. If you are using windows then you can use WAMP or other similar
products that make your life easier.

What about save and upload? Project -> Properties -> Run Configuration
-> Run remote and configure your ftp.

As Tomas wrote, I'd recommend you 6.7RC3 that is to be found on
netbeans.org.

Thanks!
Filip.

-------------
Filip Zamboj
Sun Microsystems

http://www.netbeans.org/community/issues.html
http://qa.netbeans.org



oscarwww wrote:
Quote:
Thanks for the reply. Community, please keep the answers coming and re-read my original post which should be clear as this is a show-stopper.










Back to top
oscarwww



Joined: 16 Jun 2009
Posts: 7

PostPosted: Wed Jun 17, 2009 11:08 am    Post subject: Configuring NetBeans to recognise existing Apache/PHP/mySQL Application Reply with quote

Thanks for the answers but still no closer so I better make it clearer.

1. I have a legacy working Apache/PHP/mySQL on local machine at http://localhost no ftp necessary to local.

2. Now I'd like to do my dev using NetBeans.

3. <Shift>F6 from NetBeans does not copy the changed source file to the local testing server before running it - unless you can tell me how to configure it to do so? If it can't automatically copy the file to the testing server, NetBeans will not be useful as an IDE for PHP.

4. I do not see how to let NetBeans be aware of my Apache 2.2 Server (though it is suggested it doesn't need to be - correct?)
Back to top
Filip Zamboj
Posted via mailing list.





PostPosted: Wed Jun 17, 2009 11:19 am    Post subject: Configuring NetBeans to work with PHP Reply with quote

oscarwww wrote:
Quote:
Thanks for the answers but still no closer so I better make it clearer.

I got it now Wink
Quote:


1. I have a legacy working Apache/PHP/mySQL on local machine at http://localhost no ftp necessary to local.



2. Now I'd like to do my dev using NetBeans.



3. <Shift>F6 from NetBeans does not copy the changed source file to the local testing server before running it - unless you can tell me how to configure it to do so? If it can't automatically copy the file to the testing server, NetBeans will not be useful as an IDE for PHP.


project -> properties -> copy sources to another location -> set your
web folder here
Quote:

4. I do not see how to let NetBeans be aware of my Apache 2.2 Server (though it is suggested it doesn't need to be - correct?)


I think no but Tomas knows more about this.
Quote:








Back to top
Tomas Mysik
Posted via mailing list.





PostPosted: Wed Jun 17, 2009 11:30 am    Post subject: Configuring NetBeans to work with PHP Reply with quote

Hi,

Dne středa 17 června 2009 13:09:10 oscarwww napsal(a):
Quote:
3. <Shift>F6 from NetBeans does not copy the changed source file to the
local testing server before running it - unless you can tell me how to
configure it to do so? If it can't automatically copy the file to the
testing server, NetBeans will not be useful as an IDE for PHP.

see my previous email - Project Properties -> Sources.

Quote:
4. I do not see how to let NetBeans be aware of my Apache 2.2 Server
(though it is suggested it doesn't need to be - correct?)

What _exactly_ do you want from NetBeans? Sorry, still very unclear what
NetBeans could/should do.

Thanks for clarification,
Tomas
--
Tomas Mysik
address-removed
Back to top
oscarwww



Joined: 16 Jun 2009
Posts: 7

PostPosted: Wed Jun 17, 2009 12:05 pm    Post subject: Configuring NetBeans to recognise existing Apache/PHP/mySQL Application Reply with quote

project -> properties -> copy sources to another location -> set your
web folder here ===== This is a one time copy, simply not the way PHP/Apache works thus not useful functionality.

What is needed is every time the developer modifies some PHP code in NetBeans then presses <Shift>F6 to test the page then NetBeans needs to copy this modified source file to the testing server before running it.

So, how can NetBeans be configured to do that? If it can't it is of no use and a PHP IDE.

Also, NetBeans needs to be able to be configured for 2 servers, eg. testing (local) and live (via ftp) at the same time but it seems it can't handle this. How can I upload tested php pages to live server at the click of a button?
Back to top
Tomas Mysik
Posted via mailing list.





PostPosted: Wed Jun 17, 2009 12:46 pm    Post subject: Configuring NetBeans to work with PHP Reply with quote

Hi,

Dne středa 17 června 2009 14:05:43 oscarwww napsal(a):
Quote:
project -> properties -> copy sources to another location -> set your
web folder here ===== This is a one time copy, simply not the way
PHP/Apache works thus not useful functionality.

why do you think so? Have you tried it? I guess not because it copies _all_
the changes _all_ the time. If it does not work for you, please, report an
issue [1].

Quote:
Also, NetBeans needs to be able to be configured for 2 servers, eg. testing
(local) and live (via ftp) at the same time but it seems it can't handle
this. How can I upload tested php pages to live server at the click of a
button?

Add a new Run Configuration for Remote Web Site - again, invoke Project
Properties, Run Configuration categoy, add new...

You can find useful information also on our blog [2].

HTH,
Tomas
[1] http://www.netbeans.org/community/issues
[2] http://blogs.sun.com/netbeansphp/
--
Tomas Mysik
address-removed
Back to top
Filip Zamboj
Posted via mailing list.





PostPosted: Wed Jun 17, 2009 12:47 pm    Post subject: Configuring NetBeans to work with PHP Reply with quote

oscarwww wrote:
Quote:
project -> properties -> copy sources to another location -> set your

web folder here ===== This is a one time copy, simply not the way PHP/Apache works thus not useful functionality.


sources are copied each time you change your sources inside netbeans.
btw, if you are adding files outside netbeans or edit it outside
netbeans there might be a problem to copy sources. Why don't you create
your project in web folder if this is your case.
Quote:

What is needed is every time the developer modifies some PHP code in NetBeans then presses <Shift>F6 to test the page then NetBeans needs to copy this modified source file to the testing server before running it.


No. They should be there already. What version of netbeans are you using?
Quote:

So, how can NetBeans be configured to do that? If it can't it is of no use and a PHP IDE.



Also, NetBeans needs to be able to be configured for 2 servers, eg. testing (local) and live (via ftp) at the same time but it seems it can't handle this. How can I upload tested php pages to live server at the click of a button?


you can set copy sources to another folder and have running
configuration set to remote web at the same time. once you want to
upload your sources you can setup ftp and then click on sources folder
and invoke upload.

F.
Quote:








Back to top
oscarwww



Joined: 16 Jun 2009
Posts: 7

PostPosted: Wed Jun 17, 2009 1:11 pm    Post subject: Configuring NetBeans to recognise existing Apache/PHP/mySQL Application Reply with quote

Ok, good. That's right to setup the 2 servers. What is the url to post a defect in NetBeans 6.5.1? It's not copying the modified files on <Shift>F6?

Where is the button/command to upload the selected files to the live server once testing is complete?
Back to top
Filip Zamboj
Posted via mailing list.





PostPosted: Wed Jun 17, 2009 1:26 pm    Post subject: Configuring NetBeans to work with PHP Reply with quote

oscarwww wrote:
Quote:
Ok, good. That's right to setup the 2 servers. What is the url to post a defect in NetBeans 6.5.1? It's not copying the modified files on <Shift>F6?


one of this issues could be what you are describing
http://www.netbeans.org/issues/show_bug.cgi?id=146042
http://www.netbeans.org/issues/show_bug.cgi?id=164795
Quote:

Where is the button/command to upload the selected files to the live server once testing is complete?


you need to have ftp configured and then use right button on your mouse
on source folder and press upload.
Quote:








Back to top
Filip Zamboj
Posted via mailing list.





PostPosted: Wed Jun 17, 2009 3:26 pm    Post subject: Configuring NetBeans to work with PHP Reply with quote

actually, to be more precise, download RC3 and you are fine.

-------------
Filip Zamboj
Sun Microsystems

http://www.netbeans.org/community/issues.html
http://qa.netbeans.org



oscarwww wrote:
Quote:
Ok, good. That's right to setup the 2 servers. What is the url to post a defect in NetBeans 6.5.1? It's not copying the modified files on <Shift>F6?



Where is the button/command to upload the selected files to the live server once testing is complete?










Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> PHP Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo