Category: PHP
Category Added in a WPeMatico Campaign
Accents replaced with a strange character in Symfony 6.4 [duplicate]
For 3 days, the characters with French accents no longer appear and are replaced by a �.
Everything was fine before.
In phpmyadmin the display is correct.
It’s only on the remote server, in local all is fine.
In doctrine.yaml there are indeed the indications:
default_table_options:
charset: utf8mb4
collation: utf8mb4_unicode_ci
and in the entities in the header:
#[ORM Table(options: ["collate" => "utf8mb4_unicode_ci", "charset" => "utf8mb4"])]
#[ORM Entity(repositoryClass: EquipeadminRepository::class)]
I updated the vendor via composer update.
How to correct this sudden problem?
Thank you for your answers.
Best regards
Can a select field be dependable of 2 or more fields?
I have followed instructions here https://filamentphp.com/docs/3.x/forms/advanced#dependant-select-options to make a select form dependable from another field in the Edit form. Here is the code of the select field workflow_transition_id dependable from workflow_id TextInput field, which works as expected:
This is in the resource.php
Select::make('workflow_id')
->options(Workflow::all()->pluck('name', 'id'))
->label('Workflow')
->searchable()
->preload()
->live()
->required(),
TextInput::make('workflow_status_id')
->label('Current Status')
->live()
->hiddenOn('create'),
Select::make('workflow_transition_id')
->relationship(
name: 'workflow.workflow_transitions',
titleAttribute: 'name',
modifyQueryUsing: fn (Builder $query, Get $get) => $query->where('workflow_id', $get('workflow_id')),
)
->label('New status')
->disabled(fn(Get $get) : bool => ! filled($get('workflow_id')))
->searchable()
->preload()
->required(),
Now, I want to make the select field workflow_transition_id dependable from one additional field workflow_status_id. To accomplish this, modified the “modifyQueryUsing” attribute by passing a second Get argument and adding a second **where **clause:
modifyQueryUsing: fn (Builder $query, Get $get, Get $get2) => $query->where('workflow_id', $get('workflow_id'))->where('from_workflow_status_id', $get2('workflow_status_id')),
After doing this, I get this error from Laravel:
Typed property FilamentFormsComponentsComponent::$container must not be accessed before initialization
Perhaps I am doing something that I am yet to spot it.
If I try to hardcode $get2('workflow_status_id') by a valid workflow id (i.e. 2), then it works.
I have also tried to use the option attribute (instead of the relationship) and I get the same error:
->options(function(Get $get, Get $get2) { return WorkflowTransition::where('workflow_id', $get('workflow_id'))->where('from_workflow_status_id', $get2('workflow_status_id'))->pluck('name'); })
This is in the edit form which means this workflow_status_id comes from the DB.
I have gone over several Stackoverflow, Google, Laracasts, Filamentphp website and other forums and I have not seen anybody implementing a dependable select with 2 dependent fields.
I am using:
- Filament 3.3.29
- PHP 8.4.8
flipkart api error{“code”:400,”message”:”Unable to process JSON”}
facing issue with the order fetching on flipkart seeller api i have already verified with the endpoint with the flipkart api i need the exatc one who had already working on it
POST https://api.flipkart.net/oauth-service/oauth/token?grant_type=client_credentials&scope=Seller_Api (OAuth Token)
GET https://api.flipkart.net/sellers/v3/shipments/handover/counts?locationId=[REMOVED](Vendor Pickup Count — WORKING)GET https://api.flipkart.net/sellers/v3/shipments?locationId=[REMOVED](Shipments — FAILS)GET https://api.flipkart.net/sellers/v3/orders?locationId=[REMOVED](Orders — FAILS)GET https://api.flipkart.net/sellers/v3/shipments?states=APPROVED,READY_TO_DISPATCH&locationId=[REMOVED](Shipments with states — FAILS)- `POST https://api.flipkart.net/sellers/v3/shipments/filter
”'{
“type”: “preDispatch”,
“filter”: {
“states”: [
“APPROVED”,
“READY_TO_DISPATCH”
],
“locationId”: “”
},
“pagination”: {
“pageSize”: 50,
“pageNumber”: 1
}
}
Response:
{“code”:400,”message”:”Unable to process JSON”}”’
Issue over 1600 columns when create multi column in postgres using laravel
I have use laravel 11 and postgres 17, when I use import file to create column for table in database (file only have ~500 rows, which means it will create about 500 new columns for the table). But I get error SQLSTATE[54011]: Too many columns: 7 ERROR: tables can have at most 1600 columns even though my table originally only had 18 columns. Here my functions:
DB::beginTransaction();
try {
... read data from file ...
foreach ($data as $record) {
$sql = "ALTER TABLE "$record[0]" ADD COLUMN IF NOT EXISTS "$record[1]" $record[2]($record[3]);"
Log::debug('insert >>> ' . $sql);
DB::statement($sql);
# this query below I use to check number of column in table after insert.
$qlCountCol = "SELECT count(*) as temp FROM information_schema.columns WHERE table_schema = 'public' AND table_name = 'custom_object_bc1d0996-7911-41c0-bfda-374680f6e614'";
$respo = DB::select($qlCountCol);
Log::debug($obj->table_name . ' >>>>>> col >>>> ' . json_encode($respo[0]));
}
DB::commit();
} catch (Exception $e) {
DB::rollBack();
report($e);
throw $e;
}
And I get log as below:
....
[2025-06-30 01:24:37] local.DEBUG: insert >>> ALTER TABLE "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614" ADD COLUMN IF NOT EXISTS "field_e0ab6fa8-e4f7-4bee-b8ed-1d0bb4975118" BIGINT ;
[2025-06-30 01:24:37] local.DEBUG: custom_object_bc1d0996-7911-41c0-bfda-374680f6e614 >>>>>> col >>>> {"temp":385}
[2025-06-30 01:24:37] local.DEBUG: insert >>> ALTER TABLE "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614" ADD COLUMN IF NOT EXISTS "field_739b4b6f-4c49-43d0-8840-b4559fec8601" BIGINT ;
[2025-06-30 01:24:37] local.DEBUG: custom_object_bc1d0996-7911-41c0-bfda-374680f6e614 >>>>>> col >>>> {"temp":386}
[2025-06-30 01:24:37] local.DEBUG: insert >>> ALTER TABLE "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614" ADD COLUMN IF NOT EXISTS "field_1a43292d-e691-4d73-a3d6-52f65822dfce" BIGINT ;
[2025-06-30 01:24:37] local.DEBUG: custom_object_bc1d0996-7911-41c0-bfda-374680f6e614 >>>>>> col >>>> {"temp":387}
[2025-06-30 01:24:37] local.DEBUG: insert >>> ALTER TABLE "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614" ADD COLUMN IF NOT EXISTS "field_4cc4dcf0-216e-4260-b7ee-00e4192bbaf7" BIGINT ;
[2025-06-30 01:24:37] local.DEBUG: custom_object_bc1d0996-7911-41c0-bfda-374680f6e614 >>>>>> col >>>> {"temp":388}
[2025-06-30 01:24:37] local.DEBUG: insert >>> ALTER TABLE "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614" ADD COLUMN IF NOT EXISTS "field_0f4a5850-da64-4d9f-88b6-e5d676b4b3dc" BIGINT ;
[2025-06-30 01:24:37] local.DEBUG: custom_object_bc1d0996-7911-41c0-bfda-374680f6e614 >>>>>> col >>>> {"temp":389}
[2025-06-30 01:24:37] local.DEBUG: insert >>> ALTER TABLE "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614" ADD COLUMN IF NOT EXISTS "field_de47c89a-29c7-4180-a1da-b4d143fa8b1c" BIGINT ;
[2025-06-30 01:24:37] local.ERROR: SQLSTATE[54011]: Too many columns: 7 ERROR: tables can have at most 1600 columns (Connection: default, SQL: ALTER TABLE "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614" ADD COLUMN IF NOT EXISTS "field_de47c89a-29c7-4180-a1da-b4d143fa8b1c" BIGINT ;) {"userId":1,"exception":"[object] (Illuminate\Database\QueryException(code: 54011): SQLSTATE[54011]: Too many columns: 7 ERROR: tables can have at most 1600 columns (Connection: tenant, SQL: ALTER TABLE "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614" ADD COLUMN IF NOT EXISTS "field_de47c89a-29c7-4180-a1da-b4d143fa8b1c" BIGINT ;) at /src/vendor/laravel/framework/src/Illuminate/Database/Connection.php:825)
I don’t know why my table just have 389 columns but I getting error over 1600 columns of postgres. Please explain for me why I’m geting this error and how to resolve it. Thanks.
PS:
I think is not error of PHP and laravel. I have try insert with psql query as below I getting same errors. (limit char post I can’t paste full query but it simple as below)
ALTER TABLE "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614"
ADD COLUMN IF NOT EXISTS "field_b23058d5-de8b-4b99-a405-a3500b66d33a" VARCHAR(255),
ADD COLUMN IF NOT EXISTS "field_fb93ff3e-7ced-48fc-9b42-cde892151c68" VARCHAR(255),
ADD COLUMN IF NOT EXISTS "field_e1d56b40-f37c-406a-8703-ab1a6d0930ff" VARCHAR(255),
ADD COLUMN IF NOT EXISTS "field_cb6b05da-3882-4c85-aa49-d0bdd0b0641f" BIGINT,
ADD COLUMN IF NOT EXISTS "field_bc797a62-cb29-413c-bf64-bd32ac82cb4e" VARCHAR(255),
ADD COLUMN IF NOT EXISTS "field_892c85e9-e740-4b8a-ac37-b98a1c2678a4" BIGINT,
ADD COLUMN IF NOT EXISTS "field_ac87a2dd-a679-4716-95a2-d3abf1b32886" VARCHAR(255),
ADD COLUMN IF NOT EXISTS "field_dd425cb6-4ee3-4b4f-9403-37ec424e59f0" BIGINT,
ADD COLUMN IF NOT EXISTS "field_e365f94f-4beb-40bd-9ac8-6339391a1c11" BIGINT,
ADD COLUMN IF NOT EXISTS "field_2db92de6-9419-44e1-bfdc-757c6bde52da" VARCHAR(255),
ADD COLUMN IF NOT EXISTS "field_12915b57-fd61-40d1-93dd-dd1994baec4e" VARCHAR(255),
ADD COLUMN IF NOT EXISTS "field_f88ed3f7-04cf-4db9-8297-7bc44f1c094c" JSONB,
ADD COLUMN IF NOT EXISTS "field_e9a28e0f-ede5-445f-8f07-96617ef759cf" VARCHAR(255),
ADD COLUMN IF NOT EXISTS "field_3b859643-b359-4adc-b3c4-9f1ac3b2fd41" BIGINT,
ADD COLUMN IF NOT EXISTS "field_c74b07c2-8311-4027-83c4-b745d88c3960" BIGINT,
ADD COLUMN IF NOT EXISTS "field_b357fe9a-f50c-446d-ba65-71db4b7bcb20" BIGINT,
ADD COLUMN IF NOT EXISTS "field_38cd0f1f-a26d-4b8b-84c3-a04051c5e2e4" BIGINT,
ADD COLUMN IF NOT EXISTS "field_1451940a-43e8-4935-bcc2-b2a732260d21" BIGINT,
ADD COLUMN IF NOT EXISTS "field_145d9521-6483-4c90-aef9-42aa2c8cf1e2" BIGINT,
ADD COLUMN IF NOT EXISTS "field_e1806caa-67bc-44fa-95a3-bb5fd63d92fd" BIGINT,
ADD COLUMN IF NOT EXISTS "field_7675886b-ff57-4b92-8911-585c0783e192" BIGINT,
ADD COLUMN IF NOT EXISTS "field_735797bc-7644-47c7-886b-5f01ec6b1558" BIGINT,
ADD COLUMN IF NOT EXISTS "field_d015393b-6ae9-4af6-8b21-ad2b92c90f7b" BIGINT,
ADD COLUMN IF NOT EXISTS "field_14e382ac-6247-4867-a3f8-8528fd019fc9" BIGINT,
ADD COLUMN IF NOT EXISTS "field_705be07f-a407-4892-b367-675d1b87cc0d" BIGINT,
ADD COLUMN IF NOT EXISTS "field_144cf94c-bb50-456b-82d5-6805cb4c59b7" BIGINT,
ADD COLUMN IF NOT EXISTS "field_0ff561b2-596f-46ae-a290-d3cf7a9b256c" BIGINT,
ADD COLUMN IF NOT EXISTS "field_9281c4c2-91fd-49cc-9575-729dce9bf669" BIGINT,
ADD COLUMN IF NOT EXISTS "field_2bf72685-0515-481f-8e0b-b64d1b242c61" BIGINT,
ADD COLUMN IF NOT EXISTS "field_d811281c-5821-4145-806c-1bd66f573f99" BIGINT,
ADD COLUMN IF NOT EXISTS "field_88e3d912-fe60-41a8-b030-d3fa18a426d4" BIGINT,
ADD COLUMN IF NOT EXISTS "field_93d47e04-9414-4c48-adaf-ab7d366d7efa" BIGINT,
ADD COLUMN IF NOT EXISTS "field_d299459b-d4e3-47b6-a855-36d11634195c" BIGINT,
ADD COLUMN IF NOT EXISTS "field_9115abd9-89d1-4888-92ec-d9ade862077a" BIGINT,
ADD COLUMN IF NOT EXISTS "field_e06a4cc4-5581-4623-b2f8-714652ce574b" BIGINT,
ADD COLUMN IF NOT EXISTS "field_8da5a451-f91a-4465-b527-6e99aeaf5bb8" BIGINT,
ADD COLUMN IF NOT EXISTS "field_aa8938f2-4b55-4036-bd3a-c05d8b93a191" BIGINT,
ADD COLUMN IF NOT EXISTS "field_5078b490-ee17-4bce-9d01-47eba010ebe2" BIGINT,
ADD COLUMN IF NOT EXISTS "field_dc9ce45f-3692-42d7-afd8-2ab7af1709dd" BIGINT,
ADD COLUMN IF NOT EXISTS "field_3af0dcc1-e624-431e-96ba-5fae69e4762f" BIGINT,
ADD COLUMN IF NOT EXISTS "field_71fbee40-5b13-4ef8-b3f7-7f496d944867" BIGINT,
ADD COLUMN IF NOT EXISTS "field_aaf1d70d-4e7b-4735-80f5-ade6956cdbc3" BIGINT,
ADD COLUMN IF NOT EXISTS "field_dc820da3-539b-4c6d-a108-7061b9aef69c" BIGINT,
ADD COLUMN IF NOT EXISTS "field_abe56663-b39e-4bb4-89ce-b1b70503df17" BIGINT,
ADD COLUMN IF NOT EXISTS "field_8d7db4ba-786c-4d62-b360-ed2df1c6969d" BIGINT,
ADD COLUMN IF NOT EXISTS "field_deba0917-a1cf-4343-b18e-127d22aacdca" BIGINT,
ADD COLUMN IF NOT EXISTS "field_b1bf0bb4-e3ba-495f-a397-94e7be7b89cd" BIGINT,
ADD COLUMN IF NOT EXISTS "field_033e1090-0ebd-4f80-b82e-858b39296bf9" BIGINT,
ADD COLUMN IF NOT EXISTS "field_fdba15df-a89c-4943-aaa6-85c1111e697e" BIGINT,
ADD COLUMN IF NOT EXISTS "field_59a03046-4b87-4093-bceb-489739e8793f" BIGINT,
ADD COLUMN IF NOT EXISTS "field_faaa39f7-69c8-4dd7-b9d6-937531b08870" BIGINT,
ADD COLUMN IF NOT EXISTS "field_f0dd7ac8-0469-4143-8e68-60959ebee538" BIGINT,
ADD COLUMN IF NOT EXISTS "field_f946f78c-b7d1-4827-b34a-0bb9483a9c19" BIGINT,
ADD COLUMN IF NOT EXISTS "field_8126f4d7-4d4f-48f2-8823-5a4e8a80693c" BIGINT,
ADD COLUMN IF NOT EXISTS "field_7935ff59-63e9-4da0-ad1a-51efe6a0ba58" BIGINT,
ADD COLUMN IF NOT EXISTS "field_193d1cb4-c383-4d2d-848c-aa6f5f8e571e" BIGINT,
ADD COLUMN IF NOT EXISTS "field_4678d5b9-7e14-4366-b225-39df6b826401" BIGINT,
ADD COLUMN IF NOT EXISTS "field_19d2f6b3-912a-43d4-8945-8624d6cfbc90" BIGINT,
ADD COLUMN IF NOT EXISTS "field_e1eade5b-b2f5-4987-990a-69d6f1225c42" BIGINT,
ADD COLUMN IF NOT EXISTS "field_9a78d50e-6283-411a-8905-54217fcb74c1" BIGINT,
ADD COLUMN IF NOT EXISTS "field_e3ab0679-b426-45bf-af4c-702a1910bb1c" BIGINT,
ADD COLUMN IF NOT EXISTS "field_90545d3d-1d7a-4c35-a48f-286ab4aa0752" BIGINT,
ADD COLUMN IF NOT EXISTS "field_9212dfc2-86ac-42b5-8ab7-e84d6a8ee98e" BIGINT,
ADD COLUMN IF NOT EXISTS "field_b6b9c15b-68f2-400b-b993-a8a3225c18a8" BIGINT,
ADD COLUMN IF NOT EXISTS "field_fb73c25f-6fcb-40fb-8f5d-097ecb251611" BIGINT,
ADD COLUMN IF NOT EXISTS "field_9d356167-ff6f-4787-8478-f6d879ae089b" BIGINT,
ADD COLUMN IF NOT EXISTS "field_b6dd4ccd-a092-4133-97ed-6692a0f994f0" BIGINT,
ADD COLUMN IF NOT EXISTS "field_cba4e187-97af-4e7a-a13f-d8164bd977bf" BIGINT,
ADD COLUMN IF NOT EXISTS "field_c0738d8c-ea33-47cb-91b6-29187c95b6d4" BIGINT,
ADD COLUMN IF NOT EXISTS "field_77a16feb-3b35-45fc-ab2f-aeb286606d87" BIGINT,
ADD COLUMN IF NOT EXISTS "field_43adf597-3f90-475c-9ea0-a01b671dd07e" BIGINT,
ADD COLUMN IF NOT EXISTS "field_da46313b-eef8-49a6-a868-43b6df107c32" BIGINT,
ADD COLUMN IF NOT EXISTS "field_35e22a68-fc8f-45f2-8157-3bf9cd118a0a" BIGINT,
ADD COLUMN IF NOT EXISTS "field_63089c3f-9741-41c2-b729-069116a35b22" BIGINT,
ADD COLUMN IF NOT EXISTS "field_8157276f-08a5-41bd-a5e9-31fb2f20cff6" BIGINT,
ADD COLUMN IF NOT EXISTS "field_bf42f320-6ba6-470f-bc7e-81f71cf3f7ef" BIGINT,
ADD COLUMN IF NOT EXISTS "field_9e3b04d7-fbe0-4605-ab9c-263dce772508" BIGINT,
ADD COLUMN IF NOT EXISTS "field_f9a11b2a-7929-4133-a31e-3544e34c1efb" BIGINT,
ADD COLUMN IF NOT EXISTS "field_c00f53d1-8aa8-4242-b55f-0bf3fc8d3b9e" BIGINT, ....
with table have structs as belows
create table "custom_object_bc1d0996-7911-41c0-bfda-374680f6e614"
(
id bigserial
primary key,
user_managed_id uuid default gen_random_uuid(),
name varchar(255),
owned_by bigint
constraint custom_object_bc1d0996_7911_41c0_bfda_374680f6e614_owned_by_for
references users
on delete cascade,
layout_id bigint
constraint custom_object_bc1d0996_7911_41c0_bfda_374680f6e614_field_layout
references custom_field_layouts
on delete cascade,
role_id bigint
constraint custom_object_bc1d0996_7911_41c0_bfda_374680f6e614_role_id_fore
references roles
on delete cascade,
path_id bigint
constraint custom_object_bc1d0996_7911_41c0_bfda_374680f6e614_path_id_fore
references paths
on delete cascade,
corporate_number varchar(255),
marksetil_label jsonb,
timset_label jsonb,
created_at timestamp(0) default CURRENT_TIMESTAMP,
created_by bigint
constraint custom_object_bc1d0996_7911_41c0_bfda_374680f6e614_created_by_f
references users
on delete cascade,
updated_at timestamp(0) default CURRENT_TIMESTAMP,
updated_by bigint
constraint custom_object_bc1d0996_7911_41c0_bfda_374680f6e614_updated_by_f
references users
on delete cascade,
deleted_at timestamp(0),
deleted_by bigint
constraint custom_object_bc1d0996_7911_41c0_bfda_374680f6e614_deleted_by_f
references users
on delete cascade,
system_updated_at timestamp(0),
settings jsonb
);
PS2:
I tested it and it is correct according to this comment table can have at most 1600 columns in postgres openerp
Refresh marker Google maps on Apache server [closed]
I can’t refresh marker only, without refreshing whole Google map. Location is sent every 10 seconds from esp32 to Apache server. The only way to refresh marker position is to refresh whole map0 which is not my goal. I’d like to refresh only markers without reloading whole map or website.
<?php foreach($rows as $row){ ?>
var location = new google.maps.LatLng(<?php echo $row['lat']; ?>, <?php echo $row['lng']; ?>);
function refreshMarker(){
// if marker exists and has a .setMap method, hide it
function SetMarker(location, map) {
//Remove previous Marker.
if (marker == null) {
marker.setMap(null);
}
}
//marker.setMap(map);
var marker = new google.maps.Marker({
position: location,
icon: betw,
title:"<?php echo $row['lat']; ?>, <?php echo $row['lng']; ?> , <?php echo $row['time']; ?> , <?php echo $row['altitude']; ?> m, <?php echo $row['speed']; ?> km/h, <?php echo $row['temperature']; ?> °C",
map: map
});
setTimeout(refreshMarker, 1000);}
refreshMarker();
<?php } ?>
Charaters not seeing each other on the same grid 5*5(25 tiles) [closed]
My characters cannot see each other or the npc’s when they are on the same city(city is a grid 5*5 with 25 tiles). i’m using the programs XAMPP, Visual Studio Code e phpMyAdmin para a base de dados SQL, atualluy this work a few days ago, but i add several mechanics to the game and it doesn’t happen anymore, i also have an issue with the XAMPP that re-start two days agora and didn’t start the SQL, i need to delete some data files and re-start the XAMPP so te SQL start working again and the Apache too.
Estou a alguns dias tentar corrigir sem sucesso, eu tenho um funtions.php e o ficheiro onde tenho a UI chamado game.ph.
Alguém me pode ajudar por favor!
I already check the SQL to see if the tables and colums are correct, they are, also if in the database if the two characters were really in the same city and planet, i check if the planet id and planeta map were the same, it is.
i try to debug to see if i could resolve it but went over my head, but after a few days everything seems to be ok with the code, without any erros i could see but still the same.
TYPO3 selectTree, choose everything not in relation as Startingpoint
Without any startingPoints the selectTree just renders this empty selectTree:
But I want it to load every Item it has in its relationship
basicly setting the startingPoints dynamically to every item not sorted in
it should look like this:

My current TCA:
'config' => [
'type' => 'select',
'renderType' => 'selectTree',
'multiple' => true,
'MM_hasUidField' => true,
'foreign_table' => 'tx_mysite_domain_model_item',
'allowed' => 'tx_mysite_domain_model_item',
'MM' => 'tx_mysite_domain_model_item_mm',
'treeConfig' => [
//'startingPoints' => '???'
'childrenField' => 'children',
'appearance' => [
'expandAll' => true,
'showHeader' => true,
],
],
]
Verification Email not saving to runtime/mail folder
I recently installed a fresh install of linux with a LAMP stack (w/php8). I installed composer2. I created an advanced-app using the instructions provided on the Yii site. Ran init file (production). Made the DB, etc. So basically, a clean/default install of everything.
When I try to “Sign Up” in the frontend, the DB table gets the record, but the email isn’t saved into the runtime/mail folder. Actually NO ‘mail’ folder is created. I even tried to add it manually, no luck.
The common/config/main-local.php:
'mailer' => [
'class' => yiisymfonymailerMailer::class,
'viewPath' => '@common/mail',
]
Everything I see, says that saving to a file is the default and this should work.
Do I need to add. 'useFileTransport' => true, or should it be working?
I’m thinking “maybe” a permissions problem. App was created from terminal with root access. I have chown to wwwrun:www, but still no luck.
C HTTP SERVER PHP INTEGRATION [closed]
I m actually making an http server in C.
It started just for fun, then I’ve set up the epoll system, the post request handler with the data parser all from scratch.
Now my concern is how to handle php code in my server using FastCGI.
Can someone explain the process?
Google TTS stealing the first few ms of a script – but not the way I would think
I’ve built a PHP service that calls Google Cloud Text-to-Speech and writes the audioContent (base64-decoded) directly to an MP3 file. When I prepend a hard-coded phrase (e.g. “Ein Moment der Ruhe…”m which is the same phrase that laters apears as the dynamic text) it comes through perfectly–no words lost–but as soon as my dynamic text begins, the first 1–2 words are always faded in or cut. So they are not the first words anymore but are still “faded in”.
I’ve tried adding an SSML in the beginning or in between, but the same issue persists whenever I play back the MP3 that Google returns.
I’m on shared hosting so I’d prefer to consume Google’s MP3 directly instead of running a conversion pipeline myself. What else can I try to guarantee the very first syllable of dynamic text isn’t lost?
namespace AppServices;
class GoogleTtsService extends TtsService
{
private const API_URL = 'https://texttospeech.googleapis.com/v1/text:synthesize';
public function synthesize(string $text, array $options, string $outputPath, string $apiKey): bool
{
$breakMs = defined('TTS_INITIAL_BREAK_MS') ? TTS_INITIAL_BREAK_MS : 100;
// This hard-coded phrase plays fine
$ssml = '<speak>'
. 'Ein Moment der Ruhe...'
. '<break time="'. $breakMs .'ms"/>'
. htmlspecialchars($text, ENT_QUOTES|ENT_XML1, 'UTF-8') // this never plays fine
. '</speak>';
$payload = [
'input' => ['ssml' => $ssml],
'voice' => [
'languageCode' => $options['language'] ?? 'de-DE',
'name' => $options['voice'] ?? 'de-DE-Standard-A'
],
'audioConfig' => [
'audioEncoding' => 'MP3',
'speakingRate' => $options['speed'] ?? 1.0
]
];
$response = $this->postJson(self::API_URL . '?key=' . urlencode($apiKey), $payload);
if (empty($response['audioContent'])) {
return false;
}
$audioData = base64_decode($response['audioContent']);
return file_put_contents($outputPath, $audioData) !== false;
}
}
Relevant debug log:
[28-Jun-2025 00:15:21] TTS chunk for job 311: text length=4159
[28-Jun-2025 00:15:21] SSML sent (first 100 chars):
<speak>Ein Moment der Ruhe...<break time="100ms"/>Ein Moment der Ruhe am Morgen. Ein bewu…
PHP variable in WHERE clause of SELECT statement not being read [closed]
I have the following code…
$rec = "Ashen Polish";
include("database_connect.php");
$db= $conn;
$tableName="wh_recipes";
$columns= ['recipe', 'item_descr_1', 'item_descr_2', 'skill', 'req_skill', 'kit', 'material_1', 'm1n', 'material_2', 'm2n', 'material_3', 'm3n', 'material_4', 'm4n', 'material_5', 'm5n', 'material_6', 'm6n', 'material_7', 'm7n', 'notes'];
$fetchData = fetch_data($db, $tableName, $columns);
function fetch_data($db, $tableName, $columns){
if(empty($db)){
$msg= "Database connection error";
}elseif (empty($columns) || !is_array($columns)) {
$msg="columns Name must be defined in an indexed array";
}elseif(empty($tableName)){
$msg= "Table Name is empty";
}else{
$columnName = implode(", ", $columns);
$query = "SELECT ".$columnName." FROM ".$tableName ." WHERE recipe='".$rec."' ";
$result = $db->query($query);
if($result== true){
if ($result->num_rows > 0) {
$row= mysqli_fetch_all($result, MYSQLI_ASSOC);
$msg= $row;
} else {
$msg= "No Data Found";
}
}else{
$msg= mysqli_error($db);
}
}
return $msg;
}
I am trying to fill a table with with all the information regarding a particular recipe in my database by calling the name of the recipe to populate it using the $rec variable, however $rec does not return a value and I receive the message “no data found”, if I replace the $rec variable with the actual recipe name then the correct data is displayed, I assume that I am getting the concatenation wrong for the “where” part of the query.
I have looked at a few solutions on Stack Overflow that seem to work for others and I cant seem to get any of them working for my example.
My current solution is base upon How to pass a php variable in WHERE clause of SELECT statement? , this is the closest example I could find to what I’m trying to do but doesn’t seem to work for me for some reason.
I’m getting 403 in CURL but 200 Success using Postman [closed]
I am developing an application to connect to an API and send DTE invoices to a server of the Ministry of Finance, I did the test using POSTMAN and it sends correctly, but when using the same structure in CURL it gives me 403 Forbidden, could you give me an idea of how to solve it or what I am doing wrong please?
I’m using Localhost XAMPP with PHP 7.4.33 on Windows.
This is the response from server:
{
"success": true,
"http_code": 403,
"respuesta": null
}
This is the PHP code:
<?php
// Token
$token = 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMTIzMTQwNDkxMTAyNyIsImF1dGhvcml0aWVzIjpbIlVTRVIiLCJVU0VSX0FQSSIsIlVzdWFyaW8iXSwiY19uaXQiOiIxMTIzMTQwNDkxMTAyNyIsImNfZHVpIjoiMDQ0NDE4NDQ5IiwiaWF0IjoxNzUxMDQ5MDU1LCJleHAiOjE3NTExMzU0NTV9.p8v78GFAdtfxnRMzwO4aijq3CHjGynbtpibBqx5MUBuRh9gN6J0tNlNCmTxNqmGXC8WEvzt5tMdeW32pChDzdQ';
// Documento DTE firmado
$documentoFirmado = 'eyJhbGciOiJSUzUxMiJ9.ewogICJpZGVudGlmaWNhY2lvbiIgOiB7CiAgICAidmVyc2lvbiIgOiAxLAogICAgImFtYmllbnRlIiA6ICIwMCIsCiAgICAidGlwb0R0ZSIgOiAiMDEiLAogICAgIm51bWVyb0NvbnRyb2wiIDogIkRURS0wMS0wMDAwMDAwMS0wMDAwMDAwMDAwMDAwMDciLAogICAgImNvZGlnb0dlbmVyYWNpb24iIDogIjAxM0UyRUU3LTU2RkYtNEE3OS1BNUVDLTY5NUVEQzJBNkE4NSIsCiAgICAidGlwb01vZGVsbyIgOiAxLAogICAgInRpcG9PcGVyYWNpb24iIDogMSwKICAgICJ0aXBvQ29udGluZ2VuY2lhIiA6IG51bGwsCiAgICAibW90aXZvQ29udGluIiA6IG51bGwsCiAgICAiZmVjRW1pIiA6ICIyMDI1LTA2LTI3IiwKICAgICJob3JFbWkiIDogIjAyOjUzOjU2IiwKICAgICJ0aXBvTW9uZWRhIiA6ICJVU0QiCiAgfSwKICAiZG9jdW1lbnRvUmVsYWNpb25hZG8iIDogbnVsbCwKICAiYXBlbmRpY2UiIDogbnVsbCwKICAiZXh0ZW5zaW9uIiA6IHsKICAgICJub21iRW50cmVnYSIgOiBud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m51bUl0ZW0iIDogMiwKICAgICJ0aXBvSXRlbSIgOiAxLAogICAgIm51bWVyb0RvY3VtZW50byIgOiBudWxsLAogICAgImNhbnRpZGFkIiA6IDEsCiAgICAiY29kaWdvIiA6ICJNQU5URU5JTUlFTlRPIiwKICAgICJjb2RUcmlidXRvIiA6IG51bGwsCiAgICAidW5pTWVkaWRhIiA6IDU5LAogICAgImRlc2NyaXBjaW9uIiA6ICJFTlZJTyBET01JQ0lMSU8iLAogICAgInByZWNpb1VuaSIgOiAyLjk1LAogICAgIm1vbnRvRGVzY3UiIDogMCwKICAgICJ2ZW50YU5vU3VqIiA6IDAsCiAgICAidmVudGFFeGVudGEiIDogMCwKICAgICJ2ZW50YUdyYXZhZGEiIDogMi45NSwKICAgICJ0cmlidXRvcyIgOiBudWxsLAogICAgInBzdiIgOiAwLAogICAgIm5vR3JhdmFkbyIgOiAwLAogICAgIml2YUl0ZW0iIDogMC4zMzkzODA1MwogIH0gXSwKICAicmVzdW1lbiIgOiB7CiAgICAidG90YWxOb1N1aiIgOiAwLAogICAgInRvdGFsRXhlbnRhIiA6IDAsCiAgICAidG90YWxHcmF2YWRhIiA6IDY3LjksCiAgICAic3ViVG90YWxWZW50YXMiIDogNjcuOSwKICAgICJkZXNjdU5vU3VqIiA6IDAsCiAgICAiZGVzY3VFeGVudGEiIDogMCwKICAgICJkZXNjdUdyYXZhZGEiIDogMCwKICAgICJwb3JjZW50YWplRGVzY3VlbnRvIiA6IDAsCiAgICAidG90YWxEZXNjdSIgOiAwLAogICAgInRyaWJ1dG9zIiA6IFsgXSwKICAgICJzdWJUb3RhbCIgOiA2Ny45LAogICAgIml2YVJldGUxIiA6IDAsCiAgICAicmV0ZVJlbnRhIiA6IDAsCiAgICAibW9udG9Ub3RhbE9wZXJhY2lvbiIgOiA2Ny45LAogICAgInRvdGFsTm9HcmF2YWRvIiA6IDAsCiAgICAidG90YWxQYWdhciIgOiA2Ny45LAogICAgInRvdGFsTGV0cmFzIiA6ICJTZXNlbnRhIHkgU2lldGUgOTAvMTAwIERvbGFyZXMgKFVTKS4iLAogICAgInRvdGFsSXZhIiA6IDcuODEsCiAgICAic2FsZG9GYXZvciIgOiAwLAogICAgImNvbmRpY2lvbk9wZXJhY2lvbiIgOiAzLAogICAgIm51bVBhZ29FbGVjdHJvbmljbyIgOiBudWxsLAogICAgInBhZ29zIiA6IFsgewogICAgICAiY29kaWdvIiA6ICIwNSIsCiAgICAgICJwZXJpb2RvIiA6IG51bGwsCiAgICAgICJwbGF6byIgOiBudWxsLAogICAgICAibW9udG9QYWdvIiA6IDY3LjksCiAgICAgICJyZWZlcmVuY2lhIiA6IG51bGwKICAgIH0gXQogIH0KfQ.HF2ZFzbNYNx0nfnjogWBXj4PD4sFB-ALj6xOeKukrvctLksv0CkhcqEGR0vBoy0qe1bxHHFQL0Bch6uwyaCsCdPXE94DGtAqc8aRdtpD1JxRsgjEU5J4SqZ5BRvnyYgPo5XIdKM60TXtHwLv9j1XALk2h69Y8mwYVuOfX9EOL91jugZ7xQFpd1qKXOO-mDa5BEJrTIvJs1avZaEnD1GMBY4PBe36wM46y8Hgts87rU2TyDDjIwlIMZMNm9nP3jdtR31fWuwMvW329VECfeq43DhR06h31Ek6cr_hGvcTGwLG9pXruJJPnyw5k4VfqPMikKSal4aqP5Jw2desvFcvLg';
// Código de generación
$codigoGeneracion = '013E2EE7-56FF-4A79-A5EC-695EDC2A6A85';
// Arreglo de datos
$data = [
"ambiente" => "00",
"idEnvio" => 7,
"version" => 1,
"tipoDte" => "01",
"documento" => $documentoFirmado,
"codigoGeneracion" => $codigoGeneracion
];
// Inicializar cURL
$ch = curl_init('https://apitest.dtes.mh.gob.sv/fesv/recepciondte');
// Configurar opciones
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: '.$token,
'Content-Type: application/json'
]);
// Ejecutar
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);
curl_close($ch);
// Mostrar respuesta
header('Content-Type: application/json');
if ($error) {
echo json_encode(["success" => false, "error" => $error]);
} else {
echo json_encode([
"success" => true,
"http_code" => $httpCode,
"respuesta" => json_decode($response, true)
], JSON_PRETTY_PRINT);
}
?>
I’ve already tried sending to another location to see if the headers and body data are sent, and it seems they are. Here I attach the response from the local file it receives:
{
"success": true,
"http_code": 200,
"respuesta": {
"headers": {
"Host": "localhost",
"Accept": "*/*",
"Authorization": "Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxMTIzMTQwNDkxMTAyNyIsImF1dGhvcml0aWVzIjpbIlVTRVIiLCJVU0VSX0FQSSIsIlVzdWFyaW8iXSwiY19uaXQiOiIxMTIzMTQwNDkxMTAyNyIsImNfZHVpIjoiMDQ0NDE4NDQ5IiwiaWF0IjoxNzUxMDQ5MDU1LCJleHAiOjE3NTExMzU0NTV9.p8v78GFAdtfxnRMzwO4aijq3CHjGynbtpibBqx5MUBuRh9gN6J0tNlNCmTxNqmGXC8WEvzt5tMdeW32pChDzdQ",
"Content-Type": "application/json",
"Content-Length": "4903"
},
"body_raw": "{"ambiente":"00","idEnvio":7,"version":1,"tipoDte":"01","documento":"eyJhbGciOiJSUzUxMiJ9.ewogICJpZGVudGlmaWNhY2lvbiIgOiB7CiAgICAidmVyc2lvbiIgOiAxLAogICAgImFtYmllbnRlIiA6ICIwMCIsCiAgICAidGlwb0R0ZSIgOiAiMDEiLAogICAgIm51bWVyb0NvbnRyb2wiIDogIkRURS0wMS0wMDAwMDAwMS0wMDAwMDAwMDAwMDAwMDciLAogICAgImNvZGlnb0dlbmVyYWNpb24iIDogIjAxM0UyRUU3LTU2RkYtNEE3OS1BNUVDLTY5NUVEQzJBNkE4NSIsCiAgICAidGlwb01vZGVsbyIg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QVpFUiBTRUlSRU4gVjMgTUlOSSBORUdSTyBSWjE5LTA1MDUwMTAwLVIzVTEiLAogICAgInByZWNpb1VuaSIgOiA2NC45NSwKICAgICJtb250b0Rlc2N1IiA6IDAsCiAgICAidmVudGFOb1N1aiIgOiAwLAogICAgInZlbnRhRXhlbnRhIiA6IDAsCiAgICAidmVudGFHcmF2YWRhIiA6IDY0Ljk1LAogICAgInRyaWJ1dG9zIiA6IG51bGwsCiAgICAicHN2IiA6IDAsCiAgICAibm9HcmF2YWRvIiA6IDAsCiAgICAiaXZhSXRlbSIgOiA3LjQ3MjEyMzg5CiAgfSwgewogICAgIm51bUl0ZW0iIDogMiwKICAgICJ0aXBvSXRlbSIgOiAxLAogICAgIm51bWVyb0RvY3VtZW50byIgOiBudWxsLAogICAgImNhbnRpZGFkIiA6IDEsCiAgICAiY29kaWdvIiA6ICJNQU5URU5JTUlFTlRPIiwKICAgICJjb2RUcmlidXRvIiA6IG51bGwsCiAgICAidW5pTWVkaWRhIiA6IDU5LAogICAgImRlc2NyaXBjaW9uIiA6ICJFTlZJTyBET01JQ0lMSU8iLAogICAgInByZWNpb1VuaSIgOiAyLjk1LAogICAgIm1vbnRvRGVzY3UiIDogMCwKICAgICJ2ZW50YU5vU3VqIiA6IDAsCiAgICAidmVudGFFeGVudGEiIDogMCwKICAgICJ2ZW50YUdyYXZhZGEiIDogMi45NSwKICAgICJ0cmlidXRvcyIgOiBudWxsLAogICAgInBzdiIgOiAwLAogICAgIm5vR3JhdmFkbyIgOiAwLAogICAgIml2YUl0ZW0iIDogMC4zMzkzODA1MwogIH0gXSwKICAicmVzdW1lbiIgOiB7CiAgICAidG90YWxOb1N1aiIgOiAwLAogICAgInRvdGFsRXhlbnRhIiA6IDAsCiAgICAidG90YWxHcmF2YWRhIiA6IDY3LjksCiAgICAic3ViVG90YWxWZW50YXMiIDogNjcuOSwKICAgICJkZXNjdU5vU3VqIiA6IDAsCiAgICAiZGVzY3VFeGVudGEiIDogMCwKICAgICJkZXNjdUdyYXZhZGEiIDogMCwKICAgICJwb3JjZW50YWplRGVzY3VlbnRvIiA6IDAsCiAgICAidG90YWxEZXNjdSIgOiAwLAogICAgInRyaWJ1dG9zIiA6IFsgXSwKICAgICJzdWJUb3RhbCIgOiA2Ny45LAogICAgIml2YVJldGUxIiA6IDAsCiAgICAicmV0ZVJlbnRhIiA6IDAsCiAgICAibW9udG9Ub3RhbE9wZXJhY2lvbiIgOiA2Ny45LAogICAgInRvdGFsTm9HcmF2YWRvIiA6IDAsCiAgICAidG90YWxQYWdhciIgOiA2Ny45LAogICAgInRvdGFsTGV0cmFzIiA6ICJTZXNlbnRhIHkgU2lldGUgOTAvMTAwIERvbGFyZXMgKFVTKS4iLAogICAgInRvdGFsSXZhIiA6IDcuODEsCiAgICAic2FsZG9GYXZvciIgOiAwLAogICAgImNvbmRpY2lvbk9wZXJhY2lvbiIgOiAzLAogICAgIm51bVBhZ29FbGVjdHJvbmljbyIgOiBudWxsLAogICAgInBhZ29zIiA6IFsgewogICAgICAiY29kaWdvIiA6ICIwNSIsCiAgICAgICJwZXJpb2RvIiA6IG51bGwsCiAgICAgICJwbGF6byIgOiBudWxsLAogICAgICAibW9udG9QYWdvIiA6IDY3LjksCiAgICAgICJyZWZlcmVuY2lhIiA6IG51bGwKICAgIH0gXQogIH0KfQ.HF2ZFzbNYNx0nfnjogWBXj4PD4sFB-ALj6xOeKukrvctLksv0CkhcqEGR0vBoy0qe1bxHHFQL0Bch6uwyaCsCdPXE94DGtAqc8aRdtpD1JxRsgjEU5J4SqZ5BRvnyYgPo5XIdKM60TXtHwLv9j1XALk2h69Y8mwYVuOfX9EOL91jugZ7xQFpd1qKXOO-mDa5BEJrTIvJs1avZaEnD1GMBY4PBe36wM46y8Hgts87rU2TyDDjIwlIMZMNm9nP3jdtR31fWuwMvW329VECfeq43DhR06h31Ek6cr_hGvcTGwLG9pXruJJPnyw5k4VfqPMikKSal4aqP5Jw2desvFcvLg","codigoGeneracion":"013E2EE7-56FF-4A79-A5EC-695EDC2A6A85"}",
"body_decoded": {
"ambiente": "00",
"idEnvio": 7,
"version": 1,
"tipoDte": "01",
"documento": "eyJhbGciOiJSUzUxMiJ9.ewogICJpZGVudGlmaWNhY2lvbiIgOiB7CiAgICAidmVyc2lvbiIgOiAxLAogICAgImFtYmllbnRlIiA6ICIwMCIsCiAgICAidGlwb0R0ZSIgOiAiMDEiLAogICAgIm51bWVyb0NvbnRyb2wiIDogIkRURS0wMS0wMDAwMDAwMS0wMDAwMDAwMDAwMDAwMDciLAogICAgImNvZGlnb0dlbmVyYWNpb24iIDogIjAxM0UyRUU3LTU2RkYtNEE3OS1BNUVDLTY5NUVEQzJBNkE4NSIsCiAgICAidGlwb01vZGVsbyIgOiAxLAogICAgInRpcG9PcGVyYWNpb24iIDogMSwKICAgICJ0aXBvQ29udGluZ2VuY2lhIiA6IG51bGwsCiAgICAibW90aXZvQ29udGluIiA6IG51bGwsCiAgICAiZmVjRW1pIiA6ICIyMDI1LTA2LTI3IiwKICAgICJob3JFbWkiIDogIjAyOjUzOjU2IiwKICAgICJ0aXBvTW9uZWRhIiA6ICJVU0QiCiAgfSwKICAiZG9jdW1lbnRvUmVsYWNpb25hZG8iIDogbnVsbCwKICAiYXBlbmRpY2UiIDogbnVsbCwKICAiZXh0ZW5zaW9uIiA6IHsKICAgICJub21iRW50cmVnYSIgOiBudWxsLAogICAgImRvY3VFbnRyZWdhIiA6IG51bGwsCiAgICAibm9tYlJlY2liZSIgOiBudWxsLAogICAgImRvY3VSZWNpYmUiIDogbnVsbCwKICAgICJwbGFjYVZlaGljdWxvIiA6IG51bGwsCiAgICAib2JzZXJ2YWNpb25lcyIgOiBudWxsCiAgfSwKICAiZW1pc29yIiA6IHsKICAgICJuaXQiIDogIjExMjMxNDA0OTExMDI3IiwKICAgICJucmMiIDogIjI0MTkxMTEiLAogICAgIm5vbWJyZSIgOiAiSm9zZSBBbnRvbmlvIFR1cmRpb3MgUGFyYWRhIiwKICAgICJjb2RBY3Rpd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6IDAsCiAgICAidmVudGFFeGVudGEiIDogMCwKICAgICJ2ZW50YUdyYXZhZGEiIDogMi45NSwKICAgICJ0cmlidXRvcyIgOiBudWxsLAogICAgInBzdiIgOiAwLAogICAgIm5vR3JhdmFkbyIgOiAwLAogICAgIml2YUl0ZW0iIDogMC4zMzkzODA1MwogIH0gXSwKICAicmVzdW1lbiIgOiB7CiAgICAidG90YWxOb1N1aiIgOiAwLAogICAgInRvdGFsRXhlbnRhIiA6IDAsCiAgICAidG90YWxHcmF2YWRhIiA6IDY3LjksCiAgICAic3ViVG90YWxWZW50YXMiIDogNjcuOSwKICAgICJkZXNjdU5vU3VqIiA6IDAsCiAgICAiZGVzY3VFeGVudGEiIDogMCwKICAgICJkZXNjdUdyYXZhZGEiIDogMCwKICAgICJwb3JjZW50YWplRGVzY3VlbnRvIiA6IDAsCiAgICAidG90YWxEZXNjdSIgOiAwLAogICAgInRyaWJ1dG9zIiA6IFsgXSwKICAgICJzdWJUb3RhbCIgOiA2Ny45LAogICAgIml2YVJldGUxIiA6IDAsCiAgICAicmV0ZVJlbnRhIiA6IDAsCiAgICAibW9udG9Ub3RhbE9wZXJhY2lvbiIgOiA2Ny45LAogICAgInRvdGFsTm9HcmF2YWRvIiA6IDAsCiAgICAidG90YWxQYWdhciIgOiA2Ny45LAogICAgInRvdGFsTGV0cmFzIiA6ICJTZXNlbnRhIHkgU2lldGUgOTAvMTAwIERvbGFyZXMgKFVTKS4iLAogICAgInRvdGFsSXZhIiA6IDcuODEsCiAgICAic2FsZG9GYXZvciIgOiAwLAogICAgImNvbmRpY2lvbk9wZXJhY2lvbiIgOiAzLAogICAgIm51bVBhZ29FbGVjdHJvbmljbyIgOiBudWxsLAogICAgInBhZ29zIiA6IFsgewogICAgICAiY29kaWdvIiA6ICIwNSIsCiAgICAgICJwZXJpb2RvIiA6IG51bGwsCiAgICAgICJwbGF6byIgOiBudWxsLAogICAgICAibW9udG9QYWdvIiA6IDY3LjksCiAgICAgICJyZWZlcmVuY2lhIiA6IG51bGwKICAgIH0gXQogIH0KfQ.HF2ZFzbNYNx0nfnjogWBXj4PD4sFB-ALj6xOeKukrvctLksv0CkhcqEGR0vBoy0qe1bxHHFQL0Bch6uwyaCsCdPXE94DGtAqc8aRdtpD1JxRsgjEU5J4SqZ5BRvnyYgPo5XIdKM60TXtHwLv9j1XALk2h69Y8mwYVuOfX9EOL91jugZ7xQFpd1qKXOO-mDa5BEJrTIvJs1avZaEnD1GMBY4PBe36wM46y8Hgts87rU2TyDDjIwlIMZMNm9nP3jdtR31fWuwMvW329VECfeq43DhR06h31Ek6cr_hGvcTGwLG9pXruJJPnyw5k4VfqPMikKSal4aqP5Jw2desvFcvLg",
"codigoGeneracion": "013E2EE7-56FF-4A79-A5EC-695EDC2A6A85"
}
}
}
How to find the source of the “to many connections” error on a shared server? [closed]
I currently have a shared hosting plan and I’m having problems with the database connection limit.
I contacted support to at least help me find out the origin of these connections, scripts, IP, etc.
But they said they can’t tell me this (?) and that I’ll have to figure it out on my own.
The question is how can I do this on a shared plan, which doesn’t even have a way to list the processes? Is there any way to enable a log, I don’t know?
I use the Hostinger Cloud plan
I would like to somehow find out at least the script that is causing this, because the site is crashing with less than 10 hits and I pay ONE HUNDRED AND THIRTY REAIS for the plan. I also accept server recommendations, I thought it was absurd that support didn’t help me with this.
Woocommerce Mobile App order-receipt.php template
I use the Woocommerce mobile app to print receipts. I have modified the file…
wp-contentpluginswoocommercesrcInternalReceiptRenderingTemplatesorder-receipt.php
But I guess whenever woocommerce updates, it overwrites the changes I make to this file. So I changed the permissions on the file but yet it still gets overwritten. And I do have a woocommerce directory in my child theme but I dont know the file structure to create for this particular file?
I have folders like
woocommercecheckout
woocommerceemails
woocommercepdf
I tried
woocommercesrc
woocommercetemplates
woocommercesrcInternalReceiptRenderingTemplates
But the file still gets overwritten by the system all the time.

