Get up to 80 % extra points for free! More info:

Discussion – Lesson 7 - Database wrapper

Back

 

Comments
Avatar
yoel
Member
Avatar
yoel:9/11/2019 16:41

I changed the value of the AllowOverride parameter to All in the apache.conf file and enabled the rewrite module with "sudo a2enmod rewrite", it seems that works well except when I try to comment an article, but I think isn't part of the original lessons. Anyway I'll try to fix it and report the problem for helping other people with similar issues. Thankyou very much!

 
Reply
9/11/2019 16:41
Avatar
Replies to yoel
David Capka Hartinger:9/12/2019 3:46

Great, I'm glad it works! :) The comments are not part of the original course, but you can always create a thread in our forums if you need any help - https://www.ict.social/php/php-forum.

Reply
9/12/2019 3:46
You can walk through a storm and feel the wind but you know you are not the wind.
Avatar
yoel
Member
Avatar
Replies to David Capka Hartinger
yoel:9/12/2019 15:48

Finally all is working correctly, I want to share the throubleshooting for helping other people with similar issue: I adequated the format of the timestamp just declaring a variable with the date php function and created a function for extract the last article id in my commentmanager model, then I add +1 to this var in the commentcontroller for maintain the original logic, I use this value to insert the id value when I create a new comment. I observed that some web servers like xampp fill the id field calculating the value through the auto increment but others like apache2 may not interact like I expect with mariadb and gives you an error if you pass an empty ('') value. This does the trick :D
Thanks for all the support David!

 
Reply
9/12/2019 15:48
Avatar
Kamil Wróblewski:2/7/2020 7:45

If U want to use PDO and get the chance to change db engine in the future in Ur apps don't put the names of tables and columns in apostrophes in SQL queries :)
BTW This is the best MVC+Router in PHP tutorial I've ever seen.

Edited 2/7/2020 7:46
 
Reply
2/7/2020 7:45
To maintain the quality of discussion, we only allow registered members to comment. Sign in. If you're new, Sign up, it's free.

4 messages from 14 displayed.