RedisException when installing SilverStripe - php

I've installed SilverStripe using composer but when I try and access the site I get:
Fatal error: Uncaught exception 'RedisException' with message
'Connection closed' in
/var/www/silverstripe_test/framework/dev/install/install.php5 on line
31 RedisException: Connection closed in
/var/www/silverstripe_test/framework/dev/install/install.php5 on line
31
The error seems to occur when session_start() is called but I'm not sure why?

It sounds like your instance of PHP is set up to use Redis for sessions. Have a look in php.ini and, if present, change "session.save_handler = redis" to "session.save_handler = files". If you're using Apache you can also add "php_value session.save_handler redis" to .htaccess.

Related

PHP Fatal error: Class 'IntlDateFormatter' not found in

I recently transferred my magento website from an old server to a new one, and when I opened the home page, it gives me Internal Server Error 500. In the server error log, i can see the following error:
PHP Fatal error: Class 'IntlDateFormatter' not found in /home/evonengc/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93
How can I solve this error?
go to php.ini and enable the extension
;extension=php_intl.dll
to
extension=php_intl.dll
and restart Apache

Repo not working in localhost using laravel

I am new to this but I am trying to view a repository through localhost and I am receiving this php error in the mamp log:
PHP Warning: require ..... failed to open stream: No such file or directory in .......autoload_real.php on line 58
PHP Fatal error: require(): Failed opening required
....autoload_real.php on line 58
On Line 58 is the following:
function composerRequireec02cd7cea0c14cd8638fe929f5e7e81($file)
{
require $file;
}
I think it might have something to do with the laravel version but i'm not sure. The other thing is that when I try to see errors in the laravel log there is no log in app/storage
First give the read permission to storage and bootstrap directory in your laravel project and then reload your laravel project in browser.
It seems to work now after doing composer-dump autoload then a composer update, although I was looking for more of a global answer as to why this might be happening (i.e. outdated laravel version etc.). But thanks everyone!

Fatal error: Call to undefined function printer_open()

I'm trying to print some string using PHP, i'm using the PHP print functions:
$printer = ("HP LaserJet Professional P1102");
$handler= printer_open($printer);
$content="Test Content";
printer_write($handler, $content);
printer_close($handler);
but I got that error :
Fatal error: Call to undefined function printer_open() in C:\xampp\htdocs\print.php on line 12
after googling it i found that i must add the php_printer.dll to the extensions file in php and add it's extension to the php.ini file, then restarting the server services, all of that accomplished but still getting that error.
p.s. I've tried it on WAMP and XAMPP
I think solution would be extension location.php_printer extension should be stored in c:\xampp\php\ext and not in c:\xampp\php. So move it to the ext-folder, and restart Apache.
Can you look into the error_log, which tells you, if it fails to load the module. You should also run a phpinfo(), which shows up all loaded modules, you must find the printer extensions there.
I hope it may resolve your issue.

Failed to create COM object `WScript.shell': CoInitialize has not been called

At sometime today, this error occurred and the script hanged:
[21-Aug-2013 08:35:06] PHP Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `WScript.shell': CoInitialize has not been called.
' in C:\path\to\my\script.php:357
Stack trace:
#0 C:\path\to\my\script.php(357): com->com('WScript.shell')
#1 {main}
thrown in C:\path\to\my\script.php on line 357
This is the line (running in a loop) causing the error:
$com = new Com('WScript.shell');
This line usually runs fine so I'm not missing any libraries. Why could this happen ?
Go to php.ini and add this line. After that, restart php server. Good luck to you
extension=php_com_dotnet.dll
That is most likely due to desktop heap allocation error. One way to verify is to go to Windows Event Log (system category) and search for "desktop heap allocation failed" error or warning. As an workaround, you can consider using shell_exec.
For more details about desktop heap allocation error, see KB 184802
Effectively include the library "extension = php_com_dotnet.dll" in php.ini can serve in executing $ command = new Com ('WScript.Shell');
in my case it worked with Apache / 2.2.29 server (Win64) PHP / 3.5.29 mod_ssl / 2.2.29
thanks a lot.

Enabling Twig in Kohana3

I have a problem with twig module for kohana3
(this one https://github.com/jheathco/kohana-twig).
After uploading files to modules/twig, creating cache/twig, views/twig and enabling module in bootstrap.php, i'm getting Internal Server Error 500 error (no matter which action/controller i'm displaying). In my apache log file i can find this error message:
PHP Fatal error: main(): Failed opening required ''
(include_path='.:/usr/share/php:/usr/share/pear') in
/home/bajki/workspace/biospot/modules/twig/init.php on line 4
Have anyone any idea what am i doing wrong?
Thanks in advance.
It's probably because there are some files missing; you have to clone the submodule in vendor folder, so while inside of modules/twig, do:
git submodule update --init
Ok it was my fault - i didn't know that i need to download and install Twig class myself to vendor/Twig. Problem solved!

Categories