Closed sandeshgb closed 6 years ago
Where is your app/Console directory?(Does app/Console/cake file exist?) Can you write your directory structure?
my-project
Thanks.
Can you run cake
command in your terminal?
Your cake version is 2.x, right?
yes I'm using 2.x
I cant run cake from my terminal: Output: eiosys@eiosys:~$ cake The program 'cake' is currently not installed. You can install it by typing: sudo apt install cakephp-scripts eiosys@eiosys:~$
I need to bake using netbeans itself
$ cd app
$ sh Console/cake
the above commands provide me available shells and current paths of my app...didnt get it? Cant I do Cakephp->run command in netbeans?
Umm, I try to create a new project. So, can you provide your steps to create it?
e.g.
I had cloned the project from git....thats it. You could even have a test-app ex:cakephp blog or default cakephp structure when we create a new cakephp project.
In windows its working, seems to be an issue when switched to ubuntu
OK. I'll try it once. Please wait a little while.
@junichi11 really appreciate your effort mate, but I'm available only for next 20 mins. Will continue tomorrow if required.
I've just done the following:
Unfortunately, I cannot reproduce it.
Can you look at IDE log (View > IDE log)? If you can find something for this plugin, please let me know.
Thanks.
Log says: CONFIG [null]: Parse error in file file:/tmp/nb-cake-commands-6401486998826258495.xml line 1 column 1 (PUBLIC null) [Fatal Error] nb-cake-commands-885150021411211846.xml:1:1: Content is not allowed in prolog. INFO [org.cakephp.netbeans.commands.CakeScript] org.xml.sax.SAXParseException; systemId: file:/tmp/nb-cake-commands-885150021411211846.xml; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205) at org.cakephp.netbeans.commands.CakePhpCommandXmlParser.parse(CakePhpCommandXmlParser.java:75) [catch] at org.cakephp.netbeans.commands.CakeScript.getFrameworkCommandsInternalXml(CakeScript.java:394) at org.cakephp.netbeans.commands.CakeScript.getCommands(CakeScript.java:244) at org.cakephp.netbeans.commands.CakePhpCommandSupport.getFrameworkCommandsInternal(CakePhpCommandSupport.java:99) at org.netbeans.modules.php.spi.framework.commands.FrameworkCommandSupport.refreshFrameworkCommands(FrameworkCommandSupport.java:150) at org.netbeans.modules.php.spi.framework.commands.FrameworkCommandSupport$1.run(FrameworkCommandSupport.java:181) at org.openide.util.RequestProcessor$Task.run(Unknown Source) at org.netbeans.modules.openide.util.GlobalLookup.execute(Unknown Source) at org.openide.util.lookup.Lookups.executeWith(Unknown Source) at org.openide.util.RequestProcessor$Processor.run(Unknown Source)
Thanks! The cause is it.
Your file encoding may not be UTF-8. So please try to check it tomorrow.
Then, please try to run the following command in your terminal:
$ sh Console/cake command_list --xml
Just copy & paste it here.
my result:
app$ sh Console/cake command_list --xml
<?xml version="1.0"?>
<shells><shell name="acl" call_as="acl" provider="CORE" help="acl -h"/><shell name="api" call_as="api" provider="CORE" help="api -h"/><shell name="bake" call_as="bake" provider="CORE" help="bake -h"/><shell name="command_list" call_as="command_list" provider="CORE" help="command_list -h"/><shell name="completion" call_as="completion" provider="CORE" help="completion -h"/><shell name="console" call_as="console" provider="CORE" help="console -h"/><shell name="i18n" call_as="i18n" provider="CORE" help="i18n -h"/><shell name="schema" call_as="schema" provider="CORE" help="schema -h"/><shell name="server" call_as="server" provider="CORE" help="server -h"/><shell name="test" call_as="test" provider="CORE" help="test -h"/><shell name="testsuite" call_as="testsuite" provider="CORE" help="testsuite -h"/><shell name="upgrade" call_as="upgrade" provider="CORE" help="upgrade -h"/></shells>
Output of app$ sh Console/cake command_list --xml <?xml version="1.0"?>
Ahh, I see now! There is a warning message before XML. It is the cause. Probably, you did not set the permission to your app/tmp directory correctly.
So try to check the permission.
Ok, I will check the permissions and revert to you
Giving permissions did solve the issue.........thanks!!
You're welcome :)
I'm using ubuntu 16.04, have installed following: Netbeans: 8.1 Have set path to /usr/bin/php in tools->options->php also have added plugin for cakephp but when I right-click on my project folder and select cakephp->run command, its says <there is no command available (perhaps error?)>
Kindly assist