C:\wamp\www\project\automation\codeception>
php codecept.phar bootstrap
PHP Parse error: syntax error, unexpected '[' in phar://C:/wamp/www/project/aut
omation/codeception/codecept.phar/vendor/guzzlehttp/guzzle/src/functions.php
on
line 24
PHP Stack trace:
PHP 1. {main}() C:\wamp\www\project\automation\codeception\codecept.phar:0
PHP 2. require_once() C:\wamp\www\project\automation\codeception\codecept.phar
:5
PHP 3. require_once() phar://C:/wamp/www/project/automation/codeception/codece
pt.phar/autoload.php:4
PHP 4. ComposerAutoloaderInit47cdf60ec5efa3860ea7539ac6be7d49::getLoader()
pha
r://C:/wamp/www/project/automation/codeception/codecept.phar/vendor/autoload.php
:7
PHP 5. composerRequire47cdf60ec5efa3860ea7539ac6be7d49() phar://C:/wamp/www/pr
oject/automation/codeception/codecept.phar/vendor/composer/autoload_real.php:52
Parse error: syntax error, unexpected '[' in phar://C:/wamp/www/project/automati
on/codeception/codecept.phar/vendor/guzzlehttp/guzzle/src/functions.php
on line
24
Call Stack:
0.0110 658208 1. {main}() C:\wamp\www\project\automation\codeception\c
odecept.phar:0
0.0128 671848 2. require_once('phar://C:/wamp/www/project/automation/c
odeception/codecept.phar/autoload.php') C:\wamp\www\project\automation\codecepti
on\codecept.phar:5
0.0133 673968 3. require_once('phar://C:/wamp/www/project/automation/c
odeception/codecept.phar/vendor/autoload.php') phar://C:/wamp/www/project/automa
tion/codeception/codecept.phar/autoload.php:4
0.0137 695984 4. ComposerAutoloaderInit47cdf60ec5efa3860ea7539ac6be7d4
9::getLoader() phar://C:/wamp/www/project/automation/codeception/codecept.phar/v
endor/autoload.php:7
0.0204 1014824 5. composerRequire47cdf60ec5efa3860ea7539ac6be7d49() pha
r://C:/wamp/www/project/automation/codeception/codecept.phar/vendor/composer/aut
oload_real.php:52
It's not because of Windows. Probably you are running PHP 5.3 or less. In this case you should use Codeception 1.8.x, as pointed out here: http://codeception.com/builds
For PHP 5.3 use the latest version of Codeception 1.8.x
Create a folder "TEST" in D:\
02.Download all codeception files into that folder
# http://getcomposer.org/
# http://codeception.com
03.Open command prompt and go to D:\TEST
04.Run php codecept.phar (D:\TEST> php codecept.phar)
05.Run php composer.phar require "codeception/codeception:*"
06.Go to D:\TEST\vendor\bin in command prompt
07.Run codecept bootstrap
Related
When I run xampp on fedora this error is showing up on application log
Starting Apache Web Server...
Exit code: 8
Stdout:
apache config test fails, aborting
Stderr:
httpd: Syntax error on line 522 of /opt/lampp/etc/httpd.conf: Syntax error on line 10 of /opt/lampp/etc/extra/httpd-xampp.conf: Cannot load modules/libphp7.so into server: libnsl.so.1: cannot open shared object file: No such file or directory
can anyone tell me how can I solve this?
it seems you're missing libnsl. install it through this command:
sudo dnf install libnsl
In case this doesn't work you can then download it manually:
Visit https://pkgs.org/
In the search box (pkgs.org of course) type libnsl.so.1 and choose the appropriate OS. The version shown might be higher e.g libnsl-2.28-9.fc29.x86_64.rpm, but it doesn't matter, the file needed is also included in this very package.
In the terminal, navigate to the directory where the .rpm was downloaded.
Type the following command to install it:
sudo rpm libnsl-2.XX-X.fc29.x86_64.rpm
Upon completion everything should be working fine.
A quick Google search returns this: https://www.reddit.com/r/Fedora/comments/8hlhlv/xampp_with_fedora_28/
The suggested fix is installing libnsl from this source:
https://www.rpmfind.net/linux/rpm2html/search.php?query=libnsl.so.1%28%29%2864bit%29&submit=Search+...&system=fedora&arch=
I'm gettind this PDOException could not find driver
here is my /etc/php/7.0/apache2/php.ini file
;extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
and when I run php in my server I get this warning PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: mysqlnd_connect in Unknown on line 0
I had to make sure that /usr/lib/php/20151012/mysqlnd.so exists and my modules were been enabled by the /etc/php/7.0/mods-available directory, there were multiple .ini files, except for mysqlnd.ini
so I created it
sudo nano mysqlnd.ini
and put this content:
; configuration for php common module
; priority=10
extension=mysqlnd.so
restarted apache
sudo service apache2 restart
some background information:
Ubuntu 14.04 minimal and upgraded php from verion 5.x to 7.2
and now I get every 30 minutes an email from the cron daemon with the following subject:
Cron <root#v52775> [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi
and following content:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_intl.dll' - /usr/lib/php/20131226/php_intl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_mysql.dll' - /usr/lib/php/20131226/php_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_mysqli.dll' - /usr/lib/php/20131226/php_mysqli.dll: cannot open shared object file: No such file or directory in Unknown on line 0
I'm a little bit confused because I don't know how i get this .dll files and not any .so.
I look at the php info, so the intl and mysqli module are active. The same information I get when I write php -m on my terminal.
But not the mysql extension! I disabled the older php version, only php 7.2 is running on my system.
The another confusing is the path. I'm not sure but in the e-mail from the cronjob ist the path /usr/lib/php/20131226/php_* but the php info shows me 20170718. I put a screenshot here.
screenshot php info extention
How I can fix it, I hope someone can help me?
Please ask me if you need more information :)
I fix it!
I do sudo apt-get remove "php*" and install php once again. After that you get a email with a lot of warnings like that.
PHP Warning: PHP Startup: Unable to load dynamic library 'xml.so' (tried: /usr/lib/php/20170718/xml.so (/usr/lib/php/20170718/xml.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/xml.so.so (/usr/lib/php/20170718/xml.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
This can be easily fixed by installing the missing modules.
Following an upgrade of Ubuntu 14 to 16 LTS, php has been automatically updated to version 7. Running my index.php file now breaks at the first "->" and the php code is printed in my browser from that point...
i.e.
$obj->print(); // in php file
Output is...
print();
in the web-browser.
There are no errors being output in the configured or any other error file.
Finally just reinstalled php7.0 and php5.6 from the command line along with all the required packages.
https://askubuntu.com/questions/756879/cant-install-php5-on-ubuntu-16-04
create laravel 5 project:
composer create-project laravel/laravel wifi dev-develop --prefer-dist
Error:
PHP Fatal error: Uncaught exception 'PharException' with message 'phar "/usr/local/bin/composer.phar" has a broken signature' in /usr/local/bin/composer.phar:23
Stack trace:
0 /usr/local/bin/composer.phar(23): Phar::mapPhar('composer.phar')
1 {main}
thrown in /usr/local/bin/composer.phar on line 23
This is a composer problem not a Laravel one.
Your composer.phar may be corrupted try to re-download the composer using the instructions from here
This is a composer problem, try:
Sudo su
composer self-update