I’m creating a WooCommerce (Version 5.6.0) site where users can buy foam products and the prices are calculated on the archive page. Basically, the users enter the dimensions and the price is calculated based on a formula. I’m currently struggling with updating the prices in cart, I don’t have previous experience in customizing the products and prices at this level,
Tag: session
Either session expires in the middle of work or Warning: session_cache_expire(): Session cache expiration cannot be changed when a session is active
Using PHP 8.0.6 on Windows 10 locally I received this error message: Warning: session_cache_expire(): Session cache expiration cannot be changed when a session is active in C:pathsessions.php on line 5 I updated the same file on the live Linux server (PHP 8.0.9) and the issue doesn’t occur. The relevant code: My first guess is that this might be a Windows
Starting a php session from react with an axios call does not keep the session alive, but doing it with postman works just fine
I am aware other questions like this one exist, i have failed to implement any of those successfully, meaning none have worked, whether due to a fault of my own or their inherent impotency to solving this problem. The environment : I am serving the php project with php -S 127.0.0.1:8080 and have a react front end started on the
Protect the session with the key in the session and in the cookie?
I’m looking for a way to protect my php session that contains important information. Using an IP verification is not a good idea for people on the phone. That’s why I thought it might be smart to store a randomly generated key in the session and in a classic cookie. Then every x minutes check that the two keys match.
LARAVEL: I am only getting one item from my table when there are multiple items. How would I get all of them and output them?
I am using a session to create a basic cart. In the session there are multiple IDs ranging from 1-3. When I output the data using foreach it only outputs the first item from the table. I would like all the related items to appear. How would I go about doing that? Here is my index function from my controller:
Laravel 5.8: Can you help me with this problem
I’m using Laravel 5.8 to develop my Online Store. And in this store, every product has a field of prd_delivery and it can be set one of these values: city_free_delivery country_free_delivery null When it is null, it means that it does not have any free delivery type. And when users select their products, these situations must be applied: Note that
Losing session data after POST from third party website
I have a Laravel site that redirects to a payment provider (external third party website). When the user completes their payment, they are redirected back to my site via a POST request. The issue I’m having is that the user’s session is lost when they return to the confirmation page. I wondered if this was behaviour of PHP generally but
session_start() giving error for session_destroy() in PHP 8
All of a sudden, my custom session handlers’ session’s session_start() is not working. I had to include destroy after upgrading to PHP 8. It isn’t an issue in PHP 7.4. Fatal error: Uncaught ArgumentCountError: Too few arguments to function CBSession::destroy(), 0 passed and exactly 1 expected in Session.php: Stack trace: #0 [internal function]: CBSession::destroy() #1 /path/CB/Session.php(35): session_start() #2 /path/CB/Session.php(17): CBSession::load()
How to get multiple values through session from a file which is running multiple times in PHP
I have a file which is run 2 to 3 times and there is a variable $student_name, and I want that variable to be available in another file. How to achieve it? file 1. file 2. but I am getting only the last assigned value. Answer If file 1 is executed 3 times, then $info will be re-created empty in
SESSION in laravel for page protection
I want to make a Login Registration system in laravel 8. In which User when login only can access a particular page else redirect to login page. I did this like that. what’s wrong in it. //Login Code //Session Code Answer you can use the default authentication in laravel8 using laravel application Jetstream starter kit and use the auth() middleware