I want to use the CI cache driver but when I use $this->load->driver('cache'); in MY_Controller.php or a normal controller I get a server error page (500 error).
I am using CI 2.1.3
Any idea in how to fix it? What could be the problem?
Okay, apparently you need to load it $this->load->library('cache'); even though its a driver.
EDIT// Never mind it was all a mess because of a CI error, I am using the 3.0 Driver model now and it works.
Check your error logs.
Probably means your cache directory doesn't have sufficient permissions!
Related
I need some help installing Moodle v3.7.2.
I've passed all checks for server configuration during installation, except for the fact that the site is recognized as http instead of https, maybe because of the proxy that sits in front of the nginx serving Moodle. Anyway, when I try to load the first page, I receive a generic error:
$string['servererror'] = 'An error occurred whilst communicating with the server';
I've investigated the source code for this error, and found the motivation:
On path /moodle/lib/classes/session/manager.php, row 90, this check fails:
if (!self::$handler->start())
The start() method is simply calling a php function:
session_start();
That returns FALSE and throw the exception. Any idea on how to solve this? Many thanks.
EDIT: I've also tried storing sessions on database:
$CFG->session_handler_class = '\core\session\database';
$CFG->session_database_acquire_lock_timeout = 120;
But with no luck, now the function that fails is:
session_set_save_handler
I have run into the same issue when installing Moodle 3.8 on a Windows-Subsystem-for-Linux (WSL) based Debian development server. Adding the config to switch to database sessions fixed it for me:
$CFG->session_handler_class = '\core\session\database';
$CFG->session_database_acquire_lock_timeout = 120;
I'm thinking that the WSL permissions are problematic when the Moodle data directory falls outside the moodle vhost path, so Moodle cannot read/write properly to the sessions path (yet I do see session files being created). You must delete the browser cookies/restart your browser after setting sessions to the database.
This is more of a generic solution, but did you check your $CFG->wwwroot in your config.php file? It has to be something like 'https://your.site.com/'. If you forget the s Moodle won't be able to build a connection if you configured your Webserver / proxy to forward users to :443.
I ran in this problem quite often, when I configured SSL for our Moodle Server.
I have uploaded the project in the server, but when i go to the link of my site url.com/public/index.php i see this error HTTP ERROR 500.
I have make a clear to cache and same problem
Any suggestion to solve this problem? CAN I disable the putenv() in symfony?
after displaying error, i see this message :
Warning: putenv() has been disabled for security reasons in
/home/vol15_7/byethost8.com/b8_23863116/htdocs/vendor/symfony/dotenv/Dotenv.php
on line 130
The putenv function is forbidden on your server. Your hosting provider has certainly forbidden the usage of this function which is used by DotEnv component.
Try to use another method to set environment variable like described in Symfony documentation about server configuration.
For anyone struggling with this issue on some hosting without the possibility to enable dotenv.
Symfony provides a way to dump .env variables into a PHP file. This way it won't try to use dotenv at all.
All you need to do is to run composer dump-env prod
Source: https://symfony.com/doc/current/configuration.html#configuring-environment-variables-in-production
I have a problem, i moved my drupal site, and i can see all my sites working. But sometimes when i editing them it comes "Internal Server Error". I think there is something wrong with my htaccess or my webconfig. As someone told me IIS doesn't use htaccess, but than it uses web.config. The problem is it sometimes shows Error, sometimes not. So i think it has something to do with timeouts or something like that? Could that be?
I find out, what to do that the browser shows me the exact error:
It's this: "PHP Warning: session_start(): Trying to destroy uninitialized session in D:\Parallels\Plesk Panel\Vhosts\example.de\httpdocs\Intranet\includes\bootstrap.inc on line 1165
PHP Warning: session_start(): Failed to decode session object. Session has been destroyed in D:\Parallels\Plesk Panel\Vhosts\example.de\httpdocs\Intranet\includes\bootstrap.inc on line 1165"
Can you see something, where there is something wrong?
IIS doesn't use .htaccess files. It is a different beast altogether. It is unusual to run Drupal on Windows much less IIS, so you may not find much information. Luckily, Microsoft has their own Drupal distro that you can find at http://www.microsoft.com/web/drupal. You can use their distro as-is or as a template for configuring your own installation.
I am developing a site in php and I am using codeigniter as framework.
I removed database in $autoload['libraries'] from autoload.php. But it is showing error when i removed database credentials from database.php.
I don't understand the problem here.I must be able to load the site without a database connection. According to the documentation I just shouldn't load any database. But it is throwing an error. How to resolve this issue?
The error is:
Unable to connect to your database server using the provided settings.
Filename: C:\wamp\www\mlp\system\database\DB_driver.php
Line Number: 124
You may be calling database library by loading it somewhere in your script. by using $this->library->load('database') try removing that. ... ELSE ...Try to clear your browser cache... Refresh the project once... Restart apache(if it doesnt work even after the previous two).
If you removed database from autoload.php it is not possible to show the error message, if this message is showing you had used the library any of your controller.
I am using Mint 12,
I am trying to access to a symfony1 module in the browser and I get the next error message:
500 | Internal Server Error | Doctrine_Connection_Exception
PDO Connection Error: safe_mode/open_basedir prohibits opening /home/user/projects/sf/form/symfony/data/database.db
I was following this practical
http://www.symfony-project.org/jobeet/1_4/Doctrine/en/13
There is not much information in relation in google. I found this link but it doesnt explains how to solve the problem.
http://devzone.zend.com/597/sqlite-lean-mean-db-machine/
I tried setting safe_mode=On/Off in my php.ini file, but nothing happends.
I really do not know how to solve this problem. Any help would be nice.
As I know there is not a problem with the access to the database, its sqlite and other modules work without a problem in Symfony 1.4
Thank you very Much