php-7.2

getting subdocument from document

…衆ロ難τιáo~ 提交于 2019-12-13 03:59:42
问题 I have a collection that has a sub-document in it and I'm trying to find an easy way to get an exact document. { "_id" : ObjectId("59b0303bfe409a21fccc9523"), "CreatedOn" : ISODate("2017-07-22T15:55:00.000+0000"), "UpdatedOn" : ISODate("2017-07-22T15:55:00.000+0000"), "Guid" : "4F1D7541-FF27-4FEF-9BC4-CF27D2CB92BA", "Company" : "Demo Co.", "Departments" : [ { "CreatedOn" : ISODate("2017-07-22T15:55:00.000+0000"), "UpdatedOn" : ISODate("2017-07-22T15:55:00.000+0000"), "Guid" : "D5950FC8-91B1

Connecting php 7.2 to MS SQL using sqlsrv

不羁岁月 提交于 2019-12-12 08:42:09
问题 I'm trying to get a connection to MS SQL up and running via PHP on my machine. I'm running IIS, have PHP 7.2 installed and MS SQL Express 2017. I have my basic web page running but when I click to open the PHP page, the connection does not work. session_start(); echo "Hello "; if (isset($_POST['submit'])) { $_SESSION["server"] = $_POST['server']; $_SESSION["database"]= $_POST['database']; $_SESSION["username"] = $_POST['username']; $_SESSION["password"] = $_POST['password']; echo $_SESSION[

How to install php-mcrypt in lando with php 7.2?

半世苍凉 提交于 2019-12-11 18:48:17
问题 Following example in How to install mcrypt on Docker I came to this: name: myapp recipe: drupal7 config: webroot: web php: '7.2' proxy: pma: - pma.myapp.lndo.site services: pma: type: phpmyadmin appserver: extras: - "apt-get update -y" - "apt-get install libmcrypt-dev" - "pecl install mcrypt-1.0.1" - "docker-php-ext-enable mcrypt" After rebuilding I see: $ lando php -m | grep mcrypt mcrypt But in my web application when I look at the page with phpinfo(), then there is no trace of mcrypt.

Laravel/mPDF non-numeric value encountered ErrorException after PHP upgrade to 7.2

大兔子大兔子 提交于 2019-12-11 17:54:38
问题 I update php7.1 to php7.2.1 (PHP 7.2.1 (cli)) my laravel pdf not generated show below errorr: (1/1) ErrorException A non-numeric value encountered in mpdf.php (line 30648) at HandleExceptions->handleError( 2, 'A non-numeric value encountered', '/opt/lampp/htdocs/mysite/vendor/mpdf/mpdf/mpdf.php', 30648, array( 'size' => 0, 'maxsize' => 190.00155555555551245561218820512294769287109375, 'fontsize' => 3.704166666666667051543981870054267346858978271484375, 'usefontsize' => false) ) in mpdf.php

composer could not resolve dependencies for hwi/oauth-bundle

烂漫一生 提交于 2019-12-11 17:18:04
问题 If I do $ composer require hwi/oauth-bundle I get this: Using version ^0.6.3 for hwi/oauth-bundle ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Restricting packages listed in "symfony/symfony" to "4.2.*" Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for hwi/oauth-bundle ^0.6.3 -> satisfiable by hwi/oauth-bundle[0.6.3]. - hwi/oauth-bundle 0.6.3

Error: Apache shutdown unexpectedly error message

◇◆丶佛笑我妖孽 提交于 2019-12-11 16:53:27
问题 I just upgraded the PHP version of XAMPP from PHP 7.1.7 to PHP 7.2.0 using the guidelines from this article. Then I tried restarting the XAMPP but I got this error: 10:54:47 AM [Apache] Error: Apache shutdown unexpectedly. 10:54:47 AM [Apache] This may be due to a blocked port, missing dependencies, 10:54:47 AM [Apache] improper privileges, a crash, or a shutdown by another method. 10:54:47 AM [Apache] Press the Logs button to view error logs and check 10:54:47 AM [Apache] the Windows Event

Magento on PHP 7.2 wamp server

时光怂恿深爱的人放手 提交于 2019-12-11 12:49:08
问题 i am configuring an existing magento project on local system with WAMP server php version 7.2, while installing magento i get error "PHP extension "mcrypt" must be loaded." Problem is mycrypt is no longer supported in php 7.2, can anyone suggest how can i resolve it? 回答1: mcrypt has been moved from php to pecl since 7.2 You still can install it. Install dependencies gcc make autoconf libc-dev pkg-config install the lib itself libmcrypt-dev I assume php7.2 and pecl are installed so you just

How can i enable libmongoc ssl?

浪尽此生 提交于 2019-12-11 07:32:00
问题 Im using plesk 12 and PHP7 on centos 7. How can i enable libmongoc ssl on my server? 回答1: Try to compile it with yum install git plesk-php70-devel make gcc openssl-devel git clone https://github.com/mongodb/mongo-php-driver.git cd mongo-php-driver/ git submodule update --init /opt/plesk/php/7.0/bin/phpize ./configure --with-php-config=/opt/plesk/php/7.0/bin/php-config --with-mongodb-ssl=openssl make cp /root/mongo-php-driver/modules/mongodb.so /opt/plesk/php/7.0/lib/php/modules/ plesk bin php

stream_socket_sendto(): Connection refused. Laravel 5.7 dump server

穿精又带淫゛_ 提交于 2019-12-11 00:14:52
问题 I'm using Laravel. When I dd($request->all()) that the data inside it involves file (.mp3 file). It returns the error: [2019-03-16 15:44:12] local.ERROR: stream_socket_sendto(): Connection refused {"exception":"[object] (RuntimeException(code: 0): stream_socket_sendto(): Connection refused at /vendor/symfony/var-dumper/Server/Connection.php:63 Can this be a problem with php-fpm ? If I run php artisan serve, this does not happen, and if I run php artisan dump server it does not happen either.

PHP 7.2 count() function is not working

帅比萌擦擦* 提交于 2019-12-10 23:47:01
问题 I have a working php application and it is running fine on php 7.0 version. But when I upgrade a php version to 7.2. I am getting this error: count(): Parameter must be an array or an object that implements Countable I am getting errors on code where I am comparing my data with count function. For example this is my code: $keytest = KeyUser::where('key', '=', $key)->first(); if (count($keytest) == 1) { //logic ... } I am using laravel where I am running a query and counting it if it is equal