Attempt 1) I totally dorked up my MBL. I managed get the UI working again and restored it to factory default. Wphew…
Attempt 2) Ask you for help devising a solid plan of what steps I should take to accomplish the following so I don't mess it up again:
- I want to use it for it's normal purpose of backing up my laptop files
- I want to be able to store all of my photos in the "Public —> Shared Photos" directory and then build my own photo gallery using php, php GD support, jquery and mySQL. I'm fine with the coding part, but as you'll see very confused about the setup and configuration part.
- I want to have a way (php webpage or ftp) where I can upload pictures outside my network into the "Public —> Shared Photos" directory of the MBL
Please help me with this plan (rearrange steps, answer questions, add/delete steps). I know I'm asking a ton of questions but any holes you can help fill in are much appreciated!
1) I've enabled ssh and logged into putty
2) Is it necessary to create a backup image before I start messing around? I have yet to put any data on my drive so I'm not concerned about losing my files. Or is it fine (if I mess something up) to just re-load firmware and restore to factory defaults again like I did in attempt#1?
3) It sounds like my next step should be to run 'apt-get update'
4) Then I should install optware
5) Then install nano
6) PHP installation or upgrade? Is this necessary?
_a) Does the MBL come already installed with php? I entered "php -v" and got back "PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 (cli)" So I assume this means I already have php 5.2.6 installed, correct? Is there any need for me to upgrade to do what I described above? There are multiple forums here describing difficulties resulting from upgrading php so I'm hesitant.
_b) If I need to install or upgrade php, is it best I do it through optware or apt-get or aptitude?
7) PHP GD installation. Is it best I do it through optware or apt-get or aptitude?
8) mySQL installation. Is it best I do it through optware or apt-get or aptitude?
_a) Do I need to do a separate install for a mySQL client or something like that? Or can I do it all through command line?
9) I'm very cloudy on whether I need to install some kind of webserver like lighttpd. Or is this step not necessary (do I already have what I need?) Do I need to use FastCGI for anything?
_a) What all do I need to configure to make php work with mySQL work with the "Public —> Shared Photos" directory on the MBL and with the [possibly unnecessary] lighttpd? web server?
_b) Do I need to worry about https? Based on what I want to do, can all my php code run off http? Or is it better I figure out how to set up https?
_c) Do I need to set up port forwarding? Is this just on my router admin or do I need to do something in putty too?
11) Make my website
_a) Where do I need to place my php pages inside the MBL and then what would be the corresponding URL? http[s]://externalIP:port?/path?
_b) Anything in particular I need to know about creating a connection string to the mySQL database from the php code?
12) Can I manage permissions through php passwords or do I need to set something up on the server?
13) For the out-of-network uploading of pictures, would it be better to just do this through ftp or have a php upload page? I'm wondering if there are security risks with the latter.
14) Anything else?
- Side note: Attempt #1 used accessbook + webserver from h ttp:highlevelbits.free.fr. I was able to get the port forwarding working and could access php pages from h ttps:externalIP. But when I tried to install GD support I started running into tons of dependency issues and then eventually trashed my MBL trying to get it to work. It also seemed really buggy and I don't really like all the other stuff it comes with (the feature pack manager, its own UI, etc) so I thought for attempt #2 I'd try to do a cleaner install and not use a prepared package.