yii2 deployment in rackspace cloud site - php

I am trying to deploy a yii2 website in rackspace cloud site for testing and I get this error and the site main page never shows up
[11-Jun-2014 14:10:07 America/Chicago] exception 'yii\base\ErrorException' with message 'PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/yaz.so' - /usr/lib64/php/modules/yaz.so: undefined symbol: pval_destructor' in Unknown:0
Stack trace:
0 [internal function]: yii\base\ErrorHandler->handleFatalError()
1 {main}
Yii2 web site works perfectly on my MAC localhost but not on the server. I verified that all requrirements are passed in the server(I could access requirements.php through url on server and it passed). The server has PHP 5.4.10.
Any thoughts?

Related

Laravel 8 undefined error Illuminate\\Support\\Collection::getArrayableItems()

Using laravel v8.7*
Using apache server and used deployer to deploy the Laravel application on the server.
Having issues once deployed to a server.
I get the following error:
PHP Fatal error: Uncaught Error: Call to undefined method Illuminate\Support\Collection::getArrayableItems() in /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:31\n
Stack trace:\n
#0 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Collections/helpers.php(15): Illuminate\Support\Collection->__construct(Array)\n#1 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Support/Traits/ReflectsClosures.php(49): collect(Array)\n
#2 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/ReportableHandler.php(62): Illuminate\Foundation\Exceptions\ReportableHandler->firstClosureParameterTypes(Object(Closure))\n
#3 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(234): Illuminate\Foundation\Exceptions\ReportableHandler->handles(Object(Symfony\Component\ErrorHandler\Error\FatalError))\n
#4 /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Foundati in /var/www/html/releases/2/vendor/laravel/framework/src/Illuminate/Collections/Collection.php on line 31
Used the following instructions to deploy Note: using apache server over ngnix as apache is currently running other applications on the server.
Have you checked if the PHP version on the droplet is the same as the PHP version you have been using locally? This looks like an error that will occur if you change versions between PHP / Laravel.

Doctrine settings for proxy

I'm programming a web application with Doctrine 2 on a CentOS 7 server, with Plesk and PHP 7.3.
I'm getting the error message that I have to configure a proxy directory when I run the web application. On my test system (local) it works without any issues.
What can I do to fix this problem?
Fatal error: Uncaught Doctrine\Common\Proxy\Exception\InvalidArgumentException: You must configure a proxy directory. See docs for details in /var/www/vhosts/.../vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php:23 Stack trace: #0 /var/www/vhosts/.../vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php(199): Doctrine\Common\Proxy\Exception\InvalidArgumentException::proxyDirectoryRequired() #1 /var/www/vhosts/.../vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php(77): Doctrine\Common\Proxy\ProxyGenerator->__construct(false, 'Proxies') #2 /var/www/vhosts/.../vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(167): Doctrine\ORM\Proxy\ProxyFactory->__construct(Object(Doctrine\ORM\EntityManager), false, 'Proxies', 1) #3 /var/www/vhosts/.../vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(8 in /var/www/vhosts/.../vendor/doctrine/common/lib/Doctrine/Common/Proxy/Exception/InvalidArgumentException.php on line 23

PHRETS Works Locally But Times Out On Web Server

I installed PHRETS with Composer and have been able to print information using CMD terminal and following the docs. I tried uploading all the files to my web server, but the page times out.
My error log shows the following:
PHP Fatal error: Uncaught exception 'GuzzleHttp\Ring\Exception\ConnectException' with message 'cURL error 7: Failed to connect to rets-rald.realtyserver.com port 6103: Connection timed out' in /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php:126
Stack trace:
#0 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php(91): GuzzleHttp\Ring\Client\CurlFactory::createErrorResponse(Array, Array, Array)
#1 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php(96): GuzzleHttp\Ring\Client\CurlFactory::createResponse(Array, Array, Array, Array, Resource id #69)
#2 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php(68): GuzzleHttp\Ring\Client\CurlHandler->_invokeAsArray(Array)
#3 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/Middleware.php(54): GuzzleHttp\Ring\Client\CurlHandler->__invoke(Array)
#4 /public_html/phrets/vendor/guzzlehttp/ringphp/src/Client/Middlewa in /public_html/phrets/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php on line 49
How can I get it working on the web server? Below is my configuration.
$config = new \PHRETS\Configuration;
$config->setLoginUrl('http://rets-rald.realtyserver.com:6103/saskatchewan/rets/login');
$config->setUsername('username');
$config->setPassword('password');
$config->setRetsVersion('1.5');
$config->setUserAgent('PHRETS/2.0');
$config->setHttpAuthenticationMethod('digest');
$config->setOption('use_post_method', false);
$config->setOption('disable_follow_location', false);
Turns out, I just needed to enable port 6103 on the server.

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.

Amazon S3 on wamp localhost SSL error

I'm trying to test in PHP Amazon S3 on my localhost but keep getting the same error:
Fatal error: Uncaught exception 'cURL_Exception' with message 'cURL
resource: Resource id #69; cURL error: SSL certificate problem, verify
that the CA cert is OK. Details: error:14090086:SSL
routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (cURL
error code 60). See http://curl.haxx.se/libcurl/c/libcurl-errors.html
for an explanation of error codes.' in
C:\wamp\www\mysite\application\libraries\awsphp\lib\requestcore\requestcore.class.php:829
Stack trace: #0
C:\wamp\www\mysite\application\libraries\awsphp\sdk.class.php(1034):
RequestCore->send_request() #1
C:\wamp\www\mysite\application\libraries\awsphp\services\sqs.class.php(250):
CFRuntime->authenticate('ListQueues', Array) #2
C:\wamp\www\mysite\application\libraries\awsphp\services\sqs.class.php(582):
AmazonSQS->authenticate('ListQueues', Array) #3
C:\wamp\www\mysite\application\controllers\uploads.php(33):
AmazonSQS->list_queues() #4 [internal function]: Uploads->aw3() #5
C:\wamp\www\mysite\system\core\CodeIgniter.php(359): call_user_func
in
C:\wamp\www\mysite\application\libraries\awsphp\lib\requestcore\requestcore.class.php
on line 829
Test code:
$sqs = new AmazonSQS();
$response = $sqs->list_queues();
var_dump($response->isOK());
I properly installed the AWS SDK to php files and enabled CURL and SSL on me local server. What can I do to make this work? I can't find any help online. I'm using wamp.
Get this file and save it to your hard drive. Call it cacert.pem.
Configure curl.cainfo in php.ini with the full path to the file downloaded in step 1.
Restart Apache.
I'll leave it as an exercise for the reader to find out why this fixes it, all the information you need can be found in the links above.
Are you running on Windows?
Did you take the time to run the SDK Compatibility Test that comes bundled with the SDK?
According to this post you can't work with Amazon AWS on localhost..

Categories