Can't process with PayPal using Laravel - php

After I install and configure, all what I need is to make a payment using Paypal (Sandbox).
I copy/pasted the both Keys in my .env file.
Everything works great locally, but after I uploaded it to a shared hosting and process the same payment, I got the following error, and I don't know why.
Error Picture
Errors Lines =>
PayPalConnectionException {#311 ▼
-url: "https://api.sandbox.paypal.com/v1/oauth2/token"
-data: null
#message: "failed setting cipher list"
#code: 59
#file: "/home/artemal/www/artemal/vendor/paypal/rest-api-sdk-php/lib/PayPal/Core/PayPalHttpConnection.php"
#line: 181
trace: {▶}
}

Related

failure during clear cash using symfony 4

i'm new to symfony i tried to install package admin panel by command composer require admin but it gives me error The deprecation template must contain the “% service_id%” placeholder, i executed command composer update, and found some answer ( Updating easycorp/easyadmin-bundle, Updating doctrine/doctrine-migrations-bundle, Updating symfony/orm-pack) I tried these command but it gives me error:
Fatal error: Declaration of ContainerLTFhDJN\EntityManager_9a5be93::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure in D:
\wamp\www\symfony4\var\cache\dev\ContainerLTFhDJN\srcApp_KernelDevDebugContainer.php on line 5876
Symfony\Component\ErrorHandler\Error\FatalError^ {#33
-error: array:4 [
"type" => 64
"message" => "Declaration of ContainerLTFhDJN\EntityManager_9a5be93::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer(): ?Closure"
"file" => "D:\wamp\www\symfony4\var\cache\dev\ContainerLTFhDJN\srcApp_KernelDevDebugContainer.php"
"line" => 5876
]
#message: "Compile Error: Declaration of ContainerLTFhDJN\EntityManager_9a5be93::getProxyInitializer() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::getProxyInitializer():
?Closure"
#code: 0
#file: "D:\wamp\www\symfony4\var\cache\dev\ContainerLTFhDJN\srcApp_KernelDevDebugContainer.php"
#line: 5876
}
I had a similar problem after updating some doctrine package. Removing var/cache fixed it for me.

Uncaught Error: Class 'App\Kernel' not found

I'm currently facing an important issue when i want to run any "php bin/console" command:
Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#29
#message: """
Attempted to load class "Kernel" from namespace "App".\n
Did you forget a "use" statement for "Symfony\Component\HttpKernel\Kernel"?
"""
#code: 0
#file: "./bin/console"
#line: 41
}
2020-06-11T15:43:20+00:00 [critical] Uncaught Error: Class 'App\Kernel' not found
While my Kernel.php class is normally defined in src/Kernel.php
I am working with Symfony 5
I manage to solve my issue performing 3 successive actions :
delete "vendor" folder (I saved it in another folder just in case)
delete "cach-dev" folder
run "composer update" command
Hope it can help other people to solve their issue

Inmotion hosting / Symfony / session already sent

I just migrated my website to inmotion shared hosting, but I can't run my application in prod mode.
Here is a screen:
Warning:
include_once(/home/applet15/public_html/web/../var/bootstrap.php.cache):
failed to open stream: No such file or directory in
/home/applet15/public_html/web/app.php on line 9
Warning: include_once(): Failed opening
'/home/applet15/public_html/web/../var/bootstrap.php.cache' for
inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in
/home/applet15/public_html/web/app.php on line 9
Fatal error: Uncaught RuntimeException: Failed to start the session
because headers have already been sent by
"/home/applet15/public_html/web/app.php" at line 9. in
/home/applet15/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:134
Stack trace: #0
/home/applet15/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php(259):
Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
1 /home/applet15/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php(87):
Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag('attributes')
2 /home/applet15/public_html/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/ContextListener.php(78):
Symfony\Component\HttpFoundation\Session\Session->get('_security_main')
3 /home/applet15/public_html/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall.php(69):
Sy in
/home/applet15/public_html/vendor/twig/twig/lib/Twig/Template.php on
line 396
session.auto_start is set to 0
If I try to install a new SF2/3 project, everything works fine. But mine can't run in prod mode :(
Where can be a problem?
Thanks
PS: Everything works fine on another shared hosting.
The session header must be sent before any other output. In the screenshot provided, 2 php warnings are output before the session header. Correct your code to get rid of the warnings or turn warnings off. (Ideally, amend your code so the warnings aren't raised)

Mantis SOAP-Error accessing mantisconnect.php (Eclipse Mylyn-Plugin)

I installed Mantis BT 1.2.19 on my server and it works well. To benefit from it in my Eclipse-IDE (Mars) I installed the Task-Repo Plugin for Mantis and tried to add the connection.
When I click on "Validate settings" in Eclipse I get the following error:
SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
In my error-log on the server are the following entries
[14-Oct-2015 11:25:05 Europe/Berlin] [mantisconnect.php] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
Stack Trace:
mantisconnect.php L121 SoapServer(<string>'mantisconnect.wsdl', <Array> { ['features'] => 5 })
[14-Oct-2015 11:25:05 Europe/Berlin] PHP Warning: Uncaught SoapFault exception: [Server] Error Type: SYSTEM WARNING,
Error Description: SoapServer::SoapServer(): I/O warning : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl" in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php:107
Stack trace:
#0 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php(530): SoapActions::sendSoapFault('Server', 'Error Type: SYS...')
#1 [internal function]: mc_error_handler(2, 'SoapServer::Soa...', '/var/www/vhosts...', 121, Array)
#2 /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php(121): SoapServer->SoapServer('mantisconnect.w...', Array)
#3 {main}
thrown in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mc_api.php on line 107
[14-Oct-2015 11:25:05 Europe/Berlin] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't load from '/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl' : failed to load external entity "/var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.wsdl"
in /var/www/vhosts/{myhost}/httpdocs/mantis/api/soap/mantisconnect.php on line 121
The errors above are produced by the Mantis plugin on accessing the URL
188.109.171.76 - - [14/Oct/2015:11:25:05 +0200] "POST /mantis/api/soap/mantisconnect.php HTTP/1.0" 500 1067 "-" "Mylyn/3.17.0 Mylyn-Mantis Connector/3.10.1 Apache Axis/1.4 Eclipse (org.eclipse.epp.package.jee.product) HttpClient/3.1 Java/1.8.0_60 (Oracle) Windows 7/6.1 (amd64; de_DE)"
But even a "normal" GET-access to the URL mentioned above produces the same error
https://{myhost}/mantis/api/soap/mantisconnect.php
No error is produced on accessing
https://{myhost}/mantis/api/soap/mantisconnect.php?wsdl
To solve the problem on my own I checked several ideas:
The file IS existant ... {myhost} is just a placeholder here obviously - placed by me
I switched to the context of the webserver www-data and tried accessing the file ... it IS accessible
So I´ve no idea...
PHP version is 5.5.9-1ubuntu4.13 on Ubuntu 14.04.3 LTS
€dit:
Tracked down the error to the following PHP-line in mantis/api/soap/mantisconnect.php
$server = new SoapServer("mantisconnect.wsdl",
array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
);
I don´t understand why there an error is thrown - because as I said: it exists and is readable by the webserver...
€edit2:
I replaced the line
$server = new SoapServer("mantisconnect.wsdl",
with
$server = new SoapServer("http://{myhost}/mantis/api/soap/mantisconnect.wsdl",
THIS works... so I´ve a "solution" but I don´t know why the access via file does not work
I Think I found the answere on my own (my workaround failed some hours later - with same error again).
Seems to be a bug in PHP (on Ubuntu) as mentioned here
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1160336
Unresolved since 2013
:-(
My current workaround is disabling soap.wsdl_cache_enabled in php.ini which seems to help for the moment.

Failed to start the session because headers have already been sent by "" at line 0. at n/a

I'm trying to start working in a new (Windows 8) laptop in an existing project that works fine in my previous (Mac OS X) machine and in all the (Linux) servers it's been deployed to.
I've cloned from git, run the composer, app/console works fine, I've set the config files properly, created the database and checked that the DB schema was OK, cleared cache, etc etc as I've done a thousand times before.
But now I'm getting an error I've never faced before, and I don't know if it has to do with updated dependencies that might not necessarily use the exact same versions than before, or just that I'm kind of new working on Windows environments:
[1] RuntimeException: Failed to start the session because headers have already been sent by "" at line 0.
at n/a
in C:\Users\David\Sites\my-project\app\cache\dev\classes.php line 103
at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start()
in C:\Users\David\Sites\my-project\app\cache\dev\classes.php line 183
at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag('attributes')
in C:\Users\David\Sites\my-project\app\cache\dev\classes.php line 475
at Symfony\Component\HttpFoundation\Session\Session->has('_security.last_error')
in C:\Users\David\Sites\my-project\vendor\friendsofsymfony\user-bundle\FOS\UserBundle\Controller\SecurityController.php line 28
at FOS\UserBundle\Controller\SecurityController->loginAction(object(Request))
in line
at call_user_func_array(array(object(SecurityController), 'loginAction'), array(object(Request)))
in C:\Users\David\Sites\my-project\app\bootstrap.php.cache line 2841
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
in C:\Users\David\Sites\my-project\app\bootstrap.php.cache line 2815
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
in C:\Users\David\Sites\my-project\app\bootstrap.php.cache line 2944
at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
in C:\Users\David\Sites\my-project\app\bootstrap.php.cache line 2245
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
in C:\Users\David\Sites\my-project\web\app_dev.php line 29
Check that any custom classes overriding classes from the HttpKernel, for example the Bundle class are not sending headers or responses from one of the methods like boot()

Categories