Welcome Guest, Not a member yet? Register   Sign In
CI checking permitted URI chars....in a perl script?!?!
#11

[eluser]TheFuzzy0ne[/eluser]
You can enable logging in your config.php file.

Code:
$config['log_threshold'] = 4;

Just ensure the log directory is writable.

You can also use log_message() to write your own entries to the log file. http://ellislab.com/codeigniter/user-gui...rrors.html
#12

[eluser]jrlooney[/eluser]
ok this might be it. So, the CI application has a separate header.php view for all the navigation at top. In the very top of that view, the user's login credentials are checked by calling a function inside of a helper - and that function uses get_instance() so that it can make use of the CI database class for querying the db.

Code:
$CI =& get_instance();

So, gonna try getting rid of that for now to see what happens.

#13

[eluser]jrlooney[/eluser]
Thanks! TUrned on all logging, refreshed the page and got this from the log. Notice the config is initialized again after loading that header file, so i wonder if it is in fact what i just discovered above with get_instance

Code:
DEBUG - 2013-03-19 15:00:42 --> Config Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Hooks Class Initialized
DEBUG - 2013-03-19 15:00:42 --> URI Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Router Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Output Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Input Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Global POST and COOKIE data sanitized
DEBUG - 2013-03-19 15:00:42 --> Language Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Loader Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Helpers loaded: url, cm_helper
DEBUG - 2013-03-19 15:00:42 --> Database Driver Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Validation Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Controller Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Model Class Initialized
DEBUG - 2013-03-19 15:00:42 --> File loaded: cm/views/header.php
DEBUG - 2013-03-19 15:00:42 --> Config Class Initialized
DEBUG - 2013-03-19 15:00:42 --> Hooks Class Initialized
DEBUG - 2013-03-19 15:00:42 --> URI Class Initialized
DEBUG - 2013-03-19 15:00:42 --> File loaded: cm/views/setting_publish_site_view.php
DEBUG - 2013-03-19 15:00:42 --> File loaded: cm/views/footer.php
DEBUG - 2013-03-19 15:00:42 --> Language file loaded: language/english/profiler_lang.php
DEBUG - 2013-03-19 15:00:42 --> Final output sent to browser
DEBUG - 2013-03-19 15:00:42 --> Total execution time: 0.3857
#14

[eluser]TheFuzzy0ne[/eluser]
That only returns an instance of the $CI super-global, so that you can use it within helpers and libraries. Removing that will cause problems. Smile
#15

[eluser]TheFuzzy0ne[/eluser]
It looks to me like CodeIgniter is being called twice there, since it shouldn't allow you to initialize the config class twice, it should just ignore the second request, and log that. However, it may depend on how old your CodeIgniter installation is. I have trouble remembering what I had for breakfast this morning, let alone what CodeIgniter supported/didn't support several years ago. xD

I can't help thinking that the first time CodeIgniter is run, it's not actually completing it's run for some reason. I've seen this before, but I can't remember for the life of me what the problem was.

I suggest that in your index.php file, you have something like this:

Code:
file_put_contents('path_to_log_file', 'DEBUG - '.date('Y-m-d H:i:s')." --> Starting Execution\n", FILE_APPEND);

That should show you where execution is starting, and from that, we can deduce where it's ending.
#16

[eluser]jrlooney[/eluser]
perfect! thank you. definitely seems to be related to that header view.

Code:
DEBUG - 2013-03-19 15:37:33 --> Starting Execution
DEBUG - 2013-03-19 15:37:33 --> Config Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Hooks Class Initialized
DEBUG - 2013-03-19 15:37:33 --> URI Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Router Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Output Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Input Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Global POST and COOKIE data sanitized
DEBUG - 2013-03-19 15:37:33 --> Language Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Loader Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Helpers loaded: url, cm_helper
DEBUG - 2013-03-19 15:37:33 --> Database Driver Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Validation Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Controller Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Model Class Initialized
DEBUG - 2013-03-19 15:37:33 --> File loaded: cm/views/header.php
DEBUG - 2013-03-19 15:37:33 --> Starting Execution
DEBUG - 2013-03-19 15:37:33 --> Config Class Initialized
DEBUG - 2013-03-19 15:37:33 --> Hooks Class Initialized
DEBUG - 2013-03-19 15:37:33 --> URI Class Initialized
DEBUG - 2013-03-19 15:37:33 --> File loaded: cm/views/setting_publish_site_view.php
DEBUG - 2013-03-19 15:37:33 --> File loaded: cm/views/footer.php
DEBUG - 2013-03-19 15:37:33 --> Language file loaded: language/english/profiler_lang.php
DEBUG - 2013-03-19 15:37:33 --> Final output sent to browser
DEBUG - 2013-03-19 15:37:33 --> Total execution time: 0.3165
#17

[eluser]TheFuzzy0ne[/eluser]
Have you enabled error reporting? At the beginning of your index.php file, paste this:
Code:
ini_set('display_errors', '1');
error_reporting(E_ALL);

I suspect it could be an issue with a trailing whitespace, and headers being sent prematurely.
#18

[eluser]jrlooney[/eluser]
i did have error_reporting set to all, but not the other. However, adding that in doesnt output anything new. However, your thought on headers being sent prematurely is a good thought. i'll check each script - probably starting with that final php one
#19

[eluser]jrlooney[/eluser]
Aha. Ok. So I ran the first perl script again on command line - and in the debug stuff it outputs, it looks like this newer version of PHP is outputting some header junk w/o me knowing it:

Code:
X-Powered-By: PHP/5.2.17
Content-type: text/html

<li><a href="/index.php">Home</a>....

So, now I gotta figure out how to suppress that, as I never had that happen in the older version of PHP on our old server.
#20

[eluser]TheFuzzy0ne[/eluser]
There aren't even any <ul> tags. I don't know if that's intentional, because if it's not, it seems your controller may echo something that it probably shouldn't. That's why the headers are being sent.

How is that view being loaded? I assume you want to grab the output from that view and insert it into another?

It might help if I could see the controller method that's calling the view, and the view itself.




Theme © iAndrew 2016 - Forum software by © MyBB