Mediadatabase: Moving pictures
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Mediadatabase: Moving pictures
I have a sugestion: It would be a nice feature, if s9y would scan the articles for image refs after moving medias to another directory and change the refs to the new location, if found.
If this should slow down the performance to much, we could add a new table imagerefs, where imagerefs to article id's are saved (similiar to the references table).
I hope, this was not sugested before..
[And sorry, I'm German: I hope my English was good enough to make my sugestion clear..]
If this should slow down the performance to much, we could add a new table imagerefs, where imagerefs to article id's are saved (similiar to the references table).
I hope, this was not sugested before..
[And sorry, I'm German: I hope my English was good enough to make my sugestion clear..]
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Mediadatabase: Moving pictures
Hi!
When you use MySQL, Serendipity does exactly this. It was added for Serendipity 1.2, I believe.
Best regards,
Garvin
When you use MySQL, Serendipity does exactly this. It was added for Serendipity 1.2, I believe.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
How do you move the media files? Are you using MySQL?
The code is contained in include/functions_images.inc.php, function serendipity_moveMediaDirectory().
HTH,
Garvin
How do you move the media files? Are you using MySQL?
The code is contained in include/functions_images.inc.php, function serendipity_moveMediaDirectory().
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Later again: I've updated successfully to the nighly build!
But the moving functionality still doesn't work. But whil moving the image to another subdirectory, I get PHP errors (I get them with 1.1.3, too, if I remember correctly):
But the moving functionality still doesn't work. But whil moving the image to another subdirectory, I get PHP errors (I get them with 1.1.3, too, if I remember correctly):
Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/brocken/blog/include/db/mysql.inc.php on line 270
Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www/htdocs/brocken/blog/include/db/mysql.inc.php on line 271
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /www/htdocs/brocken/blog/include/db/mysql.inc.php on line 271
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /www/htdocs/brocken/blog/include/db/mysql.inc.php on line 281
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
That sounds like a general MySQL problem. Which version are you running? You should check the MySQL error logs.
HTH,
Garvin
That sounds like a general MySQL problem. Which version are you running? You should check the MySQL error logs.
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Hmm. I'm using MySQL 5.0.22 (http://blog.brockha.us/infophp.php).garvinhicking wrote:That sounds like a general MySQL problem. Which version are you running? You should check the MySQL error logs.
But this is the only place, where I get this error messages ever yet, only while moving images.. After the moving process, the image is moved correctly but the article is not updated. Well.. I guess I can live without that feature allthough I realy would like to have it..
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Could you patch the function i mentioned to see which SQL query is causing the error?
Regards,
Garvin
Could you patch the function i mentioned to see which SQL query is causing the error?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Just echo the $sql and other variables that are being sent to serendipity_db_query() inside the function serendipity_moveMediaDirectory() - in your prevoius postings I figured you'Re already quite well with PHP, so maybe you can do that?
Regards,
Garvin
Just echo the $sql and other variables that are being sent to serendipity_db_query() inside the function serendipity_moveMediaDirectory() - in your prevoius postings I figured you'Re already quite well with PHP, so maybe you can do that?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact: