Category "php"

"Notice: Undefined variable", "Notice: Undefined index", "Warning: Undefined array key", and "Notice: Undefined offset" using PHP

I'm running a PHP script and continue to receive errors like: Notice: Undefined variable: my_variable_name in C:\wamp\www\mypath\index.php on line 10 Notice: U

"RuntimeException: a facade root has not been set"

I'm having an issue in a Laravel Zero project I'm working on. I'm working on a command that handles direct file transfers between 2 disks—1 SFTP and anoth

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

I updated from PHP 7.4.26 to PHP 8.1.0 I am getting the following error on localhost home page although website is working on server: ERROR The PHP configurati

Argument 1 passed to Symfony\Component\VarDumper\Server\Connection::__construct() ... called in DumpServerServiceProvider.php on line 49 [duplicate]

Actual Error Message is Argument 1 passed to Symfony\Component\VarDumper\Server\Connection::__const ruct() must be of the type string, null

Too few arguments to function PendingResourceRegistration::name(),1 passed in C:\xampp\htdocs\project\routes\web.php on line 18 and exactly 2 expected

Too few arguments to function Illuminate\Routing\PendingResourceRegistration::name(), 1 passed in C:\xampp\htdocs\project\routes\web.php on line 18 and exactly

Symfony redirect if already loggedin from login page

I'm using FOSUser Bundle to login. Now if user is already loggedin, how can I redirect user to homepage ('/'), if user visit to /login url. I have copied Secur

How to get Laravel's CSRF Token from Another Website?

I want to get a csrf token from another web's form. I've tried to get that token with cUrl. I guess that was success, but I think the real problem is that anoth

Handle error for duplicate entries - PHP/MySQL

What is the proper way to handle error on duplicate entries for PHP/MySQL? The code below is not working even tho the code 1062 is the right code for duplicate

How to use $this->session->set_userdata in codeigniter

I have some promblem with CI when i use $this->session->set_userdata Controller public function check_login() { $email = $this->input->pos

how to use extended ASCII instead of unicode in PHP

I have an application that is developed in visual fox pro in which I have an encryption method that I want to transfer to php code, the code is as follows: FUNC

PHP, how to convert Int value to Week days

For saving the days of week in a database, I've the existing code : if (isset($_POST['day7'])){$dayOfWeek = 1;} else { $dayOfWeek = ''; } if (isset($_POST['day1

How to remove Deprecated Symfony\Component\Debug\DebugClassLoader?

I have upgrade Symfony 3.4 to 4.4. The only Deprecation warning left is this: php.INFO: User Deprecated: The "Symfony\Component\Debug\DebugClassLoader" class i

PHPExcel export HTML table to xlsx

I need to export HTML table with data from database to xlsx file as easily as possible. I've tried PHPExcel and some JS plugins, but unsuccessfully. Is there

PHP function Not Working As Expected From functions.php Include File

I have a function in a functions.php file which updates a download count in a MySQL database via php. I cannot fathom out why it isn't working. Below is the cod

I want to display default profile image if user do not have profile image

I am trying to display a default image if user do not have profile image but I am not getting what to do next so.. can any write further code as I tried this co

Can't exclude directories from .htaccess mobile redirect?

I'm using the .htaccess mobile redirect below which I found on an older post here. It works great, but I need to exclude several directories from the redirect r

woocommerce_wp_select options array from product attribute terms

I am trying to create a drop down list box in woocommerce but have it populated with data from the database. I have the majority of the code working but the po

How to create laravel storage symbolic link for production or sub domain system?

When I worked on laravel local development server php artisan storage:link works fine for me. But when I transfer my site to production server then I saw my pub

How can I get new CSRF token in LARAVEL by using ajax

I have created a form which is having a lot of fields and user can create an unlimited field in it. If a user spends more time on it CSRF token get expires and

Install mysql client in docker image

I am trying to build a docker image for php, which can handle database dumping in my mysql container. The problem is that it seems to install the mariadb versio