Imagick() return null without any error - imagick

I tried to apply #orrd's code from this post. However when I point Imagick() to an image, I receive a null object without any errors.
I have successfully installed the Imagick extension on my server and added extension=extension=imagick.so to php.ini file.

Related

Debugging FPDF invalid call after upgrading laravel and PHP8

I have a web app that used FPDI to create pdf files, using laravel 5.7, setasign/fpdi-fpdf ^2.0 and PHP 7.4.
I recently upgraded to laravel 9 (also upgrading respective dependencies) and because the meta package was depcrecated, I now use "setasign/fpdf": "^1.8", "setasign/fpdi": "^2.0" as well as PHP 8.0.26
Now when trying to run my script I get the error "FPDF Error: Invalid Call" with the whole trace in the error handler, but I find this error message only semi informative.
Any ideas how I can debug this error?
Does FPDI have issues with PHP8? I didn't see any mention of that in the documentation.
thanks in advance!
From FPDF code, the error is shown when state == 1
fpdf.php#L1458
protected function _out($s)
{
// Add a line to the current page
if($this->state==2)
$this->pages[$this->page] .= $s."\n";
elseif($this->state==0)
$this->Error('No page has been added yet');
elseif($this->state==1)
$this->Error('Invalid call');
elseif($this->state==3)
$this->Error('The document is closed');
}
And state 1 is when the page ends
fpdf.php#L1128
protected function _endpage()
{
$this->state = 1;
}
Which happens when you close the document by calling output() (and when you switch to the next page but that automatically opens the next page).
So you might also have to read the new documentation of FPDF and adapt the code related to it.

QPaintDevice: Cannot destroy paint device that is being painted pure virtual method calledterminate called without an active exception

I am working with ASP.NET MVC. PDF output is running in debug mode with Rotativa.But when I throw it to the server I get the above error.I tried all versions of rotativa and wkhtmltopdf.
If I don't add headers to the output it works well on both sides.
CustomSwitches = string.Format("--header-html "{0}" --header-spacing 10 --footer-html "{1}"", header, footer)
I added the IP of the site to the host file. Problem solved.
See : https://cpanelplesk.com/how-to-edit-hosts-file-on-your-system/

Bypassing "Insecure Content Blocked" with Selenium Ruby script

I am fairly new with using Selenium in my Ruby script. Basically my script will make a get request to some url and log in. However my script is failing to send the email and log in automatically due to the Google Chrome pop up about insecure content blocked since one of the images on the page is using http and not https.
I was able to run the script successfully months ago however just recently when trying again, it is unable to proceed with logging in so I dont know why it stopped working all of a sudden.
The error that I see in terminal is this. In irb, I can go through each line of code successfully including using Selenium's "send_keys" and "click" to automatically sign in.
[2018-09-26T13:02:55.002527 #14131] INFO -- : [#http://company.com/favicon.ico'. This request has been blocked; the content must be served over HTTPS.">]
web_app.rb:54:in `': Console Errors Found! (Exception)
I tried searching for some solution but have been unsuccessful. There has been some variations of responses to similar problem but not too much luck with getting it to work.
Any feedback on how to fix would be appreciated.
start Chrome manualy and disable the warning - https://www.thewindowsclub.com/disable-insecure-content-warning-chrome
and use the set browser profile, there is my setup:
#BeforeClass
public static void setUpClass() {
System.setProperty("webdriver.chrome.driver", "C:\\Users\\pburgr\\Desktop\\chromedriver\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=C:\\Users\\pburgr\\AppData\\Local\\Google\\Chrome\\User Data");
driver = new ChromeDriver(options);
driver.manage().window().maximize();}

Xamarin.Auth - Google authentication won't open in browser

I'm trying to do authentication on my Android application using Xamarin.Auth. Some time ago, Google made the policy that you cannot do this in an embedded web view (for totally valid reasons).
I'm trying to open the account authentication page in a browser, but keep getting the embedded web view. I understand that isUsingNativeUI needs to be true in the following code:
_auth = new OAuth2Authenticator(clientId, string.Empty, scope,
new Uri(Constant.AuthorizeUrl),
new Uri(redirectUrl),
new Uri(Constant.AccessTokenUrl),
null,
isUsingNativeUI = true);
At every point in my application, this always equals true.
Elsewhere, I have code that redirects to what should be a browser:
var authenticator = Auth.GetAuthenticator();
Intent intent = authenticator.GetUI(this);
this.StartActivity(intent);
Regardless, I keep getting a dreaded 403 disallowed_useragent error whenever I try to run the project. Is there another element to this that I'm missing?
To my knowledge, setting auth.IsUsingNativeUI = true in the constructor should dictate that it must open in a browser. I've been following this example to try and debug with no success. I even pulled the guy's repo down to my machine and ran it - the Intent variable at the moment of redirection is almost identical.
Could there be something stupid that I'm missing? What else might be going wrong?
I realize this is an old question, but I had the same issue.
You have to install version 1.5.0.3 of the Xamarin.Auth Nuget package. The newest one (version 1.7.0 right now) doesn't work. You'll have to also install the PCLCrypto nuget package in order to get that version to work.

Magento backend error: Edit user

I get an error in Magento 1.6.1.0 backend:
System -> Permissions -> Users -> Edit user
When I try to access this page nothing gets loaded into content area. Page layout and menus are displayed but the form for user editing is not.
In Firbug it throws the following error:
$("user_user_roles") is null
This line comes from
app/design/adminhtml/default/default/template/permissions/user_roles_grid_js.phtml
which has not been touched.
I did an update from 1.6.0.0 to 1.6.1.0 ... could create and edit users in the old version but I am not able to do it now. Could not find anything on the web for this error.
Please let me know if there is a fix to this.
I also got this error. Here is what I did to fix.
Open file Roles.php in app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Roles.php and add getRowUrl() function:
public function getRowUrl($row) {
return $this->getUrl('*/*/edit');
}
Hope this helps,
Neo.

Resources