Category "php"

Cannot find php-fpm.conf

I use php-fastcgi via nginx on Ubuntu 21.10, and I want to set the log_limit php-fpm directive to 8000 for my PHP logs not to be truncated, but I can't find php

What's the PostgreSQL equivalent of $mysqli->connect_error?

If mysqli error is thrown while connecting to database, it could be detected as below. if ($mysqli->connect_error) { $this->Session->setFlash(__('

How to insert Google Adsense Code in PHP script?

How to echo AdSense code with PHP? Here is the sample of my code which I am working for a codeigniter php. $adsence = " <div class=\"right-inner\">

Upload a file Using PHP and JavaScript

I selected a image using: <input type="file" id="pimg" name="pimg" accept='image/*'/> My javascript code: p_img =document.getElementById("pimg").val

Why is VS Code removing closing tag ?> on save. anyone knows?

when i save my php file then VS Code removes ?> tag from ending. and its causing problems in execution. I dont know why is this happening. If anyone knows pl

PHP cron job and php mail() function

I have a simple PHP script in a directory beta/cron/cron.php to send out mail as follows: <?php $to = "[email protected]"; $subject = "test subject"; $message =

Inserting Country Selection into MySQL PHP [duplicate]

I'm currently developing a site that provides specific news events to users. The purpose of the site is to allow users to select which countri

Sentry on Symfony: how to exclude `NotFoundHttpException`

I'm using the SentryBundle to integrate Sentry in my Symfony app. I don't want to record "NotFoundExceptions", so I configured the bundle this way: sentry:

Call to a member function fetch_field() on a non-object MySQLiDB

Hi i cant use INSERT UPDATE function with this class: MySQLiDB. Im trying write data to mysql and if exists this data then need update. So i use INSERT ... ON D

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

I'm trying to use PHPMetrics within Docker image. I run the next command in the project root folder: docker run --rm -v `pwd`:/project jolicode/phaudit phpmetri

Wordpress : ACF image not showing

i try to display image but with Basic display (Object) but no showing <?php $image = get_field('image'); if( !empty($image) ): ?> <img src="&l

Passing PHP JSON to Javascript: echo json_encode vs echo json declaration

I'm trying to create a common constants file to share between php and javascript, using JSON to store the constants. But I'm wondering why pass the JSON from PH

How to install php_imagick on wamp64

I've been trying to install php_imagick on wamp64 without any luck. The desired goal is for WordPress to stop showing the error message: The optional module, I

How to test a php login connected to a mysql db through xampp?

hello this is my first post on stackoverflow i am at beginner level at php, mysql and work on a php log in page connected to a mysql database which i did try to

class LaratrustSeeder does not exist

I tried to clear the cache and config and do vendor and dumpload everything but keeps telling me the class Laratrust does not exist I am using laravel 8 any s

Elastic Beanstalk with Laravel Envoy

I write a bash script to run the laravel envoy command in Elastic Beanstalk. #!/bin/sh cd /var/app/current/ sudo php vendor/bin/envoy run fillData & And it

The usage of `header("Content-type:application/json");`

I just created an JQuery ajax function to retrieve some json-encoded data from PHP, here's my code : file name : bank.php $('form').on('submit', function(){

(Cache::lock()) -> get() -- Under what conditions does it return false?

I'm looking into using the Cache::lock mechanism with laravel, but something isn't exactly clear to me. This is the example they use: $lock = Cache::lock('foo',

Cant seem to get the Pagination to work on my WooCommerce REST API application?

What I got so far: [ 'wp_api' => true, 'version' => 'wc/v3', 'query_string_auth' => true //Force Basic Auth

Check for PDO Results, If None Display Message, If Yes then Loop Through

Trying to find another simple answer but only finding complicated examples. I'm trying to simply query a table, if there are results to display then loop throug