FuelPHP V 1.7.2 Fatal error: Class 'Input' not found - php

Hey I'm a starter to FuelPHP framework, I'm using version 1.7.2 , I already made my first application, Which is working perfectly in local Virtual host (windows/Wamp) , thou it didn't work well on linux server when I uploaded (I tried 2 different hosts, the same problem exists)
this is all what I get and I don't really know where to start looking :
Fatal error: Class 'Input' not found in /var/www/vhosts/carex.benseno.com.tr/httpdocs/fuel/core/classes/uri.php on line 326
Fatal error: Class 'Input' not found in /var/www/vhosts/carex.benseno.com.tr/httpdocs/fuel/core/classes/error.php on line 273
note: I extend the Class Uri, and add it to the autoloader, and I don't use any namespacing.
if anyone has an Idea that would be very appreciated
edit: Autoloader:
Autoloader::add_classes(array(
// Add classes you want to override here
'Uri' => APPPATH.'classes/extension/uri.php',
));
Note: Removing the class from autolaoding doesn't change anything, Errors are the same, I don't think it's related to the error.

Well, After a long time of debugging, strange enough, setting 'locale' => false,
in config.php file solved the problem.
which as the documentation explains :
Used for setlocale() required on some php installations, set to false
to prevent it from being set. The syntax setting for this can differ
per OS, Ubuntu for example requires a .utf8 (the encoding) suffix.
http://fuelphp.com/docs/general/configuration.html

Related

Class "String" not found error in PayPal core sdk

I am getting the following error all of sudden
Fatal error: Class 'string' not found in
\vendor\paypal\sdk-core-php\lib\PayPal\Common\PPModel.php on line 51
Did anything change in recent Wordpress update?
Around March, 2015, PayPal made some big
changes with PHP-SDK 1.0.0
Part of that change was renaming some classes;
PPModel.php was changed to PayPalModel.php
There were a lot of other files renamed.
Here is a link to all the breaking changes.
https://github.com/paypal/PayPal-PHP-SDK/wiki/Breaking-Changes---1.0.0
You will probably have a lot more work to do, other than just
PPModel. I know I had
to change 23 files and 73 lines of code. This is
because a lot of class files were renamed.
Well, I'm not sure why it's started happening to you right now, but I can see the bug:
the line mentioned initialises a class based on some reflected parameters
the reflection helper it calls defaults to returning "string", which isn't a valid class name
A couple of old closed bugs (#7, #34) mention Zend Optimizer, which is now known as OpCache, which could well be your culprit - it has a pair of settings opcache.save_comments and opcache.load_comments which must be set to On to save docblocks (/** ... */ comments) in memory. Since the Annotations relied on by the SDK are in such docblocks, if you've installed OpCache, or changed the value of that setting, your application will break.

CakePHP 3.0 not running on other machines

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.

Kohana 3.3 model Class Not Found error only in php 5.5.3

I am writing a Kohana app that has been dev'd locally on Ubuntu 12.04 LTS (PHP 5.3). It works without issue in this environment, but it throws a fatal error whenever it tries to autoload a classes/Model class on the production server (which is Ubuntu 13.10 running PHP 5.5). The application code is exactly the same. The only difference I could mention is that the apache vhost conf uses the Require directive instead of the Allow/Deny syntax because Ubuntu 13.10 ships with newer version of apache.
I get the following error whenever I hit a controller action that needs to load a model:
ErrorException [ Fatal Error ]: Class 'Model_Event' not found
MODPATH/orm/classes/Kohana/ORM.php [ 46 ]
Interestingly enough, Kohana is evidently able to load the controller classes I wrote without issue.
[source root]/application/classes/Model/Event.php exists and is ugo+rx (as are the parent directories). It contains a valid class definition (this works without issue on my local 12.04/5.3 environment). 'head -n2 [source root]/application/classes/Model/Event.php' is:
<?
class Model_Event extends Model_BaseModel {
I know PHP 5.5 introduced a difference in how it does case-insensitive string comparisons, but the file/folder names and class names are an exact case match so this shouldn't be an issue here.
PHP wasn't respecting the "short_open_tag = On" ini setting.

Fatal error: Call to undefined function: MDB2_Driver_MYSQL::getAll()

I am upgrading a site from Fedora 14, PHP4, and PEAR DB to Fedora 16, PHP 5.4 and PEAR MDB2 2.5.0b3, and I am getting the error
Fatal error: Call to undefined function: MDB2_Driver_MYSQL::getAll(). in /usr/share/php/MDB2.php on line 1892
Obviously, I've checked line 1892 of the MDB2.php file, and it contains the error reporting code for the __call magic method (allows you to call a specific function by passing it into __call)
I have checked for usages of __call, and there don't seem to be any. Likewise, when I try to find where MDB2_Driver_MYSQL is coming from, the only place it is even mentioned is in MDB2.php (as a comment about the driver for MySQL), in the class declaration (class MDB2_Driver_mysql extends MDB2_Driver_Common), and the description title in the .xml file.
I have manually included the /usr/share/php/MDB2/Extended.php file in the file where the MDB2_Driver_mysql class is defined, and that didn't help (not that this would have been a permanant fix...)
Has anyone encountered this error, and if so, what did you do to fix it? Google has proved nearly useless, as the only place it is specifically mentioned doesn't really deal with fixing it.
change getAll() in your class, to queryAll(), cause there some difference between DB & MDB2, and the same with getOne, getRow - they all changed to queryOne, queryRow. Here you can read about it http://www.phpied.com/db-2-mdb2/
Make sure you load the extended module in your code prior to making a query, similar to below:
$db->loadModule('Extended');

ZendFramework 1.11.3: 'Plugin by name 'Jquery' was not found in the registry

I have two servers.
snow leopard on HFS (case-insensitive) file system
gentoo linux with ext4 (case-sensitive) file system
on both of them I use php 5.3 and latest apache2 and latest Zend Framework 1.11 build.
under Mac OSX the website works properly, under linux I have the following error:
Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'Jquery' was not found in the registry; used paths: Dashboard_View_Helper_: /home/ufk/Projects/php-projects/xpo-website/application/modules/dashboard/views/helpers/ xpo_Uploadify_View_Helper_: xpo/Uploadify/View/Helper/ ZendX_JQuery_View_Helper_: ZendX/JQuery/View/Helper/ : /home/ufk/Projects/php-projects/xpo-website/application/helpers/ Zend_View_Helper_: Zend/View/Helper/' in /usr/local/ZendFramework-1.11.3/library/Zend/Loader/PluginLoader.php:412 Stack trace:
0 /usr/local/ZendFramework-1.11.3/library/Zend/View/Abstract.php(1174): Zend_Loader_PluginLoader->load('Jquery')
1 /usr/local/ZendFramework-1.11.3/library/Zend/View/Abstract.php(610): Zend_View_Abstract->_getPlugin('helper', 'jquery')
2 /usr/local/ZendFramework-1.11.3/library/Zend/View/Abstract.php(336): Zend_View_Abstract->getHelper('jquery')
3 /home/ufk/Projects/php-projects/xpo-website/application/modules/dashboard/views/scripts/game/login.phtml(1): Zend_View_A in /usr/local/ZendFramework-1.11.3/library/Zend/Loader/PluginLoader.php on line 412
I copied the ZendX directory (from extras/library) to the library directory of the Zend Framework located at /usr/local/ZendFramework/library/ZendX/.
I initialize the helper using:
ZendX_JQuery::enableView($view);
the code inside login.phtml that is causing the exception is:
$this->jquery()->enable();
it shouldn't even relate to the code itself because under the Mac OS server it does work, but i do have ZendX here too so i can't pinpoint the problem.
Not able to test right now, but suspect you need to uppercase the 'q' in jQuery in this line:
$this->jQuery()->enable();
Typically ZF maps methods to class names by uppercasing the first letter, so could be the 'unusual' uppercase Q in the class name is the problem.
You have to add the helper path. See manual. You can do that in bootstrap, using Zend_Application, using FrontController plugin, in base controller class or directly in view.
Update: Sorry I misread your question. The problem IS the small "q". Windows is case insensitive. That's why it works there. Linux is not. So 'jQuery.php' and 'jquery.php' are not the same files.

Categories