Category "php"

file_get_contents('php://input') not working. Empty - NULL

I having this problem for the last 12 hours, i read about 50 articles, 50 questions here, i can't fix it. I will be more precise, i want others get the solution

Does magento 2.4.4 works on php 7.4

I am planning to upgrade my magento version from 2.4.3 to 2.4.4 Will the new magento version 2.4.4 works well on php 7.4? Or it requires php 8 only

Laravel phpunit test failing authorization

I have a working api only application. I am required to write a test decided to use laravel's phpunit test. This simple app allows only authenticated users ca

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

I am new in PHP and when I am trying to connect my database with PHP it is showing error Uncaught PDOException: PDO::__construct(): php_network_getaddresse

Access relation of pivot table in Laravel

I have three models Bill, Product and Process. Bill has a ManyToMany relationship with Product and the pivot table have some extra fields. I write the Bill mode

How to override htaccees file for cache control header

In my company we have htaccess file in which there is no web caching enabled,I want to enable caching for one single api but htaccess file is overriding my cach

Transform array, set each array element with parent key php

I am receiving data that is an array of elements that contains an array of tags by language like this [ { "1": "tag_es1;tag_es2;tag_es3", "2": "tag_e

How to create a cookie to store the timestamp of when a page is first loaded with php

I would really appreciate any help if possible! This is the question: Use a cookie (NOT PHP SESSION) that expires a year from now to do the following: Record th

How to loop a tree array with unknown depth and get array blocks?

I found this solution to loop and print an unknown depth array: printAllValues($arr); function printAllValues($arr) { if(!is_array($arr)) {

How to enable curl on Wordpress

How to enable cURL on Wordpress. I have install cURL on my server and I have also enabled in PHP.ini file(removed ; before extension) but still I'm getting err

Using PHP Sessions for High Traffic with AJAX and CodeIgniter

I was reading the CodeIgniter 3 documentation on using sessions and high traffic with AJAX, and it recommends using session_write_close(). My application has fu

Encrypt in php and decrypt in Dart(flutter)

Does anyone have an idea about encrypting response from my php api and decrypting data in local using dart. I'm using flutter for my mobile application. Thank

Laravel PackageManifest.php: Undefined index: name

I'm just trying to deploy my application and I just ran composer update on my server and I got the following error: In PackageManifest.php line 122: Undefined

SilverStripe unable to populate multiple member Childs

I have 3 type of users salesman => has many buyers buyer => has many agents agent has none child so I want to list all the buyers associate with that sale

Refresh specific HTML content that retrieves data from MySQL

So i have a form that that does a simple calculation, depending on the users input. If the results is a certain value then it stores that value in a database, t

Error with creating a laravel foreign key

I'm trying to create a relational database and this is the error i get SQLSTATE[HY000]: General error: 1005 Can't create table somedumbtable.meals (errno: 150

wordpress : How to specify the cause "This site can’t be reached"

I have used Let's Encrypt for WordPress on AWS Lightsail. I found that it was expired because I didn't renew it. So I tried the Let's encrypt to renew, the bi

Python: For loops print only last element of a list

I am using a shared webspace and I can't install the dotenv libiary for php, but I can use the dotenv libiary for python to call enviorment variables from outsi

Can't find vendor/autoload.php for Ratchet

I SSH'd to my server and installed Composer and Ratchet. http://socketo.me/docs/install claims all I need to do now is include "require DIR . '/vendor/autoload.

Undefined Auth0 dependencies

I have a Lumen application by following this tutorial ( Tutoorial Lumen ) I ran this command : composer require auth0/auth0-php , it works without failure And a