Hard Light Productions Forums
Off-Topic Discussion => General Discussion => Topic started by: Sandwich on March 28, 2005, 07:44:38 am
-
Would anybody have any ideas how I can get a typical USB thumb drive to work as a PHP/MySQL webserver, so I can take it in to another computer and load up a dynamic site in a browser? I have an inkling that it's impossible, but can't hurt to ask.
-
I am 99% sure its impossible....i thought of something similiar once.....but since you cant run server software on a thumb drive its impossible.
-
Unless of course you loaded the server software on the target machine, but is that probably defeats the purpose of what your trying to do...
-
A drive isn't a processor, you're only bet is getting a big drive, a Linux distro, and boot from the thumbdrive into a linux distro running all your stuff.
-
I guess it would require there being some sort of standalone Apache "program" that one could run that would map http://127.0.0.1/ to a folder.
-
I think the main issue is storage!=processing.
You need to process stuff to make it dynamic, therefore, you need software installed on some computer.
-
Hmm.... what are you trying to do, exactly? Dynamically generate content off of a USB drive and view it on a local PC?
(i.e. instead of from remote server, take it from a local server using the USB drive data?)
-
[color=66ff00]Looked into thumbdrive distro's a while back and their issues, you need to be careful with the application; thumbdrives have a limited read write life which certain applications can murder.
Offhand I can only remember featherlinux. You get a surprising amount of applications in one of those. Hmmm, Knoppix boots off a CD and might have what you need, they push everything under the sun into one of those ISO's. :nod:
[/color]
-
Originally posted by aldo_14
Hmm.... what are you trying to do, exactly? Dynamically generate content off of a USB drive and view it on a local PC?
(i.e. instead of from remote server, take it from a local server using the USB drive data?)
I have a prototype website I'm building in PHP with a MySQL database tie-in. I'd like to take it to the client's offices to show them, but they do not have any computers with Apache or the equivalent installed. And let's just say that for the sake of argument, I can't upload it anywhere.
-
Knoppix, or some other LiveCD.
It'll allow you to use the local RAM as RAM, saving your drive. You might still be safer of with a CD, though.
-
Originally posted by Sandwich
I have a prototype website I'm building in PHP with a MySQL database tie-in. I'd like to take it to the client's offices to show them, but they do not have any computers with Apache or the equivalent installed. And let's just say that for the sake of argument, I can't upload it anywhere.
Well, if you need to borrow use of a remote machine I can give you an MySQL and FTP account on my old freespaceserver (http://freespaceserver.cjb.net) that used to hold Game Warden.
-
The problem with Knoppix is that I need to configure the MySQL and PHP parts of the webserver, and that configuration is not saved on disc, but on HDD.
And I have access to plenty of webservers online that I could potentially use, I just was wondering if there was a USB drive way to accomplish the goal. Guess not, though.
-
Extract THIS (http://sourceforge.net/project/showfiles.php?group_id=53691&package_id=48193) onto your hard-drive, copy it to the 'thumb' drive.
Then (assuming you've got a driverless USB drive) you can just plug it into a port, open the drive, double-click Start.bat and "Start MySQL Server" on the subsequent admin page, and you're good to go with a fully functional PHP/MySQL/Apache setup running off the drive.
Lord knows how fast or how stable it'll be, but it'll work [in theory].
*waits to be banned again*
-
You'd be much better off asking on a Linux forum...
This sounds like something someone might have done, just for amusement. I don't think you'd be able to boot directly from the thumb drive (you'd need a floppy) but it should be possible to make a distro entirely on the thumb drive that does what you want (mounted read-only and using a ramdisk for all file writing needed) - and just have the boot loader on a floppy.
The question is whether or not that exists atm...
-
Originally posted by 1-Off
Extract THIS (http://sourceforge.net/project/showfiles.php?group_id=53691&package_id=48193) onto your hard-drive, copy it to the 'thumb' drive.
Then (assuming you've got a driverless USB drive) you can just plug it into a port, open the drive, double-click Start.bat and "Start MySQL Server" on the subsequent admin page, and you're good to go with a fully functional PHP/MySQL/Apache setup running off the drive.
Lord knows how fast or how stable it'll be, but it'll work [in theory].
*waits to be banned again*
an0n?? :wtf:
That project is precisely what I was looking for. :yes: It works beautifully - danke sheun! :)
-
WOW...I'm in awe!
-
See, I do have my non-destructive uses.
Incidentally, you didn't ban my IP, you banned the local subnet exchange thingy's IP - it's semi-transparent as a security precaution - which means you've banned a large part of North Eastern UK. Good going :yes:
-
So tell me then, why do you keep on doing things that get you banned?
-
Because of the 'Circle Jerk Effect'.
Whereby - being generally pussies - the collective asshattery of the Admin staff results in my innocuous jokes being taken as intentional slander.
From there it progresses into a group therapy session before Shrike comes along and goes "Christ! Just ban him, you bunch of little goddamn girls..."
In short: It's everbody's fault but my own.
-
It is an0n. I guess I was wrong in the other thread. Welcome back. (don't know for how long)
Whoa... post # 1337 :arr:
-
What 'other thread'?
-
the one where you posted something, then Rictor says "I wonder who that is" insinuating that it's you, and then I respond "It doesn't sound like an0n"
EDIT: "Land of the Free"
-
I was wondering why that model in the contest said an0n.
-
.................And they banned me!
Jesus ****ing Christ.....
-
Originally posted by 1-Off
From there it progresses into a group therapy session before Shrike comes along and goes "Christ! Just ban him, you bunch of little goddamn girls..."
I'd never say that.
I'd involve more swearing. :p
-
Considering I'm still under a ban, I thought it best not to aggrevate anyone by trying to **** with the censor.
-
I feel like turning it off again. I hate censors.
-
You could always make it replace the *'s with :mad:'s
-
I see the time thing is still ****ed.....
-
yeah we know that you hate but lets keep it as it is shall we..
-
Incidentally, you can fix the time thing through centralization of the referencing.
It's ****ing up now because it's using PHP's time() function, which is relative to the server.
To fix just the post times: Replace time() in the MySQL query with NOW() - which is a MySQL function - and it'll use the singular MySQL database server's clock instead of the multiple and relative dynamic server clocks.
Or as a better way, open up newreply.php and newthread.php in WordPad then Find/Replace all instances of time() with $time.
Then add something like:
$checker = file("http://whatever.com/time.php") or die(time());
if (str_len($checker)!=WHATEVER-IT-SHOULD-BE) {
$time = time();
} else {
$time = $checker;
}
....to the beginning of the global.php and make a file called time.php at whatever.com containing:
echo time();
That way all your references to time in whichever files you Find/Replaced the contents of would be synched to a central clock - namely the clock of the server upon which the time.php was stored.
Also, if it can't get time.php it defaults to the server's time(). If it gets it and it's too long (IE, an error message) it defaults to the server's time(). So if it's anything other than a time() output, it goes "**** it" and uses the server's time() instead.
-
Originally posted by Windrunner
yeah we know that you hate but lets keep it as it is shall we..
Why? We know what words are in the "*"s. Is there really a point to censorship of this nature? It's not truely protecting anyone from anything.
The logic of "FreeSpace is a teen rated game, thus the forums must be teen rated" isn't even being used here for the censorship.
-
Hows about "GameSpy are dicks"?
-
Originally posted by Ace
Why? We know what words are in the "*"s. Is there really a point to censorship of this nature? It's not truely protecting anyone from anything.
The logic of "FreeSpace is a teen rated game, thus the forums must be teen rated" isn't even being used here for the censorship.
The logic is that we'd rather not have to deal with any possible "my child saw this and that on your forums and is now swearing all over the place" accusations. Nothing more, nothing less.
And since you all know what the asterisks are replacing, then leaving them there isn't going to harm your ability to express yourselves, now is it?
So quit your ******* ******** already. :p
-
Anyone who gives a ****ing **** about my ****ing *****ing about ****ing anything needs to take a ****ing minute to ****ing step back and look at all the ****ing **** that ****ing happens in the ****ing world and understand there's more ****ing important **** to give a **** about.
*cough*
Sorry. I think excessive swearing is more amusing with the filter, though. :D
Although I had to edit in asterisks.... it's not a particularly strict filter, really - strange that 'b itch' but not **** is censored.
-
So....an0ns new account got deleted again?
-
All of them, yes. It's a game of will now, an0n's against the collective will of the Administrative staff here, as to who will give up first. It's not helping an0n's chances for being unbanned though.
-
Originally posted by aldo_14
I think excessive swearing is more amusing with the filter, though. :D