Forums

file upload add to DB but not save to directory

Qbik 27 Mar, 2014
I have a problem with file upload i set my own absolute path

for me it is /home/rogiew/public_html/auto/images/nasze-dzieci/

nasze-dzieci permission is set to 755

and i recive this error

Notice: Undefined variable: action_id in /home/rogiew/public_html/administrator/components/com_chronoforms5/chronoforms/actions/file_upload/file_upload.php on line 131

Notice: Undefined variable: action_id in /home/rogiew/public_html/administrator/components/com_chronoforms5/chronoforms/actions/file_upload/file_upload.php on line 182
GreyHead 27 Mar, 2014
Hi Qbik,

Strictly speaking those are PHP Notices, not errors, though they can sometimes cause errors. You can hide them by setting the Site Error Reporting to System Default or None in the site Global Configuration.

The upload problems may be being caused by extra slashes, you might test with and without the slashes at the end of the path. There was also, I think, a bug in one of the CFv5 releases so make sure that you have the latest release.

If that doesn't help then turning the Debugger on might well give more clues about what is happening

Bob
Qbik 27 Mar, 2014
ok i check the slashes and nothing change I put this address in upload patch

home/rogiew/public_html/auto/images/nasze-dzieci/

when i set debugger to on
I received this for file uploader
Array
(
    [file_upload] => Array
        (
            [name] => 20140327143242_44.jpg
            [original_name] => 44.jpg
            [path] => home/rogiew/public_html/images/nasze-dzieci/20140327143242_44.jpg
            [size] => 21419
            [link] => home/rogiew/public_html/images/nasze-dzieci/20140327143242_44.jpg
        )

)


and after it there is info

Array
(
    [] => Array
        (
            [Files Upload] => Array
                (
                    [0] => Upload routine started for file upload by : file_upload
                    [1] => home/rogiew/public_html/images/nasze-dzieci/20140327143242_44.jpg has been uploaded successfully.
                )

        )
[...]


so its look like everything ok but still nothing in destination foler😟
GreyHead 28 Mar, 2014
Hi Qbik,

Hard to know. Please try adding this in a temporary Custom Code action in the ON Submit event.
<?php
echo $_FILES;
?>
It shouldn't show any errors but might give a clue about what is happening.

Bob
Qbik 28 Mar, 2014
ok i do it but it show only
array


when i use debugger it show me this as error
Array
(
)


any idea??
GreyHead 28 Mar, 2014
Hi Qbik,

Sorry, please try
<?php
echo'<div>$_FILES: '.print_r($_FILES, true).'</div>';
?>

The empty array in the Debug just says that there were no errors recorded.
Bob
This topic is locked and no more replies can be posted.