generate-migrations-diff failing with Zend framework - zend-framework

I am trying to generate a migration script using Doctrine with Zend Framework. I am getting the following:
$ php doctrine.php generate-migrations-diff
$ PHP Fatal error: Cannot redeclare class Avo_Model_AccessType in
$ tmp/fromprfx_doctrine_tmp_dirs/AccessType.php on line 16
I can successfully build the models form the yaml file. I am using Zend Framework 1.10.5 and Doctrine 1.2.2 I think the issue might be with the autoloader and the fact that Zend Autoloads the classes that doctrine is trying to re-create.

I've got the same error today. The problem was that in bootstrap I preloaded all models with
Doctrine_Core::loadModels($options['models_path']);
So, I just removed that line and it helped.

Related

How to create a feature module with lazy loading in Ionic 6

I created a hello world Ionic 6 Angular Project.
In the root folder I use
ng generate module customers --route customers --module app.module
This command I know from angular to create a lazy loaded feauter Module.
But I got this Error Message.
File customers/customers.module.ts does not exist.
If I create a module with this name first, I got the Error Message something like "there is already a customer.module.ts, merge conflict".
How to generate a lazy loaded feature module, using the cli command?
I solved it with the ionic command
ionic generate
than I choosed "Page". This create everything with module and lazy loading support.

FuelPHP Upload Class not found

I am trying to upload an image using FuelPHP framework Upload class and I am getting the following error:
Fatal error: Class 'FuelPHP\Upload\Upload' not found in
/projects/clients/client0/web61/web/fuel/fuel/core/classes/upload.php
on line 90
This is the code I am using after the form is submitted:
Upload::process($config);
if (Upload::is_valid()) {
Upload::save();
}
Thanks!
It's a bug in FuelPHP_1.6.1.zip file. Update Fuel to 1.6/master or
Edit composer.json with:
"fuelphp/upload": "2.0"
to
"fuelphp/upload": "1.*"
and then,
$ composer update
From the looks of it, you don't have the FuelPHP/Upload package installed. Have you ran:
composer install
on your root folder?
The current Upload class just translates the old class interface to the new one, as Harro describes here.

Fatal error: Class 'Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle' not found

I'm trying to install mongodb since 3 days but each time, I had a different error message until I fix some of them and I could install mongodb for my Symfony 2.1.4 installation. So now I have this error message:
"Fatal error: Class 'Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle' not found"
I couldn't find any solution to solve it.
For information in my composer.json I added these lines:
"doctrine/mongodb-odm": "*",
"doctrine/mongodb-odm-bundle": "v2.0.1"
and it creates 3 folders in the Doctrine namespace:
doctrine/mongodb
doctrine/mongodb-odm
doctrine/mongodb-odm-bundle
Why is this occurring?
For Symfony 2.1, you'll need to use version 3.0 of the Doctrine ODM MongoDB Bundle.
"doctrine/mongodb-odm": "1.0.*#dev",
"doctrine/mongodb-odm-bundle": "3.0.*#dev"
The reason the bundle you installed could not be found was because it was under a different namespace, being Symfony\Bundle\DoctrineMongoDBBundle\DoctrineMongoDBBundle for Symfony 2.0

DomPDF not working in Zend Framework 1.12.0 An input file is required (i.e. input_file _GET variable)

DomPDF throws the following error, using Zend Framework 1.12.0.
Error
An input file is required (i.e. input_file _GET variable).
However, it works fine using Zend 1.7.0.
Here is the way I've included it in the controller
require_once("dompdf_config.inc.php");
spl_autoload_register('DOMPDF_autoload');
And this is how I instantiate Zend Loader Autoloader in my Bootstrap file
$loader = Zend_Loader_Autoloader::getInstance();
$loader->setFallbackAutoloader(true);
I believe it may be due to autoloading DOMPDF. Any suggestions?

Symfony 1.4x and sfTCPDFPlugin

I have installed sfTCPDFPlugin in my project, but when I try to test if the installation is alright (with the source found on the official site) I get the error:
Fatal error: Class 'TCPDF' not found in C:\wamp\www\mairie\plugins\sfTCPDFPlugin\lib\sfTCPDF.class.php on line 12
How can I fix it?
Read the readme tab here : http://www.symfony-project.org/plugins/sfTCPDFPlugin
It says you have to download the tcpdf library, not only the sfTCPDFPlugin.
i faced with same problem, and i did the following task it will also help you.
first of all run: symfony plugin:uninstall sfTCPDFPlugin then remove the sfTCPDFPlugin directory form your plugin folder.
mow do the following setps:
1. cd your project path/symfony
2. symfony plugin:install sfTCPDFPlugin
3. download the tcpdf library unzip it and past into your sfTCPDFPlugin/lib now your directory looks like your project path/symfony/plugins/sfTCPDFPlugin/lib/tcpdf
now change your ProjectConfiguration.class.php to add $this->enablePlugins( array('sfTCPDFPlugin') ); now run the symfony plugin:publish-asstes and finally clear the cache symfony cc.