A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: MX/Router.php

Line Number: 239

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Router.php
Line: 239
Function: strpos

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Router.php
Line: 72
Function: set_class

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 282

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Cannot change session cookie parameters when headers already sent

Filename: Session/Session.php

Line Number: 294

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 304

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 314

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 315

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 316

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 317

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Headers already sent. You cannot change the session module's ini settings at this time

Filename: Session/Session.php

Line Number: 375

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Cannot change save handler when headers already sent

Filename: Session/Session.php

Line Number: 110

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Cannot start session when headers already sent

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 173
Function: _ci_load_library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 192
Function: library

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 153
Function: libraries

File: /home/rskasihibu/public_html/edokter/application/third_party/MX/Loader.php
Line: 65
Function: initialize

File: /home/rskasihibu/public_html/edokter/index.php
Line: 319
Function: require_once

REST Server Tests

REST Server Tests

Home

See the article http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/

The master project repository is https://github.com/chriskacerguis/codeigniter-restserver

Click on the links to check whether the REST server is working.

  1. Users - defaulting to JSON
  2. Users - get it in CSV
  3. User #1 - defaulting to JSON (users/id/1)
  4. User #1 - defaulting to JSON (users/1)
  5. User #1 - get it in XML (users/id/1.xml)
  6. User #1 - get it in XML (users/id/1/format/xml)
  7. User #1 - get it in XML (users/id/1?format=xml)
  8. User #1 - get it in XML (users/1.xml)
  9. Users - get it in JSON (AJAX request)
  10. Users - get it in HTML (users.html)
  11. Users - get it in HTML (users/format/html)
  12. Users - get it in HTML (users?format=html)