Symfony 1.4x and sfTCPDFPlugin - plugins

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.

Related

PHP Fatal error: Class 'RemoteWebElement' not found in

I have a symfony project that run normal in command line:
php app/console server:run
But, I want to run inside PhpStorm. When I try to do this, it gives the fatal error:
PHP Fatal error: Class 'RemoteWebElement' not found in
I already tried to look the oficial documentation of the classe:
http://facebook.github.io/php-webdriver/classes/RemoteWebElement.html. But I didn't found information that culd help me.
I also added the compose dependency:
composer require facebook/webdriver
But had no effect!
=======================================
I'll explain step-step how to get this the bug (It will be very long!):
I have:
PHP 5.5.9
PhpStorm 10.0.3
composer 1.0-dev (7117a5775ffdcdfd31bbd52a138a6f9c65e7e3c2) 2016-02-03
So, create a new symfony project (current version 3.0) and add composer dependencies:
symfony new project
cd project
composer update
Then, open this project inside of phpstorm and I configure settings for to run the project:
Settings -> Languages & Frameworks -> PHP
"PHP language level": 5.5
"Interpreter": 5.5.9
Add through plus(+) the PHP folder:
/usr/share/php
Click 'OK'
Now, try to run de project through PhpStorm by the shortcut:
Ctrl+Shif+F10.
Will appear the bug:
PHP Fatal error: Class
'Symfony\Bundle\FrameworkBundle\Test\WebTestCase' not found in
Solve this by this way inside of PhpStorm:
Settings -> Languages & Frameworks -> PHP -> PHPUnit
Choose: "Use custom autoloader"
And, in the field "Path to script", informe the autoloader's address. For example:
/home/murilo/git/slu/app/autoload.php. Click 'OK'.
Again, try to run de project through PhpStorm by the shortcut:
Ctrl+Shif+F10
Will appear the bug:
PHP Fatal error: Class 'Doctrine\Tests\Common\Cache\CacheTest' not
found in
Solve this through this command inside the project folder:
composer require maslosoft/cachetest:dev-master -n --no-progress
For the last time, try to run de project through PhpStorm by the shortcut:
Ctrl+Shif+F10
Will appear the bug:
PHP Fatal error: Class 'RemoteWebElement' not found in
I'm at this bug.
Please, someone knows how I can overcome this bug? o.O
I struggled with the same exact issue as you have described. After breaking my head for most of the day with this problem, I found the issue.
When you execute the command php app/console server:run in command line, it sets up a server and runs the website. However, when you run the project in PHPStorm, it doesn't actually run it as a server but runs it as a PHPUnit. What you need to do is configure a PHP Web Application in PHPStorm and run that.
Check the image below where I have configured the website. When I run the Web Application, it will run by the url and it will show up in your browser.

how to include a local javascript im ember-cli application

I have a local javascript in my application that i want to include in my ember-cli application.
it is called carrotsearch.foamtree.js
In order that it will be included i put it under vendor\foamtree\carrotsearch.foamtree
and in the app.js i write
import CarrotSearchFoamTree from 'foamtree/carrotsearch.foamtree'
the problem is that i get an error
===== 1 JSHint Error
Build failed. ENOENT, no such file or directory
'C:\Users\davidga\Desktop\ember\nextgen\tmp\tree_merger-tmp_dest_dir-37cYqLzL.tmp\foamtree\carrotsearch.foamtree.js'
File: foamtree/carrotsearch.foamtree.js Error: ENOENT, no such file or directory C:\Users\davidga\Desktop\ember\nextgen\tmp\tree_merger-tmp_dest_dir-37cYqLzL.tmp\foamtree\carrotsearch.foamtree.js'
at Object.fs.statSync (fs.js:689:18) at addModule
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\no
de_modules\broccoli-es6-concatenator\index.js:83:46) at addModule
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\no
de_modules\broccoli-es6-concatenator\index.js:126:9) at
C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\node_modules\
broccoli-es6-concatenator\index.js:59:7 at tryCatch
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\nod
e_modules\rsvp\dist\commonjs\rsvp-internal.js:163:16) at
invokeCallback
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-c
li\node_modules\rsvp\dist\commonjs\rsvp-internal.js:172:17) at
publish
(C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\node
_modules\rsvp\dist\commonjs\rsvp-internal.js:150:13) at flush (C:\Users\davidga\Desktop\ember\nextgen\node_modules\ember-cli\node_m
odules\rsvp\dist\commonjs\rsvp\asap.js:51:9) at
process._tickCallback (node.js:419:13)
I thought that the problem is maybe bower related so i followed the following post how to include a private local file in javascript project using bower
The problem is that neither
"foamtree": "foamtree/carrotsearch.foamtree.js"
nor
"foamtree": "vendor/foamtree/carrotsearch.foamtree.js"
works.
What may i do?
Thanks,
David
I found an answer.
In brocfile.js we can add the line
app.import('vendor/foamtree/carrotsearch.foamtree.js')
I don't know if this is an optimal anser but it works
Update:
This solution is stated in the ember-cli documentation
http://iamstef.net/ember-cli/#managing-dependencies
If you don't need them to minified in your vendor.js file you can put them in the public/js and then include it as a normal script file in app/index.html. I use this method for some libraries like moment.js.
The public folder gets directly copied to your site root during the build.

How to use the plugin sfTCPDFPlugin?

I work with symfony 1.4, and I want to use the plugin sf sfTCPDFPlugin.
I followed step by step all the instructions, I read the question “How to generate PDF using sfTCPDFPlugin in symfony 1.4?” and answers, but when I try to generate a PDF file, I get the following error:
The server returned a "500 Internal Server Error".
In detail, I have done the following:
I installed PEAR - PHP Extension, and run OK.
I installed
successfully the plugin sfTCPDFPlugin
I downloaded and installed
the "TCPDF library"
$ symfony plugin:publish-assets
$ symfony cc
Copy the /plugins/sfTCPDFPlugin/config/pdf_configs.yml into the config folder of your application
Now I try to test the plugin, but when I want to run the function "test" that is included in the plugin, I get the following error:
The server returned a "500 Internal Server Error":
PHP Fatal error: Class 'TCPDF' not found in D:\proyectos\conflictosnew\plugins\sfTCPDFPlugin\lib\sfTCPDF.class.php on line 14
I use Wampsever under Windows XP
Any idea what could be happening?
I have found an error! The link contained in: "Download the TCPDF library" at: http://www.symfony-project.org/plugins/sfTCPDFPlugin, is incorrect, because download fonts only, not the complete library
In the following link you can find the complete library TCPDF:
http://sourceforge.net/projects/tcpdf/files/

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.

PhalconPHP: My webtools page have'nt any css or js and all links do'nt work

I Created a project by this command:
phalcon create-project invo --enable-webtools
But when i open this page:
localhost/phalcon/invo/webtools.php
What is the problem?!
Change the base uri in your config.php baseUri = "/phalcon/invo/"
I encountered this type of error after creating a project with phalcon command line tool. So to resolve this issue try the following steps:
In app/config/config.php add an entry under [application] staticUri = /projectname/
Replace projectname with your project name.