I have been researching and I found the fix for all my problems. I am hosting my Moodle server at 1and1. I just had to use some special .htaccess and php.ini files to let it work properly. And it is also necesary to copy those files in all the moodle directories in order for it to work.
These are the contents of the files:
- File .htaccess:
AcceptPathInfo on
LimitRequestBody 0
- File php.ini
AcceptPathInfo on
cgi.fix_pathinfo = 0
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 600
default_socket_timeout = 600
I put those files in the main moodle directory, and then, to copy them in every subdirectory, making a symbolic link to the main .htaccess and php.ini files I put the following commands:
find . -type d -exec ln -s /full/path/to/moodle/.htaccess {} \;
find . -type d -exec ln -s /full/path/to/moodle/.php.ini {} \;
And now everything is working properly