You taught me a lot of brand new things in this video! This whole issue of Sessions and cookies was a lot in the dark for me, now you've put the sun on it, I love you Gio!!!
@ProgramWithGio Жыл бұрын
Super happy to hear that, glad it was helpful, thank you 💙💙💙
@lairotuT-Tutorial3 ай бұрын
Never have seen this example of the php close tag problem. Great work Gio!
@ProgramWithGio3 ай бұрын
Thank you 💙
@mwaas Жыл бұрын
all things is quite perfect from the clear voice and accent to the amazing content , clear explanation , explanation of all deep topics .. and the best things is explain all things not just basic stuff
@ProgramWithGio Жыл бұрын
Thank you 🙌. Glad to hear you like the videos 💙
@aleksandrkanygin26723 жыл бұрын
Very informative as always. Merry Christmas, hope your channel grows next year!
@ProgramWithGio3 жыл бұрын
Thank you 💙. Merry Christmas & happy holidays 🎄⛄
@QorashyTech Жыл бұрын
Thanks!
@ProgramWithGio Жыл бұрын
Thank you for your support 🙏
@truthteachers Жыл бұрын
Thanks
@ProgramWithGio Жыл бұрын
Thanks for support 💙
@АйбекУшыншыканал2 ай бұрын
A good course, I am waiting for a video on microservice architecture )
@ProgramWithGio2 ай бұрын
Thank you
@Zubbee2 жыл бұрын
Ok so, I've used session start before. It was more like I copied it. It wasn't explained in the video I watched. I just knew the guy wrote it at the top of the script. No understanding at all. So I'm very grateful for this video and also grateful to know that you talk about it more in the 3rd section. Thanks Gio.
@ProgramWithGio2 жыл бұрын
Glad to hear it was helpful, thank you
@Abdulrahman-Mohamed2 жыл бұрын
Perfect Perfect Perfect .. Nobody says these details, thank you really alot. #Respect
@ProgramWithGio2 жыл бұрын
You're welcome & thank you 🙌
@Vitalii-m6r Жыл бұрын
I enjoy learning PHP on this channel. Thanks!
@ProgramWithGio Жыл бұрын
Happy to hear that, thank you
@skundu90092 жыл бұрын
Excellent work Sir... you pointed out each n every small small things, that no one talk about it...
@ProgramWithGio2 жыл бұрын
Glad you like it, thank you
@Armando-px8hi Жыл бұрын
Understood by watching it just one time as always😅Thanks GIO for helping us to go and get our dream job.
@ProgramWithGio Жыл бұрын
You got this 🤞👏
@karolzamojcin1886 Жыл бұрын
Astounding as always 🏆
@ProgramWithGio Жыл бұрын
Thank you
@jrd1sso Жыл бұрын
I really learned a lot of things, THANK YOU!
@ProgramWithGio Жыл бұрын
Happy to hear 🙌
@KochADV26 күн бұрын
very good. thanks
@ProgramWithGio26 күн бұрын
Thank you
@mimoh20002 жыл бұрын
Hi Gio, Some how, am not getting the increatment from $_Session['count']. Here are the codes: Home Class inside the index(), i added $_SESSION['count'] = ($_SERVER['count'] ?? 0 )+ 1 ; and on the index page var_dump($_SESSION); I am getting only one on the browser, Using Nginx with PHP 8.1.9. Thanks for your anticipated response. Also, the buffering has been set to 0 from my php.ini file.
@ProgramWithGio2 жыл бұрын
Hello. You are using SERVER super global instead of SESSION in assignment. Change it to session and then it should work
@mimoh20002 жыл бұрын
@@ProgramWithGio Thanks. I just wasn't paying close attention. Thanks. Continuing.
@ekramulhasanshawon565510 ай бұрын
awesome dear
@ProgramWithGio10 ай бұрын
Thank you
@issaissifou35792 жыл бұрын
Thank you so much!
@ProgramWithGio2 жыл бұрын
You're welcome 👍
@GillesBeaulacJoe2 жыл бұрын
Hi Gio - Love your course, I'm following every lesson. Thank you. My question: How would you manage that users session would stay active the whole day? Currently, the browser ends session after about 30 minutes or so of inactivity. My users log in and once logged in they refer to the app in different ways, but they don't sit there and look at the app, they multi-task and sometimes they are on a phone call - whatever it is, I must prevent the session from ending after non-activity - I only want the session to end at the end of the day.
@ProgramWithGio2 жыл бұрын
Hello. Thank you for your support 💙. This mainly depends on how your code is set up, sessions configured, how it's persisted, etc. There are different ways you can implement this. You can have ajax call every few minutes or so to kind of ping activity & extend the session, you can play with session timeouts, can use cookies, etc.
@vkdgames2 жыл бұрын
Good stuff, thank you !
@ProgramWithGio2 жыл бұрын
Glad you liked it. Thank you
@memack1012 жыл бұрын
Thank you.
@ProgramWithGio2 жыл бұрын
💙
@mimlog6593 Жыл бұрын
Thanks for everything you do Gio, but please I would like to know how you are able to edit your php.ini file
@ProgramWithGio Жыл бұрын
I apologize, I should've mentioned this in the video & seems like I left it out by accident. Create a local.ini file in your docker directory if you are on docker, add whatever configs you want to change in that file, then in your docker-compose add this line within the app container section in volumes: - ./local.ini:/usr/local/etc/php/conf.d/local.ini rebuild the containers & you should be good. You can see example here: github.com/ggelashvili/expennies/tree/P2_Start/docker
@mimlog6593 Жыл бұрын
@@ProgramWithGio thanks, you are doing a great job😀
@ProgramWithGio Жыл бұрын
@@mimlog6593 no problem 👍
@sadegha77242 жыл бұрын
Handy, thanks
@ProgramWithGio2 жыл бұрын
👍👍
@federicobau86513 жыл бұрын
great video
@momahdy Жыл бұрын
Please tell me how does your app auto reflects code changes without the need to do a docker build
@ProgramWithGio Жыл бұрын
When I change something in Dockerfile I run docker build behind the scenes and I mention in video that you should run it too. Otherwise if nothing has changed in Dockerfile or docker-compose then there is no need to rebuild
@momahdy Жыл бұрын
@@ProgramWithGio thanks, at my project I change the php code but it's not reflected inside container
@ProgramWithGio Жыл бұрын
@@momahdy put your project in GitHub and DM me on Twitter and I can help troubleshoot it. Most likely some misconfiguration
@mibrahim42452 жыл бұрын
Awesome video !! .. but I have a question, I set the PHP session cookie to httponly (in server settings) and indeed the httponly mark showed up.. but why when I type document.cookie in the console I can still see the cookie value ? Thanks
@ProgramWithGio2 жыл бұрын
Sorry, just saw this comment, I was not notified for some reason. Are you sure the cookie is httponly? If you can send me the screenshots of the way you set the cookie & the console.log of the document.cookie that would be helpful, you can send it to me on Twitter
@mibrahim42452 жыл бұрын
@@ProgramWithGio thanks for the reply 🌹 .. Yes plz I'd be grateful if you share your Twitter ID here 🙏
@ProgramWithGio2 жыл бұрын
@@mibrahim4245 its on my KZbin channel about page. @Giodev8
@mdsirazul9231 Жыл бұрын
Hi Sir How are you, I need some help.I make a copy of the container php.ini on my host computer. If I change something in my host php.ini it doesn't change in container php.ini, how can I do that?
@ProgramWithGio Жыл бұрын
You need to add it to your docker-compose file under volumes
@AlexFloppy Жыл бұрын
Do we have these code shared some where on github?
@ProgramWithGio Жыл бұрын
When we get to parts where there is something to share yes it's on GitHub & link in description. For some videos there isn't much to share since it's mostly theory & a scratchpad basically
@comounburro3 жыл бұрын
When is the third sections going to be released?
@ProgramWithGio3 жыл бұрын
There is one more video for section 2 scheduled to be released next week, then there will be a summary of what we did in the 2nd section (and a small exercise). After that, we'll begin 3rd section. Probably we'll start in a couple of weeks.
@truthteachers Жыл бұрын
Bro, in this video i see in the Home class it uses the view class. I have been following the course from the start and none of the previous videos talked about views. Please advise in which video was view covered before this one. Thank you.
@ProgramWithGio Жыл бұрын
That one slipped into this video, you dont need to worry about it, we cover it within the MVC video which is 2.27, so you will get to it in 2 videos
@truthteachers Жыл бұрын
@@ProgramWithGio Great thank you. Appreciated.
@dameeldiop3412 жыл бұрын
Excellent as usual, just want to know how to copy the php.ini from wherever its source to the docker folder so I can edit things easily.. Google failed me on that so far Thanks again.
@ProgramWithGio2 жыл бұрын
Thank you. I might make a separate video on that since a few others have asked the same. Basically, you can either copy your custom php.ini from Dockerfile or from docker-compose. Within your docker-compose, under volumes, you can create a section to copy your local php.ini to the proper location, something like: volumes: - ./php/local.ini:/usr/local/etc/php/conf.d/local.ini
@aerohcss3 ай бұрын
Gio, I've noticed that you run scripts in browser or via CLI and never directly via PHP Storm (Shift + F10). Is it just personal preferences or run scripts this way really worse than CLI? Thank you.
@ProgramWithGio2 ай бұрын
Not everyone has IDE and may not understand what's happening. Showing results in browser or running it in CLI makes following along a bit easier.
@bakosyy Жыл бұрын
Hello Gio. Is it ok to also say that "Once RESPONSE is sent to a page, you can no longer send any further headers" instead of "Once HEADERS are sent to a page, you can no longer send any further headers"?
@ProgramWithGio Жыл бұрын
yea cause response would also be sending headers
@michaelwest8422 жыл бұрын
Howdy Gio, I cannot do this lesson because of a fatal error. You say go to Home.php and have use App\View as well as $_SESSION['count'] = ($_SESSION['count'] ?? 0) +1; return View::make('index', $_GET)->render(); However, we do not yet view yet, what do we need to include in it.
@ProgramWithGio2 жыл бұрын
Hello, you can comment that out, views are covered later and we implement that part. I had to re-record a small part of this video and recorded it with the code from a future lesson. You don't need views in this lesson so you can comment it out and just return string like in other methods.
@1Kicaj2 жыл бұрын
Hi Gio, i dont get the fact we can't see the warning which is caused by having output_buffering > 0, start_session triggers E_WARNING, but if we do something like include('file_not_exists.php') it also trigger E_WARNING but this time we will see in a browser Warning: include(file_not_exists.php)...... So what's the difference between E_WARNING caused by start_session and include ?
@ProgramWithGio2 жыл бұрын
start session doesn't always trigger warning when output buffering is > 0 because content isn't echoed on the screen until the end of the script or until it has buffered 4KB or whatever the output buffering is set to. Watch the part from 1:18 - 2:05 where I explain it.
@1Kicaj2 жыл бұрын
@@ProgramWithGio yeaa, after some experiments with headers_sent() and curl -v to see fully response i finally understand that. thank you for your answer, and the whole course :)
@stephen.cabreros Жыл бұрын
did I miss a video where you setup the php ini?
@ProgramWithGio Жыл бұрын
No don't think you did. Check my reply to Mim Log's comment here
@stephen.cabreros Жыл бұрын
@@ProgramWithGio thanks so much Gio
@ProgramWithGio Жыл бұрын
@@stephen.cabreros no problem 🙌
@idemous2 жыл бұрын
Can you create a video about JWT?
@ProgramWithGio2 жыл бұрын
Maybe in future, I'll add it to the list. Thank you for the suggestion.
@CodeWithAbirOfficial11 ай бұрын
🎉
@ProgramWithGio10 ай бұрын
💙
@sergeisurin2963 Жыл бұрын
👍🙏
@ProgramWithGio Жыл бұрын
🙏
@truthteachers Жыл бұрын
Bro I asked this question 2 videos ago but did not get help. The question is this. I find that the info produced by $_SERVER differs terribly when I use xampp to run the script and when i use the PHP inbuilt server "php -S localhost:3000". I am using Windows 10 and PHP 8.1.12. This conflict becomes critical when i try to get REQUEST_URI parameter. When i use Xampp i get "/MyCoursesLG/php/courses/piocourse/src/public/" but when i use inbuilt server i get "/". This creates unnecessary coding variations especially when i tried to create basic routing. Why does this happen and how to resolve this?
@ProgramWithGio Жыл бұрын
I don't always get notified of all comments from KZbin. When using something like XAMPP it runs using apache & apache has its own config which sets some of the options. php server may not set all of those things or may set them differently so there might be difference in what is available within $_SERVER variable. DM me on Twitter & send me your XAMPP apache vhost configuration to see if there is a misconfiguration.
@truthteachers Жыл бұрын
@@ProgramWithGio Its ok. I realize that this is something that PHP developers need to fix immediately. I think it is important that they need to keep results consistent otherwise the value of the language will be lost. I am getting a similar problem with the time() function. The cookie is set using the UTC time although i have already specified the TimeZone as my local time in the ini file. The stupidity in this is that the expiry is checked against my local time but the cookie is created using UTC. Sigh!!
@ProgramWithGio Жыл бұрын
@@truthteachers I don't think there is an issue with it though, you should be able to configure most of the things including the timezones. For cookie you set expiration in unix timestamp essentially which is UTC. It shouldn't matter what time zone is on client.