Comments (8)
It only works when ALL the vars are set to "private" at the beggining of the REST_controller file too, not just all the other ones switched to "protected" everywhere on the last commit:
private $rest_format = NULL; // Set this in a controller to use a default format private $methods = array(); // contains a list of method properties such as limit, log and level private $request = NULL; // Stores accept, language, body, headers, etc private $response = NULL; // What is gonna happen in output? private $rest = NULL; // Stores DB, keys, key level, etc private $_get_args = array(); private $_post_args = array(); private $_put_args = array(); private $_delete_args = array(); private $_args = array(); private $_allow = TRUE;
from codeigniter-restserver.
weirdly I got the exact same message.
from codeigniter-restserver.
I have it working on a 1.6 CI updated to 2.0.2, but on a 2.0.2 clean install this is happening.
I changed all visibility 'protected' back to 'private' and it is now working again.
Basically this was undone: 4b7bf25
from codeigniter-restserver.
i think i did same thing to make it work.
from codeigniter-restserver.
Great!
I just checked that my previous working install didn't have that commit I linked earlier, so there's nothing to do with the codeigniter update or clean install. It was just a thought.
from codeigniter-restserver.
Let's assume this is CI 2.0.2 being weird. Did anyone do any debugging? Is this happening on 2.0.1 or 2.0.3-ish?
from codeigniter-restserver.
I thought it was CI related because it was happening on the clean install and not the one I upgraded from 1.6, but what actually changed from one install to the other was that commit I linked earlier: protected vs. private.
My error log fills up with this on CI 2.0.2 with the current codeigniter-restserver version:
[Wed Jul 20 23:22:50 2011] [error] [client 189.100.171.15] PHP Fatal error: Cannot access protected property Example::$rest in /var/www/mydomain.com/system/core/Loader.php on line 946
from codeigniter-restserver.
Thanks @caioiglesias
Work like a charm !!
from codeigniter-restserver.
Related Issues (20)
- Installing through composer will remove "self::" from RestController.php HOT 3
- POST request is not working only GET request is working HOT 1
- [RuntimeException] when installing library - [mikey179/vfsstream] HOT 1
- GET method with JSON input HOT 1
- Limit API key to class and function HOT 1
- Expected type HOT 1
- HTTP codes accessed through a variable that does not exist
- Class 'chriskacerguis\RestServer\RecursiveIteratorIterator' not found HOT 1
- Still work on CodeIgniter 3.0.4 ? HOT 1
- Duplicated data in serialized request log HOT 2
- Suspend key HOT 1
- CORS Issue HOT 2
- Add russian language HOT 1
- Cannot send body request from React js app HOT 2
- Got error after a Get service is completed HOT 1
- How about the client side HOT 1
- Issue with CodeIgniter 4.3.2 version - Rest Server version 3.1.4 HOT 2
- about DBAD License on Format.php HOT 1
- PHP 8.3 deprecation for `ldap_connect` with 2 parameters.
- php 8.1 deprecated calls on /restcontroller.php HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeigniter-restserver.