General PHP/MySQL questions...

General PHP/MySQL questions...

by Marc Dastous -
Number of replies: 27

Martin et al., I'm not sure this would be the appropriate place to post this, but I think you all could answer this question becasue you know of the inner workings of Moodle. 

My hosting service has web directory size limitations.  I am limited to 1GB of storage or 25,000 files which ever comes first.

Now my questions. 

  1. I have been reading about using a DB to store images.  Would it be possible to store all user/admin uploaded files (ie. assignments) in the database?
  2. If it is possible, would it place too much of a demand on the mySQL server?
  3. If not, aside from purchasing a new domain (or limiting the number of online assignments), is there a way to reduce the number of files that are counted against my file count or space?

I feel that as I grow, this will become a SERIOUS issue.  I want to bring my school online with it's own Moodle site using this same host, but fear we would reach capacity quickly.

Marc

Average of ratings: -
In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Williams Castillo -
Hi,

In 1999 or so, I rented my first hosting service at hostway.com which, apart from behing extremelly expensive, has that kind of restrictions... My experience was that whatever I did, I was always dangerously close to the file limit... Thus, if you do install (as I did... by mistake) the front page extentions the things get even worst by the way it works.

Not to mention if you have any common webstats program running on the site (specially those that saves its data in static files).

My advise is to move as soon as you can.. There are MANY good options, including some quite cheap...

Good luck,
Will
In reply to Williams Castillo

Re: General PHP/MySQL questions...

by Marc Dastous -

Ok, that advise taken.  However, I have not found a hosting service that provides more than what I have for the price; $100 for 14 months of service.  This is what I get:

ydot.gif
Disk Space (Raid Storage) or 25,000 files
1,000 MB
ydot.gif
Data Transfer/Bandwidth
5 GB/ Day! (Not Month!)
ydot.gif
Call Toll Free
check2.gif
ydot.gif
POP3/IMAP Email & SMTP
650
ydot.gif
Catch-All Email/Email Forwarding
check2.gif
ydot.gif
New Domain Name/ Transfer*
FREE!
ydot.gif
10 FTP Users (Unlimited FTP Access)
check2.gif
ydot.gif
CGI-BIN, SSI, .htaccess, Cronjobs
check2.gif
ydot.gif
Web-Based Email (secure)
check2.gif
ydot.gif
OPS Control Panel
check2.gif
ydot.gif
Control Panel Web Users
25
ydot.gif
PHP4 w/ Zend Optimizer, Perl5, Sendmail
check2.gif
ydot.gif
FrontPage 98/2000/2002 Ext.
check2.gif
ydot.gif
Webstats, Raw Log Files
check2.gif
ydot.gif
Built in osCommerce (Shopping Cart)
FREE!
ydot.gif
Secure Socket Layer (Secure Server)
INCLUDED!
ydot.gif
24/7 Fast & Responsive Support
check2.gif
ydot.gif
Live Chat Support
check2.gif
ydot.gif
7 Days Telephone Support!
check2.gif
ydot.gif
DNS Control ( A record, Cnames, MX records)
check2.gif
ydot.gif
MySQL Database
INCLUDED!
ydot.gif
phpMyAdmin
check2.gif
ydot.gif
Flash, Shockwave, Midi, Mulitmedia Support
check2.gif
ydot.gif
No Forced Advertising or Links
check2.gif
ydot.gif
99.7% Uptime and Reliability
check2.gif

 tserverspecs.jpg
tallincluded.jpg
ydot.gif
Connected to 9 Backbone Providers (InterNap)
check2.gif
ydot.gif
Fully Redundant Network Connection
check2.gif
ydot.gif
Fast & Reliable UNIX FreeBSD Servers
check2.gif
ydot.gif
24/7/365 Network Monitoring System
check2.gif

If you have a service that can beat that, I would like to know.  As a teacher, on a limited budget, I am always looking to save a buck.

Marc

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Paul Wentholt -

hello Marc,

what's your hosting provider?
It's very cheap!

Paul

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Williams Castillo -
IMHO, that 1000MB of disk space or 25000 file entries restriction  is just b@#~$@€it. Your average file size should be 42K wich could be easily outsized by most pictures, documents, animations, etc that you could use...

Let's say that your average file size if 100K... Now your whole site should have up to 250 files. Say 50K.. 500 files.

Moodle itself has around 6000 files (although smaller in average).

However, I wouldn't  ask too much for 7 bucks a month but I wouln't look for a 7 bucks-a-month server to host a school-wide website either...

In the worst case scenario, my bets goes for a reseller account. Plenty of room to play and grow.

Not 7$/months but I'm sure that paying 15$-20$/month can be afforded for any average school. Not all of them, of course... I'm concious of that.
In reply to Williams Castillo

Re: General PHP/MySQL questions...

by Marc Dastous -

Well Will, I would agree, but.... this school district is one of those anomolies.  We have enough money to purchase BB 5.0, but won't install PHP to the web server so we don't have to use an external host.

Now my ignorance is going to show through... reseller account?

Marc

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Williams Castillo -
Basically, one account that allows you to re-sell web hosting services. I'm sure your w.h.p. has these packages.. If you need a lot of room, you can sell all the space to yourself! smile

The downside is that most of those servers are not optimized for moodle so you have to ask customer service for fine tunning... One thing that you wouldn't need to concern about in web hosting service like... moodle.com.

There's also another option though: A dedicated server... In this option, you are in charge (in theory) of one of your hosting provider's computer which means that you have to perform every administrative tasks on them, from installation (SO, modules, libraries, softwares, etc) to backups, including reboots when necessary. A lot of work

I hope it helps,
Will
In reply to Williams Castillo

Re: General PHP/MySQL questions...

by Timothy Takemoto -

I am trying to set up a dedicated "LAMP" (Linux, Apache, Mysql Php) server now. I have the linux, apache and ftp server running but php is still not moving at all, and I have not even managed to install mysql.

There are so many types of linux, apache, mysql and php (plus other modules) that the permutations are vast. I guess that a lot of them work but not the ones I have tried so far.

Tim

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Bryan Williams -

Mark,

I logged in to your Demo Course as a Guest to take a look around and noticed within various assignments that a student will create PDF files using PDFCreator.  I wonder if you know that, although a freebie, this program is very inefficient at creating PDF files. The file size you get with this utility is many times what it should be, compared to Adobe Acrobat.  I know you cannot control this, I only point it out because of the storage comments you have made regarding your ISP account. If your students are required to submit a number of PDF files, you may want to explore storage options outside of Moodle for these resources.

In reply to Bryan Williams

Re: General PHP/MySQL questions...

by Marc Dastous -

The only reason I am using PDFCreator is we can't afford Adobe Acrobat for the lab.  Not to mention, my students can't afford it for home. 

I realize the compression is not optimal, but in an effort to distiguish between work to be graded and using Moodle as a transport mechanism between home and school I chose PDFs.  If it's in the "Drop Box" as a PDF it gets graded, if it's in there as any other file type it doesn't.

Thank you for the input I really do appreciate the ability to share ideas in a forum like this.

Marc

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by W Page -

Hi!

I have been quietly watching this thread.

Consider using "OpenOffice v1.1" located at,
http://www.openoffice.org/

It has "PDF" creation built in.  You can also save files to "DOC" format automatically.

It is free and will probably generate much smaller PDF files.

WP1

In reply to W Page

Re: General PHP/MySQL questions...

by Bryan Williams -

Good suggestion!  I ran a test on a 32 page Word document with a few graphics that I opened in OpenOffice.org, under three conditions for creating a PDF.  Here's what the test showed: 

  1. Using Export as PDF on the File menu with medium setting created a PDF document that is 342k.
  2. Using Adobe Acrobat Distiller with similar compression setting as above created a PDF file that is 328k.
  3. Using PDFCreator print driver created a PDF file that is 550k.

Incidentally students can also open PowerPoint presentations and Excel spreadsheets within the OpenOffice.org applications, without loss of formatting, and then create their PDF's.  

In reply to W Page

Re: General PHP/MySQL questions...

by Marc Dastous -

I am using OpenOffice.org on my laptop and I love it, but....

Our school system mandates that we teach MS Office products.  When I suggested using OpenOffice.org I was essentially "slapped down" and told no.  This is why we are seeking outside hosting services, so that we don't have to deal with the narrow mindedness of the MIS staff.

Alas the trials and tribulations of working as an educator in America's public schools mixed

You know, I need to go back to my business roots and ask for forgiveness and not permission.  I'm installing OpenOffice.org in the morning and I am going to teach the kids how to use it evil.  Aye mate let's see what those MIS blokes do then black eye

Marc

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by W Page -

If you just talk to the kids and not anyone on the faculty, you probably will not get any hassle.  The kids will probaby get into using OpenOffice and have a lot of fun with it.  smile big grin

WP1

Attachment logonew.gif
In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Jacob Romeyn -
Sun  StarOffice also is free for schools  staff and students.  A slightly enhanced OpenOffice.approve
In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I used to work for a company that did image databases for the web and they had come to the conclusion that storing images in a db was not the way to go. Some of the reasons for this are to do with portability, as soon as you put binary files in a database you limit the number of different databases that you can use. As moodle was designed with portability in mind this is a strike against this approach.

You also loose the ability to easily manipulate the images. By keeping to the file system and simply generating the URL from the databas you can use standard file manipulating programs and perhaps nicest of all it doesn't really matter where the images reside. Thus we used to develop on a local machine but get the images from a machine on the other side of the country using a URL. This did mean that anyone who could formulate the images coudl retrieve them. I think we were one of the few outfits that were doing image databases of a non adult entertainment nature.

Marcus
In reply to Marcus Green

Re: General PHP/MySQL questions...

by Mark Smith -

Is it possible to restrict who could retrieve the pix if you use the URL approach?

Mark

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Przemyslaw Stencel -
is there a way to reduce the number of files that are counted against my file count or space?

You can delete the Moodle language packs and themes that you don't use. Especially languages - if you decide to keep only one, you will be able to delete more than 3000 files.
In reply to Przemyslaw Stencel

Re: General PHP/MySQL questions...

by Marc Dastous -

So if I want the site to be just in English, I can delete everything except for lang/en and lang/en_us?  Is this the case?

Will this also reduce the language options in the drop down menu automatically?

Marc

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Przemyslaw Stencel -
That's right (to both of your questions) smile
In reply to Przemyslaw Stencel

Re: General PHP/MySQL questions...

by Marc Dastous -

Thank you.  Removing phpBB and the language folders you mentioned I saved 5000 files and about 65 MB. 

I had already removed the FrontPage extensions yesterday.  That saved about 3000.

This should get me through to the end of the semester.

Marc

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Williams Castillo -
dunno if it is just too obvious but you can also delete all modules that you do not use (saving memory also!) and the CVS folders (created by the cvs client) if for any reason you have upload them to you production servers.

Glad to hear you're solving your problem.

Will
In reply to Williams Castillo

Re: General PHP/MySQL questions...

by Marc Dastous -

Thanks Will;

I don't use CVS, I haven't figured that out yet.

I have deleted the 2 modules I don't use, Attendance and Workshops, but I use everything else or plan on using them soon.

Talk about streamlining a web site.  You guys are cutting it to the bone.big grin

In reply to Marc Dastous

Re: General PHP/MySQL questions...

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
When Moodle 1.2 is released I'll look at packaging a Moodle-Lite which contains just the bare minimum.
In reply to Martin Dougiamas

Re: General PHP/MySQL questions...

by Charles Libby -

How do you get in on the beta testing.  Unfortunately I am using windows and have not figured out how to obtain a good CVS image from SourceForge.  Any Suggestions?