Category "php"

Symfony Error: You have requested a non-existent parameter "file_path" [closed]

This is my stack trash, I am getting this when doing the existing Symfony project. stack trash : Symfony\Component\DependencyInjection\E

PHP variable added to page not populated - getting undefined in Javascript function call

I am having a bit of trouble, and i think my syntax and structure is correct but for some reason the function is failing. products.php page i have this function

PHP Fatal error: Class not found - PHPUnit

I'm trying to use PHPUnit in a PHP project. Here is my project structure (files are in italic font style) controllers Pages.php tests pagesTest.php vendor

Sum column values from multiple arrays

I have an arrays with dynamic name. My array could be more than 3, depends and array variable should be unique $loopThrice = 3; $getSum = 0; $total = array();

Inserting data into SQL Server Db An Invalid direction was specified

I am using SQL Server DB (mssql), And trying to execute Insert Query through PHP. public function registerCustomer($custId, $custData) { $sqlString = "INS

Xdebug 3 not showing in phpinfo on m1 Monterey

After installing xdebug with sudo pecl install xdebug it looks that is installed but only in CLI. php -i | grep "xdebug" - this returns a lot of rows Then when

shell errors running php exec

I have a PHP script that executes a shell command to find the common items between two files given. This is the beginning of my PHP script: $E7Bonded_File = "

Apache 1.3.37 server returnes 403 Access Denied when post request

update 2022-05-14 i found that server shows 403 when post request, not get request. get reqeust works well, not post. hi i got problem with the apache server th

get attribute from class not working php 7

I have $this->table as a global variable and an object inside of it, where foo is a table field name. example. $this->table = t_module::__set_state(arra

WordPress ACFNotice: get_field() - We've detected one or more calls to retrieve ACF field values before ACF has been initialized

My WordPress website has this notice below, how do I fix this? Notice: acf_get_value was called incorrectly. Advanced Custom Fields PRO - We've detected one or

How to avoid executing commands as root using phpseclib's library?

Currently I'm executing all commands as root, which is a very bad idea and unsafe as I read. I want to execute the commands in a secure way. An example of curre

Can we define variables in `.tpl` files?

In general, if we have a Smarty project we assign variables in .php file, and use the variables in its corresponding .tpl` file. such as: $smarty->assign('

Get empty result api firebase [FCM]

I've saved some of my mobile registration_codes that are connected with my development environment of Firebase. Once I send a manual notification by the api I r

could not find driver Debian SQL Server PHP

I have a Laravel installation running on a Debian 9.9 server and PHP 7.4. I need to connect to a SQL Server database on a remote Windows server. I followed th

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

I want to return HTML from PHP. I found a solution from StackOverflow which is insert JSON_HEX_QUOT | JSON_HEX_TAG after array in json_encode but it does not wo

Send POST data via raw JSON with Postman

I've got Postman (the one that doesn't open in Chrome) and I'm trying to do a POST request using raw JSON. In the Body tab I have "raw" selected and "JSON (appl

CS-cart - assigning variables into config file

In my CS-cart 4 PHP project I have a Smarty 3 (tpl) view file.. There I have defined one JavaScript function like: <script type="text/javascript">

Distribute array row data to make multiple new rows

I have below the data [ { "price_in_dollar": 1000, "price_in_euro": 1000, "price_in_pound": 1000, "price_in_rupee": 1000,

How to send parameters in soap request in php in __soapcall() function

i want to send a below xml request to the server which is sending ok by using soap UI but not in php: <ns:AgentLogin> <ns:AgentLoginRQ

Is there a way to manually store Kafka offset so a consumer never misses messages?

Using PHP Laravel Framework to consume kafka messages with the help of the mateusjunges/laravel-kafka laravel package. Is it possible to save the offset by cons