Questions tagged [php-7.1]

The successor to PHP 7.0. Use this tag for version-specific issues relating specifically to PHP 7.1.

php-7.1
Filter by
Sorted by
Tagged with
149 votes
14 answers
54k views

PHP7.1 json_encode() Float Issue

This isn't a question as it is more of a be aware. I updated an application that uses json_encode() to PHP7.1.1 and I was seeing an issue with floats being changed to sometimes extend out 17 digits. ...
3 votes
5 answers
35k views

Error: Apache shutdown unexpectedly error message

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: ...
1 vote
1 answer
38 views

How to optimize - PHP 7.3.14 + Laravel 6

I need to replicate a legacy structure for comparison purposes and to motivate system migration. I will write a report pointing out the pros and cons of this migration. But I immediately had a problem,...
2 votes
2 answers
9k views

Update Ampps php version from 7.1.2 to 7.1.8

I am running Ampps 4.9.3 on Mac, and I am trying to install Laravel 5.6, which has a dependency on PHP 7.1.3. The latest version of Ampps says it supports 7.1.8, but I can't figure out how to change ...
10 votes
8 answers
22k views

Homebrew PHP 7.1 (macOS Sierra) Apache Syntax Error

So I've been following along with This Tutorial, which helps configure Apache 2.4 with multiple versions of PHP. Everything was going quite smoothly, and all of my PHP versions worked, except for 7.1. ...
5 votes
1 answer
10k views

Error when uploading certain .png files "Interlace handling should be turned on when using png_read_image"

I have seen some random errors when processing images that were uploaded to my site, where certain .png files will cause an error to be echo'd to the output buffer which will screw up the response ...
8 votes
1 answer
7k views

When running phpcs, ERROR: Referenced sniff "PHPCompatibility" does not exist is coming

I want to run phpcs tool, but this error is coming, ERROR: Referenced sniff "PHPCompatibility" does not exist I ran phpcs -i. That gave me , The installed coding standards are PEAR, PSR1, Zend, ...
4 votes
1 answer
22k views

Enable PHP7 apache module - apache 2.4 - Linux Ubuntu 14

I have problem to use PHP 7.1 with apache. I installed PHP 7.1: apt-get install php7.1 I installed the PHP 7.1 apache module : apt-get install libapache2-mod-php7.1 I disabled the PHP5 module : ...
0 votes
2 answers
2k views

Exception - Call to undefined function course_overviewfiles_options()

I am using a Moodle(3.2.2 the newest one) site created by php7.0 and mysql5.7,but when i try to add a new course as administrator, an error called :Exception - Call to undefined function ...
1 vote
2 answers
90 views

Issue in Developing Conceptual Model for My Website

I want to discuss a non-code related issue. Rather it's an issue with the concept or data model itself. I am building a business directory website using Laravel. I have made a packages table, ...
0 votes
0 answers
28 views

Zend XmlRpc Client gzinflate out of memory on php 7.1

I have a problem with Zend XmlRpc Client. When it recieves response with more than 25MB, then it crushes with Out of memory error Fatal Error: Allowed memory size.... Can someone help me please with ...
0 votes
0 answers
14 views

how to debug line by code - am using mpdf library php

dompdf loadhtml will work but after dompdf render system not responding , here html is having image urls(complete path) also and has style css separate file...... $dompdf->loadHtml($htmlWithStyles);...
0 votes
0 answers
26 views

mpdf : WriteHTML not working for morethan 10 array with css and image

we are using more html dynamic value and image urls and style.css also it was working fine earlier but after the pathches upgrade in server not working not throwing any error also application will ...
0 votes
3 answers
5k views

mysqli extension missing (Windows 10, PHP 7.17, MAMP,)

So I have been searching high and low an answer to my problem. Anytime I go here http://localhost:8888/phpMyAdmin/, I get this error So I created a php file with phpinfo() and get this info.php So ...
0 votes
0 answers
76 views

PHP container log redirection to docker logs

I am working to create a LEMP stack-based dockerized environment in AWS ECS using docker-compose. My php7.1-fpm and nginx containers are interconnected and working fine as expected. I have redirected ...
3 votes
2 answers
11k views

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

I have a local PHP7 & Apache environment on my Mac. All my scripts from one site are showing this error at the end of the page: Warning: Unknown: Failed to write session data using user defined ...
14 votes
2 answers
12k views

How to install PHP Opcache on MacOS High Sierra?

I'm using the standard Apache and PHP 7.1 (not Homebrew) that comes with Mac High Sierra. However, it appears that this version doesn't have Opcache enabled even though it should come as standard with ...
0 votes
2 answers
1k views

How to read any of the file type using php7?

I have tried to extract the user email addresses from my server. But the problem is maximum files are .txt but some are CSV files with txt extension. When I am trying to read and extract, I could not ...
2 votes
1 answer
765 views

Validating an RSA PKCS#1v1.5 SHA 256 signature with an RSA 2048 public key

I have a public key stored in the database as a string. The generating library says that it is an RSA 2048 public key. Here is an example of the public key as it is stored: ...
3 votes
3 answers
2k views

Do Laravel migrations lock the tables they affect?

I'm using MySQL. The documentation doesn't say anything on the matter. Let me know if there's anything else I can clarify. Thank you for your time.
285 votes
19 answers
703k views

Switch php versions on commandline ubuntu 16.04

I have installed php 5.6 and and php 7.1 on my Ubuntu 16.04 I know with Apache as my web server, I can do a2enmod php5.6 #to enable php5 a2enmod php7.1 #to enable php7 When I disable php7.1 in Apache ...
-1 votes
4 answers
2k views

PHP Switch Case

I made a pretty stupid Logic Error in a very Basic PHP Script. See u_mulders Answer for the Conclusion. The Script accesses a $_GET[] Variable and should just determine if the Variable is set (which ...
-1 votes
1 answer
68 views

laravel 5.1 installation issue with php 7.1 , cannot install carbon 2

composer install error on carbon 1 is deprecated SO, how can i run my vagrant with laravel 5.1 with carbon 1 and I have try find from stackoverflow and other site but no helps comes up . every thing ...
29 votes
4 answers
103k views

How to install bcmath in Ubuntu for PHP 7.1

I'm using an Ubuntu 16 server for testing with php7.1. One of my app uses bcadd function. I know that I need to install bcmath module for that but I'm unable to find php7.1-bcmath. When I tried to ...
0 votes
3 answers
598 views

PHP Soap method call not return all data but __getLastResponse does

I am making a call to a method using php soap. $options = ['trace' => 1, 'exceptions' => true, 'wsdl_cache' => WSDL_CACHE_NONE]; $wsdl = 'confidential-wsdl'; $client ...
30 votes
8 answers
26k views

PHP iterable to array or Traversable

I'm quite happy that PHP 7.1 introduced the iterable pseudo-type. Now while this is great when just looping over a parameter of this type, it is unclear to me what to do when you need to pass it to ...
0 votes
2 answers
738 views

Connection could not be established with: php_network_getaddresses: getaddrinfo failed: Name or service not known

Connection could not be established with host p3plvcpnl452615.prod.phx3.secureserver.net :stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known I have ...
20 votes
6 answers
17k views

Homebrew PHP appears not to be linked. - Valet [duplicate]

I had a problem which appeared all of the sudden saying: Unable to determine linked PHP. which I could not solve so I uninstalled valet, php and dependencies. Then I installed fresh php7.1 but when I ...
0 votes
1 answer
545 views

Created arrays in PHP 5.6 with [] work, but in PHP 7.1 give fatal error

In PHP 5.6 this works fine, but in PHP 7.1 it gives Fatal error: Uncaught Error: [] operator not supported for strings $result->execute(); $result->bind_result($id, $name); while($result->...
0 votes
1 answer
388 views

PHP 7.1 flush doesn't work at all

I need to flush content during the script is running. Sounds simple yet there are several discussions about that issue. I've tried everything I was able to find so I thing there has to be something ...
12 votes
5 answers
43k views

Can't install php7 or php 7.1 with homebrew

I was following a couple links that had this same sequence, namely this example. I was unable to get it done successfully. Here is the output from terminal MacBook-Pro-4:/ SHennessy$ brew tap ...
0 votes
1 answer
311 views

phpinfo() changes the status code of nginx response in a weird way

I have a php code that should always end up being "http 500 code" as I have a call to undefined func status_code("OK"); code: <? # phpinfo(); echo 'error_log = ' . ini_get('...
2 votes
1 answer
605 views

Php: Float encoded in scientific notation with json_encode()

Using php7.1, this: json_encode(['value' => 0.00001]); would return this string: {"value":1.0e-5} although I would like to get {"value":0.0001} How can I achieve that? Here is what I've ...
0 votes
1 answer
223 views

PHP 7.1 iconv() converts currency symbols into LB and EUR

I just updated my vagrant box from PHP 7.0 to PHP 7.1, and now some weird things happen with regex: $filename = 'hello£€'; $filename = iconv("UTF-8", "ASCII//TRANSLIT", $filename); ...
0 votes
1 answer
281 views

MAMP ext mailparse is not loading, not sure if installed correctly PHP 7.1.33

i started to work on web application which uses PHP 7.1.33 - which i did set up in MAMP, but I have problem to get extension mailparse - which I tried and probably installed through PECL commands. But ...
1 vote
0 answers
1k views

ioncube loader, doesn't work Error

When I start the file what need the encoder, I get this fatal error: Fatal error: The file C:\xampp\htdocs\WeFact\Pro\index.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP ...
0 votes
3 answers
659 views

PHP 7 intdiv() vx floor or custom type cast

I am looking PHP 7 new Additions in order to improve my skills, i want to know what exactly the difference between the intdiv() vs floor() or custom type cast for example echo (int) (8/3); // 2 echo ...
1 vote
1 answer
1k views

Installing Composer in Docker container gives Segmentation fault

I am using official php docker image: 7.1-apache I am trying to install composer through the docker console and following the steps provided here: https://getcomposer.org/download/ When I get to the ...
0 votes
1 answer
1k views

"PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/http.so'" after downgraded PHP from 8.1 to 7.1

We have a requirement that needs to downgrade PHP from 8.1 to 7.1 in our Ubuntu 18 server. sudo update-alternatives --set php /usr/bin/php7.1 After the downgrade, we're seeing PHP Startup error ...
1 vote
2 answers
4k views

How do I install mcrypt extension for php 7.1 on MacOS 12 for Laravel development?

This is driving me crazy and following all the online tutorials hasn't helped. I have just upgraded to a new mac running MacOS Sierra (10.12.1) and am trying to get my development environment ...
0 votes
0 answers
85 views

Is it possible to install the dependencies you have in composer.json file without you have composer as tool in you machine?

I'm trying to put this app working but unfortunately whenever I try to install all dependencies inside composer.json file as you can see in the image above I'm getting that error. I don't know what's ...
1 vote
3 answers
41k views

Download and install the php mcrypt extension under windows 10

where can I download and how to install the mcrypt extension for php 7.1 (TS,VC14) under Windows 10 / 64 bit. I need it for an akeneo project and this has dependencies using mcrypt (and not other ...
12 votes
5 answers
14k views

SSH2 for PHP7 MacOS?

When trying to use ssh2_sftp($this->con); PHP 7.1.7 thinks Im looking for a function in the class. After some reading, I found that SSH2 needs to be installed from PECL ( http://php.net/manual/...
0 votes
1 answer
714 views

php-fpm processes stuck on state "getting request informations"

My webserver has been experiencing a problem of php-fpm active processes slowly increasing till the pm.max_children setting is reached, at which point it's stuck and I need to restart php-fpm. (os: ...
9 votes
1 answer
17k views

Symfony 3.0 migration PHP 5.5 to PHP 7.1 : "A PHP accelerator should be installed > Install and/or enable a PHP accelerator (highly recommended)"?

I want to upgrade PHP5.5 to 7.1 in a SYMFONY 3.0 Project. I have been checking the "php.ini" file to get the right result. One last thing is unresolved: Under PHP5.5, I used the extension ...
2 votes
2 answers
6k views

How to query MongoDB from PHP using '$or' or '$and' clause?

I want to get data from mongodb by using MongoDB PHP7.1 Driver with the help of $or or $and clause in filter. I have tried to construct query to do the same but that didn't work. Here is my sample ...
1 vote
1 answer
555 views

memcached not getting loaded for php7

I am using Easyphp-DevServer-17 and PHP7 ,I want to use "memcached" with PHP-7.1 , I downloaded memcached dll files from the following link php 7 memcahced I tried adding dll files to ext ...
7 votes
1 answer
4k views

How to extend PHP Laravel model's fillable fields in a child class?

I try to extend an extintig ˙PHP` Laravel model with some other fields, but I not found the right solution. I use PHP 7.1 with Laravel 6.2 Here is my code, what explain what I want to do. The ...
0 votes
1 answer
291 views

I a trying to update my server to php7.1 version but I am facing an issue

I have been trying to update the server for the latest PHP version 7.1 but I am being unsuccessful. I am getting the following error when I try apt-get upgrade E: Some index files failed to download. ...
7 votes
3 answers
7k views

Symfony 3.4 session time

In my Symfony 3.4 application, the user is automatically logged out after a certain period of time. I want to change this behaviour and make my application never log out automatically. It should log ...

1
2 3 4 5
11