No video

How to Deploy a PHP and MySQL Website on Heroku And Configure the Database

  Рет қаралды 62,560

DoableDanny

DoableDanny

Күн бұрын

This video shows every single step in order to deploy a PHP and MySQL website on Heroku. We will then configure the database remotely using PHPMyAdmin.
I wrote this post to make following along to this video easy: www.doabledann...
Support the channel by subscribing: / @doabledanny
Twitter: / doabledanny

Пікірлер: 131
@usage_sa
@usage_sa Жыл бұрын
I had been stuck before watching this helpful video, so thank you so much!
@kingamarszakowska8069
@kingamarszakowska8069 3 жыл бұрын
I was struggling so much, but it finally works! thank you
@doabledanny
@doabledanny 3 жыл бұрын
Good to hear!
@Hevletica
@Hevletica Жыл бұрын
Thank you it works! Pity the mariadb plugin costs money. Once I rewrote my sql dump to match the mysql syntax it worked like a charm. You get 3600 maximum questions as part of the free resource plan. Will figure out thanks !
@opeyemiilesanmi2059
@opeyemiilesanmi2059 2 жыл бұрын
Thanks for the tutorial @DoableDanny. In Case anyone is here trying to create a table with a json field and ClearDb on heroku is giving you issues. You can use JawsDB Mysql
@povilasbikmanas1643
@povilasbikmanas1643 2 жыл бұрын
Even though it was a bit of a struggle to make the project work using Heroku, in the end, everything was sorted out and it's working nicely. Thank you for your guidance with the video!
@doabledanny
@doabledanny 2 жыл бұрын
You're welcome!
@ck-code
@ck-code 7 ай бұрын
thanks so much for helping us bro 🥰 finaly i host my first php project
@didubako6738
@didubako6738 2 жыл бұрын
Thanks man , u just saved my life , i was struggling with heroku aha
@humphreycastro236
@humphreycastro236 3 жыл бұрын
Thanks for this guide! really helps on my school work.
@siddheshb.kukade4685
@siddheshb.kukade4685 3 жыл бұрын
Thank you your video and article helped more than heroku docs 🙏🙏😍🙂🙂🤗
@fransoa2103
@fransoa2103 2 жыл бұрын
S.imply, I.ntelligent and L.ow C.ost, best SILC method ever Thanx from France Alps mountain ;)
@eduardorpg64
@eduardorpg64 2 жыл бұрын
This helped me a lot! Thank you so much! You're a life saver!
@doabledanny
@doabledanny 2 жыл бұрын
Good to hear! Thanks Eduardo!
@devgjpro7112
@devgjpro7112 2 жыл бұрын
woooooowww... i m the 500th liker.... well... this tutorial was worth more than that... cool one... 👍
@doabledanny
@doabledanny 2 жыл бұрын
Thanks Bhomic, glad it helped!
@KevinJohnKiely
@KevinJohnKiely 3 жыл бұрын
Just what I needed, thanks a lot for this!
@doabledanny
@doabledanny 3 жыл бұрын
Glad it helped!
@Kidkaze29
@Kidkaze29 2 жыл бұрын
Absolute lifesaver, thank you so much!
@svejdam7106
@svejdam7106 3 жыл бұрын
Awesome video Danny, keep rocking :)
@doabledanny
@doabledanny 3 жыл бұрын
Thank you very much my friend!
@theriddler2129
@theriddler2129 2 жыл бұрын
Thanks, dude! You help me a lot!
@hyefur
@hyefur 2 жыл бұрын
Thanks for the tutorial, Thumbs up
@egoraizer2792
@egoraizer2792 3 жыл бұрын
Thank you very much! This video really helped me
@doabledanny
@doabledanny 3 жыл бұрын
Great to hear!
@kinga3684
@kinga3684 3 жыл бұрын
You've just helped me so much, how can I support you?
@doabledanny
@doabledanny 3 жыл бұрын
You could subscribe to my channel and newsletter (www.doabledanny.com/blog/). Thanks!
@kinga3684
@kinga3684 3 жыл бұрын
@@doabledanny do you know how to make it work so that I can also query to the database? Because using this approach I can only establish a connection.
@doabledanny
@doabledanny 3 жыл бұрын
@@kinga3684 github.com/DoableDanny/Snake-with-Online-Leader-board See the index.php file. That's how I query the DB :)
@brunovidal4043
@brunovidal4043 Жыл бұрын
Thank you bro!
@dtawusaku
@dtawusaku 2 жыл бұрын
Many thanks!!
@nebojsaplavsic901
@nebojsaplavsic901 2 жыл бұрын
Awesome. It took me all day but it works perfectly fine. How to refresh/update?
@Toughmenchannel
@Toughmenchannel 2 жыл бұрын
thanks for making the video
@charlesoni2787
@charlesoni2787 2 жыл бұрын
I found this error. Forbidden (You don't have permission to access this resource.) . Someone told me to Create a file name: Procfile. is the reason ?
@AdamHulbert
@AdamHulbert 3 жыл бұрын
Great guide. Thank you very much for this. Can I make a suggestion? 10:55 Definitely worth turning on "file name extensions" in windows explorer for anyone working with text/code files in windows.
@doabledanny
@doabledanny 2 жыл бұрын
Thanks Adam, that's a good suggestion 👍
@AdamsProgrammer
@AdamsProgrammer Жыл бұрын
Hey, thank you. You are a life saver
@tadvacc
@tadvacc Жыл бұрын
Hi, I am having issues deploying a similar app to yours, I receive a "Method not allow" message instead of the phase of my index.php. Is there any tips to solve my error?
@francescoscollo2275
@francescoscollo2275 2 жыл бұрын
Hi . The video and tutorial are very good. I deploy my first project with php and mysql. My second project is not working with the same system .
@ElegantCoder
@ElegantCoder 2 жыл бұрын
thank you so much
@hassantariq7013
@hassantariq7013 Жыл бұрын
Hey, so I have question. I'm making an API with PHP and MySQL, for an Android app. And it works perfectly fine with XAMPP Apache and MySQL. The problem arises when I close my laptop, then the android app stops working (like fetching data from the Database). So if I close XAMPP, (stopping MySQL, and Apache) would the API still work (like fetch the data from the Database), in this approach?
@mofe620
@mofe620 2 жыл бұрын
Thank you so much
@johnrush3030
@johnrush3030 3 жыл бұрын
very helpful thank you!
@doabledanny
@doabledanny 3 жыл бұрын
Hey guys, this is the tutorial I am following in the video: www.doabledanny.com/Deploy-PHP-And-MySQL-to-Heroku
@Jeff-pt8sw
@Jeff-pt8sw 3 жыл бұрын
this is very helpful thank you.
@doabledanny
@doabledanny 3 жыл бұрын
Thanks Jeffrey!!
@animasinghdhabal5052
@animasinghdhabal5052 3 жыл бұрын
Grt tutorial.. Thnxx
@siddharthgaur5650
@siddharthgaur5650 3 жыл бұрын
Really Great Video I Have Been Looking Exactly For This Only. But, I am facing an issue. I saw your video, read your blog too. I imported my DB using SQL script. I changed the connection variables as well (as mentioned) and re-deployed the site. But still not able to make it work. The tables are not getting populated and I've getting ERR500 error as well. Can you Kindly make a video on that?
@doabledanny
@doabledanny 3 жыл бұрын
I'm not sure I can help you with that I'm afraid. You'll have to do some googling! Thanks Siddharth!
@darentan9771
@darentan9771 3 жыл бұрын
On the last step when asked to copy the following code, /* $cleardb_server = $cleardb_url["host"]; $cleardb_username = $cleardb_url["user"]; $cleardb_password = $cleardb_url["pass"]; $cleardb_db = substr($cleardb_url["path"],1); */ just key in the the fields directly. Following the video, the fields would be: /* $cleardb_server = "eu-cdbr-west-03.cleardb.net"; $cleardb_username = "b0cc1049d026d1"; $cleardb_password = "da2394e8"; $cleardb_db = "heroku_3b61f10a737bcca"; */ The HTTP 500 error should be gone now
@vincentfernandez9994
@vincentfernandez9994 2 жыл бұрын
@@darentan9771 hi, what if im using PDO connections?
@gabrielfono844
@gabrielfono844 3 жыл бұрын
I have a problem after deploying my app on heroku, I have this weird message ' connection failedNo such file or directory' I am confused please I need your help I read all your articles but I can't figure out what is happening right now I built an app with html css js php and mysql
@myst.youtube
@myst.youtube 3 жыл бұрын
Same problem
@kalebjuliu7944
@kalebjuliu7944 3 жыл бұрын
Thanks! very helpful
@doabledanny
@doabledanny 3 жыл бұрын
Great to hear!
@christelleloussouarn314
@christelleloussouarn314 Жыл бұрын
Thanks mate, awesome video. Am just having trouble with part 13, the cleardb info where should i insert it in a symfony app? its not working properly in the php.index?
@mehdimrn59
@mehdimrn59 4 ай бұрын
tell how fix that plz ive the same problem
@rubiobenjamin2
@rubiobenjamin2 3 жыл бұрын
Muchas gracias me sirvió mucho !
@navidhernandez2055
@navidhernandez2055 3 жыл бұрын
Excelente! 10pts!
@doabledanny
@doabledanny 3 жыл бұрын
Wow 10pts, cheers Navid!
@parthpitroda5113
@parthpitroda5113 3 жыл бұрын
thank you for tutorial and video bro :)
@yanickndi9922
@yanickndi9922 2 жыл бұрын
Thank you. This is very helpful :)
@buddhidhananjaya8556
@buddhidhananjaya8556 3 жыл бұрын
So, for the last bit, Where we have to basically make a config file. Rather than taking the host, User file "automatically" is there a way to just configure it manually!
@ericaimhigh
@ericaimhigh 9 ай бұрын
Does heroku allow for multiple deployments from the same github repo?
@spicytuna08
@spicytuna08 3 жыл бұрын
why connecting to local database? why not use the database in the cloud? heroku should have database available in the cloud.
@rebeccajames5242
@rebeccajames5242 3 жыл бұрын
Danny. After everything is done. Does it mean your MySQL Server must always be ON on your PC before the database can be use ?
@spicytuna08
@spicytuna08 3 жыл бұрын
i thought the same. it seems that local computer is where the database will reside. this is not what we want.
@Mashwishi
@Mashwishi 2 жыл бұрын
What is the limitations of free cleardb, and also does it have same syntax/query of Mysql from the xampp
@nhatminh7956
@nhatminh7956 3 жыл бұрын
HTTP ERROR 500 some thing does not work :((
@kristiyanivanov7414
@kristiyanivanov7414 3 жыл бұрын
thanks dude
@oasis4everever
@oasis4everever 3 жыл бұрын
Thanks a lot !! 👍
@doabledanny
@doabledanny 3 жыл бұрын
Happy to help!
@vincentfernandez7197
@vincentfernandez7197 3 жыл бұрын
i think it would be better if you add or change the HOST,username,password to connection DB? not in the config.php
@chax255
@chax255 2 жыл бұрын
I have been access denied everytime I try to access the remote clear server through this method tried every possible way
@Abbatyya
@Abbatyya 3 жыл бұрын
very useful interest video
@doabledanny
@doabledanny 3 жыл бұрын
Thanks Abbaty!
@krsxishere
@krsxishere 2 жыл бұрын
do you have to add a credit card when submitting an order form?
@raghavsharma4842
@raghavsharma4842 2 жыл бұрын
Hey Danny, Everything worked great mate, except I am Getting this error: Cannot connect: invalid settings. mysqli::real_connect(): (HY000/2002): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Anyone encountered this? Would love some thoughts on how to fix it
@jailsonjunior1612
@jailsonjunior1612 2 жыл бұрын
did you solve?
@raghavsharma4842
@raghavsharma4842 2 жыл бұрын
@@jailsonjunior1612 Unfortunately not. Got help from someone who put my mysql data into postgresql before it worked
@tanujkumar8072
@tanujkumar8072 2 жыл бұрын
Requires credit card details How can i overcome from this problem??
@voontaotan1095
@voontaotan1095 3 жыл бұрын
Hi, in this tutorial, it's only two file, what if I prepared my project and how to commit all ?
@eldrago3140
@eldrago3140 2 жыл бұрын
how should I configure MySQL in case of multiple websites with different databases for each? Do I have to add multiple Heroku Remote Server PHP codes in config.inc.php? @ 12:54
@myst.youtube
@myst.youtube 3 жыл бұрын
Damn your so good :).
@doabledanny
@doabledanny 3 жыл бұрын
Thanks mate 👍
@myst.youtube
@myst.youtube 3 жыл бұрын
@@doabledanny i have a problem, connect failed, How im suppose to do? But I already did you what you say
@myst.youtube
@myst.youtube 3 жыл бұрын
Finally fix it :)
@konandev4278
@konandev4278 2 жыл бұрын
i don't have credit card, so what should i do?
@olivierboulanger1118
@olivierboulanger1118 2 жыл бұрын
Hello sorry to bother you, but at the end you modify the php files. Do you need to git add, commit and push and pull from heroku ? Thx a lot
@doabledanny
@doabledanny 2 жыл бұрын
Yeah I believe you'll need to push it
@olivierboulanger1118
@olivierboulanger1118 2 жыл бұрын
@@doabledanny Thx You're so kind to answer me. May I have another last one ? If I coonect my backend-heroku-php who contains several files like delete.php... I got an error server 500 ? Have you have an idea ? Have a nide day ! Thx again
@levycrols8044
@levycrols8044 2 жыл бұрын
is this outdated because for me it totally does not work the last part.
@juliusroxas4039
@juliusroxas4039 3 жыл бұрын
hello i am beginner for using heroku but i have a few question, why when i try to add on a clearDB in my app they need a requirement which is credit card but i dont have yet that then i watch your tutorial also then your tutorial is this year only please help me what can i do .. thank you for advancee..
@doabledanny
@doabledanny 3 жыл бұрын
Hi Juilius, I had already added my card before I made the video. Heroku requires you to enter card details to add the clearDB, even for the free tier :)
@warpmaster7
@warpmaster7 3 жыл бұрын
So a couple of questions. Do have to delete the pre-existing connection in our php app in replace of the heroku connection? Also I am getting an "undefined method 'rowcount'" and "undefined method'fetch'" I am a beginner at php so if you or anyone in the comment section could let me know what I'm doing wrong I would very much appreciate it :).
@doabledanny
@doabledanny 3 жыл бұрын
Yeah, you have to delete the existing connection and replace it with the Heroku connection. I'm not sure about the undefined methods tho!
@camilasalazarfigueroa9330
@camilasalazarfigueroa9330 2 жыл бұрын
how do i know wich branch i am using?
@jjabendan3332
@jjabendan3332 2 жыл бұрын
bro is there any way I can communicate with you? I really need your help, when i deploy my website error. Please reply i really need you :(
@devchauhan8715
@devchauhan8715 3 жыл бұрын
man i am not able to run the heroku login command from my vscode ? plsss plsss help
@debjeetdas9951
@debjeetdas9951 2 жыл бұрын
After configuring the database in phpmyadmin if I stop my phpmyadmin from xaamp will the herokuapp still get the access of the databases??
@doabledanny
@doabledanny 2 жыл бұрын
Phpmyadmin is only being used to configure the remote database. The Heroku app will be accessing the remote dB only, so yes you can stop xampp and it will work
@debjeetdas9951
@debjeetdas9951 2 жыл бұрын
@@doabledanny thankyou for replying ❤
@cash3517
@cash3517 3 жыл бұрын
Hi danny so i have multiple php files being deployed, my index.php redirects to my login page, but when the address shows its on login.php why does it say: Error: Connection error. No such file or directory I included it in the push so I have no idea how it isn't in the directory can you help?
@myst.youtube
@myst.youtube 3 жыл бұрын
Same error
@vamshichoula5871
@vamshichoula5871 2 жыл бұрын
error: src refspec main does not match any. Error was comming last step . Can you please explain why?
@azizabderrahim1335
@azizabderrahim1335 Жыл бұрын
You have to verify your branche main or master by the command: git show -ref
@korakbhakta202
@korakbhakta202 2 жыл бұрын
'$' is not recognized as an internal or external command, operable program or batch file. It is showing this error.
@rynanyr0879
@rynanyr0879 Жыл бұрын
i had the same error ..
@korakbhakta202
@korakbhakta202 Жыл бұрын
@@rynanyr0879 you have to install git bash first.
@maelstrom57
@maelstrom57 2 жыл бұрын
Thanks a lot, I've been able to deploy my project. However I have a big issue -- I can only access the home page. If I try going to any other location like /login, I get a 404 error even though everything worked fine in development. I've looked around for a solution but can't find one. I need to deploy this website for my web developer degree. If you could help, I'd appreciate it immensely.
@chandamaharjan6059
@chandamaharjan6059 2 жыл бұрын
I have the same problem. How do i fix it?
@gtry-bq5mw
@gtry-bq5mw 2 жыл бұрын
I'm having the same problem too, please help😣
@Joangelis
@Joangelis 2 жыл бұрын
Did anyone find a solution to this issue?
@Fenix72rus
@Fenix72rus 2 жыл бұрын
Any help?
@carolinening5394
@carolinening5394 2 жыл бұрын
I have the same issue and my reason is that I didn't successfully connected to the database. In my configuration, I used define('DB_HOST', 'localhost') for development, but I need to change it to define('DB_HOST', $cleardb_server) for production.
@dfordemo981
@dfordemo981 3 жыл бұрын
great
@doabledanny
@doabledanny 3 жыл бұрын
Thanks!
@jagadishhudgi1108
@jagadishhudgi1108 Жыл бұрын
Show me using spring boot
@walterdiaz6437
@walterdiaz6437 3 жыл бұрын
thanks man but this does not work with mysql (or at least it is not for free with myslq)
@doabledanny
@doabledanny 3 жыл бұрын
Heroku offer a free tier when adding a mySQL dB.
@sagiden1343
@sagiden1343 2 жыл бұрын
cool
@lacertezzadellapena
@lacertezzadellapena 2 жыл бұрын
Hi Danny, excellent tutorial and references. the only problem is point 13. when I need to connect to ClearDB it throws error on $cleardb_url = parse_url(getenv("CLEARDB_DATABASE_URL")); errror: syntax error, unexpected variable "$cleardb_url", expecting "function" or "const" Any help would be appreciated
@kakosnaki
@kakosnaki 2 жыл бұрын
You probably have an error on above line. Does your echo statement end with a semicolon.
@thienvu1377
@thienvu1377 2 жыл бұрын
I do not have credit card :(
@kacperkepinski4990
@kacperkepinski4990 Жыл бұрын
and doesnt work thanks
@NewToneMusicOfficial
@NewToneMusicOfficial 2 жыл бұрын
Boyka😀
@rebeccajames5242
@rebeccajames5242 3 жыл бұрын
Danny. After everything is done. Does it mean your MySQL Server must always be ON on your PC before the database can be use ?
@doabledanny
@doabledanny 3 жыл бұрын
No, the database will be in the cloud. Your local server is for development only.
@rebeccajames5242
@rebeccajames5242 3 жыл бұрын
@@doabledanny thanks bro I’ll follow your channel thanks. I’ll go through it I just download VScode for my MacBook.
Heroku Is Dead, Here's What I Recommend
11:59
Theo - t3․gg
Рет қаралды 258 М.
How to deploy Laravel web app on Heroku
20:05
Søren Spangsberg Jørgensen
Рет қаралды 23 М.
Oh No! My Doll Fell In The Dirt🤧💩
00:17
ToolTastic
Рет қаралды 11 МЛН
When you discover a family secret
00:59
im_siowei
Рет қаралды 24 МЛН
Люблю детей 💕💕💕🥰 #aminkavitaminka #aminokka #miminka #дети
00:24
Аминка Витаминка
Рет қаралды 662 М.
PHP Attributes 50 Minute Tutorial
50:12
Gary Clarke
Рет қаралды 9 М.
The BEEFY mini PC - Minisforum AtomMan G7 PT
12:40
ShortCircuit
Рет қаралды 192 М.
How to Upload PHP Website On Server with Database
14:31
OnlineITtuts Tutorials
Рет қаралды 274 М.
How to Deploy a Laravel App to Heroku with Database Setup?
12:12
Make your Dart Web Server accessible to everyone - Deployment with Heroku
13:46
Deploy MySQL Database to Heroku with ClearDB MySQL Add-on
20:08
Learn .NET MAUI - Full Course for Beginners | Build cross-platform apps in C#
4:08:53
Deploying Your PHP Code To Heroku
8:38
Codemy.com
Рет қаралды 63 М.