codeigniter blank page, no errors or logs - php

I was working on an existing project of codeigniter 3.0.1 and I must have change something somewhere that I dont find who broke the site. Everything was working before and now I get a blank page with no errors and no logs at all...
I have added the code to the index.php to display error and still nothing
error_reporting(E_ALL);
ini_set('display_errors', 'On');
I then started to put some echo to see where i reached... Index reach to
require_once BASEPATH.'core/CodeIgniter.php';
system/core/CodeIgniter.php reach to
$EXT =& load_class('Hooks', 'core');
system/core/Hooks.php reach to
$CFG =& load_class('Config', 'core');
And then nothing can be echo from /system/core/Config.php within the constructor. I can still echo from before the class definition.
I picked a fresh copy of that file to be sure it's good and still same.
Can anyone help me identify the issue or point me out some ideas, I am not so used to CI. Thanks in advance

The problem was an error in a php syntaxe in some page. I post this answer because of the way I ended up troubleshooting it... For some reason, I was totally unable to get the error messages from anywhere (log or php_error) even with the error_reporting or the ini_set() even if i placed it mostly everywhere even the page where the error was.
The problem about no error reporting came from the php config that I didnt had acces to, but I managed to downgrade the php version from 7 to 5.6 and errors showed up letting me find the file with bad php syntaxe.
Hope that might help someone

Related

php, ajax error reporting is not working

i have this file and on a click event it calls a php function through $.post{}
i have used alert(data) to recognized errors. But unfortunately its not allerting anything except it shows an error on firebug console with relevant url "Internal server error 500" and then i tried to access the code through browser pasting the full url, I have put error_reporting(E_ALL);
ini_set("display_errors", 1); , but shows a blank page. I'm lost here no idea how to solve this without any errors displaying.. Help much appreciated.
p.s in php info error reporting is off. i tried htaccess on my subfolder without no luck either.
Make sure of the following:
error_reporting(E_ALL) is right after <?php tag
There is indeed a PHP error - try to deliberately make one. Maybe the error is elsewhere, not your PHP but the .htaccess file (since you're getting 500), or maybe it's a logical error.

php login script error

I have this login script working just fine on one server but not on other and coudn't figure out why.
include_once 'include/processes.php';
$Login_Process = new Login_Process;
$Login_Process->check_status($_SERVER['SCRIPT_NAME']);
and the third line won't display the server status, the code display on my web page, and didn't go to main page. any idea may cause the issue.
thanks.
The third line isn't working, most likely, because you have a Fatal Error being generated somewhere as a result of this line:
$Login_Process = new Login_Process;
Either use ini_set to change the errors being displayed, or set up an error log. You basically need to know what the errors are, and then you can deal with them.
It could be many things, some of which may be the configuration.
The first thing I would check is the PHP version. Make sure that nothing in your scripts or your php.ini file conflict with the version of PHP you're migrating to.
After that, go through the functions you're calling and make sure nothing is deprecated in PHP on the second server.

PHP website does not work, and nothing logged in the error log

I have a problem with PHP. There is an error that I have never encountered before. The home.php, which is the main page of my site, cannot be viewed. And there is nothing in error log. After there is an inclusion of a php page (a class that is a part of my API). Till that line the holl HTML (javascript and css inclusions) are echoed from php and successfully rendered in browser, but after the php kind of stops suddenly. When I delete that line(php page inclusion line), website works, but before, this inclusion didn't make any problem for me. I removed the code parts which after them I encountered this problem, but nothing works.
I am using Apache2, PHP5 with Ubuntu 11.10.
Any help will be appreciated, thanks in advance.
My first hints would be to check the following:
In your script set ini_set('display_errors', '1'); and error_reporting(E_ALL); to display all errors.
Turn on the php error log and check it for errors.
run php -l home.php on the command line to check your php file for syntax errors.
Check Apache's error log, sometimes error messages go there.
If nothing helps use a debbugger like XDebug to see where the script terminates, or alternative insert statements like die("here"); and move them around in your code, to see which parts of your scripts are passed.
Greetings and good luck.

X-Cart stopped working, it seems like it goes somewhere and never comes back

I am facing a very strange issue in X-Cart, I am working on localhost. It was working fine and now it is not working anymore. It shows nothing but a blank page, it seems like it goes somewhere and then doesn't come back.
We installed another X-Cart on localhost and it worked fine. I am just doing theming, client will purchase license. So is it because of some sort of licensing problem? That it works for some time and then stops working?
I tried to debug and seems like problem is in sessions.php file in include directory. It seems like statement creating problem is x_session_start().
If your seeing a blank page it's probably because there's been an error and you have error reporting disabled.
You can enable it by putting this code on the first line of the script...
ini_set('display_errors', 1);
error_reporting(E_ALL);

Include does nothing

I want to chceck files before I'll connect domain on my server. I've added them in direct admin, I've uploaded files - but I don't know how to get to them.
I have 4 domains connected, but i have acces only to one. I saw that it's possible to include file from higher level
include('../../panele-podlogowe.eu/adm/img/edit.gif')
That gave me correct image. But when I've done:
include('../../panele-podlogowe.eu/index.php');
Nothing happens (I've turned Error reporting on).
When I did something like:
include('../../panele-podlogowe.eu/index.php');
echo 'Failed?';
Nothing prints out... What the heck?
Solution:
ini_set("display_errors", "stdout");
Review the PHP error log. That usually, even under default settings, shows what's the problem.
Enable error reporting so php will print what is wrong. Add this at the top of your file.
error_reporting(E_ALL);
Otherwise:
Check the access permissions for that file
Double-check the file you are including for syntax errors. (if the include causes php to crash/segfault you might not get any output)

Categories