junichi11 / cakephp-netbeans

CakePHP support in NetBeans
http://cakephp.org
71 stars 18 forks source link

setup existing project #106

Closed sela closed 10 years ago

sela commented 10 years ago

I tried to setup an existing CakePHP project to the plugin, but what ever I tried failed. My project doesn't follow exactly the folder structure of when you create a new project and then moving the existing code into that and it didn't work for me. Any doc how I suppose to do it?

junichi11 commented 10 years ago

I'm sorry to be late.

At first, you must check enabled option at the project properties.(Right-click project > properties > Frameworks > CakePHP) Then, Did you set your CakePHP root and app folder path(relative path from your project directory) there?

sela commented 10 years ago

Thanks. I have in CakePHP Root as I got cake.php in Console directory and I get "Not found cake script file(cake.php)."

junichi11 commented 10 years ago

How did you install the CakePHP? composer? zip file?

sela commented 10 years ago

the cakephp is in a separate directory as a global.

junichi11 commented 10 years ago

Please try to set the relative path for your CakePHP directory from your project directory to project properties.

If you are not sure, please tell me your directory structures.

sela commented 10 years ago

I tried with cd ../../../usr/share/cakephp/2.4.5/lib/Cake/Console/ from my and it works from the command but not from the plugin.

junichi11 commented 10 years ago

I'm not sure what you want to say yet exactly... What are your problems? At first, Were you able to set up plugin?

I tried with cd ../../../usr/share/cakephp/2.4.5/lib/Cake/Console/ from my and it works from the command but not from the plugin.

Does this mean a problem for run command action?

Could you write the followings?

sela commented 10 years ago

The problem. when I select CakePHP tab under Frameworks in Project Properties. I can't make the OK button to work as I get various of errors. I'm stuck with the error Not found cake script file(cake.php). Although I tried different ways. I understand I need to have the relative directory from the project folder in the Sources category. My cake.php file is in /usr/share/cakephp/2.4.5/lib/Cake/Console/ and the source is /var/www/myproj so I set the CakePHP Root to ../../../usr/share/cakephp/2.4.5/lib/Cake/Console/ but I get the Error Not found cake script file(cake.php). in red at the bottom of the window.

junichi11 commented 10 years ago

I see now. Thanks for your reply.

CakePHP Root is not Console directory but top of directory. Please try to set ../../usr/share/cakephp/2.4.5 instead of ../../../usr/share/cakephp/2.4.5/lib/Cake/Console/

sela commented 10 years ago

Brilliant. It works perfectly. It isn't very clear you need to omit the /lib/Cake/Console/

junichi11 commented 10 years ago

Brilliant. It works perfectly.

:+1:

It isn't very clear you need to omit the /lib/Cake/Console/

I wrote CakePHP Root. I didn't write Console directory or cake.php.