Getting a blank page - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: Getting a blank page (/showthread.php?tid=69239) |
Getting a blank page - ThorTheViking - 10-24-2017 Hi All. I am a noob at CI, have now worked my way fixing all errors etc, got my "hello world" to work, so th CI is there and working. and off course the index.php file is loading honkey-dori My problem seems to be DB connection, or I am not sure..... been testing with the examples from formget.com insert-data-into-database-using-codeigniter update-data-in-database-using-codeigniter delete-data-from-database-using-codeigniter At first i got some errors, that i fixed, but now when i go to display page (for the above mentioned) localhost/myDir/index.php/.......... i only get a blank white page, the title is loaded as i can see the text at the top..... but nothing else checked and added database to autoload... i am using CodeIgniter-2.2.0 PHP 5.63 MySQL 5 (SQLi) Any suggestions on how to get it to work........ RE: Getting a blank page - InsiteFX - 10-25-2017 If you think you have a Database connection problem you can use this script to test the connection. PHP Code: <?php Place in a file and run it. RE: Getting a blank page - ThorTheViking - 10-25-2017 (10-25-2017, 03:16 AM)InsiteFX Wrote: If you think you have a Database connection problem you can use this script to test the connection.Thanks for that! Connect Successfully. Host info: localhost via TCP/IP That means my DB connection is working fine. but i still do not get the test samples from the site - with update , edit or delete in DB to work. Could it be that they are not working on CI 2.2.0? or something extra needed on that version? What would be the implications to upgrade to CI 3.X.X ? what are the Pros and Cons? is it still possible to run that on PHP 5.63? and MySQL 5? I am sort of lost here RE: Getting a blank page - ThorTheViking - 10-25-2017 One always learn new things! just by chance i did a view source on my white page...... there i see html> <head> <title>Update Data In Database Using CodeIgniter</title> <link href='http://fonts.googleapis.com/css?family=Marcellus' rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="<br /> <b>Fatal error</b>: Call to undefined function base_url() in <b>C:\My_localhost\application\views\update_view.php</b> on line <b>5</b><br /> Then checking that line in update_view.php <link rel="stylesheet" type="text/css" href="<?php echo base_url(). "css/update.css" ?>"> After some more research Just adding url in the config/autoload.php $autoload['helper'] = array('url'); Then it is working..... just a little surprise that it would only show in view source...... (one lesson learned) RE: Getting a blank page - InsiteFX - 10-26-2017 Yep, that always gets new users. Another one to remember is that you can always use your web browsers development tools to find errors F12. Anyways glad that you found out your problem. |