I'm using the Barryvdh/laravel-dompdf which is a laravel 5 wrapper for the domPDF library (Link to GIT). But after I ran a composer update on my project, I get a error message when I try to convert a html file to a pdf file. The error is as follow FatalErrorException in class.pdf.php line 1876: Call to undefined method Cpdf::o_rapport(). I couldn't find a solution for the specific problem so I tried to downgrade the version of the Barryvdh/laravel-dompdfand run composer again, but that didn't help. So after that I looked at the stacktrace and tried finding the piece of code that fires the FatalError, but nowhere in the code the method o_rapport() is being called, even if I use the search function of my IDE to search my complete project for this method, no reference are found so that is a dead end aswell.
Now I want to ask if someone did encounter the same problem as me and how to fix this.
Related
I'm trying to open tinker in a Laravel project, but when I run php artisan tinker I get this error:
ErrorException
file_exists(): Unable to find the wrapper "hoa" - did you forget to enable it when you configured PHP?
I can't find everything similar error online, I found only similar errors but with 'wrapper http' .
Does anyone have any suggestions? Thanks
Could this be due to custom code or a library you've imported?
I often find that if I add things to the ServiceProvider or Kernel, they run before many of the artisan commands, and if I've failed to perform the proper "if" checks first, it fails.
I suppose the question I would have in return would be; Is this a fresh Laravel install or have you got custom code and libraries running? I would check there, try removing libraries you've added, HOA from my searching doesn't appear to default to Laravel.
— Happy to revise my answer should more detail be provided
Solved with this command founded on github:
composer require psy/psysh:0.11.2 --dev
After upgrading php to 5.5, the following error occurs:
PHP Fatal error: Call to undefined function bi_to_str() in /var/www/index.php
I know that it's not a coding error, but it could be a missing library. But could an empty value cause that error? Is there an easy way to load that library using apt-get in Debian?
Well with the help I received in the comments, I was able to come up with a solution.
It seems that it's just the function that is missing. I was able to create a file called big_int.php, fill it with the contents found here, and just link to it using require_once in index.php, like this:
require_once('big_int.php');
All is well. Many thanks to Barmar for the helpful tip.
Few weeks ago I set up a Message system with Symfony Messenger and it worked great.
Today I wanted to create new object through message, so I went to my server and type the command to consume message
First I had this result
$ bin/console messenger:consume-messages amqp_notifications
/usr/bin/env: ‘php\r’: No such file or directory
It never happened before with my files, and I never changed the line ending or encoding of my file sin PHPstorm.
I tried to use $ php bin/console messenger:consume-messages amqp_notifications
but then I had this error.
Attempted to load class "AMQPConnection" from the global namespace.
Did you forget a "use" statement?
Pretty weird, because I have have the php-amqp ext installed as you can see on the screenshot of my phpinfo
I didn't change anything in my Message class or Handler.
Also, I tried to call new AMQPConnection() on a random action, just to try, and I didn't get the error.
I'm completely lost with this error this time, as everything is installed.
I use PHP 7.3.1 and symfony Messenger 4.2.2
It seems your second issue was already solved by ccKep on his comment.
The first one is that the specific shebang line #!/usr/bin/env php executes the first php found in the $PATH. So if you already have uninstalled it, which seems the case, or it has a symbolic link to another php version, you can get a wrong result.
Tries to check what is inside the $PATH and replace the PHP path for the correct one. You might get the place running which php.
I am unable to create a new package from module builder. In module builder, when I enter a package name and key and hit save, it does nothing.
When I inspect in chrome, the console logs the following error:
Uncaught TypeError: Cannot read property 'value' of undefined
at validate_form (sugar_grp1.js:228)
at check_form (sugar_grp1.js:160)
at Object.handleSave (ModuleBuilder.js:905)
at HTMLInputElement.onclick (/XXXXXX/index.php?module=ModuleBuilder&action=index&type=mb#ajaxUILoc=&mbContent=module%3DModuleBuilder%26action%3Dpackage%26new%3D1:1)
Any suggestions on what I can look at or do to debug?
I'm using SuiteCRM 7.7.8
Php 7
I thought this might be a permissions issue, so i made sure all folders and files are 755 and tried to create the package again but got the same error.
I do not have any custom modules. this was the first one im trying to build.
I get similar errors if i try to export a module in studio also.
When I dig deeper, the exact line that fails in sugar_grp1.js is var current_module=document.getElementsByName("view_module")[0].value;
There is no element with name view_module on the page. It appears that this is happening to other users also. Please see: https://suitecrm.com/community/forum/suitecrm-7-0-discussion/12418-unable-to-create-package-in-module-builder#42665
UPDATE: I have done the usual repair and rebuild everything along with JS groupings and JS. Still the same.
An easy solution, see following steps:
Open /cache/include/javascript/sugar_grp1.js
Go to line 228 or find the next text:
var current_fields='';var current_module=document.getElementsByName("view_module")[0].value;$.ajax({type:"GET",url:"index.php?to_pdf=1&module=ModuleBuilder&action=getModuleFields¤t_module="+current_module,async:false,success:function(result){current_fields=JSON.parse(result);},error:function(xhr,status,error){var err=eval("("+xhr.responseText+")");}});for(k=0;k<current_fields.length;k++){if(isError!=true){val=current_fields[k].toUpperCase();if((operator=="=="&&val==item1)||(operator=="!="&&val!=item1)){isError=true;add_error_style(formname,validate[formname][i][nameIndex],'Invalid Value: Field Name already exists');}}}
Remove this line.
QuickRepair.
Clear your Browser Cache and try again.
After I run composer update on AWS PHP SDK I started to get this error:
Fatal error: Interface 'Guzzle\Common\HasDispatcherInterface' not found in <path>
There is HasDispatcherInterface.php file in <path>, but I still get the error. Is this a bug? If it is, is there any workaround?
So it turned out this is about a 12 year old bug of PHP. https://bugs.php.net/bug.php?id=18556
When you use setlocale('tr_TR'), PHP can not find any class or method has an 'I' letter in its name. Even if its a standart library. Great.