Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [php]

PHP is an open-source, multi-paradigm, dynamically-typed, and interpreted scripting language designed initially for server-side web development. Use this tag for questions about programming in the PHP language.

-3 votes
0 answers
30 views

Get sum of values in multi array [duplicate]

I have an array with different keys, and I am interested in the sum of the values of only the ones that start (or contain) "MT". $json = file_get_contents($path2); //echo $json.'<br&...
Amphata's user avatar
  • 27
-3 votes
0 answers
29 views

how can i correctly return array value to jquery [closed]

<?php include ('config/dbcon.php'); if (isset($_GET['visa-id'])) { $visa_id = $_GET['visa-id']; $query = "SELECT document, preference FROM visa_document WHERE visa-id = '$visa-id'&...
Hissan Zahir's user avatar
1 vote
0 answers
41 views

How to modify a PHP class to accept PgSql\Result as an attribute

I need to find a way (if possible) to make a PHP class accept a PgSql\Result object as an attribute. PHP 8.1+ has migrated the pgsql result resource to the PgSQL\Result instance. In prior versions ...
Steady Eddie's user avatar
0 votes
1 answer
33 views

Problems with LVE ID 5487

I made a php application that uses the spatie library top convert pdf files to jpg, using ghost script and imagickMagic. The process is slow, but in dev enviroment, it works fine. I just ajusted the ...
Roberto Carreira's user avatar
-1 votes
0 answers
45 views

Session variable into a prepared statement [closed]

When I submit a form, I would like the Session variable user_id to carry through to my prepared statements so it can be inserted into my table. Code of dev.inc.php (following comments...) <?php if(...
Matt Drake's user avatar
-1 votes
0 answers
26 views

Cannot connect to Postgres from my php/symfony application

I'm having issues connecting to any database from my php/symfony application when I try to connect to pg_connect("host=localhost port=5432 dbname=dbname user=username"); the app just dies ...
Dhee4's user avatar
  • 9
0 votes
0 answers
17 views

Google PlayIntegrity API validate token via PHP

I try to get device verdict with google play integrity token, but always have a million errors and I can't understand whats wrong. My Code: <?php use Google\Client; use Google\Service\...
Arkadiy Kryzhanivskyi's user avatar
0 votes
0 answers
24 views

Json error: Cannot modify header information – headers already sent on Aws-bitnami

Inquiries regarding logs in the following format are probably the most common due to json errors related to WordPress. [Thu Jul 25 13:00:50.367263 2024] [proxy_fcgi:error] [pid 26574:tid ...
Young Lee's user avatar
0 votes
0 answers
52 views

PHP not connect to Microsoft Fabric database

I am attempting to connect to a database on Microsoft Fabric, but it will not connect. It does not display any error messages, nor is there anything in the logs. I am at a loss for what the issue ...
Tony's user avatar
  • 1
0 votes
0 answers
17 views

filtered special Database statements for google index

I have the url() statement in my database. all in www.site.com/random_alias format (splash pages). Some links were created by the admin (userid=1) and archived to specialized (archived=1). how can I ...
Ali Haseli's user avatar
0 votes
0 answers
23 views

Imagick creating PDF even though setImageFormat is set to JPEG

I have an odd issue that I cannot get to the bottom of. I'm using Imagick to generate JPG thumbnails of PDFs that are uploaded to a custom admin tool. However, Imagick is creating PDF files even ...
awvickers's user avatar
0 votes
0 answers
18 views

Why is Google Sheets PHP API failing when I insert a line manually in Google Sheets?

I have a PHP script adding lines to a Google Spreadsheet. It all works perfectly fine. $client = new Google_Client(); $client->setApplicationName("Google Sheets API"); $client->...
Matthias's user avatar
-1 votes
0 answers
18 views

php8.1 - Deprecated code involving date_create() [duplicate]

Here are the errors I am getting: Warning : Undefined variable $modified in /home/cssdar/public_html/members/templates/cassiopeia_members2024/index.php on line 38 Warning : Undefined variable $...
Karen Kurtz's user avatar
1 vote
0 answers
14 views

Understanding uriTemplate and Variable IDs in Symfony API Platform

I'm currently working on a Symfony project using API Platform, and I'm running into some confusion regarding the uriTemplate system and how it handles variable IDs. I have an entity called Article, ...
GeppettoG's user avatar
0 votes
2 answers
53 views

Get model relationship collection from another database in Laravel

I have set the connection to two databases properly. I also have created eloquent table models and I can query a single table relationship from another database easily e.g. $user->customer User ...
Drunken M's user avatar
  • 2,474

15 30 50 per page
1 2
3
4 5
20