Page 1 of 1
Upload blank screen..
Posted:
Wed Jul 20, 2011 12:21 pm
by jimr451
Hi,
I posted once before on a similar issue - I'm looking for direction here.
I have a simple table, with a "Upload" field (Type = container).
When I save a record with an uploaded file, the file uploads, the record updates, but I get a "blank screen". After that, any attempt to view or edit the record results in a blank screen.
Can you give any spots where I can begin debugging this? I'm using xataface-1.3rc3, with php 5.3.6. Or is there a workaround for me to "save the file" on my own using the delegate class? I'd go that route if necessary.
-Jim
Re: Upload blank screen..
Posted:
Wed Jul 20, 2011 2:37 pm
by shannah
Likely there is an error happening... check your error log to see what the error is.
On a side note - I don't have any PHP 5.3.6 instances running yet. My test environments are 5.3.1 and 5.2.8 - so there is a possibility you're uncovering something new.... (but it is more likely something unrelated to the PHP version).
-Steve
Re: Upload blank screen..
Posted:
Thu Jul 21, 2011 10:22 am
by jimr451
Well, the error_log shows nothing.
I did a lot of tracing, and got into the smarty template:
Dataface_View_Record.htmlThis line is where it dies:
- Code: Select all
{record_view var=rv record=$record}
When I print out "record" the only difference between a good record (with a blank upload field) and the one that crashes, is the uploaded field:
- Code: Select all
[site_logo] => Array
(
[0] => Array
(
[0] => Array
(
[0] => logo.png
)
)
)
Not sure if any of this gives any clue. I don't know smarty templates too well, so I don't really know where to go from here.
-Jim
Re: Upload blank screen.. SOLVED
Posted:
Thu Jul 21, 2011 12:51 pm
by jimr451
Hi,
Ok, I traced the problem to not having the "fileinfo" extension on the server.
So in the Record.php, around line 2260 or so, the area where that extension is loaded, my server just bombed out with no error, just a blank screen.
My "fix" is too embarassing to post here, but if anyone else runs into this issue, i hope it points you in the right direction.
-Jim
Re: Upload blank screen..
Posted:
Thu Jul 21, 2011 2:02 pm
by shannah
What version of Xataface are you using?
Re: Upload blank screen..
Posted:
Thu Jul 21, 2011 2:11 pm
by shannah
Thanks for posting this. It seems that the dl() function is deprecated in PHP 5.3 and is not included standard anymore. I have removed this attempt to dynamically load fileinfo in SVN. The change may make it into 1.3rc5.
(Note: You'll also need to remove a similar line in Dataface/Application/blob.php if you plan to use blob columns to store your uploads).
Re: Upload blank screen..
Posted:
Fri Jul 22, 2011 4:01 am
by jimr451
Cool I'll keep the blob thing in mind. For now i'm happy my uploads are working!
FYI, the php 5.3 also broke some other software out there, as I found when I was searching. I guess a couple functions were removed or changed.
-jim