|
Gypsy Boy
Redeemer
Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 4 months, 23 days
|
Please help me get my PHP and MySQL project going
#24990542 - 02/13/18 03:26 AM (6 years, 1 month ago) |
|
|
I just installed Oracle virtual box and bitnami lampstack package
I have no problems lunching LAMP virtual box. I get a log in screen where i log in : bitnami my user name, i see a black Oracle VM Virtual Box window... but where do i go from here??
I got a good book on PHP and MySQL here (PHP and MySQL for dynamic websites by Larry Ullman) how do i start writing code in PHP ?
I am making a web app similar to a forum. I gotta find out how to get the ball rolling somehow.
Edited by Gypsy Boy (02/13/18 06:32 AM)
|
Gypsy Boy
Redeemer
Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 4 months, 23 days
|
Re: Please help me get my PHP and MySQL project going [Re: Gypsy Boy]
#24990706 - 02/13/18 06:49 AM (6 years, 1 month ago) |
|
|
It says
Quote:
Step 1. Deploy your PHP application. The main directory to deploy your PHP application is /opt/bitnami/apache2/htdocs. You can copy your PHP application files to that directory and access the application via your browser.
Where is that directory?
What files do i put in there?
How do i compile it so i can view this in the browser?
|
Gypsy Boy
Redeemer
Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 4 months, 23 days
|
Re: Please help me get my PHP and MySQL project going [Re: Gypsy Boy]
#24990784 - 02/13/18 08:01 AM (6 years, 1 month ago) |
|
|
Now i got another problem
When i try to access PHPMyAdmin it gives me a address I type in the address and instead of php admin i get this:
Quote:
Awesome! WordPress is now installed.
Access WordPress You just installed WordPress using Bitnami - the fastest, easiest and most secure way to deploy your favorite app.
Bitnami WordPress Stack Visit the Bitnami WordPress documentation page for more information on managing your installation. Find answers to common questions or pose a new question on our community forum. Thanks for using Bitnami!
|
Ythan
ᕕ( ᐛ )ᕗ
Registered: 08/08/97
Posts: 18,817
Loc: NY/MA/VT Borderlands
Last seen: 51 minutes, 12 seconds
|
Re: Please help me get my PHP and MySQL project going [Re: Gypsy Boy] 1
#24991238 - 02/13/18 12:10 PM (6 years, 1 month ago) |
|
|
I haven't used Bitnami's LAMP Stack but I can try to help. Did you intend to install WordPress or was that just part of the bundle and you aren't going to use it?
Anyway it sounds like /opt/bitnami/apache2/htdocs is the root folder for your web server. You should be able to type:
Code:
cd /opt/bitnami/apache2/htdocs
which will change to that directory, and
Code:
ls
will list the files it contains. If you put a file there, it should become accessible from your website. You don't need to compile anything, if you put a valid PHP file in that folder and access it from a web browser, it should be executed and the output will be displayed. You could try making a file called "test.php" with this:
Code:
<?php echo "Hello! You just ran {$_SERVER['SCRIPT_NAME']} and it is currently ".date('r').".\n"; ?>
Then try loading it from http://your.vm.ip.address/test.php and see if it works. If you are prompted to download a file, or if you just see the source code without an actual script name or date stamp, that's a problem which will need to be fixed. But I suspect it will just work.
For security purposes, it looks like they set up phpMyAdmin to only accept connections from 127.0.0.1, ie. the machine which is hosting the website. In theory you could install a graphical shell for Debian in your virtual machine, and load up a web browser and just go straight to http://localhost/phpmyadmin from within the virtual machine and it should work as expected. But, I don't recommend installing all that stuff on a server box, the recommended way to do it would be with an SSH tunnel as explained here. It can be a little confusing but the instructions are very clear so I'd give that a try first and see if you run into any problems.
|
Gypsy Boy
Redeemer
Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 4 months, 23 days
|
Re: Please help me get my PHP and MySQL project going [Re: Ythan]
#24993798 - 02/14/18 12:20 PM (6 years, 1 month ago) |
|
|
1. Thank you very much for tying to help
2. This is why I say learning in university is so much better than learning on your own. Here, learning on your own, is very frustrating. In uni you have everything prepared for you, and if any issues arise you ask your tutor and problem solved straight away.
3. I was under impression theres only one LAMP, somebody sent me a link to the bitnami so I thought id go with it. As for wordpress, for some reason bitnamis website told me to download it.
Quote:
put a file there, it should become accessible from your website.
HOW do I put file in there?
See the attached gif, I tried several times but couldn’t copy test.php you gave me.
Please dude, i appreciate your help, I know I sound like a noob, I have tons of coding experience with C++ but when it comes to web programming I know very little.
Edited by Gypsy Boy (02/14/18 12:30 PM)
|
Gypsy Boy
Redeemer
Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 4 months, 23 days
|
Re: Please help me get my PHP and MySQL project going [Re: Gypsy Boy]
#24993906 - 02/14/18 01:01 PM (6 years, 1 month ago) |
|
|
Just found something interesting
Quote:
The three come bundled together, referred to as either the WAMP, MAMP or LAMP according to whether you are installing them on Windows (W), a Mac (M), or Linux (L).
Does it mean since i am on windows i should use WAMP??
|
Gypsy Boy
Redeemer
Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 4 months, 23 days
|
Re: Please help me get my PHP and MySQL project going [Re: Gypsy Boy] 1
#24993970 - 02/14/18 01:37 PM (6 years, 1 month ago) |
|
|
Just downloaded and installed WAMP...................
Forget LAMP!! NOW we in business !!
I can see with WAMP server you have a "www" directory in windows that you can copy files into. I put that test.php in there but how do i run it?
Theres no IP address, theres just a "http://localhost/"
Edited by Gypsy Boy (02/14/18 05:16 PM)
|
Gypsy Boy
Redeemer
Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 4 months, 23 days
|
Re: Please help me get my PHP and MySQL project going [Re: Gypsy Boy]
#24993973 - 02/14/18 01:38 PM (6 years, 1 month ago) |
|
|
I got it i got it!!!
Type:
http://localhost/test.php
Woooo hooo!!! It works!!!
|
Gypsy Boy
Redeemer
Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 4 months, 23 days
|
Re: Please help me get my PHP and MySQL project going [Re: Gypsy Boy]
#24996223 - 02/15/18 11:00 AM (6 years, 1 month ago) |
|
|
I had a look at webhosts
It looks like I'll be doing my coding under windows in WAMP. Does it mean I should use a Linux host or windows one?
Linux seem to offer PHP and mySQL where's windows hosting is more ASP.NET and MSSQL
There, I seem to have answered my question myself
Edited by Gypsy Boy (02/15/18 11:18 AM)
|
DualWieldRake
Stranger
Registered: 07/17/16
Posts: 1,115
Loc: Zone 8b
|
Re: Please help me get my PHP and MySQL project going [Re: Gypsy Boy]
#25004825 - 02/19/18 01:29 AM (6 years, 1 month ago) |
|
|
I used both windows and linux hosts for projects i develop on a windows machine. Either works
|
|