how to get the console working with Doctrine and CodeIgniter - codeigniter

I've been following this great tutorial :
http://www.joelverhagen.com/blog/2011/05/setting-up-codeigniter-2-with-doctrine-2-the-right-way/
and at some point, you're supposed to create a doctrine-cli.php file in my app' application folder with the following code to execute Doctrine's commands from the command line:
My Doctrine repository is in /back-meetmyfriend/application/libraries/Doctrine and the Doctrine.php in libraries.
However, I can't get the console working on W7/WAMP:
I've followed step by step the tuts and my repo is
E:\Programmes\wamp\www\back-meetmyfriend\application
and in the git Bash console when in /e/Programmes/wamp/www/back-meetmyfriend/application i type down $ php doctrine-cli.php
I'm having a PHP Fatal error: Class 'Symfony\Component\Console\Helper\HelpserSet not found
Is there something wrong with my APPPATH ? how should I configure it ?
Thanks

Related

Unable to generate resources using laravel-code-generator in Laravel 5.8

I created a fresh Laravel project v5.8. Then installed the latest version of the Laravel Code Generator (2.3) but I'm unable to generate resources. I've read your release notes for 2.3 and I'm not seeing where I'm making a mistake on the installation or the commands I keep the output below:
php artisan create:scaffold Test generates the output below:
Exception : The file
resources/laravel-code-generator/sources/tests.json was not found!
at /Users/Sites/Laravel/lms/vendor/crestapps/laravel-code-generator/src/Models/Resource.php:686
682| {
683| $fileFullname = Config::getResourceFilePath($filename);
684|
685| if (!File::exists($fileFullname)) {
> 686| throw new Exception('The file ' . $fileFullname . ' was not found!');
687| }
688|
689| return File::get($fileFullname);
690| }
Exception trace:
1 CrestApps\CodeGenerator\Models\Resource::jsonFileContent("tests.json")
/Users/Sites/Laravel/lms/vendor/crestapps/laravel-code-generator/src/Models/Resource.php:549
2 CrestApps\CodeGenerator\Models\Resource::fromFile("tests.json", "CrestApps")
/Users/Sites/Laravel/lms/vendor/crestapps/laravel-code-generator/src/Commands/Framework/CreateScaffoldCommand.php:70
Please use the argument -v to see more details.
I'm getting a similar output when trying to create resources from a database table. I'm using the php artisan resource-file:from-database [model-name] command.
I read online that it may have to do with the Laravel storage folder not having the correct permissions but I've tried that and it didn't work. Cleared and config the cache, composer dump-autoload, etc... But nothing has worked.
I'm also noticing that the generator does not publish the configuration file on your sample video on your website. I have tried to publish the config file using the vendor:publish command but it generates a somewhat empty file, only has this option: 'files_upload_path' => 'uploads'. The folder for the generator located inside the resources folder does not contain a config file.

Cannot make command line tool for artisan in PhpStorm 2017.1.3

I got this error message when I tried to make an alias for artisan: [Settings | Tools | Command Line Tool Support ] -> add -> tool based on Symfony Console.
Problem:
Failed to parse output as xml: Error on line 3: Content is not allowed
in prolog..
Command:
C:\xampp\php\php.exe C:\xampp\htdocs\artisan list --format=xml
Output:
[Symfony\Component\HttpKernel\Exception\NotFoundHttpException]
Even when I try artisan serve or composer install,
then [Symfony\Component\HttpKernel\Exception\NotFoundHttpException] bug is occured.
I don't find any solution for this.
I'm using Laravel 5.2 + Angular 1.
I had recently issues running artisan commands (ide-helper for example) directly in phpstorm, I'd recommend you to use your OS terminal instead. It might help you.

View [layouts.app] not found in laravel

I have created an application in laravel using appzcoder crud-generator plug-in. i have done everything accordingly but i am getting the above mentioned error. I have a folder named layouts in views folder and this folder has app.stub in it. but when i run the project it gives the following error
View [layouts.app] not found. (View:C:\wamp64\www\myProject\resources\views\admin\items\index.blade.php)
make sure you have run below code if not run it will create layout.app path
or manually create view/layout/app.php
php artisan vendor:publish --provider="Appzcoder\CrudGenerator\CrudGeneratorServiceProvider"

Laravel new command error

I did the following commands:
composer global require "laravel/installer=~1.1"
and
set PATH=%PATH%;%USERPROFILE%\AppData\Roaming\Composer\vendor\bin
But when I try to do:
laravel new blog
I get the following error:
Notice: Undefined variable: output in C:\Users\****\AooDara\Roaming\Composer\vendor\laravel\installer\src\NewCommand.php on line 55
Fatal error: Call to a member function writeln() on null in C:\Users\****\AooDara\Roaming\Composer\vendor\laravel\installer\src\NewCommand.php on line 55
Any idea of what went wrong?
Seems like you already have a directory called 'blog' in your application directory. Try creating a laravel app with different name or delete / rename existing 'blog' directory and try again.
for example laravel new helloapp.
However, I think the error showing at the console is a bug of laravel new command. I could see the error at the console when I tried to create a app with same name again from same directory.
The error not exists now. Try creating other application.

Magento Command line script Class 'SoapClient' not found

I am trying to run a script from commandline to call a method in a Model, which involves the class SoapClient But come up with the error message
PHP Fatal error: Class 'SoapClient' not found in ....
Line which has the error is
$client = new SoapClient($this->_soapUrl);
I run the same process through web using a test route and it works.
Checked PHPINFO and it says
Soap Client enabled
Soap Server enabled
How can I include the SoapClient Class to the script or what can be the solution?
Your command line PHP uses different php.ini. Find out which php.ini file is used in PHP CLI and make sure the Soap extension is loaded there as well.

Resources