I have a moodle database which I exported a few months ago before our server went down. Now I want to generate reports from my old database, I have tried to import to new moodle site but moodledata folder is missing. So now I'm looking for another way to generate reports from my database. I have tried to make Msql queries but I think that would take a lot of time for now. I need help if there is any tool around which I can use or any API which I can use to generate reports from my database. I have tried to use Seal Report to tackle this issue but I have found that there is a lot of manual work to be done, I don't means this tool can't do that but I'm just looking if there is any other tool which can simplify my task.
NB: I know some will say this is not a programming question, Please feel free to suggest any best way to query using any language.
You should be able to set up a local copy of a Moodle site with a copy of the database and with a blank Moodle data folder (I've done this regularly in order to investigate issues on a customer's site).
Once you've done that, you will have access to any reporting tools you would normally have inside Moodle.
You may find it easiest to set up a fresh install of Moodle, pointed at a blank database, then, once the install is finished, edit the config.php file to point at the restored copy of the original site. You may have to purge caches (php admin/cli/purge_caches.php) and you may have to reset the admin password (php admin/cli/reset_password.php). It is also wise to turn off email (edit config.php and add $CFG->noemailever = true; ).
So I will start from the beginning, I took it upon myself to start a forum as one I used to visit daily disappeared, I wanted to keep in touch with the regulars, that was the basic premise behind doing the forum, I had hosting for a personal website, I figured it would be easy to add it to my hosting, which had worked fine for many years, given all it was doing was running a series of WordPress sites over the years.
I assumed it would be fine hosting a small forum, how wrong I was, my first issue was installing the forum, first choice was phpbb, that wouldn't install, after 5 tried and fruitless talks with their "tech department", I gave up on phpbb, I tried vanilla forums and one other, neither worked, someone recommended punbb, lightweight and simple.
I gave it a try, got further with it, I got to the part where you choose your db type, sql failed many times, so I settled on sqlite, it worked, forum install and I was up and running, for a few days/1 week it went pretty smooth, then I had connection errors, "this page cannot be displayed" etc, I can't remember them all, someone smarter than I suggested some proper hosting, something dedicated to this forum, so I went looking, read a few tutorials, all spoke of backing up the database, before moving, thiw is where I ran into my first big issue, I had a cloned forum installed[or so I thought] on my PC, went to back up my db and found it to be a little small, under 100kb.
I downloaded it anyway, imported it using phpmyadmin running on wampserver, it seemed to import fine, I soon realised none of my users were there, none of th eposts, nothing was, so I researched what I may have done wrong, watched many a youtube video on how to export a db using phpmyadmin with tables etc, I followed at leas 5 separate vidoes, none seemed to work, I folded and spoke to my hosts online chat, asked them to backup the db for me, they did with the exact same result, a sub 100kb sql file lacking any tables or only a few, it varied, I had them do this 3 times I think.
So I gave up for a week I think, I was stressed, I didn't get anywhere, in this time I spoke to a few people, I got a few suggestions, the most promising is that somehow my installed forum is writing/reading data from a database that isn't under my control, this seemed to be the most logical, as the forum works, but the 2 databases I see in MySQL under my control panel, desck4 I think it's called, iPage is the host I use just FYI, are either empty [the one I specified during the install of punbb] or the one I assume was created by pubb[for unknown reasons] which shows some basic info, but nothing after my initial setup, something which I don't understand is how is the forum running, if it's not writing data to either f these databases then it shouldn't function, right, so this theory makes sense, as it needs a db to work, I don't understand how it happened, but it makes sense, even to me, a complete dummy where this this stuff is concerned.
tldr; I have a forum, I can't backup db, I am confused, as are many I have asked for help, I don't know what's happening, I don't know what to ask my host for, they don't understand what I am asking, they are of no use until I can be specific in what I ask for, I came here seeking help from the massive knowledge base that is Stack Overflow.
So anything will be of help, how do I ask for help, can anyone explain in plain English for me and the host, I really want to do this myself, but it is so far beyond my current understanding.
Obviously this is in the too hard basket, I can't explain it, and so no one can actually get at what I want to do, so I won't even try and explaining it to the host, i've moved to a new host, everything is fine and dandy, sorry for not posting right, I saw how I was supposed to do it, but it made no sense to me, I am used to a more open kind of discussion.
TLDR; Issue ignored, I'm done with it.
Me and my friend are in different countries have been developing a LAMP web app for several weeks. All these times we have been sharing source code over ftp. In this way php files become messy. I have heard about CVS, and have been reading about it. But I still cannot figure out how it works exactly.
How does the CVS could help me in this matter ?
I would be much appreciated for someone who point me in the right direction.
Ok here comes a very simple explanation of VCS. After using it for a while you'll laugh at the explanation but for now I guess this should help you.
What are the problems of your current ftp file sharing?
If 2 people upload the same file one of the files will get overwritten
After uploading it you'll only see who changed the file (the last time) but not where it got changed
You can't provide information about the changes (despite putting comments in the files itself)
You can't go back in time, once uploaded old files are lost
With version control you can solve these problems:
Files get either merged into one new file, or get overwritten but the old file will still be stored to roll back if needed
You can see who made which changes when
You can provide comments when you "upload" your files about what got changed (without storing these comments inside files)
You can always go back in time and restore old "uploads"/changes
You can also create small side projects by branching. This basically let's you split your project in smaller pieces and work on them separately.
So at the beginning of your work you usually get your local sources up-to-date by getting all the changes that got made. Then you do your work and afterwards you update the online version with your changes so that other developers can pull these changes and continue to work on them or integrate these changes into their current changes.
How to implement this sorcery?
You could google for "how to implement git" or "how to implement svn" but I would recommend you to use an online service as a beginner. Here is a list of services: https://git.wiki.kernel.org/index.php/GitHosting
My personal preference for closed source projects with a low number of developers is https://bitbucket.org/. You get a small wiki page and bug tracking tool provided with some of the services. If you want to use bitbucket, here is the very easy to understand documentation: https://confluence.atlassian.com/display/BITBUCKET/Bitbucket+101
Important to know:
Soon you'll learn that you don't upload files as I've written multiple times but rather change lines of code. You also don't upload them you "commit" them.
While cvs could help, not many developers will recommend using it for new projects. It has largely been replaced with Subversion (svn), but even that is falling out of favour. Many projects these days use distributed version control with git or Mercurial (hg).
A good introduction to git can be found in the free online book Pro Git.
In any case, these things are all version control systems. They help to synchronize the code between developers, and also let you track
who changed code,
when it was changed,
why it was changed, and
how it was changed.
This is very important on projects with multiple developers, but there is value in using such a system even when working on your own.
I am developing an application in the Kohana PHP framework that assesses performance. The end result of the process is a webpage listing the overall scoring and a color coded list of divs and results.
The original idea was to have the option to save this as a non-editable PDF file and email the user. After further research I have found this to be non as straight forward as I hoped.
The best solution seemed to be installing the unix application wkhtmltopdf but as the destination is shared hosting I am unable to install this on the server.
My question is, what's the best option to save a non editable review of the assessment to the user?
Thank you for help with this.
I guess the only way to generate a snapshot, or review how you call it, is by storing it on the server side and only grant access via a read only protocol. So basically by offering it as a 'web page'.
Still everyone can save and modify the markup. But that is the case for every file you generate, regardless of the type of file. Ok, maybe except DRM infected files. But you don't want to do that, trust me.
Oh, and you could also print the files. Printouts are pretty hard to be edited. Though even that is not impossible...
I found a PHP version that is pre-built as a Kohana Module - github.com/ryross/pdfview
I have an old joomla installation which was hacked. All I know for now only index.php was changed and they messed with my user accounts. I downloaded index.php from the current version but at one point it calls $app->dispatch(); which requires a component name parameter in my version. Does anyone know what parameter this should be? I tried: null, 'home', 'application',...
Also I'm planning on updating to the newest version later, however I can't seem to find my current version number. I found somewhere that it is displayed in the admin pages but I can't access them yet. Can I find it in the code files somewhere?
EDIT: The index.php from version 1.5.22 worked. Apparently the correct version was 1.5.3. Does anyone know what else I should check that might have been hacked/messed with?
Why not get a copy of the version you used?
http://forum.joomla.org/viewtopic.php?p=2221953
You can go to the joomla project on
joomlacode.org, then select the search
tab. From there you type in "1.0.10"
and select Releases to search in. You
should get some results. Click on the
one you are searching for, the files
can be found on the files tab, this
time the tab is on a blue bar (more to
the bottom of the screen).
Although I'd recommend upgrading completely, to stop being re-hacked again.
====== Answer to second question
How big is the site? Usually if it's just a link spamming attack a quick once over will suffice.
The next issue is that you need to patch the hole that caused the problem, in this case upgrading to the latest Joomla (1.6 - I believe) is the first port of call.
Have you modifed the Joomla system in such a way that the hack could have been opened up by you?
My advice, reset the admin passwords and upgrade Joomla.
Very difficult to say anything else without seeing what the "hack" was.
I had to clean out a hacked Joomla install recently. My tip is to grep all the files base64_decode: some hacks consist of decoding a huge string that emits php.
find ./ | xargs grep base64_decode
The hack looked like this: error_reporting(0);eval(base64_decode('JGxMOXdGMWFZNHpY.....
This particular piece of code detected googlebot and other crawlers, and then emitted a list of spam links heavy on viagra. If a normal user agent string was used it showed a normal site. I had to use a firefox extension that changes the user agent to debug this.
The next step would be getting rid of the exploit and then either patching Joomla and waiting for the next exploit or switching to something more secure, like static html or a well-maintained CMS.
Fortunately Joomla has really nice documentation on how to recover from a hack. http://docs.joomla.org/Security_Checklist_7. As Pino mentioned, it is critical that you are always on the latest version to minimize your exposure to security exploits.