Issue upgrading to phpunit 3.5.13 - phpunit

I have been using phpunit for a while, starting with 3.5.8, subsequently upgrading to 3.5.10 and now on 3.5.11
I wanted to upgrade to 3.5.13 today using the commands:
pear channel-update pear.phpunit.de
pear upgrade phpunit/PHPUnit
Unfortunately pear does upgrade itself only but the upgrade of phpunit fails as seen below. Yes, I am in Administrator mode, so authorizations should not be an issue. I find this all the more strange, as I have performed two successful upgrades previously. Because of this I find it hard to believe it is an issue that is specific to my setup (the development machine is running Windows 7 64Bit).
Has anyone else experienced this issue and can offer a solution?
Output from 'pear upgrade phpunit/PHPUnit':
First run:
>pear upgrade phpunit/PHPUnit
phpunit/PHPUnit requires PEAR Installer (version >= 1.9.2), installed version is
1.9.1
phpunit/PHPUnit can optionally use PHP extension "dbus"
phpunit/File_Iterator requires PEAR Installer (version >= 1.9.2), installed vers
ion is 1.9.1
downloading YAML-1.0.5.tgz ...
Starting to download YAML-1.0.5.tgz (9,966 bytes)
.....done: 9,966 bytes
downloading XML_RPC2-1.0.8.tgz ...
Starting to download XML_RPC2-1.0.8.tgz (67,063 bytes)
...done: 67,063 bytes
downloading PEAR-1.9.2.tgz ...
Starting to download PEAR-1.9.2.tgz (295,120 bytes)
...done: 295,120 bytes
downloading Cache_Lite-1.7.9.tgz ...
Starting to download Cache_Lite-1.7.9.tgz (30,318 bytes)
...done: 30,318 bytes
downloading Console_Getopt-1.3.1.tgz ...
Starting to download Console_Getopt-1.3.1.tgz (4,471 bytes)
...done: 4,471 bytes
upgrade ok: channel://pear.symfony-project.com/YAML-1.0.5
upgrade ok: channel://pear.php.net/Console_Getopt-1.3.1
upgrade ok: channel://pear.php.net/PEAR-1.9.2
upgrade ok: channel://pear.php.net/Cache_Lite-1.7.9
upgrade ok: channel://pear.php.net/XML_RPC2-1.0.8
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
Second Run:
>pear upgrade phpunit/PHPUnit
phpunit/PHPUnit can optionally use PHP extension "dbus"
downloading PHPUnit-3.5.13.tgz ...
Starting to download PHPUnit-3.5.13.tgz (118,553 bytes)
..........................done: 118,553 bytes
could not extract the package.xml file from "C:\Program Files (x86)\Zend\ZendSer
ver\bin\tmp\PHPUnit-3.5.13.tgz" Unable to create directory 'C:/Program/Fil7414.t
mp'
Unable to create path for C:/Program/Fil7414.tmp/package.xml
Download of "phpunit/PHPUnit" succeeded, but it is not a valid package archive
Error: cannot download "phpunit/PHPUnit"
downloading File_Iterator-1.2.6.tgz ...
Starting to download File_Iterator-1.2.6.tgz (3,439 bytes)
...done: 3,439 bytes
could not extract the package.xml file from "C:\Program Files (x86)\Zend\ZendSer
ver\bin\tmp\File_Iterator-1.2.6.tgz" Unable to create directory 'C:/Program/Fil7
675.tmp'
Unable to create path for C:/Program/Fil7675.tmp/package.xml
Download of "phpunit/File_Iterator" succeeded, but it is not a valid package arc
hive
Error: cannot download "phpunit/File_Iterator"
Download failed
upgrade failed
Here is the pear configuration:
C:\Users\Hanno Schupp>pear config-show
PHP Warning: Module 'Zend Data Cache' already loaded in Unknown on line 0
PHP Warning: Zend Extension Manager: Cannot load Zend Data Cache module in Unkn
own on line 0
PHP Warning: Module 'Zend Utils' already loaded in Unknown on line 0
PHP Warning: Zend Extension Manager: Cannot load Zend Utils module in Unknown o
n line 0
CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels auto_discover <not set>
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy <not set>
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pear.php.net
Remote Configuration File remote_config <not set>
PEAR executables directory bin_dir C:\Program Files
(x86)\Zend\ZendServer\bin
PEAR documentation directory doc_dir C:\Program Files
(x86)\Zend\ZendServer\bin\docs
PHP extension directory ext_dir C:\Program Files
(x86)\Zend\ZendServer\lib\phpext
PEAR directory php_dir C:\Program Files
(x86)\Zend\ZendServer\bin\pear
PEAR Installer cache directory cache_dir C:\Users\HANNOS~1\AppData\Local\
Temp\pear\cache
PEAR configuration file cfg_dir C:\Program Files
directory (x86)\Zend\ZendServer\bin\cfg
PEAR data directory data_dir C:\Program Files
(x86)\Zend\ZendServer\bin\data
PEAR Installer download download_dir C:\Program Files
directory (x86)\Zend\ZendServer\bin\tmp
PHP CLI/CGI binary php_bin C:\Program Files
(x86)\Zend\ZendServer\bin\.\php.
exe
php.ini location php_ini <not set>
--program-prefix passed to php_prefix <not set>
PHP's ./configure
--program-suffix passed to php_suffix <not set>
PHP's ./configure
PEAR Installer temp directory temp_dir C:\Program Files
(x86)\Zend\ZendServer\bin\tmp
PEAR test directory test_dir C:\Program Files
(x86)\Zend\ZendServer\bin\tests
PEAR www files directory www_dir C:\Program Files
(x86)\Zend\ZendServer\bin\www
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 0
Debug Log Level verbose 1
PEAR password (for password <not set>
maintainers)
Signature Handling Program sig_bin c:\gnupg\gpg.exe
Signature Key Directory sig_keydir C:\Program Files
(x86)\Zend\ZendServer\bin\pearke
ys
Signature Key Id sig_keyid <not set>
Package Signature Type sig_type gpg
PEAR username (for username <not set>
maintainers)
User Configuration File Filename C:\Program Files
(x86)\Zend\ZendServer\bin\pear.i
ni
System Configuration File Filename C:\Program Files
(x86)\Zend\ZendServer\bin\pearsy
s.ini
enter code here

Update
As #amateur barista and #Tibor have pointed out, you can apply this same fix without modifying your pear.ini by using the following commands:
> pear config-set temp_dir "C:\tmp"
> pear config-set download_dir "C:\tmp"
Original
I had this same issue on my Windows 7 64-bit machine running WampServer.
It seems that PEAR handles the temp_dir and download_dir variables differently. For download_dir it handles spaces in the path correctly, while for temp_dir it becomes FUBAR'd.
Here are the steps to correct:
Open your pear.ini (mine was: C:\Program Files (x86)\WAMP\bin\php\php5.3.4\pear.ini)
Note: This file is serialize'd so make sure you understand the syntax before changing anything.
Alter the temp_dir and download_dir variables to paths without spaces.
Example (before):
s:8:"temp_dir";s:48:"C:\Program Files (x86)\WAMP\bin\php\php5.3.4\tmp";s:12:"download_dir";s:48:"C:\Program Files (x86)\WAMP\bin\php\php5.3.4\tmp"
Example (after):
s:8:"temp_dir";s:6:"C:\tmp";s:12:"download_dir";s:6:"C:\tmp"
All done! Try your install command again.
Presumably, you probably only need to alter one of the paths in pear.ini but this is how I got it working.

The command llnes to modify pear config attributes
pear config-set temp_dir "C:\tmp"
pear config-set download_dir "C:\tmp"

From the error message, Unable to create directory 'C:/Program/Fil7675.tmp', it looks like it's chopping Files off the configured temporary file path. I don't know where PEAR installs on Windows, but it seems like it's trying to create a folder under "C:/Program Files/PEAR" but chops off everything after the space.
Actually, it looks like it's stuffing part of Files into the new path.

Related

PHP Zip module install but still I am getting error

I have godaddy hosting. I install the php zip module through php pear packages.
But Still I am getting this error.
Oops, Unyson Backup requires PHP Zip module but it is not enabled on your server. If you are not familiar with PHP Zip module, please contact your hosting provider.
I have install the zip through php pear.
While on php pear packages i am having this message.
You will need to add “/home/g45h9xclhwaz/php” to the include path. You can do this by adding the following code to your script:
ini_set("include_path", '/home/g45h9xclhwaz/php:' . ini_get("include_path") );
I Don't Know where to install in the script.

Launch project symfony in browser [duplicate]

I have installed Lampp on my linux system, and I am learning symfony2, while trying to create the schema with symfony2 command
php app/console doctrine:schema:create
I am getting the following error message:-
PDOException “could not find driver”
I also uncomment this line extension=php_pdo_mysql.dll in php.ini file
I tried to look and google my issue but couldn't resolve my problem. when i run php -m command i am getting the following result:-
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/mysql.so' - /usr/lib/php5/20090626+lfs/mysql.so: 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/php5/20090626+lfs/mysqli.so' - /usr/lib/php5/20090626+lfs/mysqli.so: 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/php5/20090626+lfs/pdo_mysql.so' - /usr/lib/php5/20090626+lfs/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mbstring
mhash
openssl
pcntl
pcre
PDO
----
----
Is there a way i can remove this issue ?
In Ubuntu, write in the console
sudo apt-get install php5-gd php5-mysql
and it will work
Hope you are running your project in localhost. In your project folder app/config a file named parameters.ini , Make sure that your Mysql database connection cofiguration is correct. If you are using mysql See database_driver=pdo_mysql is its driver.
Below is an example.
database_driver = pdo_mysql
database_host = localhost
database_port =
database_name = databasename
database_user = msqlusername
database_password = mysqlpassword//if not make blank
mailer_transport = smtp
mailer_host = localhost
mailer_user =
mailer_password =
locale = en
secret = ThisTokenIsNotSoSecretChangeIt
Hope it helps you.
You need to have a module called pdo_mysql.
Look for the following in phpinfo() output,
pdo_mysql => PDO Driver for MySQL, client library version => 5.1.44
to install pdo_mysql you need to do this:
pecl install pdo
pecl install pdo_mysql
and then add the following to your php.ini file:
extension=pdo.so
extension=pdo_mysql.so
brew install php70-pdo-pgsql
in case you installed php7 on mac with brew and, change php version according to what you have installed.
if you are using XAMPP then in php.ini file line no 897(depends on version),
;extension=php_pdo_pgsql.dll
uncomment it , then it appears like below
extension=php_pdo_pgsql.dll
in php.ini file line no 897, then restart XAMPP.
There are two PHP versions installed in my server PHP 5.6 and PHP 7
When I run the command php app/console doctrine:schema:update I have the error : [PDOException] could not find driver
I resolve this error by specifying the PHP version:
php5.6 app/console doctrine:schema:update
Looks like your install is missing the .so files it needs to implement the mysql connection. If you're using a package management system to install PHP then make sure you've installed all the necessary submodules (in this case I think you'll need mysql-dev, and the various PHP PDO modules), though such dependencies should have been resolved for you by the package manager.
If you didn't go through a package manager, then you'll have to compile the required .so files from source.
I had the same problem and for me, it was having multiple PHP versions.
So specifying the full address of the PHP solved the problem.
Adding to Jaspreet Chahal's answer.
When installing PDO as a shared module, the php.ini file needs to be updated so that the PDO extension will be loaded automatically when PHP runs. You will also need to enable any database specific drivers there too; make sure that they are listed after the pdo.so line, as PDO must be initialized before the database-specific extensions can be loaded. If you built PDO and the database-specific extensions statically, you can skip this step(Source).
What I mean is, it should look something like this -
extension=pdo.so should be placed before the extensions of the different database drivers.
Maybe you forget to install doctrine/dbal
composer update
composer require doctrine/dbal
if it didn't work go to your php.ini (according to current version)
and remove ";"
;extension=pdo_mysql.so

Make qmake use qt5 by default

I have both qt4 and qt5 on my Linux system. qt4 is used by default. What is a clean way to change that so that qmake uses qmake-qt5 by default?
The system might have different meta packages that handle the default.
For example on Debian there is a qt4-default and a qt5-default package, installing one of them will uninstall the other and set the symlinks appropriately
Step 0: Install qtchooser in your system.
$sudo apt-get install qtchooser
Step 1: locate your qtchooser configure file in your system.
$ locate qtchooser | grep conf
/usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
/usr/lib/x86_64-linux-gnu/qtchooser/4.conf
/usr/lib/x86_64-linux-gnu/qtchooser/5.conf
/usr/lib/x86_64-linux-gnu/qtchooser/qt4.conf
/usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf
The command result may be different from yours. Those x.conf files represent all of qt versions qtchooser could recognized in your system. Each x.conf file is a symbolic link to a file configured the qt you have installed. Modifying the default.conf could configure the default qt version you expected.
Step 2: Find out the file location the symbolic link file default.conf linked to.
$ls -l /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf
lrwxrwxrwx 1 root root 53 x xx xxx /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf -> ../../../../share/qtchooser/qt4-x86_64-lnux-gnu.conf
Step 3: Create your qt version conf file
The result of step 2 shows the location of all qt version conf file: /usr/share/qtchooser. You just create a conf file specified your qt version in this path. For example, my qt is installed at /opt/Qt5.13.1/ and I want to set this qt version as the default one in my system. We could create a file named like qt5.13.1.conf.
$cd /usr/share/qtchooser
$sudo vi qt5.13.1.conf
and fill in the following two lines: first line means the qmake location and another represents the library path.
/opt/Qt5.13.1/5.13.1/gcc_64/bin
/opt/Qt5.13.1/5.13.1/gcc_64/lib
Step 4: Set your qt as the default one.
Just modify the default.conf symbolic link to your qt conf file created at step 3.
$cd /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/
$sudo ln -snf ../../../../share/qtchooser/qt5.13.1.conf default.conf
After complete those steps, the default qt has been configured and you can type following command to test and it should be your qt as the default.
$qmake -v
There is a tool named qtchooser to switch between Qt versions. On Debian and Ubuntu you can install it with apt-get install qtchooser.
Easiest way is to use it to list the alternatives and then create QT_SELECT environment variable.
$ qtchooser -list-versions
4
5
default
opt-qt55
qt4-i386-linux-gnu
qt4
qt5-i386-linux-gnu
qt5
Then you create QT_SELECT environment variable and set e.g. export QT_SELECT=4 or export QT_SELECT=5.

AllJoynChat sample - directory not found for option '-L/build/Debug-iphoneos'

I tried to build the AllJoynChat sample and got the following error message:
ld: warning: directory not found for option '-L/build/Debug-iphoneos'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using Xcode 7.2 and iOS 9.2 SDK. Any help?
It seems like your the build cannot find openssl library.
The following steps need to be followed exactly as below:
Unzip the AllJoyn SDK package to a folder on your development system.
Download and copy the OpenSSL source into a separate folder on your development system, not under the AllJoyn SDK.
Navigate to the OpenSSL source top folder in Finder, and copy the openssl.xcodeproj folder you downloaded from GitHub into this folder.
Open the openssl.xcodeproj in Xcode.
In Xcode, build the crypto target (libssl.a and libcrypto.a) for each
combination of configuration (debug|release) and platform (iphoneos|iphonesimulator) that you need for your iOS project by selecting Product->Build For->(your desired configuration).
Create a new folder called "build" under the top-level OpenSSL folder created in step 1.
Locate your OpenSSL build products folders (i.e.: Debug-iphoneos) in the
/Users//Library/Developer/Xcode/DerivedData/XXXXXXXXXXXXX-openssl/Build/Products folder, and copy all the - folders, like Debug-iphoneos, to the build
folder created in step 6.
You should now have a folder structure similar to this containing libssl and libcrypto
for each $(CONFIGURATION)-$(PLATFORM_NAME) you built in step 5:
openssl-1.0.1c
build
Debug-iphoneos
libssl.a
libcrypto.a
Debug-iphonesimulator
libssl.a
libcrypto.a
Define an environment variable OPENSSL_ROOT=
This environment variable needs to be present whenever you build projects using the AllJoyn SDK.
9a. For Mac OS X 10.7 to 10.9, to set the environment variable, open a Terminal window and type the
following:
launchctl setenv OPENSSL_ROOT <path to top level folder containing openssl>
Restart XCode.
9b. With Mac OS X 10.10, environment variable processing changed. Most importantly, OPENSSL_ROOT
must be defined before launching Xcode (Xcode will not pick up new or changed variables
after launching). Therefore, to set the environment variable, open a Terminal window and type
the following:
launchctl setenv OPENSSL_ROOT <path to top level folder containing openssl>
sudo killall Finder
sudo killall Dock
Restart XCode.
If you have already done the above check step 9 since the step differs for different version of OS X and you may be on the latest version for which the instructions have not been updated yet.

How to install libraries with pear when no release is available

This is not the first time I experience something like that. This time it was with PHPunit.
I wanted to install the library using pear..
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
The installation fails saying :
No releases available for package "pear.phpunit.de/PHPUnit"
What can I do ?
Thank you
Note :
pear upgrade says that I have the latest version
pear update-channels says that I am up to date
Note2 : I am at work so behing a proxy
Note3: using windows OS
In Windows Explorer, go to your WAMP PHP installation folder (default will be C:\wamp\bin\php\php[version]).
Create a new directory called “PEAR” here.
Download the PEAR phar installer https://phar.phpunit.de/phpunit.phar and place it in the new directory above.
Fire up a cmd window (Start and search for “cmd”) as administrator
Change to your new directory
(default command will be “cd C:\wamp\bin\php\php[version]\PEAR”)
Run the following command: “php go-pear.phar”.
The first thing that the installer will ask is whether you are installing a system wide copy of PEAR. Since you are probably working on a development machine, either is fine. Just press enter to install system wide.
Next, the installer will show you a bunch of paths that it automatically calculated by using it’s current location on your disc.
You mentioned you are behind a proxy, you may then need to set it explicitly, with something like the following:
$ pear config-set http_proxy http://username:password#proxy.example.com:80
I found it in another post. the cache has to be cleared.
pear clear-cache

Resources