• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
upload gives white screen

#1
[eluser]überfuzz[/eluser]
I'm setting up a pdf-upload. The file is uploaded, but I'm getting a white screen.



Code:
$config['upload_path'] = './assets/pdf/';
            $config['allowed_types'] = 'pdf';
            $config['max_size'] = '5000';  // Don't say, clients order. default in php.ini is 12M.
            $config['xss_clean'] = TRUE;

            if(!isset($this->data['status_pdf']))   //If no error in form status_pdf isn't set.
            {
                $this->load->library('upload', $config);


                if ( ! $this->upload->do_upload())
                {
                    // ------------------- Part works
                    $this->data['status_pdf'][] = $this->upload->display_errors('', '');
                    $this->data['content'] = "inloggad/veckobrev/form";
                    $this->load->view('templates/logged', $this->data);
                }
                else
                {
                    // ---------------------- Here I'm getting white screen.
                    //get raw_name to store src-link.
                    $temp_array = $this->upload->data();
                    print_r($temp_array);

                }
            }

Edit, I can't see what's wrong here. If any one can and points it out I'll be very happy.

#2
[eluser]LuckyFella73[/eluser]
Hej hej Überfuzz,

I can't see an error at the pointed lines. Are you
sure that the pdf file is uploaded and did you try
to echo a test-string in your else condition to prove
that the script in the else condition is performed?

Har det sa bra

Update:
I just tested your lines from the else condition in
my backend where a pdf upload is done and got the
print_r result like expected. Tested with CI 1.7.1

So I think it must be something else ...
very helpful .. Wink

#3
[eluser]überfuzz[/eluser]
[quote author="LuckyFella73" date="1261071072"]Hej hej Überfuzz,

I can't see an error at the pointed lines. Are you
sure that the pdf file is uploaded and did you try
to echo a test-string in your else condition to prove
that the script in the else condition is performed?

Har det sa bra[/quote]

Well I've done the 'standard' debugging. Every if/else seems to work, I'm getting stuff echoed in every one but the one with the print_r() test. Can't figure it out..?

Danke gleisfals!

Edit, I forgot to mention. The file is uploaded to the server, in the right folder.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.