OpenSprites / OpenSprites-Origin

The original OpenSprites website, written in PHP. Discontinued - remains for historical reasons. See OpenSprites-Next for the new generation of Scratch resource sharing.
MIT License
19 stars 9 forks source link

Locally Testing on Linux #53

Closed andrewjcole closed 9 years ago

andrewjcole commented 9 years ago

How can I locally test OS on Linux?

I can already test PHP itself from var/www using http://localhost. But whenever I import the OS repo, I get blank. Nothing. White. I also have to change permissions on everything, but even then, I still get blank.

Help?

jamesd-uk commented 9 years ago

Could you tell us some system info? Linux distro, etc? Is it just a simple HTTP server or did you get LAMP? (Linux, Apache, MySQL, PHP) Can you access it from another PC on pcname.lan?

andrewjcole commented 9 years ago

I'm using Elementary OS Luna All I did was this: aboutlinux.eu/how-to-run-php-on-ubuntu/

jamesd-uk commented 9 years ago

Looks like they are having issues with their own servers, because according to my computer: "Firefox can't find the server at www.aboutlinux.eu.". :P

pilppe commented 9 years ago

Why do you have to change permissions? On Ubuntu 14.10 i dont and i tested Xubuntu 14.10 too

andrewjcole commented 9 years ago

Yep. I had to change permissions on everything and still blank screen for everything.

towerofnix commented 9 years ago

I dunno, on OS X Mavericks and above, I can use the php command (that's what I've been using for testing my blog) but I don't know how to run it on Linux - perhaps a similar command?

jamesd-uk commented 9 years ago

I'm having a Linux machine arriving soon, so I can test it then.

The-QullzToxic commented 9 years ago

@The-Cheese-Eater is that a Pi2? :3

jamesd-uk commented 9 years ago

Nope, it's an old Fujitsu Siemens laptop. I got it yesterday, but it has less RAM than described on Ebay, so I may have to buy some more before I install a fully functional OS. It currently has OpenDOS on it.

pilppe commented 9 years ago

@The-Cheese-Eater Install Lubuntu on it, it uses LXDE and its very lightweight (even more lightweight than Xubuntu with XFCE) I would definitely recommend Lubuntu or some other lightweight distribution on a computer with <=1gb RAM, it really is a rocket like that. No joke. Lubuntu sometimes uses about 70-100MB RAM on normal usage and 40MB when its a fresh install without any programs opened, crazy isnt it? Youtube video of crazy low RAM usage Not forgetting LXDE actually looks fairly decent. You can trust the distro too, you get all the same programs as normal Ubuntu gets since its a flavor of Ubuntu. Also, you dont need to waste your system resources for anti-viruses since you can get no viruses on a Linux system (theoretically you can, but the biggest reason is using Windows programs with WINE and the virus comes to the wine c: drive

@andrewjcole Now, assuming you're using ElementaryOS since its based on Ubuntu it should work the same way And yeah, to fix this issue i did this: (use LAMP because WAMP sucks)

sudo apt-get install tasksel
sudo tasksel install lamp-server

after that go check out localhost.

if you want to edit /var/www/index.php etc. type this in your terminal:

sudo chown -R yourusername /var/www/ that makes you an owner
sudo chmod -R 755 /var/www/ now apache can edit it etc.

Also, if you want to use a soft link. Create a folder called "web" on your main directory and run this:

sudo ln -s /var/www/ ~/web/

And if anyone says the first method is a security problem, it isnt. And if you seriously think it as a bad method, you can use this "good" method... It sucks.

gksudo nautilus

a file browser WITH root (administrator) permissions will open, use that to copy the files.

And if you want phpmyadmin to test how your database works

sudo apt-get install phpmyadmin

Good luck!

Also, in my opinion Arch Linux is the best system for almost everything but gaming, (AUR is awesome), use this to setup LAMP on Arch. http://www.tecmint.com/install-lamp-in-arch-linux/

andrewjcole commented 9 years ago

Will try when I have the chance! Many thanks!

pilppe commented 9 years ago

Updated my comment, both cheese and andrew should check it.

jamesd-uk commented 9 years ago

Thanks, thats good advice! When I first checked the BIOs, it said there was 200+MB of RAM installed, when the listing was 500MB. >:( The laptop is for taking outside where I may get dirt in this one, so it's not crucial to have loads of power.

The-QullzToxic commented 9 years ago

Ah, the times you wish they did laptop skins xD

pilppe commented 9 years ago

What do you mean?

andrewjcole commented 9 years ago

I still didn't get to try this out yet, but I did find my Windows Vista notebook, so I can try on that if this doesn't work.

jamesd-uk commented 9 years ago

Ok, let us know.