I have used php library for stripe payment, When I call the charge page it gives 500 internal server error by this namespace errors and also the require init.php giving error.
My server PHP Version 5.2.17
SO Please suggest me how to solve this problem..
i.stack.imgur.com/c05Hr.png
The latest release of Stripe's PHP bindings (2.*) require you to have PHP 5.3.3 or later on your server as explained here. Since you're on PHP 5.2.17 you'd need to either:
Use the legacy version of the bindings (1.18.0)
Upgrade the version of PHP on your server to at least 5.3.3
Related
i've installed PHPMailer over composer on hostinger.com (webhost). The original version of PHPMailer was 5.0 so I upgraded to 6.6 after i came across this error when submitting a ContactForm7 WordPress plugin form.
Fatal error: Uncaught Error: Class 'PHPMailer\PHPMailer\SMTP' not found in /home/uxxxxxxxx/domains/rebelcitytour.com/public_html/staging25/wp-includes/PHPMailer/PHPMailer.php:1953
I've upgraded to version 6.6 of PHPMailer, I've checked the PHPMailer folder. It exists. And has three files in it...
Exception.php PHPMailer.php SMTP.php
Yet, the plugin PHP code can't seem to find SMTP class? Weird right?
I've included this code in load.php of my plugin root director...
require_once '/staging25/wp-includes/PHPMailer/SMTP.php';
Link to bug on system
Yes, like suggested above. It was a namespace issue caused by a dev declaring a global variable in local scope.
I'm trying to set up swagger-editor locally.
After cloning, I ran it using npm start but it never works on the browser .
and the browser gives the error:
This page isn’t working localhost sent an invalid response.
ERR_INVALID_REDIRECT
My nodejs version is 10.16.1 and npm version is 6.9.0.
Does it work only with 6.x version of nodejs? Did I miss anything here?
Or is there any other tool for setting up swagger-editor locally or using it?
Thanks.
I'm trying to deploy a node.js app on my server.
I've followed the instructions laid out by cPanel in their documentation here: Guide to Node.js Installations and here: How to Install a Node.js Application. I want to do this without CloudLinux and given Apache's Node.js module it seemed to be possible.
However, even though deploying the app in the backend seems fine, I'm getting this error when trying to access the app in my browser:
The Phusion Passenger application server tried to start the web application through a Passenger-internal helper tool called the SpawnEnvSetupper. But that helper tool encountered an internal error.
Error Details: Failed to initialize LVE library: : init_lve error [2]
The stdout/stderr output of the subprocess so far is: Error: Failed to initialize LVE library: : init_lve error [2]
I don't know much about LVE but I do know that it's a part of CloudLinux. So, do I still need to have CloudLinux installed after all? Thanks.
Update:
Tried deploying the same node.js app on a subdomain and had the same error. Then I tried to deploy it on another server that I manage (following the same steps) and was able to do so successfully. My hosting company seems to think there was an issue when I uninstalled CloudLinux from my server. (I had previously set it up to run Node and then had it removed once I discovered that I wouldn't need it.)
To answer my own question ...
Yes, Node.js can run on cPanel without CloudLinux.
By following the instructions in the cPanel documentation here (Guide to Node.js Installations) and here (How to Install a Node.js Application), a Node.js app can be deployed successfully.
In my particular situation above, I had installed CloudLinux on my server originally to deploy Node.js apps before cPanel came out with their own module for Apache. Given that I was paying extra for the CloudLinux software, I wanted to remove it from my hosting account and leverage the Apache module. During the uninstall, it turns out that LVE and other libraries related to CloudLinux were not removed correctly causing the error (not sure why yet). By simply removing those and restarting my server the Node app started functioning properly again.
I have a project written in Angular 4 and I am trying to build it, but I keep getting this error: Mixins may not be defined within control directives or other mixins.
I've looked around on the internet and I saw some recommendations to downgrade node-sass to the version 4.8.1, but when I tried to do this, I got a 404 erro from Github:
> node-sass#4.8.1 install c:\my-project\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node":
HTTP error 404 Not Found
And sure enough, this address: https://github.com/sass/node-sass/releases/download/v4.8.1/win32-x64-64_binding.node doesn't exists. My guess is because there are new versions of node-sass available and the 4.8.1 was pushed back to the second page: https://github.com/sass/node-sass/releases?after=3.5.3.
I know that I am using a very old version of Angular and I have plans to upgrade it, but I don't have the time to do this now, has someone managed to solve this?
Download win32-x64-64_binding.node, put in the local:
C:\Users\{username}\AppData\Roaming\npm-cache\node-sass\4.8.1\
Then install again.
I am currently breaking down a swagger.json file following this guide: https://github.com/swagger-api/swagger-spec/blob/master/guidelines/REUSE.md
I made a mistake somewhere, and I would like to use the swagger-tools to find out where is my problem. When I run the tool, it just get stuck and doesn't produce any output.
I am using a localhost server, and my $ref are pointing to the localhost using absolute URLs such as:
"$ref": "http://localhost:8080/api-docs/v1/parameters.json#/myParameter"
I tried running using the file from the filesystem or served by the local server: none is working.
swagger-tools validate http://localhost:8080/api-docs/v1/swagger.json
However, if I shutdown the server and try to validate from the file system, the tools complains that it cannot resolve the references so somehow that proves that the file is parsed and swagger-tools tries to validate it.
Platform: Windows 7 Pro
Powershell
npm --version: 2.11.3
swagger-tools --version: 0.9.2
installed using npm -g install
I found the solution: the problem was coming from self-references in the definitions file that were using absolute URLs.
Using relative reference such as:
"$ref" : "#/myReference"
solved the issue and the swagger-tools validate is now working as expected.
I started suspecting something like that when I looked at the Node.js process and saw it was consuming 1.2 Go RAM and 25% CPU.