Hi John,
Thanks for your reply.
it is often a problem with PHPBaseDir (which sets openbase_dir), upload_tmp_dir and $_SERVER['DOCUMENT_ROOT'].
Yes, surely !
In your case I think it is is with upload_tmp_dir.
Mmm... Why ?
If upload_tmpdir is not set, we usually have an
UPLOAD_ERR_NO_TMP_DIR error. As you can see in my first post, phpinfo() confirms that it's well set to /tmp. I did it via a template-custom... And I have no error in
$_FILES['docjoint']['error'] (tested as
UPLOAD_ERR_OK just before calling
move_uploaded_file. I also test the returned error, somewhere before in the script, and there is none [yes, there is a useless double check : my script is very bad
])
Is there another reason that makes you think that my upload_tmp_dir is not good ?
Personally I found rather than trying to mess with the Primary ibay it is easier to create a new ibay and mess with that !
Ok. I will try with another ibay. But did you pay attention that I already try to put my uploaded file in another ibay ? My Php script is in the Primary, but I want the uploaded file to go on the "shared_files" ibay. So, did you suggest to put my script on a third ibay ? Not a problem for me, but I'm not sure that it will magically make this work ! No risk to try anyway...
You set PHPBaseDir on the Primary iBay but I am not sure that is needed ?
What do you mean exactly :
1 - It's not needed because it's the default,
2 - Or it's not needed as I want to put the uploaded file in another ibay ?
As I put my script in the Primary, I think it's needed unless it's the default, but anyway it can't be the problem, can it ?
I worry if the problem is not rather with the $_SERVER['DOCUMENT_ROOT'], the path I use for the destination, or the fact that I want to put it in another ibay. In the script I gave in my first post, I had a bad path. This gives me a "No such file or directory" error in /var/log/messages. But if I put
../../shared_files/html or
$_SERVER['DOCUMENT_ROOT']/../../shared_files/html, I get a "Permission denied" error, when I should be able to write in this ibay, as the rights are
UserAccess=wr-group-rd-everyone with
Group=shared. Am I wrong ?
Before putting it on the prod server, where it doen't works, I test this script on my own server, in an ibay (not Primary) and putting the uploaded file in a subfolder of the same ibay. In this case, it's working properly. So, unless I forgot something in the config of the prod server (I gave it in my first post, and don't see what could be wrong or missing), it seems that the problem is with the use of the 2 different ibays... The only thing changed in the script between the 2 servers is the path.