Welcome Guest, Not a member yet? Register   Sign In
[Q] [SOLVED] using tidy_repair_string from within ci app
#1

[eluser]vlad_ci[/eluser]
I am having a strang problem that I experience on my webhosts' site
but not in my home env.

The code below works as an individual test file, but when invoked
from within a library loaded with __autoload
while executing within CI framework, I get a Warning

Code:
A PHP Error was encountered

Severity: Warning

Message: tidy_repair_string() [function.tidy-repair-string]: Unable to load Tidy configuration file at '/usr/local/lib/php/default.tcfg'.





Code:
<?php

error_reporting(E_ALL,E_STRICT,E_WARNING);


$config=array(
                                'indent'         => false,
                        'output-xhtml'   => true, //this one is important
                        'numeric-entities' => true,
                        'doctype' => 'auto',
                        'clean' => true,
                        'add-xml-space'=>true,
                        'drop-proprietary-attributes'=>true,
                        'wrap' => 0);

        $fixed_up_str=
                tidy_repair_string(
                '<p>Tidy String: if there are no errors it is working </p>',
                $config,'utf8');


    echo $fixed_up_str;
?&gt;

The support people are asking me to replicate the problem in a small tets file .. but in this
small test file it works. Wanted to know if anybody has an idea

(the hosting provider is linux/centos PHP 5.2.8, tidy was recently enabled at my request)
I do not have access to /usr/local/lib directory (from my viritual account it does not exist)
#2

[eluser]vlad_ci[/eluser]
Ok, I needed to use a bitmask and more importantly do this

ini_set("display_errors", 1);

otherwise errors were not displayed




Theme © iAndrew 2016 - Forum software by © MyBB