Welcome Guest, Not a member yet? Register   Sign In
read_file: file is being read, but incorrect output. Any ideas?
#11

[eluser]codex[/eluser]
[quote author="Randy Casburn" date="1216839906"]There are a couple of things to point out in the post above. First is the use of the relative path to the image. That isn't important for now, but it might be later. The second is the fact that I'm running this in the index() function. I wasn't sure how you were calling the Resize() function before and that could have some implications too.

So for now, try to run this from the index() function (http://yadayada.com/test) to see if it runs. We can move it to a Resize() function later.

Randy[/quote]

Already moved to resize(), still working. Rerouting and all.

Thanks a lot. You helped me in the right direction. I don't think I can ask more of your time and effort since the problem seems to lie within my current setup. I guess I'll just have to dive into it to try and find what's causing the problem.

Thanks again!
#12

[eluser]Randy Casburn[/eluser]
OK...no problem. Glad to help.
#13

[eluser]codex[/eluser]
EDIT: Jeez, never mind. Solved.

Original message:
Ok, I'm still puzzled why this won't work. It has something to do with my setup so I'll post it here. I'm on a shared host where I have a number of add-on domains. I want them to share a single system AND application folder. The addon folder (the domain) holds all files/folders specific to that domain.

Code:
- addon_domain
  -- config
  -- errors
  -- logs
  -- temp
  -- media
  -- assets
  -- views
  -- index.php
- application
  -- controllers
  -- helpers
  -- libraries
  -- models
- system

I've customized loader.php, common.php and exceptions.php and it all works nicely. I guess my setup will raise some eyebrows, but this works for me. But why is it (see discussion above) not working. Why can't I display an image with $this->output->set_header("content-type: image/jpeg");
$this->output->set_output($data);

Any ideas very, very welcome.
#14

[eluser]Randy Casburn[/eluser]
Quote:Why can’t I display an image with...yada yada
maybe because...
Quote:I’ve customized loader.php, common.php and exceptions.php and it all works nicely.
And this didn't work either:
Quote:d:/wamp/www/codeigniter/assets/test.jpg
Which seems to be a third or forth configuration you can't get to work.

===

So in summary, everything works nicely in your completely bastardized CI implementation...except (awkward pause)

===

But when you test everything you want to do in this post in a CI install that IS NOT bastardized...it works perfectly well.


Hmmm...how odd is that. Don't know what to tell ya.

Randy

p.s. Oh, and thanks for disclosing you had some strange set up in the beginning of all this!
#15

[eluser]codex[/eluser]
[quote author="Randy Casburn" date="1217149865"]
Quote:Why can’t I display an image with...yada yada
maybe because...
Quote:I’ve customized loader.php, common.php and exceptions.php and it all works nicely.
And this didn't work either:
Quote:d:/wamp/www/codeigniter/assets/test.jpg
Which seems to be a third or forth configuration you can't get to work.

===

So in summary, everything works nicely in your completely bastardized CI implementation...except (awkward pause)

===

But when you test everything you want to do in this post in a CI install that IS NOT bastardized...it works perfectly well.


Hmmm...how odd is that. Don't know what to tell ya.

Randy

p.s. Oh, and thanks for disclosing you had some strange set up in the beginning of all this![/quote]

Am I sensing some sarcasm here?

I should probably have mentioned that I had a different setup, but because everything was working ok up to the output->image point I presumed it had nothing to do with my setup. And to be honest, I kinda forgot I had a butchered setup, so it didn't spring to mind immediately.

Anyway, your help was great and it helped me solve the issue. I started with a fresh install, no matchbox this time, and all is working great.

Btw, customizing loader.php, common.php and exceptions.php is nothing more than modifying the path to the files. In this case removing every instance of APPPATH.
#16

[eluser]Randy Casburn[/eluser]
Customizations are as necessary naming a child some times. Everyone will tell you to use them sparingly for a few reasons. You've discussed them all in this thread..."I've forgotten I did them", "I wasn't sure if they would have an impact", "each time I go back to a fresh install and try _____(fill in the blank) it works just fine, but in my customized configuration it doesn't".

If you need you customizations, I would recommend putting them back in one at a time until this breaks. You'll at least know then what is causing your problem and will have to make the choice of FIX or FORGET at that point.

I'm glad you've got this all figured out. But please disclose the funky parts earlier next time %-P

Randy
#17

[eluser]codex[/eluser]
[quote author="Randy Casburn" date="1217185038"]Customizations are as necessary naming a child some times. Everyone will tell you to use them sparingly for a few reasons. You've discussed them all in this thread..."I've forgotten I did them", "I wasn't sure if they would have an impact", "each time I go back to a fresh install and try _____(fill in the blank) it works just fine, but in my customized configuration it doesn't".

If you need you customizations, I would recommend putting them back in one at a time until this breaks. You'll at least know then what is causing your problem and will have to make the choice of FIX or FORGET at that point.

I'm glad you've got this all figured out. But please disclose the funky parts earlier next time %-P

Randy[/quote]

What a coincidence, I was just PM-ing you saying just that. I did put all the stuff back one at a time until it broke. And figured out what was causing it :-)




Theme © iAndrew 2016 - Forum software by © MyBB