Laravel - Imagick not found when a job calls it - jobs

When I call a class from a controller that uses Imagick it works just fine.
When I call the same class from a job it cannot find Imagick
using
$image = new \Imagick();
So not a namespace issue.
Any thoughts most welcome.
EDIT:
So this is a Mac/MAMP specific issue. Works on my production server so I am not so concerned. Both have Imagick extension installed. I suspect artisan listen is making php calls using the system version of php. I did check:phpversion() in my script and it is php 7.020 for both the controller and the job that has the issue. I can live with the mystery :)

Laravel Don't have own Imagick Class u can't use it be default if you have own class add on app/config.php aliases if you don't have i suggest use http://image.intervention.io/getting_started/installation for image convert or crop or anything u like

Related

yii creating webapp error

Hi i am trying to create a yii application and i am got this issue tried google but not able to find the solution how can i resolve this,..?
This is my error:
Error: Unsupported VCS specified. Currently only git and hg supported.
And what actually this error is..?
yiic webapp d:\xampp\htdocs should work.
Notice the backslashes.
Or, perhaps better, since the app generator supports relative paths, navigate to d:\xampp and simply run yiic webapp htdocs.
That said: why are you using Yii 1 ?
It is really old, and does not receive any updates.
Yii 2 is so much better :)

Class 'Google_Service' not found

I am working on the Google + API blogger code. I have downloaded this file
https://github.com/google/google-api-php-client
I have inserted my Google Developer codes in the right places I do believe.
I am getting this error
Fatal error: Class 'Google_Service' not found in /home3/aundie/public_html/dandewebwonders.com/Blog/google-api-php-client-master/src/Google/Service/Blogger.php on line 33
Any help for a new developer in training would be most helpful. Thank you in advance
Try to include autoload.php file as the first require statement. I got the same error and this solved it for me.
require_once 'google-api-php-client/src/Google/autoload.php';
I hit the same problem as well. The solution is moving to php 5.3 or higher, as the Google API PHP client uses the newer class loading mechanism in php.
Just as the following at the beginning of the code, the same as advised by Lamiaa El-morsy
require_once 'src/Google/autoload.php';
On the GitHub page, they've explained the requirement.
So, you must install the required library first, by doing the following command if you're using composer.
$ composer require google/apiclient:^2.0

enchant_broker_init() performance issue

I have a web site which uses enchant enchant_broker_init().
I`m not sure why but enchant_broker_init() takes something like 19~ seconds to load the page.
Once I remove this function page loads right away.
anyone has an idea why this is? or how can I debug it?
Thanks
Steps to install php enchant plugin.
APACHE
http://apache.mivzakim.net//httpd/binaries/win32/#warnings
PHP
http://windows.php.net/download/
ENABLE PHP ON APACHE
http://php.net/manual/en/install.windows.apache2.php
Enchant will not work using WAMP. ( at least for it hasn't... ).
Afterwards add the following path
share\myspell\dicts
to your PHP directory.
should look like that.
C:\PHP\share\myspell\dicts
Put the dictionary files there.
.aff
.dic

Symfony 2 : Handle COM Object

I would like to use a COM object in my Symfony 2 Controller. COM must be a part of PHP 5, so I guessed there would have been no problem.
Here is my code:
$ObjectFactory = new COM("CrystalReports11.ObjectFactory.1");
And Symfony returns me this error:
Class 'App\InterfaceBundle\Controller\COM' not found
I'm on Windows 7, using PHP 5.3. When displaying phpinfo, I can see COM object support enabled.
What am I doing wrong? Is there any PHP inclusion to make in the Controller to make it work?
You're working in a namespace called App\InterfaceBundle\Controller, so PHP is looking for the class COM within that namespace.
Changing your code to the following will explicitly tell PHP to load the class from the "global space" rather than the current namespace:
$ObjectFactory = new \COM("CrystalReports11.ObjectFactory.1");
You can read more about namespaces in the PHP manual: http://www.php.net/manual/en/language.namespaces.php

Yii requirement status

I try to upload my first small project on new VPS (Linux+php-5.3.3+ apache) and found these problem don't know why any help will be appreciated plz.
1- I have to lowercase all my folders in my project to work on Linux system with php+apache.
2- Strange problem is getting error in calling modlules function if like this....Post::xxx if change to post::xxx its ok I mean everything should be in lowercase otherwise give error like Post.PHP not found.
3- CDbConnection failed to open the DB connection: could not find driver?
4- I did run yii/requirements and got all below services/status FAILED and rest PASSED.
- DOM extension
- PDO MySQL extension
- PDO PostgreSQL extension
- Memcache extension
- APC extension
- Mcrypt extension
- SOAP extension
- GD extension
Any suggestion how make above services PASSED. as Im running MySQL db.
I look forward to hear soon.
I know that Khan have already resolved his app problem, but just to references, the answer is:
1 - The unix/linux systens are case-sensitive, so if you named a folder Post you'll need calling Post/ on your code.
2 - As in the last answer, if you are calling you class file Post so you need to change your class name as Post, because the php autoload depend of OS is case-sensitive too.
3 - It fail because the php PDO fail and Yii use it to connect to database system.
4 - Its necessary fix PDO MySQL extension the others are optional
GodFather.