{"id":5166,"date":"2019-11-09T12:44:03","date_gmt":"2019-11-09T07:14:03","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=5166"},"modified":"2026-11-17T15:04:40","modified_gmt":"2026-11-17T09:34:40","slug":"how-to-debug-in-codeigniter","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-debug-in-codeigniter\/","title":{"rendered":"How to Debug in CodeIgniter: A Complete Guide to PHP Debugging"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong><strong>Post Date:<\/strong><\/strong> November 09, 2019<strong><br><strong>Last Updated:<\/strong> <\/strong>November 06, 2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Debugging is an essential part of web application development. While developing applications using the CodeIgniter PHP framework, developers may encounter various errors related to variables, database queries, controllers, models, AJAX requests, and application logic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Identifying and fixing these issues can sometimes be challenging, especially when an application does not produce the expected output.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are several <strong><a href=\"https:\/\/codeigniter.com\/user_guide\/testing\/debugging.html\" target=\"_blank\" rel=\"noopener\">CodeIgniter debugging techniques<\/a><\/strong> that developers can use to identify and troubleshoot application errors. PHP functions such as <code>echo<\/code>, <code>print_r()<\/code>, and <code>var_dump()<\/code> help display variable values directly in the browser, while the CodeIgniter <code>log_message()<\/code> function records debugging information in log files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we will explain <strong>how to debug in CodeIgniter<\/strong> using different PHP debugging functions, how to configure application logging, and how to <strong>debug AJAX requests in CodeIgniter<\/strong> with practical examples.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whether you are a beginner or an experienced PHP developer, these <strong>PHP debugging techniques<\/strong> will help you identify errors and troubleshoot CodeIgniter applications more efficiently.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Different Methods to Debug in CodeIgniter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are several ways to debug PHP applications developed using CodeIgniter. The most commonly used debugging methods include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>echo<\/code><\/li>\n\n\n\n<li><code>print_r()<\/code><\/li>\n\n\n\n<li><code>var_dump()<\/code><\/li>\n\n\n\n<li><code>log_message()<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These functions help developers inspect variable values, check application execution, and identify problems in controllers and models.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s understand each method with practical examples.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.1 echo()<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>echo<\/code> statement is used to display strings, numbers, and variable values directly in the browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is one of the simplest PHP debugging techniques for checking whether a variable contains the expected value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"609\" height=\"124\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-2.png\" alt=\"How to debug in CodeIgniter using PHP debugging functions print_r() and var_dump().\n\" class=\"wp-image-12976\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-2.png 609w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-2-300x61.png 300w\" sizes=\"(max-width: 609px) 100vw, 609px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-3.png\"><img decoding=\"async\" width=\"530\" height=\"95\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-3.png\" alt=\"How to debug in CodeIgniter using echo() to display variable output.\" class=\"wp-image-12978\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-3.png 530w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-3-300x54.png 300w\" sizes=\"(max-width: 530px) 100vw, 530px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can also display multiple variable values using <code>echo<\/code>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$name = \"John\";\n$age = 25;\n\necho \"Name: \" . $name;\necho \"&lt;br>\";\necho \"Age: \" . $age;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Name: John\nAge: 25<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>When to use echo():<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To check simple variable values.<\/li>\n\n\n\n<li>To verify whether a particular section of code is executing.<\/li>\n\n\n\n<li>To display temporary debugging messages.<\/li>\n\n\n\n<li>To check values received from forms.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">1.2 print_r()<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>print_r()<\/code> function displays information about a variable in a human-readable format.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is especially useful when working with arrays and objects because it makes their structure and values easier to understand.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"375\" height=\"278\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-4.png\" alt=\"How to debug in CodeIgniter using print_r() to display PHP array values.\" class=\"wp-image-12979\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-4.png 375w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-4-300x222.png 300w\" sizes=\"(max-width: 375px) 100vw, 375px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-5.png\"><img loading=\"lazy\" decoding=\"async\" width=\"394\" height=\"252\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-5.png\" alt=\"How to debug in CodeIgniter using print_r() to display PHP array values.\" class=\"wp-image-12980\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-5.png 394w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-5-300x192.png 300w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The HTML <code>&lt;pre&gt;<\/code> tag preserves the formatting and makes array output easier to read in the browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>When to use print_r():<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To inspect array values.<\/li>\n\n\n\n<li>To check database query results.<\/li>\n\n\n\n<li>To verify data passed between controllers and models.<\/li>\n\n\n\n<li>To inspect API responses.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">1.3 var_dump()<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>var_dump()<\/code> function displays detailed information about a variable, including its data type, value, and size.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unlike <code>print_r()<\/code>, it provides additional details that help developers identify incorrect data types and unexpected values.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" width=\"377\" height=\"266\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-6.png\" alt=\"How to debug in CodeIgniter using var_dump() to display PHP variable data types and values.\" class=\"wp-image-12981\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-6.png 377w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-6-300x212.png 300w\" sizes=\"(max-width: 377px) 100vw, 377px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"396\" height=\"265\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-7.png\" alt=\"How to debug in CodeIgniter using var_dump() to display PHP variable data types and values.\" class=\"wp-image-12982\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-7.png 396w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-7-300x201.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-7-272x182.png 272w\" sizes=\"(max-width: 396px) 100vw, 396px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">From the output, you can identify:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The variable is an array.<\/li>\n\n\n\n<li>The array contains three elements.<\/li>\n\n\n\n<li>The name value is a string.<\/li>\n\n\n\n<li>The age value is an integer.<\/li>\n\n\n\n<li>The city value is a string.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Difference between print_r() and var_dump():<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>print_r()<\/th><th>var_dump()<\/th><\/tr><tr><td>Displays readable variable information.<\/td><td>Displays detailed variable information.<\/td><\/tr><tr><td>Useful for inspecting arrays and objects.<\/td><td>Useful for inspecting data types and values.<\/td><\/tr><tr><td>Does not clearly show data types.<\/td><td>Shows data types and string lengths.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">1.4 log_message()<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>log_message()<\/code> function is provided by CodeIgniter to write debugging information, errors, and application messages into log files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unlike <code>echo<\/code>, <code>print_r()<\/code>, and <code>var_dump()<\/code>, the <code>log_message()<\/code> function does not display debugging output directly in the browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead, it records messages in the application&#8217;s log directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This method is useful when debugging production applications because developers can inspect application activity without displaying internal information to website visitors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Syntax:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-8.png\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"49\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-8.png\" alt=\"How to debug in CodeIgniter using log_message() to write debug messages into application log files.\n\" class=\"wp-image-12983\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-8.png 628w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-8-300x23.png 300w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Common message types include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>error<\/code><\/li>\n\n\n\n<li><code>debug<\/code><\/li>\n\n\n\n<li><code>info<\/code><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"277\" height=\"64\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-9.png\" alt=\"\" class=\"wp-image-12984\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-9.png 277w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-9-272x64.png 272w\" sizes=\"(max-width: 277px) 100vw, 277px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Before using this function, you need to enable logging in the CodeIgniter configuration file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. How to Enable log_message() in CodeIgniter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default, CodeIgniter logging may be disabled. To generate application log files, you need to configure the logging threshold.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Configuration file:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">application\/config\/config.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Find the following configuration:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$config['log_threshold'] = 0;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change the value according to your debugging requirements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Available log levels<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Log Level<\/th><th>Description<\/th><\/tr><tr><td>0<\/td><td>Disables logging.<\/td><\/tr><tr><td>1<\/td><td>Records error messages, including PHP errors.<\/td><\/tr><tr><td>2<\/td><td>Records error and debug messages.<\/td><\/tr><tr><td>3<\/td><td>Records error, debug, and informational messages.<\/td><\/tr><tr><td>4<\/td><td>Records all messages.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For example, to enable debugging messages, configure:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$config['log_threshold'] = 2;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Example of log_message()<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add the following code inside your controller or model:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">log_message('debug', 'Debugging enabled');<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Expected output in the log file:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">DEBUG - 2019-11-08 15:41:48 --> Debugging enabled<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The message will be recorded in the CodeIgniter application log file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Where are CodeIgniter log files stored?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">By default, CodeIgniter 3 stores log files inside:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">application\/logs\/<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can navigate to the directory using the following Linux command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd application\/logs\/<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">List the available log files:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ls -lh<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To monitor a specific log file:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">tail -f log-2019-11-08.php<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace the filename with the actual log file generated by your application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure the logs directory has the correct write permissions for your web server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Avoid setting the logging threshold to <code>4<\/code> permanently in production because it can generate a large number of log entries.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. How to Debug Using var_dump() in CodeIgniter Controller and Model<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In CodeIgniter, controllers handle incoming requests, while models handle database-related operations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes, the data received by the controller or returned by the model may not be what you expect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can use <code>echo<\/code>, <code>print_r()<\/code>, and <code>var_dump()<\/code> inside controller and model files to inspect variable values.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example: Debugging in a Controller<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose you are receiving a student ID from a frontend form.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can inspect the received value using <code>var_dump()<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Controller example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-10.png\"><img loading=\"lazy\" decoding=\"async\" width=\"430\" height=\"265\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-10.png\" alt=\"How to debug in CodeIgniter using var_dump() inside a controller to inspect POST request values and data types.\" class=\"wp-image-12985\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-10.png 430w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-10-300x185.png 300w\" sizes=\"(max-width: 430px) 100vw, 430px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This helps you verify whether the controller receives the expected POST value.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example: Debugging in a Model<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can also inspect database query results inside your model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Model example:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"391\" height=\"231\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-11.png\" alt=\"CodeIgniter debugging in model using print_r() to display student database query results.\" class=\"wp-image-12986\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-11.png 391w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-11-300x177.png 300w\" sizes=\"(max-width: 391px) 100vw, 391px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This helps you check whether the database query returns the expected student details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Important:<\/strong> Temporary debugging output can interfere with normal controller responses and AJAX JSON responses. Remove debugging statements after troubleshooting.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. How to Debug AJAX Requests in CodeIgniter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">AJAX is commonly used in web applications to send requests from the frontend to the backend without reloading the entire webpage.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In CodeIgniter applications, AJAX requests communicate with controller methods, which may call models to perform database operations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes, an AJAX request may execute successfully, but the expected response may not appear on the frontend.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To identify the issue, developers can inspect the AJAX response using JavaScript debugging methods.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example: AJAX Request<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Consider the following jQuery AJAX code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" width=\"451\" height=\"381\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-12.png\" alt=\"Debug AJAX requests in CodeIgniter using jQuery AJAX, console.log(), success and error callbacks.\" class=\"wp-image-12987\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-12.png 451w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-12-300x253.png 300w\" sizes=\"(max-width: 451px) 100vw, 451px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">How does this work?<\/h3>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>The frontend sends an AJAX request to the CodeIgniter application.<\/li>\n\n\n\n<li>The controller receives the request.<\/li>\n\n\n\n<li>The controller processes the submitted data.<\/li>\n\n\n\n<li>The model performs database operations if required.<\/li>\n\n\n\n<li>The controller returns the response.<\/li>\n\n\n\n<li>The AJAX success callback displays the response in the browser console.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">If the request fails, the error callback helps identify the issue.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Displaying AJAX Response in the Browser<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to display the response directly on the webpage for temporary debugging, you can use:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" width=\"524\" height=\"415\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-13.png\" alt=\"How to debug AJAX requests in CodeIgniter using jQuery success and error callbacks to display server responses.\" class=\"wp-image-12988\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-13.png 524w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-13-300x238.png 300w\" sizes=\"(max-width: 524px) 100vw, 524px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This allows you to inspect output generated by the controller or model.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, replacing the entire webpage is suitable only for temporary debugging. A better approach is to use <code>console.log()<\/code> or display the response inside a dedicated HTML element.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. Debugging AJAX Requests Using Browser Developer Tools<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Browser Developer Tools provide additional information that helps developers identify frontend and backend communication issues.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can open Developer Tools in Google Chrome by pressing:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">F12<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, use:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Ctrl + Shift + I<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the following tabs:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5.1 Console<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the Console tab to identify JavaScript errors and inspect AJAX responses.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">console.log(response);<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This helps you verify the data returned by the CodeIgniter controller.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5.2 Network<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Network tab displays all HTTP requests made by the browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can inspect:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Request URL.<\/li>\n\n\n\n<li>HTTP status code.<\/li>\n\n\n\n<li>Request method (GET or POST).<\/li>\n\n\n\n<li>Submitted form data.<\/li>\n\n\n\n<li>Response content.<\/li>\n\n\n\n<li>Request duration.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5.3 Response<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Select the AJAX request in the Network tab and open the Response section to inspect the actual data returned by the CodeIgniter controller.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is particularly useful when an AJAX request returns an unexpected response or a PHP error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">6. Common CodeIgniter Debugging Issues and Solutions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here are some common problems developers may encounter while debugging CodeIgniter applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Issue 1: log_message() Is Not Generating Log Files<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Possible reasons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Logging is disabled.<\/li>\n\n\n\n<li>Incorrect log threshold.<\/li>\n\n\n\n<li>Logs directory does not have write permissions.<\/li>\n\n\n\n<li>Invalid log path configuration.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Solution:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the following configuration:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$config['log_threshold'] = 2;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Also verify that the logs directory has the correct write permissions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Issue 2: var_dump() Is Not Displaying Expected Values<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Possible reasons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The variable is empty or NULL.<\/li>\n\n\n\n<li>The controller method is not executing.<\/li>\n\n\n\n<li>The request is not reaching the expected controller.<\/li>\n\n\n\n<li>AJAX is returning a different response.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Solution:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Check the variable value and inspect the request using browser Developer Tools.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">var_dump($this->input->post());<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Issue 3: AJAX Request Is Not Working<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Possible reasons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Incorrect AJAX URL.<\/li>\n\n\n\n<li>Incorrect HTTP method.<\/li>\n\n\n\n<li>Missing request parameters.<\/li>\n\n\n\n<li>PHP errors in the controller.<\/li>\n\n\n\n<li>Server-side errors.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Solution:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect the Network and Console tabs in the browser.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also log the received request data:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-15.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"246\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-15-1024x246.png\" alt=\"\" class=\"wp-image-12990\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-15-1024x246.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-15-300x72.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-15-768x185.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-15.png 1152w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Issue 4: Database Query Is Not Returning Expected Results<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Possible reasons:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Incorrect table name.<\/li>\n\n\n\n<li>Incorrect column name.<\/li>\n\n\n\n<li>Invalid query conditions.<\/li>\n\n\n\n<li>Missing database records.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Solution:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use CodeIgniter&#8217;s database debugging methods and inspect the query result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"455\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-14.png\" alt=\"\" class=\"wp-image-12989\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-14.png 557w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image-14-300x245.png 300w\" sizes=\"(max-width: 557px) 100vw, 557px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This helps you inspect both the executed SQL query and the returned data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. Best Practices for Debugging in CodeIgniter<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Following proper debugging practices helps developers identify errors efficiently and maintain application security.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Use <code>echo<\/code> for quickly checking simple variable values.<\/li>\n\n\n\n<li>Use <code>print_r()<\/code> to inspect arrays and objects.<\/li>\n\n\n\n<li>Use <code>var_dump()<\/code> to identify variable data types and values.<\/li>\n\n\n\n<li>Use <code>log_message()<\/code> to record debugging information.<\/li>\n\n\n\n<li>Use browser Developer Tools to inspect AJAX requests.<\/li>\n\n\n\n<li>Check application log files when investigating PHP errors.<\/li>\n\n\n\n<li>Verify database queries and returned results.<\/li>\n\n\n\n<li>Avoid displaying sensitive information in the browser.<\/li>\n\n\n\n<li>Remove temporary debugging statements before deploying to production.<\/li>\n\n\n\n<li>Keep production logging enabled at an appropriate level.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Debugging is an essential part of developing and maintaining CodeIgniter applications. PHP functions such as <code>echo<\/code>, <code>print_r()<\/code>, and <code>var_dump()<\/code> help developers inspect variable values, while CodeIgniter&#8217;s <code>log_message()<\/code> function provides a convenient way to record application errors and debugging information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By following these <strong>CodeIgniter debugging techniques<\/strong> and using browser Developer Tools, developers can identify problems in controllers, models, database queries, and AJAX requests more efficiently.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Understanding these methods can save development time and make troubleshooting easier when working on PHP applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you for visiting <strong>Pheonix Solutions<\/strong>. We hope this tutorial helps you understand how to debug in CodeIgniter. If you find this article useful, share it with your friends and fellow developers!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions (FAQs)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. How do I debug in CodeIgniter?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can debug CodeIgniter applications using PHP functions such as <code>echo<\/code>, <code>print_r()<\/code>, and <code>var_dump()<\/code>. You can also use CodeIgniter&#8217;s <code>log_message()<\/code> function to record debugging information in application log files.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. How do I enable debugging in CodeIgniter 3?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open <code>application\/config\/config.php<\/code> and configure <code>$config['log_threshold']<\/code> to <code>2<\/code> or higher to enable debug and additional logging messages.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Where are CodeIgniter log files stored?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">By default, CodeIgniter 3 stores log files inside the <code>application\/logs\/<\/code> directory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Official Links<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/codeigniter.com\/userguide3\/\" target=\"_blank\" rel=\"noreferrer noopener\">CodeIgniter Official Documentation<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/codeigniter.com\/userguide3\/database\/configuration.html\" target=\"_blank\" rel=\"noreferrer noopener\">CodeIgniter 3 Database Configuration<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/codeigniter.com\/userguide3\/database\/connecting.html\" target=\"_blank\" rel=\"noreferrer noopener\">CodeIgniter 3 Connecting to Multiple Databases<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/codeigniter.com\/userguide4\/\" target=\"_blank\" rel=\"noreferrer noopener\">CodeIgniter 4 User Guide<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-add-google-recaptcha-in-php-codeigniter\/\">How to add Google ReCAPTCHA in PHP Codeigniter<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-debug-in-codeigniter\/\">How to debug in Codeigniter<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need Assistance with CodeIgniter Development?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Configuring multiple database connections requires careful handling of credentials, database permissions, query execution, and application architecture. <a href=\"https:\/\/pheonixsolutions.com\/\">Pheonix Solutions<\/a> can assist with PHP application development, CodeIgniter integration, database configuration, performance optimization, and troubleshooting.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you need assistance implementing multiple database connections or maintaining your CodeIgniter application, <a href=\"https:\/\/pheonixsolutions.com\/contact\/\">contact Pheonix Solutions<\/a> to discuss your requirements.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post Date: November 09, 2019Last Updated: November 06, 2026 Introduction Debugging is an essential part of web application development. While [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":13592,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[605,273],"class_list":["post-5166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-architecture","tag-codeigniter-framework","tag-php","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1lk","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/CodeIgniter-7-Easy-Debugging-Tips.png","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=5166"}],"version-history":[{"count":6,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5166\/revisions"}],"predecessor-version":[{"id":13594,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5166\/revisions\/13594"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media\/13592"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=5166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=5166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=5166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}