[wp-trac] [WordPress Trac] #7570: Wrong upload directory on clean 2.6.1 installation

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 22 10:46:31 GMT 2008


#7570: Wrong upload directory on clean 2.6.1 installation
------------------------+---------------------------------------------------
 Reporter:  gerritholl  |       Owner:  anonymous
     Type:  defect      |      Status:  new      
 Priority:  normal      |   Milestone:  2.7      
Component:  General     |     Version:           
 Severity:  normal      |    Keywords:           
------------------------+---------------------------------------------------
 Hi,

 On a fresh 2.6.1 install, images are uploaded to the wrong directory. My
 errorlog has, among other things, four 'PHP Warnings', one 'PHP Fatal
 Error' and one 'WordPress database error' (the full log is below)

 I install wordpress according to the "Famous 5-Minute Install" (create a
 new, empty database, new user, etc).
 I do not change any configuration other than entering my database
 information in the wp-config.php file.
 I create a new post and upload an image. I select the HTTP uploader
 because my webhost (webreus.nl) does not allow the flash uploader
 (mod_security: Access denied with code 500. Pattern match "^Shockwave
 Flash" at HEADER("USER-AGENT")).
 I change the wp-content/-permissions to 777 because otherwise I will get
 the error "The uploaded file could not be moved to /var/www/vhosts
 /stratospheric-census.org/httpdocs/wordpress/wp-content".
 The upload is succesful. In my logfile, it says:

 {{{
 213.93.165.246 - - [22/Aug/2008:12:34:03 +0200] "POST /wordpress/wp-admin
 /media-upload.php?post_id=3&type=image&flash=0 HTTP/1.1" 200 11056
 "http://www.stratospheric-census.org/wordpress/wp-admin/media-
 upload.php?post_id=3&type=image&flash=0" "Mozilla/5.0 (X11; U; Linux i686;
 en-US; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1"
 }}}

 The suggested "Link URL" is http://www.stratospheric-census.org/wordpress
 /wp-content/uploads/stratosphericcensus_group.jpg

 When I click "Insert into post" it creates the following HTML code:

 {{{
 [caption id="attachment_6" align="alignnone" width="300" caption="the
 group"]<a href="http://www.stratospheric-census.org/wordpress/wp-
 content/uploads/stratosphericcensus_group2.jpg"><img class="size-medium
 wp-image-6" title="stratosphericcensus_group2" src="http://www
 .stratospheric-census.org/wordpress/wp-
 content/uploads/stratosphericcensus_group2-300x225.jpg" alt="the group"
 width="300" height="225" /></a>[/caption]
 }}}

 If I disable the linking by clicking "None" next to "Link URL" it creates
 the following HTML code (the caption-part is the same):

 {{{
 <img class="size-medium wp-image-5" title="stratosphericcensus_group1"
 src="http://www.stratospheric-census.org/wordpress/wp-
 content/uploads/stratosphericcensus_group1-300x225.jpg" alt="the group"
 width="300" height="225" />
 }}}

 The result in my httplog is like this:

 {{{
 213.93.165.246 - - [22/Aug/2008:12:35:36 +0200] "GET /wordpress/wp-
 content/uploads/stratosphericcensus_group-300x225.jpg HTTP/1.1" 404 1255
 "http://www.stratospheric-census.org/wordpress/wp-admin/post-new.php"
 "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.1) Gecko/2008072820
 Firefox/3.0.1"
 }}}

 and in my errorlog is like this:

 {{{
 [Fri Aug 22 12:24:31 2008] [error] [client 213.93.165.246] PHP Warning:
 require() [<a href='function.require'>function.require</a>]: Unable to
 access /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 includes/compat.php in /var/www/vhosts/stratospheric-
 census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:24:31 2008] [error] [client 213.93.165.246] PHP Warning:
 require(/var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 includes/compat.php) [<a href='function.require'>function.require</a>]:
 failed to open stream: No such file or directory in /var/www/vhosts
 /stratospheric-census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:24:31 2008] [error] [client 213.93.165.246] PHP Warning:
 require() [<a href='function.require'>function.require</a>]: Unable to
 access /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 includes/compat.php in /var/www/vhosts/stratospheric-
 census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:24:31 2008] [error] [client 213.93.165.246] PHP Warning:
 require(/var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 includes/compat.php) [<a href='function.require'>function.require</a>]:
 failed to open stream: No such file or directory in /var/www/vhosts
 /stratospheric-census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:24:31 2008] [error] [client 213.93.165.246] PHP Fatal
 error:  require() [<a href='function.require'>function.require</a>]:
 Failed opening required '/var/www/vhosts/stratospheric-
 census.org/httpdocs/wordpress/wp-includes/compat.php'
 (include_path='.:.:') in /var/www/vhosts/stratospheric-
 census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:24:35 2008] [error] [client 213.93.165.246] PHP Warning:
 require() [<a href='function.require'>function.require</a>]: Unable to
 access /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 includes/compat.php in /var/www/vhosts/stratospheric-
 census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:24:35 2008] [error] [client 213.93.165.246] PHP Warning:
 require(/var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 includes/compat.php) [<a href='function.require'>function.require</a>]:
 failed to open stream: No such file or directory in /var/www/vhosts
 /stratospheric-census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:24:35 2008] [error] [client 213.93.165.246] PHP Warning:
 require() [<a href='function.require'>function.require</a>]: Unable to
 access /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 includes/compat.php in /var/www/vhosts/stratospheric-
 census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:24:35 2008] [error] [client 213.93.165.246] PHP Warning:
 require(/var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 includes/compat.php) [<a href='function.require'>function.require</a>]:
 failed to open stream: No such file or directory in /var/www/vhosts
 /stratospheric-census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:24:35 2008] [error] [client 213.93.165.246] PHP Fatal
 error:  require() [<a href='function.require'>function.require</a>]:
 Failed opening required '/var/www/vhosts/stratospheric-
 census.org/httpdocs/wordpress/wp-includes/compat.php'
 (include_path='.:.:') in /var/www/vhosts/stratospheric-
 census.org/httpdocs/wordpress/wp-settings.php on line 207
 [Fri Aug 22 12:26:45 2008] [error] [client 213.93.165.246] WordPress
 database error Table 'blog2.wp_options' doesn't exist for query INSERT
 INTO wp_options (option_name, option_value, autoload) VALUES ('cron',
 'a:2:{i:1219400805;a:1:{s:17:\\"wp_update_plugins\\";a:1:{s:32:\\"40cd750bba9870f18aada2478b24840a\\";a:3:{s:8:\\"schedule\\";s:10:\\"twicedaily\\";s:4:\\"args\\";a:0:{}s:8:\\"interval\\";i:43200;}}}s:7:\\"version\\";i:2;}',
 'yes') made by add_option
 [Fri Aug 22 12:26:55 2008] [error] [client 213.93.165.246] WordPress
 database error Table 'blog2.wp_options' doesn't exist for query INSERT
 INTO wp_options (option_name, option_value, autoload) VALUES ('cron',
 'a:2:{i:1219400815;a:1:{s:17:\\"wp_update_plugins\\";a:1:{s:32:\\"40cd750bba9870f18aada2478b24840a\\";a:3:{s:8:\\"schedule\\";s:10:\\"twicedaily\\";s:4:\\"args\\";a:0:{}s:8:\\"interval\\";i:43200;}}}s:7:\\"version\\";i:2;}',
 'yes') made by add_option, referer: http://www.stratospheric-
 census.org/wordpress/wp-admin/install.php
 [Fri Aug 22 12:34:05 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-census.org/wordpress
 /wp-admin/media-upload.php?post_id=3&type=image&flash=0
 [Fri Aug 22 12:35:37 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-census.org/wordpress
 /wp-admin/post-new.php
 [Fri Aug 22 12:35:43 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-census.org/wordpress
 /wp-admin/post-new.php
 [Fri Aug 22 12:37:48 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-census.org/wordpress
 /wp-admin/media-upload.php?post_id=3&type=image&flash=0
 [Fri Aug 22 12:38:03 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-census.org/wordpress
 /wp-admin/post-new.php
 [Fri Aug 22 12:38:09 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-
 census.org/wordpress/?p=3&preview=true
 [Fri Aug 22 12:38:43 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-census.org/wordpress
 /wp-admin/post-new.php
 [Fri Aug 22 12:39:11 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-census.org/wordpress
 /wp-admin/post-new.php
 [Fri Aug 22 12:40:09 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-census.org/wordpress
 /wp-admin/media-upload.php?post_id=3&type=image&flash=0
 [Fri Aug 22 12:40:19 2008] [error] [client 213.93.165.246] File does not
 exist: /var/www/vhosts/stratospheric-census.org/httpdocs/wordpress/wp-
 content/uploads, referer: http://www.stratospheric-census.org/wordpress
 /wp-admin/post-new.php
 }}}

 I am not sure what version of MySQL is running on my webhost (webreus.nl).
 Is there a page that gives some diagnostics that I can cut'n'paste here?

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7570>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list