I have place moodle files: C:\xampp\htdocs\moodle, E:\moodledata and in mysql created database "moodle".I m getting this error message on the webpage when opening moodle
"Config table does not contain version, can not continue, sorry.
More information about this error
It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation."
Setting in config.php
<?php // Moodle configuration file
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '';
$CFG->prefix = 'lms_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => '',
'dbsocket' => '',
);
$CFG->wwwroot = 'http://'.$_SERVER['HTTP_HOST'].'/moodle';
$CFG->dataroot = 'E:\\moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
require_once(dirname(__FILE__) . '/lib/setup.php');
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
It looks like it got interrupted during install and now the database is incomplete. You can try two things: insert the missing version number into the config table, for example by using phpMyAdmin, or delete the database, create a new one and try to install again.
To insert the version number:
open the file version.php to find the version number.
in your database manager, go to the table mdl_config
insert a new record with the values: name='version' and value='the version number you looked up in the version.php file'
this can happen if the install process is not perfect.
You haven't told us the version or anything about the 'local server'
so we can not see the specifics of your problem.
check the release notes for the version you are using and make sure 100% that your server meets the requirements.
Related
I have just installed Moodle on my web-server. Everything was OK until I came to page where I saw this text: "This page should automatically redirect. If nothing is happening please use the continue link below. Continue."
When I click on Continue, the same page shows again. I deleted all data from moodledata folder (saw it on this site), but I have the same problem again and again. What can be a problem here and how to solve it?
Thank you in advance.
The first step to do is to enable debugging. I assume you can not access site administration anymore so you have to enable debugging in the config.php file. The file is located in /path/to/moodle/config.php (that means in the root folder of your Moodle installation).
The first lines should look like that in config.php. That means you have to add the 4 lines which are under $CFG = new stdClass();
<?php // Moodle configuration file
unset($CFG);
global $CFG;
$CFG = new stdClass();
#error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS!
#ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS!
$CFG->debug = (E_ALL | E_STRICT); // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!
$CFG->debugdisplay = 1; // NOT FOR PRODUCTION SERVERS!
After that open Moodle in your browser. A debug message will be displayed. Post the error message in order to get additional help so solve the problem.
I'm trying to first uninstall a package, then install the latest version of that same package. Simple you would think, but when I include the following code in my DSC configuration:
### remove old product setup
Package removeOldProduct {
Ensure = 'Absent'
Name = 'My Product Name'
Path = ""
ProductId = ""
}
### now install the latest product setup
Package productSetup {
Ensure = 'Present'
Name = 'My Product Name'
Path = "$productShare\Repository\product.msi"
ProductId = ""
Arguments = "ACCEPT_EULA=1 /q"
DependsOn = '[Package]MsSql'
}
While creating the .mof file, I receive the following error:
Test-ConflictingResources : A conflict was detected between resources '[Package]productSetup and '[Package]removeOldProduct in node 'myNodeServer'. Resources have identical key properties but there are
differences in the following non-key properties: 'Path;Ensure;Arguments'.
I don't want to use a Script resource to process my uninstall. What am I doing wrong here?
Your configuration is supposed to be idempotent, generally, so this doesn't make a lot of sense. You would be uninstalling and reinstalling the package every time the configuration is applied (every 30 minutes or whatever it's set to).
An MSI installer should support upgrading automatically, which means you would just ensure the installation of the (newer) MSI.
I try to convert odt-Files to doc-Files using OpenOffice. Installed Version is 3.1.1 and can't be changed at the moment. Perl Version is 5.18.
The Perl-module OpenOffice::UNO is used for this conversion. Unfortunately in newer Versions of OpenOffice/LibreOffice do not support Perl anymore.
The Script calls OpenOffice headless using xvfb.
Here is the code used:
`# Launch OpenOffice.org as a server
$ ooffice \
"-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager"
use OpenOffice::UNO;
# connect to the OpenOffice.org server
$uno = OpenOffice::UNO->new;
$cxt = $uno->createInitialComponentContext('file:///.../path/perluno');
$sm = $cxt->getServiceManager;
$resolver = $sm->createInstanceWithContext
("com.sun.star.bridge.UnoUrlResolver", $cxt);
$rsm = $resolver->resolve
("uno:socket,host=localhost,port=8100;urp;StarOffice.ServiceManager");
# get an instance of the Desktop service
$rc = $rsm->getPropertyValue("DefaultContext");
$desktop = $rsm->createInstanceWithContext("com.sun.star.frame.Desktop", $rc);
.....`
On the last included line to create $desktop i get following Error message:
terminate called after throwing an instance of 'com::sun::star::container::NoSuchElementException'
Is there any way to fix this problem? Tried to understand the Code of the UNO-interface, especially UNO.xs but there has not been any information about the call "createInstanceWithContext".
Looking through the OpenOffice-documentation does not provide any information about this either.
It would also help just to get the complete java error message, to make sure what element is missing.
The file "perluno" has the content:
[Bootstrap]
UNO_TYPES=/usr/lib64/openoffice.org//program/types.rdb
UNO_SERVICES=/usr/lib64/openoffice.org//program/services.rdb
I'm following this tutorial.
When I run php scripts/load.mysql.php it says:
SQLSTATE[42000] [1102] Incorrect database name '/home/tirengarfio/workspace/ZendFW/gaziende/application/../data/db/guestbook-dev.db'
So I just tried to change the line
resources.db.params.dbname = APPLICATION_PATH "/../data/db/guestbook-dev.db"
to
resources.db.params.dbname = "guestbook-dev" and created a new database called guestbook.
but I get another error about the "guestbook" is not a file, exactly:
PHP Warning: file_get_contents(/home/tirengarfio/workspace/ZendFW/gaziende/scripts/data.mysql.sql): failed to open stream: No such file or directory in /home/tirengarfio/workspace/ZendFW/gaziende/scripts/load.mysql.php on line 81
This is the code around the line 81 error (checkout what var_dump() returns):
// Check to see if we have a database file already
$options = $bootstrap->getOption('resources');
$dbFile = $options['db']['params']['dbname'];
if (file_exists($dbFile)) {
unlink($dbFile);
}
// this block executes the actual statements that were loaded from
// the schema file.
try {
$schemaSql = file_get_contents(dirname(__FILE__) . '/schema.mysql.sql');
// use the connection directly to load sql in batches
$dbAdapter->getConnection()->exec($schemaSql);
var_dump($dbFile);die(); // this returns "guestbook-dev"
chmod($dbFile, 0666);
So.. how should I set the name for the database connection exactly?
Note: the example of the tutorial is for Sqlite and I'm trying to use MySQL. Is that point? I never used Sqlite.
Regards
here are the basic application.ini settings for a Mysql db,
resources.db.adapter = "pdo_Mysql"
resources.db.params.username = "username"
resources.db.params.password = "password"
resources.db.params.dbname = "database name"
resources.db.params.charset = "utf8"
resources.db.isDefaultTableAdapter = true //optional but very helpful if you only have one db
Mysql Needs a little more info then SqlLite.
As far as populating the DB for this Tutorial I just took the easy way and copied the SQL into phpmyadmin.
Note:
If you've never used SqlLite before, this might be great chance to learn something new. This tutorial really doesn't need Mysql. :)
I have been trying to make it work for sometime now, but I can't. I am working on a Windows 7 64bits, I have the Memcached Server running as Service, I have the php_memcached.dll extension in the PHP 5.3.8 and when I call it on the app in Codeigniter I do it the right way (I Think).
$this->load->driver('cache', array('adapter' => 'memcached', 'backup' => 'file'));
var_dump($this->cache->memcached->is_supported());
die();
but it throws a false so I don't know what I am doing wrong. When I call it like this:
$this->load->driver('cache', array('adapter' => 'memcached', 'backup' => 'file'));
$data = $this->cache->memcached->get('data_' . $idData);
I get this PHP error:
Fatal error: Call to a member function get() on a non-object in E:\workspace\example\system\libraries\Cache\drivers\Cache_memcached.php on line 50
Thanks for the help :-)
The CI driver is looking for the Apache Module, but in WIN we use mostly the PHP-Class Memcache.
Try to change Line 165 in /system/libraries/Cache/drivers/Cache_memcached.php
$this->_memcached = new Memcached();
For me it works after changing from Memcached to Memcache.
$this->_memcached = new Memcache();
I know this is old, but I just came across the same issue.
On Windows, you should be using "Memcache" rather than "Memcached". To do this, follow the instructions on this page:
http://www.leonardaustin.com/technical/how-to-install-memcached-on-xampp-on-windows-7
Then, to get it working in CI, you'll need to make two small changes to \system\libraries\Cache\drivers\Cache_memcached.php:
In function is_supported(), replace:
if ( !extension_loaded('memcached'))
With:
if ( !extension_loaded('memcached') && !extension_loaded('memcache'))
And in function _setup_memcached(), replace:
$this->memcached = new Memcached();
With:
if(class_exists("Memcached"))
$this->_memcached = new Memcached();
else
$this->_memcached = new Memcache();