I know you may not have a lot of time but please upload more as you can .. This series is the only modern one on the internet and many people depend on it for learning php
I put out 2 videos per week whenever I can, sometimes 1. That is what I physically am able to record & edit at the moment given the limited free time that I have.
this channel has very good and useful tutorials the topics that are discussed are definitely practical in action , thanks for making them and Hope you complete his course as complete as u can
Good Job! a little suggestion, please. As a PHP developer, I have faced issues dealing with file includes, for example; file B includes file A and when you include file B into file C, there will be a problem with the inclusion of A from the B file. I would be much grateful to see a future video on proper ways of dealing with nested files includes and how to resolve their path.
My reply was deleted again by youtube. Not sure if you got my previous reply but basically we covered include/require in first section of the course. You should use namespaces & avoid include/require to avoid issues that you mentioned. Namespaces were covered in the composer lesson so check it out if you missed it.
I had the issue of not being able to move the file due to a permission error while using Docker. I ended up changing the storage folder owner to www-data and that sorted out the problem. sudo chown -R www-data:www-data storage I put this here for other noobs like me who may be challenged with a similar situation. 🙂
How do you set this up on the other php pages so the post code can function properly ->post(/upload , [ App\Classes\Home\::class, 'upload']) I'm confuse on this code I already installed composer to get autoload.php working properly
Hey Gio. Did you forget to also mention about `post_max_size` configuration? I read that `post_max_size` should not be less than `upload_max_filesize`.
post_max_size is the directive for the whole POST body & the file size does contribute to that as well. You would have same issue of reaching that post max size even if u set it at same or slightly bigger than upload_max_filesize when you try to upload multiple files at the same time since their size would go over the max post size. So in general yes you should try & keep post_max_size much higer than upload_max_filesize but it mainly depends on the application & what sort of post requests you will have.
Hi! Got a question. What about the folder permissions (in a web hosting for example) in order to securly upload files? Do you have any video or article about it? Thanks a lot!
I am doing ID card project where I have created one 'template'. Using dompdf to create the ID card. But its creating all the ID cards in one pdf document. I would to to generate multiple ID's cards in individual pdf in one click. Please help me on this
I have using a hosing and my file upload didn't work in my local host it work i changed upload_tmp_dir in .htaccess and php.ini file but nothing happen my file didn't upload and i get error code 6 can you help me please.
Yes on server restart, the files uploaded however are deleted at the end of the request. From php docs: "The file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed." www.php.net/manual/en/features.file-upload.post-method.php
Yes that's correct, if you want to add extension you can add it but you don't have to. You can add extension during download & keep files stored without it. About tmp folder it depends what your storage path constant is set to
@@ProgramWithGio Thank you for responding. I granted permissions for creating and deleting files in the folder where I uploaded my file, and it worked. You're an excellent teacher, responding to everyone's comments. Hats off to you!
Fantastic tutorial. But I do have one complaint🤔, I am taking a two year web development program in September and you haven't left anything for them to teach me 😢😂🤣
I find myself compelled to look for another video since I can't find the code samples related to this one. It's either me who can't see it or you didn't put it... I had to leave a comment cause I see a missed potential on this video... *ciao
We work on project later on that has source. This needed no source because it's just a concept. Feel free to write it by hand while watching video, that will help you understand it better 👍
@UC0ciKWze0ytRYIQw6gMkbhg where do you see upload.php? It's pointing to /upload route which invokes upload method on Home class. All the code is there, maybe you missed that part?
My bad. I confused: action="upload/" As something like: action="upload.php" and thus been looking for an imaginary file whereas it just points to index.php. I will take full advantage of this now that I worked that out. I'm working on a production project and was in a bit of a hurry. Otherwise this is a really useful piece of content. I can agree with everyone now...
Hiiii love the tutorial series. I got an error about this file upload Two warning: -Warning: move_uploaded_file(/var/www/public/../storage/Screenshot from 2023-03-04 21-01-09.png): Failed to open stream: Permission denied in /var/www/app/Classes/Home.php on line 27 -Warning: move_uploaded_file(): Unable to move "/tmp/phpSZ39tl" to "/var/www/public/../storage/Screenshot from 2023-03-04 21-01-09.png" in /var/www/app/Classes/Home.php on line 27
This is by far the best PHP tutorial! Thanks a million!
Thank you 💙
I can't express enough how much I appreciate your course! If you would get yourself a Patreon account or something, I would definitely support you!
Thank you so much 🙌
I dalje jedan opd najboljih časova PHP-a na koje sam naišao dosad. Svaka čast Gio !
Thank you 💙
I know you may not have a lot of time but please upload more as you can .. This series is the only modern one on the internet and many people depend on it for learning php
I put out 2 videos per week whenever I can, sometimes 1. That is what I physically am able to record & edit at the moment given the limited free time that I have.
@@ProgramWithGio
I appreciate your efforts ❤
@Program With Gio your work on this channel is a genuine service to the global web development community, thank you
this channel has very good and useful tutorials the topics that are discussed are definitely practical in action , thanks for making them and Hope you complete his course as complete as u can
Glad you like them. Thank you.
This series is very very valuable. Thank you so much, Gio
Happy to hear, thank you 🙌
@@ProgramWithGio You're welcome
Great explanation, great course
Glad you think so!
Gio you are awesome explaining
Thank you 🙏
This was great. Will come back to it when I start practicing (at the end of section 2). I'll move on. Thanks Gio
Awesome, thank you
Good Job! a little suggestion, please. As a PHP developer, I have faced issues dealing with file includes, for example; file B includes file A and when you include file B into file C, there will be a problem with the inclusion of A from the B file. I would be much grateful to see a future video on proper ways of dealing with nested files includes and how to resolve their path.
My reply was deleted again by youtube. Not sure if you got my previous reply but basically we covered include/require in first section of the course. You should use namespaces & avoid include/require to avoid issues that you mentioned. Namespaces were covered in the composer lesson so check it out if you missed it.
This series is very valuable. Thank you so much !
Glad you like it, thank you
great video, best php course
I had the issue of not being able to move the file due to a permission error while using Docker.
I ended up changing the storage folder owner to www-data and that sorted out the problem.
sudo chown -R www-data:www-data storage
I put this here for other noobs like me who may be challenged with a similar situation. 🙂
Good job, you could also add the user & group via Docker, you might see that in source code of Expennies project (later section)
Awesome tutorial 👌
Thank you! Cheers!
thank you for your great job!
Glad it was helpful!
Thank you Gio
You're welcome
this vidéo is legendary
Thank you
Hello Gio how were you able to use the storage path constant in the Home.php without including or requiring it?
Storage path is defined in index.php I think & index.php is entrypoint to all requests
How do you set this up on the other php pages so the post code can function properly ->post(/upload , [ App\Classes\Home\::class, 'upload']) I'm confuse on this code I already installed composer to get autoload.php working properly
Maybe you missed some of the previous lessons? Check the routing lesson
Hey Gio. Did you forget to also mention about `post_max_size` configuration? I read that `post_max_size` should not be less than `upload_max_filesize`.
post_max_size is the directive for the whole POST body & the file size does contribute to that as well. You would have same issue of reaching that post max size even if u set it at same or slightly bigger than upload_max_filesize when you try to upload multiple files at the same time since their size would go over the max post size. So in general yes you should try & keep post_max_size much higer than upload_max_filesize but it mainly depends on the application & what sort of post requests you will have.
Hi! Got a question. What about the folder permissions (in a web hosting for example) in order to securly upload files? Do you have any video or article about it? Thanks a lot!
Hi, no video specific to that but there is a video about production & deploying the app in third section.
I am doing ID card project where I have created one 'template'. Using dompdf to create the ID card. But its creating all the ID cards in one pdf document. I would to to generate multiple ID's cards in individual pdf in one click. Please help me on this
I haven't worked with dompdf before & can't really help you without more information.
I have using a hosing and my file upload didn't work in my local host it work i changed upload_tmp_dir in .htaccess and php.ini file but nothing happen my file didn't upload and i get error code 6 can you help me please.
I would need to see your code & configuration. Hard to guess the issue this way. Feel free to DM me on X (Twitter)
Thank you
you're welcome
Thank you.
💙
I have a question, that tmp file storage will ever get cleaned?
Yes on server restart, the files uploaded however are deleted at the end of the request. From php docs: "The file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed."
www.php.net/manual/en/features.file-upload.post-method.php
@ProgramWithGio great answer, thank you.
Hi, thanks for the tutorials
Yes that's correct, if you want to add extension you can add it but you don't have to. You can add extension during download & keep files stored without it.
About tmp folder it depends what your storage path constant is set to
@@ProgramWithGio Thank you very much!
I am learning PHP OOP using Ubuntu Linux, but when uploading, I encounter the error 'move_uploaded_file failed to open stream: Permission denied.'
Check permissions of the directory where you are uploading to
@@ProgramWithGio Thank you for responding. I granted permissions for creating and deleting files in the folder where I uploaded my file, and it worked. You're an excellent teacher, responding to everyone's comments. Hats off to you!
Fantastic tutorial. But I do have one complaint🤔, I am taking a two year web development program in September and you haven't left anything for them to teach me 😢😂🤣
That's amazing haha. Thank you. I'm sure you will learn a lot of things there too 👍
I find myself compelled to look for another video since I can't find the code samples related to this one. It's either me who can't see it or you didn't put it...
I had to leave a comment cause I see a missed potential on this video... *ciao
We work on project later on that has source. This needed no source because it's just a concept. Feel free to write it by hand while watching video, that will help you understand it better 👍
@UC0ciKWze0ytRYIQw6gMkbhg where do you see upload.php? It's pointing to /upload route which invokes upload method on Home class. All the code is there, maybe you missed that part?
My bad. I confused:
action="upload/"
As something like:
action="upload.php"
and thus been looking for an imaginary file whereas it just points to index.php.
I will take full advantage of this now that I worked that out. I'm working on a production project and was in a bit of a hurry. Otherwise this is a really useful piece of content. I can agree with everyone now...
@@SupremeTec360 no worries, glad it worked out at the end, thank you 🙌
Hiiii love the tutorial series.
I got an error about this file upload
Two warning:
-Warning: move_uploaded_file(/var/www/public/../storage/Screenshot from 2023-03-04 21-01-09.png): Failed to open stream: Permission denied in /var/www/app/Classes/Home.php on line 27
-Warning: move_uploaded_file(): Unable to move "/tmp/phpSZ39tl" to "/var/www/public/../storage/Screenshot from 2023-03-04 21-01-09.png" in /var/www/app/Classes/Home.php on line 27
Are you using docker? Might have to do with permissions, ping me on Twitter and I can help troubleshoot it