When I go to upload a file using the webform, nothing happens. The uploader just sits there and spins. I get the following error in the console.
Version 2.9.4
```javascript
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data[Learn More]
jquery.min.js:5:15991
TypeError: uploadCategory is null[Learn More]
```

<!-- github-sync-id:354688328 -->
Please use the developer console F12 to display the content of the json
response. Thank you
Le mar. 28 août 2018 à 16:19, autodonncha <notifications@github.com> a
écrit :
> I also have this problem.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/Piwigo/Piwigo/issues/920#issuecomment-416602534>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AAs-jdDr6w9YP4EY-JZWhkVbOiUzHxvTks5uVVF0gaJpZM4WPbKZ>
> .
>
<!-- github-comment-id:416603515 -->
VM220:1 Uncaught SyntaxError: Unexpected token p in JSON at position 1
at JSON.parse ()
at Function.m.parseJSON (jquery.min.js?v2.9.4:5)
at o.Uploader.FileUploaded (admin.php?page=photos_add:459)
at o.Uploader. (124w9x3.js:110)
at Array. (124w9x3.js:95)
at i (124w9x3.js:95)
at 124w9x3.js:95
at Array. (124w9x3.js:95)
at i (124w9x3.js:95)
at 124w9x3.js:95
My console is showing this error:
VM220:1 Uncaught SyntaxError: Unexpected token p in JSON at position 1
at JSON.parse (<anonymous>)
at Function.m.parseJSON (jquery.min.js?v2.9.4:5)
at o.Uploader.FileUploaded (admin.php?page=photos_add:459)
at o.Uploader.<anonymous> (124w9x3.js:110)
at Array.<anonymous> (124w9x3.js:95)
at i (124w9x3.js:95)
at 124w9x3.js:95
at Array.<anonymous> (124w9x3.js:95)
at i (124w9x3.js:95)
at 124w9x3.js:95
<!-- github-comment-id:416606561 -->
That's not the content. Check into the Network tab instead, the answer of
the json request
Le mar. 28 août 2018 à 16:34, William Hodges <notifications@github.com> a
écrit :
> [image: image]
> <https://user-images.githubusercontent.com/11448029/44729861-afc83d80-aaad-11e8-8102-dc09ddf2890f.png>
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/Piwigo/Piwigo/issues/920#issuecomment-416608128>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AAs-jbfhOi0ZdiMgyUKZcZc_XqY0VuLVks5uVVTjgaJpZM4WPbKZ>
> .
>
<!-- github-comment-id:416612376 -->
Forbidden
You don't have permission to access /ws.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to
use an ErrorDocument to handle the request.
Yet, the permissions are set to 777.
Interesting, I'm getting the following:
```
Forbidden
You don't have permission to access /ws.php on this server.
Additionally, a 403 Forbidden error was encountered while trying to
use an ErrorDocument to handle the request.
```
Yet, the permissions are set to 777.
<!-- github-comment-id:416622416 -->
https://piwigo.org/forum/viewtopic.php?id=28837
Le mar. 28 août 2018 à 17:07, William Hodges <notifications@github.com> a
écrit :
> Interesting, I'm getting the following:
>
> Forbidden
>
> You don't have permission to access /ws.php on this server.
>
> Additionally, a 403 Forbidden error was encountered while trying to
> use an ErrorDocument to handle the request.
>
> Yet, the permissions are set to 777.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/Piwigo/Piwigo/issues/920#issuecomment-416622416>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AAs-jd7zPIJvuzkTvySISeYO5EP1Y0Cpks5uVVywgaJpZM4WPbKZ>
> .
>
<!-- github-comment-id:416630209 -->
I am using a volume to store images. Is that a problem from using an absolute path, or is that a permissions issue?
Thanks for your help.
Ok I am getting:
[prepare_directory] cannot create directory ".//mnt/volume_lon1_02/2018/08/28"
In my conf:
$conf['upload_dir'] = '/mnt/volume_lon1_02';
I am using a volume to store images. Is that a problem from using an absolute path, or is that a permissions issue?
Thanks for your help.
<!-- github-comment-id:416631740 -->
That's beyond my small knowledge of Linux and i don't know that part of
Piwigo, but could you use symlink instead of changing the setting?
Le mar. 28 août 2018 à 17:30, autodonncha <notifications@github.com> a
écrit :
> Ok I am getting:
>
> [prepare_directory] cannot create directory
> ".//mnt/volume_lon1_02/2018/08/28"
>
> I am using a volume to store images. Is there a problem with using
> absolute paths, or is that a permissions issue?
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <https://github.com/Piwigo/Piwigo/issues/920#issuecomment-416631740>, or mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/AAs-jUxRDamj_gpdhe1G7ZSUiVD6KOXMks5uVWIugaJpZM4WPbKZ>
> .
>
<!-- github-comment-id:416634189 -->
I figured it out. For me, it was caused by the absolute path. It must be relative, as the comment above the setting says.
I needed to use:
$conf['upload_dir'] = '../../../mnt/volume_lon1_02';
Thanks for your help
<!-- github-comment-id:416634470 -->
Hm, I have a similar problem (piwigo 2.9.4). I see there's an attempt to upload files in upload/buffer : .part files are created with 0 length, but that's it. I see no error in logs.
Files are ~1-3MB, I verified I can upload files with small php script.
EDIT: I spawned a VM and installed it on vanilla system -- it works without problem. So probably something in my configuration is causing a problem. FYI: It's a FreeBSD 11.2, apache24/php71/mysql56 running inside jail.
PHP does have a permission to upload (tested by my small php script), so I'm obviously missing something ..
EDIT2: I'm updating the answer just in case somebody else has the same problem. In php.ini, among other things, I've upload_tmp_dir set to non-standard directory. For this reason I had to update open_basedir to include this dir in the path.
Hm, I have a similar problem (piwigo 2.9.4). I see there's an attempt to upload files in upload/buffer : .part files are created with 0 length, but that's it. I see no error in logs.
Files are ~1-3MB, I verified I can upload files with small php script.
EDIT: I spawned a VM and installed it on vanilla system -- it works without problem. So probably something in my configuration is causing a problem. FYI: It's a FreeBSD 11.2, apache24/php71/mysql56 running inside jail.
PHP does have a permission to upload (tested by my small php script), so I'm obviously missing something ..
EDIT2: I'm updating the answer just in case somebody else has the same problem. In php.ini, among other things, I've `upload_tmp_dir` set to non-standard directory. For this reason I had to update `open_basedir` to include this dir in the path.
<!-- github-comment-id:433705962 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
When I go to upload a file using the webform, nothing happens. The uploader just sits there and spins. I get the following error in the console.
Version 2.9.4
I also have this problem.
Please use the developer console F12 to display the content of the json
response. Thank you
Le mar. 28 août 2018 à 16:19, autodonncha notifications@github.com a
écrit :
My console is showing this error:
VM220:1 Uncaught SyntaxError: Unexpected token p in JSON at position 1
at JSON.parse ()
at Function.m.parseJSON (jquery.min.js?v2.9.4:5)
at o.Uploader.FileUploaded (admin.php?page=photos_add:459)
at o.Uploader. (124w9x3.js:110)
at Array. (124w9x3.js:95)
at i (124w9x3.js:95)
at 124w9x3.js:95
at Array. (124w9x3.js:95)
at i (124w9x3.js:95)
at 124w9x3.js:95
That's not the content. Check into the Network tab instead, the answer of
the json request
Le mar. 28 août 2018 à 16:34, William Hodges notifications@github.com a
écrit :
Interesting, I'm getting the following:
Yet, the permissions are set to 777.
https://piwigo.org/forum/viewtopic.php?id=28837
Le mar. 28 août 2018 à 17:07, William Hodges notifications@github.com a
écrit :
Ok I am getting:
[prepare_directory] cannot create directory ".//mnt/volume_lon1_02/2018/08/28"
In my conf:
$conf['upload_dir'] = '/mnt/volume_lon1_02';
I am using a volume to store images. Is that a problem from using an absolute path, or is that a permissions issue?
Thanks for your help.
That's beyond my small knowledge of Linux and i don't know that part of
Piwigo, but could you use symlink instead of changing the setting?
Le mar. 28 août 2018 à 17:30, autodonncha notifications@github.com a
écrit :
I figured it out. For me, it was caused by the absolute path. It must be relative, as the comment above the setting says.
I needed to use:
$conf['upload_dir'] = '../../../mnt/volume_lon1_02';
Thanks for your help
Hm, I have a similar problem (piwigo 2.9.4). I see there's an attempt to upload files in upload/buffer : .part files are created with 0 length, but that's it. I see no error in logs.
Files are ~1-3MB, I verified I can upload files with small php script.
EDIT: I spawned a VM and installed it on vanilla system -- it works without problem. So probably something in my configuration is causing a problem. FYI: It's a FreeBSD 11.2, apache24/php71/mysql56 running inside jail.
PHP does have a permission to upload (tested by my small php script), so I'm obviously missing something ..
EDIT2: I'm updating the answer just in case somebody else has the same problem. In php.ini, among other things, I've
upload_tmp_dirset to non-standard directory. For this reason I had to updateopen_basedirto include this dir in the path.