I decided instead of using the migration guide/shell for the upgrade from 1.3 to 2.0 of CakePHP to just go with a vanilla installation of it. For some reason, I'm getting this error:
Fatal error: Class 'Component' not found in /home/bob_cobb/public_html/mydomain.com/lib/Cake/Controller/Component/SessionComponent.php on line 32
When trying to access my website. I looked to see if SessionComponent.php even exists and it doesn't on my server, nor in the 2.0 repository. Do I need to create this file or something? (Edit: The file exists.)
its not about the sessioncomponent but the Component class itself:
App::uses('Component', 'Controller');
This declaration says where to find it. But cake doesnt seem to find it. so it is probably missing.
it should be in /Cake/Controller/
Actually, SessionComponent.php does exist, at least in the official 2.0.6 repository. Your download/upgrade was probably corrupted. Try adding the file to your server. If you're lucky, that's the only issue; more likely, though, you'll need to reupgrade.
I'm not sure where you're looking, but SessionComponent.php does actually exist in the 2.0.x repo:
https://github.com/cakephp/cakephp/blob/master/lib/Cake/Controller/Component/SessionComponent.php
You may want to re-download your whole /lib section if you're missing files.
Related
I'm working on a project with protocol buffers and after i compiled a proto file, i cant seem to include it neither run it cos it keeps giving me this exact error:
PHP Fatal error: Class 'Google\Protobuf\Internal\Message' not found in /app/generated_files/message.php on line 13
On message.php i have the auto generated file from a .proto file and it includes Google\Protobuf\Internal\Message.
While reading on the protobuf github issues, i found that a person had the same problem where he concluded that it was the composer's fault. However in my case that wouldnt be the issue cos i didnt use composer.
I used pecl to install protocol buffers, and i have the library protobuf.so located in /etc/php5/apache2/XXXXXXXXX. I also added extension=protobuf.so on the last line of php.ini.
Keep in mind that im using docker for everything, therefore it might be something different but i still doubt.
In case anyone ends up here with the same question: you just need to add componser autoloader to your file include_once './vendor/autoload.php'; (change path as required)
I had the same problem, but the reason was different for me:
Git somehow messed up the casing of the folders, which lead to a wrong file path translation.
As soon as I fixed the casing ([...]/src/Google/Protobuf instead of [...]/src/google/protobuf in the vendor folder)
Today I installed Symfony 2.7.9 for the first time and of course I've installed Sonata Admin (successfully). Now I'm trying to install SonataUserBundle like described here. But all the time I get the same error:
Unable to find file "#SonataUserBundle/Resources/config/routing/admin_resetting.xml" in
#SonataUserBundle/Resources/config/routing/admin_resetting.xml (which is being
imported from "/Users/alex/www/Personal/startup-1/app/config/routing.yml"). Make sure
the "SonataUserBundle" bundle is correctly registered and loaded in the application kernel
class. If the bundle is registered, make sure the bundle path
"#SonataUserBundle/Resources/config/routing/admin_resetting.xml" is not empty.
And YES, of course I checked admin_ressetting.xml and found that folder #SonataUserBundle/Resources/config/routing is empty.
Here my files:
config.yml, routing.yml, security.ylm, AppKernel.php
Also I'll note that:
My database contains 0 tables.
In folder src/Application/Sonata I have the only folder UserBundle
It seems there is a real issue with the 2.2.4 version of SonataUserBundle. Indeed admin_ressetting.xml is missing as you can see there.
FYI, I just posted an issue reporting the bug.
You can get the file from the master branch and create it under vendor/sonata-project/user-bundle/Resources/config/routing to fix it meanwhile.
Update (Apr, 28'16)
In fact, that's not an issue but a documentation misleading (the default documentation is ahead of last release). You need to refer to the v2.2 documentation if you want to use the last release, which is the 2.2.4 for now.
If you really checked #SonataUserBundle/Resources/config/routing which should be located under vendor/ and it's empty I would recommend you to delete vendor-directory, clear composer cache (compser clear-cache) and run composer install again.
As you can see at Github the directory should not be empty and contain more files than admin_resetting.xml.
I have a fresh version of CI running and I've installed the codeigniter-oauth2 spark via bash on my Ubuntu instances on EC2.
I followed the directions of the documentation and created a controller called auth using the demo code.
I have looked in my sparks folder and all the correct files/folders are there (as well as the /0.4.0 folder).
I have added the Facebook
My autoloads file has this
$autoload['libraries'] = array('session','OAuth2');
Now when I open the page mydomain.com/auth/sessions/facebook I get the error
"Unable to load the requested class: oauth2"
I can't seem to find any other assistance online regarding this issue online. I don't think it's an issue of not having the right case as I have tried all different ways of writing it.
Any direction to fix this issues would be greatly appreciated.
Use lower case when loading libraries.
$autoload['libraries'] = array('session','oauth2');
$autoload['sparks'] = array('OAuth2/0.4.0');
I get the following error when i am logged into the backend in magento
Fatal error: Interface 'Zend_Http_Client_Adapter_Interface' not found in /homepages/45/d210005774/htdocs/websitename/lib/Varien/Http/Adapter/Curl.php on line 176
Also i got this error previously in my index management section in magento
Fatal error: Call to undefined method Zend_Locale_Data::disableCache() in
/homepages/45/d210005774/htdocs/websitename/lib/Zend/Locale/Format.php
on line 153
Could anyone help me out with this? I think the problem is to do with zend framework but i am not sure whats causing this
It looks like there's something wrong with your installation. Either you're missing files from Magento's lib folder, you have damaged files in Magento's lib folder, or (longshot) your PHP include path is pointing in a different location.
First thing I'd do is download a fresh install of your version of Magento, unzip it in a separate folder, and then run
diff -r /homepages/45/d210005774/htdocs/websitename/ /path/to/fresh/magento
This will give you a list of differences between the standard core files and your own.
If you want to diagnose specific files, check
lib/Zend/Http/Client/Adapter/Interface.php
for the missing interface
interface Zend_Http_Client_Adapter_Interface
{
...
}
And check
lib/Zend/Locale
for the missing method
public static function disableCache($flag)
{
self::$_cacheDisabled = (boolean) $flag;
}
Finally, check you PHP include path to ensure there isn't an older copy of Magento and/or Zend being included.
Upload Zend folder again.it works for me.
When I try to generate a CRUD test for a new project I am getting a PHP Warning and a Fatal Error.
The errors relate to files that it cannot find, however, I have checked and the files are definitely there.
The error text is 'require_once(lib/model/map/QuestionMapBuilder.php): failed to open stream: No such file or directory in c:\webroot\askeet\lib\model\om\BaseQuestionPeer.php on line 547'
What details of my project should I check?
I think it's a problem with your include path.
Check it, the require_once() call is looking for lib/model/map/QuestionMapBuilder.php
But your include_path is C:\webroot\askeet\lib
Which, when resolved together into a full path, would look like this
C:\webroot\askeet\lib\lib\model\map\QuestionMapBuilder.php
So, I think your solution is to add C:\webroot\askeet to your include path.
You are generating crud for the Question model class but it doesn't seem to exist. Documentation on using the crud generator
First you must use the schema.yml file to define your database, and run
./symfony propel:build-model
to generate your model files. (this will generate lib\model\map\QuestionMapBuilder.php)
I finally tracked down the issue. In my PHP.ini files, they were setup wit the default UNIX file path settings.
Weirdly nothing had ever been broken by this incorrect configuration. Plus, everything in Symfony had worked up until now.
I have switched to Windows style file_path and all is well again.
Thanks for all the answers!