I am a Kohana newbie who is currently stuck with the installation process.
I have downloaded the latest version(3.3.1) of kohana and installed it in my php server. The kohana installation asked to me to delete the install.php as it found that my server is well equipped to run kohana based applications.
I have renamed the install.php. and used the following url to get kohana homepage. www.mydomain.com/kohana, kohana is where i uploaded the kohana files.
When i tried running above URL it ended up an error asking to me to add Cookie::$Salt statement to the bootstrap.php. I addded the line Cookie::$Salt ="foobar" somewhere below Line 90 of bootstrap.php. Now i am getting the following error.
Fatal error: Access to undeclared static property: Cookie::$Salt on
line 91
Kindly advice how to resolve this issue.
Static properties are case sensitive in PHP! You need to set $salt, not $Salt.
Cookie::$salt = "...";
Related
I did everything according to points 1-5 as indicated in the Readme.MD
https://github.com/ckfinder/ckfinder-laravel-package#configuring-authentication
On site authors say: At this point you should see the connector JSON response after navigating to the <APP BASE URL>/ckfinder/connector?command=Init address. Authentication for CKFinder is not configured yet, so you will see an error response saying that CKFinder is not enabled
I opened link
http://127.0.0.1:8000/ckfinder/connector?command=Init
And have JSON error:
{"error":{"number":110,"message":"Unknown error."}}
Can someone help me? How to find reason of trouble? i google many sites and there is no desicion
Are you using PHP 8+?
For me the issue was a deprecated line in the package itself.
I fixed this error by changing vendor\ckfinder\ckfinder-laravel-package\_connector\ArgumentResolver.php line 65
from
if ($reflectionClass = $param->getClass()) {
to
if ($reflectionClass = new \ReflectionClass($param->getType()->getName())) {
because getClass() is deprecated in PHP 8.0.3, It works fine for me now.
Note: Do keep in mind that it's not good to change things inside the vendor folder!
I've developed a small project on a machine, using CakePHP 3.0, and I need it to run on another machine. I've tried to install it on several other machines.
If I run the composer to install the CakePHP 3.0, then I copy my stuff to overwrite it, the project works. I've tried this on two machines and had no problem so far. If I don't run the composer, and just copy the stuff to the target machine, it gives me the following error. I've tried this on 3 machines, and every machine gives me this:
Fatal error: Class 'Locale' not found in /home/u113681897/public_html/vendor/cakephp/cakephp/src/I18n/I18n.php on line 229
Fatal error: Class 'Locale' not found in /home/u113681897/public_html/vendor/cakephp/cakephp/src/I18n/I18n.php on line 229
I've copied the whole project to this server to test.
I told you this because I thought it has something to do with my problem. The point is that I have to run this on a machine that is not mine, and I can't install composer on it. The /public_html/vendor/cakephp/cakephp/src/I18n/ has files related to internationalization and localization, but my project will never be translated, so a workaround to make the project ignore those files would be enough to solve my problem.
The following code is an excerpt from the (...)/I18n/I18n.php that might be relevant:
<?php
namespace Cake\I18n;
use Aura\Intl\FormatterLocator;
use Aura\Intl\PackageLocator;
use Aura\Intl\TranslatorFactory;
use Cake\I18n\Formatter\IcuFormatter;
use Cake\I18n\Formatter\SprintfFormatter;
use Locale;
class I18n {
// lots of code here
public static function defaultLocale() {
if (static::$_defaultLocale === null) {
static::$_defaultLocale = Locale::getDefault() ?: 'en_US';
// the line above is the Line 229
}
return static::$_defaultLocale;
}
// many code here too
}
I've checked that another file also tries to access this Locale class, but I don't know if there are other files trying to access it as well. Many files from everywhere inside the project tries to access methods from I18n.php. I need it running but I can't figure out how to make it run.
Any help will be greatly appreciated.
As I just found out, prior to CakePHP 3.0, the installation must be done by composer, as stated in the 3.0 migration guide:
CakePHP should be installed with Composer
Since CakePHP can no longer easily be installed via PEAR, or in a shared
directory, those options are no longer supported. Instead you should use
Composer to install CakePHP into your application.
So it won't run on regular free web hosting services.
I've recently moved a silverstripe site to a new server. Since then it's bringing up the error:
Fatal error: Class 'SiteTreeDecorator' not found in /home/priorysc/public_html/googlesitemaps/code/GoogleSitemapDecorator.php on line 9
I try removing the googlesitemaps folder, but then it just brings up the error that it can't find the googlesitemaps _config file. Is there any way I can remove the reference to googlesitemaps, or failing that just get the thing to work?
I'm a fairly verse php coder but I don't know that much about silverstripe as it's just been dumped on me.
Anyone know? I'm tearing my hair out over this!
-James
SiteTreeDecorator was a class that existed in v2.4 of SilverStripe, the fact that the error is saying it doesn't exist tells me you're running v3.0 or higher. Double check which version of SilverStripe you're running, then update the 'googlesitemaps' module to the appropriate version:
SilverStripe v3.0: https://github.com/silverstripe-labs/silverstripe-googlesitemaps/tree/1.1
SilverStripe v3.1: https://github.com/silverstripe-labs/silverstripe-googlesitemaps/tree/master
I have just installed YII without any problems, but I cannot get into GII. I have uncommented the specific lines in mywebapp/protected/config/main.php to enable GII.
When I try to go to: localhost/myapp/index.php?r=gii I am redirected to localhost/myapp/index.php?r=gii/default/login.
I don't have the URL manager enabled it is a fresh installation on Wamp.
The error I get is this:
Fatal error: Cannot redeclare class CLogRouter in C:\wamp\www\yii\framework\logging\CLogRouter.php on line 53
The yii folder is the installation folder (did not know that the app is still using it).
What could be causing the trouble and how to get GII working? Thanks for your replies!
It is not clear what your problem is.
Getting redirected to /gii/default/login is good. This is where you log in with a password.
Your error "Cannot redeclare class CLogRouter" indicates that you are declaring CLogRouter twice. This probably happens in your protected/config/main.php.
However, I am under the impression that this error is not related to gii. Why don't your turn logging off (for now)?
I'm trying to set up my Zend installation but when I run zf show version in the CLI I get this error message:
Fatal error: Class 'Zend\Filter\Word\CamelCaseToSeparator' not found in C:\Progr
am Files (x86)\EasyPHP-12.1\php\php546x120828095553\ZendFramework-2.0.3\library\
Zend\Filter\Word\CamelCaseToDash.php on line 18
I haven't changed anything in the files and they're in the right place with the correct names and everything.
Does anyone of you know what the error could be?
I had the same problem when I had 2 zend framework libaries includes in php.ini file for zend framework 1 and 2 versions, when I left only one, this error disapeared.