Help with Terminal for PHP

  • From: "NeilC" < >
  • To:
  • Subject: Help with Terminal for PHP
  • Date: Fri, 21 Sep 2012 14:29:08 -0400


> BTW for running Symfony2 commands directly from the IDE, you can use the 
> built-in support - just right click your project and invoke Symfony2 > 
> Run Command... 
> 
> Tomas
> 


Yes Tomas, I am already using that to run a specific file that I place in the 
project and I also maintain a Project that has odd snippets and files of PHP 
for use in Symfony2 projects (as well as one for my WordPress projects). I 
import these files into each project and run using the Right Click -> Run 
command as you suggest. An example of this is a file to import Composer.

I am definitely in the correct folder and the file called console definitely 
exists!

Code:
sh-4.1$ cd C://wamp/www/BetPremier
sh-4.1$ ls -g
total 620
----------+ 1 None   1065 Sep 20 01:17 LICENSE
----------+ 1 None   5928 Sep 20 01:17 README.md
----------+ 1 None   7859 Sep 20 01:17 UPGRADE.md
d---------+ 1 None      0 Sep 20 01:48 app
----------+ 1 None   1755 Sep 20 01:17 composer.json
----------+ 1 None   2275 Sep 20 01:17 composer.lock
----------+ 1 None 574405 Sep 20 01:31 composer.phar
----------+ 1 None  12430 Sep 20 01:30 installer.php
d---------+ 1 None      0 Sep 20 01:17 src
d---------+ 1 None      0 Sep 20 01:17 vendor
d---------+ 1 None      0 Sep 20 01:17 web
sh-4.1$ app/console generate:bundle --namespace=Blogger/BlogBundle 
--format=yml
/usr/bin/env: php: No such file or directory
sh-4.1$ cd app
sh-4.1$ app/console generate:bundle --namespace=Blogger/BlogBundle 
--format=yml
sh: app/console: No such file or directory
sh-4.1$ 



However, the console file imports further files and they do not appear to 
exist! ( see below)


Code:
#!/usr/bin/env php
<?php

// if you don't want to setup permissions the proper way, just uncomment the 
following PHP line
// read 
http://symfony.com/doc/current/book/installation.html#configuration-and-setup ;
for more information
//umask(0000);

set_time_limit(0);

require_once __DIR__.'/bootstrap.php.cache';
require_once __DIR__.'/AppKernel.php';

use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;

$input = new ArgvInput();
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') 
?: 'dev');
$debug = getenv('SYMFONY_DEBUG') !== '0' && 
!$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';

$kernel = new AppKernel($env, $debug);
$application = new Application($kernel);
$application->run($input);




I think the problem relates to the "permissions" as indicated in the COMMENTS 
- so its a Symfony2 problem, not a NetBeans problem.

But thanks for the help anyway guys.






Help withTerminal for PHP

NeilC 09/21/2012

Re: Help withTerminal for PHP

Geoff Hoffman 09/21/2012

Re: Help withTerminal for PHP

Tomas Mysik 09/21/2012

Re: Help withTerminal for PHP

Paolo Scarabelli 09/21/2012

Help with Terminal for PHP

NeilC 09/21/2012

Help with Terminal for PHP

NeilC 09/21/2012

Re: Help with Terminal for PHP

Tomas Mysik 09/24/2012

Help with Terminal for PHP

NeilC 09/25/2012

Project Features

About this Project

PHP was started in November 2009, is owned by Petr Jiricka, and has 236 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close