Issue Details (XML | Word | Printable)

Key: MDL-17419
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Petr Skoda
Reporter: Joseph Rézeau
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

cannot install 2.0 - openssl blocks installation

Created: 27/Nov/08 02:24 AM   Updated: 28/Nov/08 09:54 PM
Return to search
Component/s: Installation
Affects Version/s: 2.0
Fix Version/s: 2.0

Issue Links:
Duplicate
 

Participants: Joseph Rézeau, Petr Skoda and Samuli Karevaara
Security Level: None
Resolved date: 28/Nov/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
Just downloaded moodle 2.0 and trying to install on XAMP. I have done many moodle installs in the past without problems.
Getting this error blocking message:

Checking your environment ...
We are checking if the various components of your system meet the system requirements
Warning: require_once(HTML/QuickForm/DHTMLRulesTableless.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\moodle20\moodle\lib\formslib.php on line 26
Fatal error: require_once() [function.require]: Failed opening required 'HTML/QuickForm/DHTMLRulesTableless.php' (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\moodle20\moodle\lib\formslib.php on line 26

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda added a comment - 27/Nov/08 04:41 AM
workaround is to create config.php manually

Joseph Rézeau added a comment - 27/Nov/08 08:09 AM
Petr,
I CAN create config.php manually, no problem. But I expect this is just a temporary bug which will be solved so that "normal" installation of moodle 2.0 can work in the near future???
Joseph

Petr Skoda added a comment - 27/Nov/08 08:28 AM
Somebody has to review includes from environment checking code, I had a look and did not like what I saw there - I was afraid that I would end up rewriting it, I will work on this when I finish my current tasks...

Joseph Rézeau added a comment - 28/Nov/08 03:45 AM
Even after creating config.php by hand I am unable to install a fresh moodle 2.0. Installation stops and says weird things such as
"Database was successfully upgraded" immediately followed by "Error writing to database", click Continue seems to re-launch the install but it definitely dies out later on with a final "Error writing to database" message...
Looking forward to repair to this bug,
Joseph

Petr Skoda added a comment - 28/Nov/08 03:52 AM
I am missing the most important information - what database are you using?

Samuli Karevaara added a comment - 28/Nov/08 04:07 AM
Dupe of MDL-17405

Joseph Rézeau added a comment - 28/Nov/08 05:23 AM
using mySql

Petr Skoda added a comment - 28/Nov/08 05:52 AM
which one - mysqli or mysql?

Joseph Rézeau added a comment - 28/Nov/08 05:57 AM
mysql "normal"

Petr Skoda added a comment - 28/Nov/08 07:31 AM
could you please try to update from cvs? both issues should be fixed, but anyway I would strongly recommend to switch to new/better mysqli extension which I suppose is disabled on your server.

Joseph Rézeau added a comment - 28/Nov/08 08:19 AM
Just updated my whole moodle files 2.0 from cvs.
Now installation begins OK, the config file is created.
Install begins to created the tables but invariably stops before it has finished with "Error writing to database" message(s) and finally dies. I am despairing to install moodle 2.0 on my machine...

About mysqli,the problem is that I already have several moodles (and other php/mysql software) installed on my local machine. If I switch to mysqli will it cause problems to those other moodles and software???
Joseph


Petr Skoda added a comment - 28/Nov/08 08:43 AM
no it will not break other sites

Petr Skoda added a comment - 28/Nov/08 08:46 AM
retested all three options:
mysql/adodb
mysqli/adodb
mysqli/natice

and all of them install fine for me

what mysql and PHP version do you have?


Joseph Rézeau added a comment - 28/Nov/08 07:24 PM
Petr > retested all three options:
mysql/adodb
mysqli/adodb
mysqli/natice

What does that mean? Where are those options available???

Joseph Rézeau added a comment - 28/Nov/08 07:25 PM
Info
Local machine, with Windows XP
using the XAMP installation package provided by Moodle:
PHP Version 5.2.5
mysql Client API version 5.0.51a
mysqli
MysqlI Support enabled
Client API library version 5.0.51a
Client API header version 5.0.45
MYSQLI_SOCKET /tmp/mysql.sock
Directive Local Value Master Value
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.reconnect Off Off

Scenario: can't install moodle 2.0
Install goes well with: creating config.ini; server checks; etc.
Setting up database.
When creating tables in the database, installation stops here with error message:

SELECT name FROM mdl_config WHERE name = ? --LIMIT -1, 1 [array ( 0 => 'enablecompletion', )] INSERT INTO mdl_config (name,value) VALUES(?,?) [array ( 'name' => 'enablecompletion', 'value' => '0', )]

Database was successfully upgraded
Error writing to database

If I click Continue, installation continues with module tables, plugins, etc.
Database was successfully upgraded
Backup version is now 2008111700
Blocks, block tables
paypal tables have been set up correctly
just after that (paypal tables); installation stops for good with Error writing to database message.


Petr Skoda added a comment - 28/Nov/08 07:32 PM
could you please try to add following into config.php? it might display more errors

@error_reporting(1023);
@ini_set('display_errors', '1');
$CFG->debug = 38911;
$CFG->debugdisplay = true;


Petr Skoda added a comment - 28/Nov/08 07:33 PM
aaah, I think I can see one problem in info above, looking at code

Joseph Rézeau added a comment - 28/Nov/08 07:39 PM
After adding the error_reporting & debugging lines listed in your previous comment, I get this new info:

SELECT name FROM mdl_config WHERE name = ? --LIMIT -1, 1 [array ( 0 => 'enablecompletion', )] INSERT INTO mdl_config (name,value) VALUES(?,?) [array ( 'name' => 'enablecompletion', 'value' => '0', )]
Database was successfully upgraded

Warning: openssl_csr_sign() [function.openssl-csr-sign]: cannot get CSR from parameter 1 in C:\Program Files\xampp\htdocs\moodle20\moodle\mnet\lib.php on line 395

Warning: openssl_x509_export() [function.openssl-x509-export]: cannot get cert from parameter 1 in C:\Program Files\xampp\htdocs\moodle20\moodle\mnet\lib.php on line 399

Warning: openssl_x509_free() expects parameter 1 to be resource, boolean given in C:\Program Files\xampp\htdocs\moodle20\moodle\mnet\lib.php on line 400

Warning: openssl_pkey_export() [function.openssl-pkey-export]: cannot get key from parameter 1 in C:\Program Files\xampp\htdocs\moodle20\moodle\mnet\lib.php on line 404

Warning: openssl_pkey_free() expects parameter 1 to be resource, boolean given in C:\Program Files\xampp\htdocs\moodle20\moodle\mnet\lib.php on line 405

Error writing to database


Petr Skoda added a comment - 28/Nov/08 07:53 PM
eh, looks like a windows specific BUG - I can reproduce that now,
works fine in linux

Petr Skoda added a comment - 28/Nov/08 07:53 PM
workaround is to disable openssl extension in PHP.ini

Joseph Rézeau added a comment - 28/Nov/08 08:13 PM
Petr ?koda - 28/Nov/08 07:53 PM eh, looks like a windows specific BUG - I can reproduce that now, works fine in linux
Window specific bugs? Never heard of them

Petr ?koda - 28/Nov/08 07:53 PM
workaround is to disable openssl extension in PHP.ini

Yes, I disabled ;extension=php_openssl.dll and now at long last ... I CAN install Moodle 2.0.

Thanks Petr for your patience and your help!

Joseph


Petr Skoda added a comment - 28/Nov/08 09:54 PM
openssl should fail properly if not configured now and should not block install