Uploaded Files - renamed, wrong directory

Hi Folks

I’ve already asked this on the French Spip list but as yet with no answer, so let’s see if anyone on the English list can figure it out.

I recently upgraded to 1.9. No major problems apart from when uploading documents and images. They no longer get put into the proper directories (e.g. /IMG/zip) - instead they get uploaded straight into /IMG. Worse still, the file extension plus an underscore is added to the start of the file name itself. So, if for example, I upload a file called somefile.zip, SPIP renames this to zip_somefile.zip (or, worse still, sometimes it does it twice so it becomes zip_zip_somefile.zip) and puts it into /IMG, not into /IMG/zip.

This is driving me batty!

The same happens with images: pic.gif is renamed to gif_pic.gif and put into /IMG

I’m not sure if this might be a side-effect of rename rules? I have url = « propres » and I’ve uploaded .htaccess to take care of the php3 redirection.

No idea how to solve this problem. Anyone have any ideas?

best wishes
Huw

Really strange : I don't have this troubles with the 1.9.
Did you upgrade by svn or by the download url ?
Have you tried without url=propre ?
Do you know if your server is a windows or a linux or a Mac or something else ?

.Gilles
--
2006/8/14, huw@darkneon.com <huw@darkneon.com>:

Hi Folks

I've already asked this on the French Spip list but as yet with no answer,
so let's see if anyone on the English list can figure it out.

I recently upgraded to 1.9. No major problems apart from when uploading
documents and images. They no longer get put into the proper directories
(e.g. /IMG/zip) - instead they get uploaded straight into /IMG. Worse still,
the file extension plus an underscore is added to the start of the file name
itself. So, if for example, I upload a file called somefile.zip, SPIP
renames this to zip_somefile.zip (or, worse still, sometimes it does it
twice so it becomes zip_zip_somefile.zip) and puts it into /IMG, not into
/IMG/zip.

This is driving me batty!

The same happens with images: pic.gif is renamed to gif_pic.gif and put into
/IMG

I'm not sure if this might be a side-effect of rename rules? I have url =
"propres" and I've uploaded .htaccess to take care of the php3 redirection.

No idea how to solve this problem. Anyone have any ideas?

best wishes
Huw
_______________________________________________
spip-en@rezo.net -
http://listes.rezo.net/mailman/listinfo/spip-en

Really strange : I don't have this troubles with the 1.9.
Did you upgrade by svn or by the download url ?

Downloaded, unzipped, uploaded (I followed the French upgrade instructions quite carefully so backed up and restored only those files specified).

Have you tried without url=propre ?

Not yet. There are quite a number of incoming links from other sites which use those URLs so I'm reluctant to do this.

Do you know if your server is a windows or a linux or a Mac or something else ?

It's Linux. There was one other person on the French list who reported a similar problem a couple of weeks ago but as far as I can work out, we seem to be the only two :frowning:

best wishes
Huw

2006/8/14, huw@darkneon.com <huw@darkneon.com>:

> Really strange : I don't have this troubles with the 1.9.
> Did you upgrade by svn or by the download url ?

Downloaded, unzipped, uploaded (I followed the French upgrade instructions
quite carefully so backed up and restored only those files specified).

There may be some interference when you try to overwrite some files.
What happens when you download a file, change its content, upload it
(so overwrite it) and download it again : do you see your
modifications ?

You can try this :
- delete everything on your server except 'IMG', your template
directory, and your personal files.
- Also (if present on your server) rename mes_options.php3 into mes_options.php
- in_connect.php3 into inc_connect.php
- and mes_fonctions.php3 into mes_fonctions.php
- And then upload the files of Spip 1.9
If you kept ecrire/inc_connect.php, you won't have to do any installation.

Other method (less time during wich the server is unusable) :
You can also try to install 1.9 separately on your server, and copy it
only when it's working properly :
make a directory named 'spip1.9'
copy 'IMG', your template directory, and your personal files, and
upload Spip inside it.
copy ecrire/inc_connect.php3 to spip1.9/ecrire/inc_connect.php
Go to http://your-webserver/spip1.9/ecrire
If it works, that means that SPIP is installed correctly on your server :
so finally delete everything at the Spip root directory except spip1.9
and move the whole content of spip1.9 into the root directory.

Now connect to your private area.
You'll have to make an upgrade of your database.
After that it should be ok

.Gilles

> Have you tried without url=propre ?

Not yet. There are quite a number of incoming links from other sites which
use those URLs so I'm reluctant to do this.

> Do you know if your server is a windows or a linux or a Mac or something
> else ?

It's Linux. There was one other person on the French list who reported a
similar problem a couple of weeks ago but as far as I can work out, we seem
to be the only two :frowning:

best wishes
Huw

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Thanks. I'll try this when I have the time (probably next weekend) and report back.. :wink:

best wishes
Huw

----- Original Message ----- From: "Gilles Vincent" <gilles.vincent@gmail.com>
To: <huw@darkneon.com>
Cc: <spip-en@rezo.net>
Sent: Monday, August 14, 2006 10:02 AM
Subject: Re: [Spip-en] Uploaded Files - renamed, wrong directory

2006/8/14, huw@darkneon.com <huw@darkneon.com>:

> Really strange : I don't have this troubles with the 1.9.
> Did you upgrade by svn or by the download url ?

Downloaded, unzipped, uploaded (I followed the French upgrade instructions
quite carefully so backed up and restored only those files specified).

There may be some interference when you try to overwrite some files.
What happens when you download a file, change its content, upload it
(so overwrite it) and download it again : do you see your
modifications ?

You can try this :
- delete everything on your server except 'IMG', your template
directory, and your personal files.
- Also (if present on your server) rename mes_options.php3 into mes_options.php
- in_connect.php3 into inc_connect.php
- and mes_fonctions.php3 into mes_fonctions.php
- And then upload the files of Spip 1.9
If you kept ecrire/inc_connect.php, you won't have to do any installation.

Other method (less time during wich the server is unusable) :
You can also try to install 1.9 separately on your server, and copy it
only when it's working properly :
make a directory named 'spip1.9'
copy 'IMG', your template directory, and your personal files, and
upload Spip inside it.
copy ecrire/inc_connect.php3 to spip1.9/ecrire/inc_connect.php
Go to http://your-webserver/spip1.9/ecrire
If it works, that means that SPIP is installed correctly on your server :
so finally delete everything at the Spip root directory except spip1.9
and move the whole content of spip1.9 into the root directory.

Now connect to your private area.
You'll have to make an upgrade of your database.
After that it should be ok

.Gilles

> Have you tried without url=propre ?

Not yet. There are quite a number of incoming links from other sites which
use those URLs so I'm reluctant to do this.

> Do you know if your server is a windows or a linux or a Mac or > something
> else ?

It's Linux. There was one other person on the French list who reported a
similar problem a couple of weeks ago but as far as I can work out, we seem
to be the only two :frowning:

best wishes
Huw

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

OK, I've found the solution to the file upload problem (namely: zips, gifs etc being placed into IMG directory instead of IMG/zip etc. and renamed to zip_filename, gif_filename etc.)

I eventually found an old message from Cyril in the French mailing list and after half an hour of experimenting, I finally got the problem solved. For the benefit of others, here's the answer:

1. When you upgrade from 1.8.3 to 1.9, for some reason the subfolders beneath IMG end up each with a file named .test. You must delete each file named .test in these IMG subdirectories.

2. You should set file permissions to 777 on each subdirectory of IMG as well as on the IMG directory itself.

3. Your IMG directory may by now contain some files with the name of the extension (zip, gif) etc plus 'plat' - e.g. zip.plat, gif.plat. Delete (or rename) these files too.

This should fix the problem. It should now be possible to upload gifs, zips etc. with the names unchanged into the correct subdirectories. Hurrah!

ONE MORE QUESTION....

I now have various files called zip_filename.zip (and so on) in my IMG directory. Is there any way I can rename and move them into the correct subdirectories in such a way that the files and images already attached (or displayed) in Spip documents remain attached to the appropriate documents? If not, what is the best way to tidy up my IMG directory (move the files to the correct folders) and reconstruct the pages which already reference them?

best wishes
Huw

----- Original Message ----- From: "Gilles Vincent" <gilles.vincent@gmail.com>
To: <huw@darkneon.com>
Cc: <spip-en@rezo.net>
Sent: Monday, August 14, 2006 10:02 AM
Subject: Re: [Spip-en] Uploaded Files - renamed, wrong directory

2006/8/14, huw@darkneon.com <huw@darkneon.com>:

> Really strange : I don't have this troubles with the 1.9.
> Did you upgrade by svn or by the download url ?

Downloaded, unzipped, uploaded (I followed the French upgrade instructions
quite carefully so backed up and restored only those files specified).

There may be some interference when you try to overwrite some files.
What happens when you download a file, change its content, upload it
(so overwrite it) and download it again : do you see your
modifications ?

You can try this :
- delete everything on your server except 'IMG', your template
directory, and your personal files.
- Also (if present on your server) rename mes_options.php3 into mes_options.php
- in_connect.php3 into inc_connect.php
- and mes_fonctions.php3 into mes_fonctions.php
- And then upload the files of Spip 1.9
If you kept ecrire/inc_connect.php, you won't have to do any installation.

Other method (less time during wich the server is unusable) :
You can also try to install 1.9 separately on your server, and copy it
only when it's working properly :
make a directory named 'spip1.9'
copy 'IMG', your template directory, and your personal files, and
upload Spip inside it.
copy ecrire/inc_connect.php3 to spip1.9/ecrire/inc_connect.php
Go to http://your-webserver/spip1.9/ecrire
If it works, that means that SPIP is installed correctly on your server :
so finally delete everything at the Spip root directory except spip1.9
and move the whole content of spip1.9 into the root directory.

Now connect to your private area.
You'll have to make an upgrade of your database.
After that it should be ok

.Gilles

> Have you tried without url=propre ?

Not yet. There are quite a number of incoming links from other sites which
use those URLs so I'm reluctant to do this.

> Do you know if your server is a windows or a linux or a Mac or > something
> else ?

It's Linux. There was one other person on the French list who reported a
similar problem a couple of weeks ago but as far as I can work out, we seem
to be the only two :frowning:

best wishes
Huw

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en