Strange error trying to execute "php codecept.phar run > result.txt" - php

I have installed Codeception following the guide on their website. Everything went okay, so I created my first basic test.
<?php
$I = new WebGuy($scenario);
$I->wantTo('ensure that frontpage works');
$I->amOnPage('/');
$I->see('Homepage');
Trying to execute this and it gave Stack trace errors so I dumped them in result.txt page.
Codeception PHP Testing Framework v1.6.2
Powered by PHPUnit 3.7.19 by Sebastian Bergmann.
Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in phar://C:/wamp/www/dugun/codecept.phar/src/Codeception/Configuration.php on line 175
Notice: Use of undefined constant CURLOPT_CERTINFO - assumed 'CURLOPT_CERTINFO' in phar://C:/wamp/www/dugun/codecept.phar/src/Codeception/Configuration.php on line 175
Notice: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed 'CURLOPT_SSL_VERIFYPEER' in phar://C:/wamp/www/dugun/codecept.phar/src/Codeception/Module/PhpBrowser.php on line 78
Fatal error: Call to undefined function Guzzle\Http\Curl\curl_version() in phar://C:/wamp/www/dugun/codecept.phar/vendor/guzzle/guzzle/src/Guzzle/Http/Curl/CurlVersion.php on line 47
Using WAMP on Windows 7. PHP ver 5.4.3. Apache ver 2.4.2. CURL is enabled in settings. Tried restarting several times, no luck.
Anyone knows how to solve this issue, what may be wrong?
Update
The problem was related to curl.dll. Downloading a fresh one from this topic (PHP cURL not working - WAMP on Windows 7 64 bit) solved the issue.

Based on the errors I'd guess that CURL is missing even though it's enabled, try running a phpinfo() to see if the extension is running.
From the PHP site:
"Note: Note to Win32 Users
In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll must be present in your PATH. You don't need libcurl.dll from the cURL site."
http://www.php.net/manual/en/curl.installation.php

Related

Error in jelastic php 7.3 regarding zip.so

When redeploying or newly deploying a Node with PHP 7.3 (nginx 1.14.2) i get the following error when trying to create a zip-archive in php using zip.so
php: symbol lookup error: /usr/lib64/php/modules/zip.so: undefined symbol: zip_file_add
(this is from calling the $zip->addFile() function.
This is a problem across jelastic hosting-providers (tested on two different hosting-providers)

Can't run phpunit on phpstorm due to Undefined variable: argv in

I have everything configured but when I run the tests it fails with this error log:
/usr/bin/php /tmp/ide-phpunit.php --bootstrap /home/lchost/EOSS2/tests/bootstrap.php --no-configuration /home/lchost/EOSS2/tests
Testing started at 9:02 PM ...
PHP Notice: Undefined variable: argv in /tmp/ide-phpunit.php(191) : eval()'d code on line 1
PHP Stack trace:
PHP 1. {main}() /tmp/ide-phpunit.php:0
PHP 2. IDE_PHPUnit_Loader::init() /tmp/ide-phpunit.php:250
PHP 3. eval() /tmp/ide-phpunit.php:191
This version of PHPUnit is supported on PHP 5.6, PHP 7.0, and PHP 7.1.
You are using PHP 5.5.9-1ubuntu4.20 (/usr/bin/php5).
What should I do? I was trying to update php5.5.9 to php5.6 but unsuccessful.
For the Notice message, from PHP for argv variable.
enable register_argc_argv in you php.ini file.
And for testing, upgrade your php.
You are getting Notice that will not affect your execution of the test. So thats not a problem for the PHPUnit.

Fatal Error: Call to undefined function gzopen() when installing WordPress theme

I'm seeing the below error after attempting to activate a WordPress theme. The error message in the browser is...
Fatal error: Call to undefined function gzopen() in /var/www/mysite.com/wp-content/themes/flat/themify/themify-builder/classes/class-themify-builder-layouts.php on line 528
Checking my /var/log/apache2/error.log I see the following error:
Call to undefined function gzopen() in /var/www/mywebsite.com/wp- content/themes/flat/themify/themify-builder/classes/class-themify-builder-layouts.php on line 528, referer: http://mywebsite.com/wp-admin/update.php?action=upload-theme
Server information:
OS: Ubuntu 14.04 LTS
Apache: APache/2.4.7
PHP: PHP 5.5.9-1ubuntu4
That happened with me too (after upgrading to 14.04 #ubuntu). I waisted my whole day on it but in the end i found the solution.
replace gzopen with gzopen64.
this absolutely worked for me.
PS: I'll like the magento community to know that this problems appeared in creating package, after upgrading apache and php.
This issue occurs because your PHP server is not compiled with Zlib (this PHP module allows you to read and write .gz compressed files). Zlib support in PHP is not enabled by default.
More information about how to setup Zlip can be found here: http://php.net/manual/en/zlib.setup.php

phpwebsocket - Undefined Function socket_create() - Have php_sockets enabled on Windows/WAMP

I checked out the PhpWebSockets project from here:
https://code.google.com/p/phpwebsocket/
It's in its own project on my localhost (Windows 7 64-bit) box, inside of a WAMP server. I issue the following command in Windows Command Line to run the server.php file:
C:\wamp\bin\php\php5.4.12\php.exe C:\wamp\www\phpwebsocket\server.php
But it results in the following error message:
PHP Fatal error: Call to undefined function socket_create() in C:\wamp\www\phpwebsocket\server.php on line 58
My WAMP instance DOES have the php_sockets extension enabled (since I saw this similar question who had that problem).
Anyone know what I could possibly be doing wrong?
Found the answer in another thread:
Error with PHP Websocket and Wamp Server
Turns out running the file on the command line means it uses a different php.ini file than the WAMP server does. Seems stupid, but turned out php_sockets wasn't uncommented in that php.ini file, and removing it removed the error with it.

Call to undefined function openssl_pkcs7_sign()

I'm using TCPDF to sign son PFD documents.
I was testing the examples via web: http://www.tcpdf.org/examples.php, and they worked fine, but when I downloaded the lib and tested it # localhost I got this error in "example 52":
Fatal error: Call to undefined function openssl_pkcs7_sign() in
C:\xampp\htdocs\pruebas\pdf_firma\tcpdf\tcpdf.php on line 9043
My PHP is Version 5.3.8.
Any has any idea how to fix it?
Openssl must be installed
Enabling the OpenSSL in XAMPP
http://www.php.net/manual/en/openssl.setup.php

Categories