You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Austin Mico <un...@gmail.com> on 2014/01/08 11:40:08 UTC

upgrade to subversion 1.8.5 suspected bug

Hi,

I have tried to upgrade with the latest version 1.8.5 but found to have the
display of the repository with apache to be incorrect wherein php codes
were displayed incorrectly. Some of the codes were truncated.

I just reverted back to 1.8.4 and still work on my local dev box.


Thanks,

Austin

Re: upgrade to subversion 1.8.5 suspected bug

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
Do you have another web server running on port 80? And does the
WanDisco server tweak the standard "httpd" package's configuration, or
does it install another fully equipped "httpd"?

You should be able to run tools like "netstat" and "lsof" to see what
has the port open.

On Tue, Jan 21, 2014 at 12:04 AM, Austin Mico <un...@gmail.com> wrote:
>
> Sorry, this is a private repository.
>
> The subversion is 1.8.4 (r1534716)
>
> mod_dav_svn.x86_64 1.8.4-2
>
> Here is the yum update command:
>
>  yum update subversion
> Loaded plugins: fastestmirror
> Loading mirror speeds from cached hostfile
>  * base: mirrors.arsc.edu
>  * extras: mirrors.lga7.us.voxel.net
>  * ius: archive.linux.duke.edu
>  * updates: mirror.clarkson.edu
> Setting up Update Process
> Resolving Dependencies
> --> Running transaction check
> ---> Package subversion.x86_64 0:1.8.4-2 will be updated
> --> Processing Dependency: subversion = 1.8.4-2 for package:
> mod_dav_svn-1.8.4-2.x86_64
> ---> Package subversion.x86_64 0:1.8.5-1 will be an update
> --> Running transaction check
> ---> Package mod_dav_svn.x86_64 0:1.8.4-2 will be updated
> ---> Package mod_dav_svn.x86_64 0:1.8.5-1 will be an update
> --> Finished Dependency Resolution
>
> Dependencies Resolved
>
> =============================================================================================================================================================
>  Package                                 Arch
> Version                               Repository
> Size
> =============================================================================================================================================================
> Updating:
>  subversion                              x86_64
> 1.8.5-1                               WANdisco
> 2.2 M
> Updating for dependencies:
>  mod_dav_svn                             x86_64
> 1.8.5-1                               WANdisco
> 76 k
>
> Transaction Summary
> =============================================================================================================================================================
> Upgrade       2 Package(s)
>
> Total download size: 2.2 M
> Is this ok [y/N]:
> Downloading Packages:
> (1/2): mod_dav_svn-1.8.5-1.x86_64.rpm
> |  76 kB     00:00
> (2/2): subversion-1.8.5-1.x86_64.rpm
> | 2.2 MB     00:02
> -------------------------------------------------------------------------------------------------------------------------------------------------------------
> Total
> 616 kB/s | 2.2 MB     00:03
> Running rpm_check_debug
> Running Transaction Test
> Transaction Test Succeeded
> Running Transaction
>   Updating   : subversion-1.8.5-1.x86_64
> 1/4
>   Updating   : mod_dav_svn-1.8.5-1.x86_64
> 2/4
> Stopping httpd: [  OK  ]
> Starting httpd: [  OK  ]
>   Cleanup    : mod_dav_svn-1.8.4-2.x86_64
> 3/4
>   Cleanup    : subversion-1.8.4-2.x86_64
> 4/4
> Stopping httpd: [FAILED]
> Starting httpd: (98)Address already in use: make_sock: could not bind to
> address 0.0.0.0:80
> no listening sockets available, shutting down
> Unable to open logs
> [FAILED]
>   Verifying  : mod_dav_svn-1.8.5-1.x86_64
> 1/4
>   Verifying  : subversion-1.8.5-1.x86_64
> 2/4
>   Verifying  : subversion-1.8.4-2.x86_64
> 3/4
>   Verifying  : mod_dav_svn-1.8.4-2.x86_64
> 4/4
>
> Updated:
>   subversion.x86_64 0:1.8.5-1
>
> Dependency Updated:
>   mod_dav_svn.x86_64 0:1.8.5-1
>
> Complete!
>
>
> On vhost config
>
> This line exist:
>
> LoadModule dav_svn_module     modules/mod_dav_svn.so
> LoadModule authz_svn_module modules/mod_authz_svn.so
>
> <Location /repos>
>  DAV svn
>  SVNParentPath /var/svn-repos
>  SVNPathAuthz off
>  #...Authentication configuration here
> </Location>
>
> If you have this code below which can be viewed exactly like this on browser
> on version 1.8.4
>
> <?php
>
> // Define path to application directory
> defined('APPLICATION_PATH')
>     || define('APPLICATION_PATH', realpath(dirname(__FILE__) .
> '/../application'));
>
> // Define application environment
> defined('APPLICATION_ENV')
>     || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ?
> getenv('APPLICATION_ENV') : 'production'));
>
> // Ensure library/ is on include_path
> set_include_path(implode(PATH_SEPARATOR, array(
>     realpath(APPLICATION_PATH . '/../library'),
>     get_include_path(),
> )));
>
> /** Zend_Application */
> require_once 'Zend/Application.php';
>
> // Create application, bootstrap, and run
> $application = new Zend_Application(
>     APPLICATION_ENV,
>     APPLICATION_PATH . '/configs/application.ini'
> );
> $application->bootstrap()
>             ->run();
>
>
> Here is the the source code viewed on browser after installing 1.8.5-1.
>
> bootstrap() ->run();
>
> I hope these details should help.
>
> Regards,
>
> Austin

Re: upgrade to subversion 1.8.5 suspected bug

Posted by Austin Mico <un...@gmail.com>.
I added the line

RemoveType .php

for the subversion conf and it is working now.

Thank you very much to all.


On Wed, Jan 22, 2014 at 3:13 PM, Ben Reser <be...@reser.org> wrote:

> On 1/21/14, 9:43 PM, Austin Mico wrote:
> > AddType text/html .php
>
> Ryan is entirely right.
>
> This is your problem.  Add this to your Location for svn:
> RemoveType .php
>
> Or simply move the AddType inside some block a <Directory> block probably
> makes
> the most sense.  Since <Directory> blocks will never match against SVN
> served
> traffic now.
>
>

Re: upgrade to subversion 1.8.5 suspected bug

Posted by Ben Reser <be...@reser.org>.
On 1/21/14, 9:43 PM, Austin Mico wrote:
> AddType text/html .php

Ryan is entirely right.

This is your problem.  Add this to your Location for svn:
RemoveType .php

Or simply move the AddType inside some block a <Directory> block probably makes
the most sense.  Since <Directory> blocks will never match against SVN served
traffic now.


Re: upgrade to subversion 1.8.5 suspected bug

Posted by Austin Mico <un...@gmail.com>.
Here is the php conf:

#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps



Thanks



On Wed, Jan 22, 2014 at 11:15 AM, Nico Kadel-Garcia <nk...@gmail.com>wrote:

> On Tue, Jan 21, 2014 at 8:38 PM, Ben Reser <be...@reser.org> wrote:
>
> > This is a side effect of the change to setting the filename entry in the
> > request record with 1.8.5.  See the 2nd yellow box here:
> >
> http://subversion.apache.org/docs/release-notes/1.8.html#mod_dav_svn-fsmap
> >
> > I'd guess you have some sort of handler or filter that's messing with
> php files.
> >
> > So post your full httpd conf and I can probably point you at what you
> have
> > configured wrong.
>
>
> Given that he saw this error mesage:
>
>
>      Starting httpd: (98)Address already in use: make_sock: could not
> bind to address 0.0.0.0:80
> no listening sockets available, shutting down
>
> I'm going to be *really surprised* if something involving a syntax
> change for handling local files, or Subversion directory paths, would
> cause that error. This looks like something else is already on port
> 80.
>

Re: upgrade to subversion 1.8.5 suspected bug

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Tue, Jan 21, 2014 at 8:38 PM, Ben Reser <be...@reser.org> wrote:

> This is a side effect of the change to setting the filename entry in the
> request record with 1.8.5.  See the 2nd yellow box here:
> http://subversion.apache.org/docs/release-notes/1.8.html#mod_dav_svn-fsmap
>
> I'd guess you have some sort of handler or filter that's messing with php files.
>
> So post your full httpd conf and I can probably point you at what you have
> configured wrong.


Given that he saw this error mesage:


     Starting httpd: (98)Address already in use: make_sock: could not
bind to address 0.0.0.0:80
no listening sockets available, shutting down

I'm going to be *really surprised* if something involving a syntax
change for handling local files, or Subversion directory paths, would
cause that error. This looks like something else is already on port
80.

Re: upgrade to subversion 1.8.5 suspected bug

Posted by Ben Reser <be...@reser.org>.
On 1/20/14, 9:04 PM, Austin Mico wrote:
> If you have this code below which can be viewed exactly like this on browser on
> version 1.8.4
> 
> <?php
> 
> // Define path to application directory
> defined('APPLICATION_PATH')
>     || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
> 
> // Define application environment
> defined('APPLICATION_ENV')
>     || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
> 
> // Ensure library/ is on include_path
> set_include_path(implode(PATH_SEPARATOR, array(
>     realpath(APPLICATION_PATH . '/../library'),
>     get_include_path(),
> )));
> 
> /** Zend_Application */
> require_once 'Zend/Application.php';
> 
> // Create application, bootstrap, and run
> $application = new Zend_Application(
>     APPLICATION_ENV,
>     APPLICATION_PATH . '/configs/application.ini'
> );
> $application->bootstrap()
>             ->run();
> 
> 
> Here is the the source code viewed on browser after installing 1.8.5-1.
> 
> bootstrap() ->run();

This is a side effect of the change to setting the filename entry in the
request record with 1.8.5.  See the 2nd yellow box here:
http://subversion.apache.org/docs/release-notes/1.8.html#mod_dav_svn-fsmap

I'd guess you have some sort of handler or filter that's messing with php files.

So post your full httpd conf and I can probably point you at what you have
configured wrong.


Re: upgrade to subversion 1.8.5 suspected bug

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 22, 2014, at 00:26, Ryan Schmidt wrote:

> On Jan 20, 2014, at 23:04, Austin Mico wrote:
> 
>> If you have this code below which can be viewed exactly like this on browser on version 1.8.4
>> <?php
>> 
>> // Define path to application directory
>> defined('APPLICATION_PATH')
>>    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
>> 
>> // Define application environment
>> defined('APPLICATION_ENV')
>>    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
>> 
>> // Ensure library/ is on include_path
>> set_include_path(implode(PATH_SEPARATOR, array(
>>    realpath(APPLICATION_PATH . '/../library'),
>>    get_include_path(),
>> )));
>> 
>> /** Zend_Application */
>> require_once 'Zend/Application.php';
>> 
>> // Create application, bootstrap, and run
>> $application = new Zend_Application(
>>    APPLICATION_ENV,
>>    APPLICATION_PATH . '/configs/application.ini'
>> );
>> $application->bootstrap()
>>            ->run();
>> 
>> 
>> Here is the the source code viewed on browser after installing 1.8.5-1.
>> 
>> bootstrap() ->run();
> 
> That’s exactly what I get *if* the server is sending this with the MIME type text/html. Is it?

Presumably yes, since you’ve shown us you’ve requested that in your configuration:

On Jan 21, 2014, at 23:43, Austin Mico wrote:

> Here is the php conf:

> AddHandler php5-script .php
> AddType text/html .php

> #AddType application/x-httpd-php-source .phps


On Jan 22, 2014, at 00:26, Ryan Schmidt wrote:

> On my system, when the svn:mime-type property of this file is not set, it uses the MIME type application/x-httpd-php for .php files, which causes the browser to not display it at all but rather download it.
> 
> If you want it to display it unaltered, you could have the server send the MIME type text/plain.


In my httpd.conf the directives are:

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps



Re: upgrade to subversion 1.8.5 suspected bug

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 20, 2014, at 23:04, Austin Mico <un...@gmail.com> wrote:

> If you have this code below which can be viewed exactly like this on browser on version 1.8.4
> <?php
> 
> // Define path to application directory
> defined('APPLICATION_PATH')
>     || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
> 
> // Define application environment
> defined('APPLICATION_ENV')
>     || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
> 
> // Ensure library/ is on include_path
> set_include_path(implode(PATH_SEPARATOR, array(
>     realpath(APPLICATION_PATH . '/../library'),
>     get_include_path(),
> )));
> 
> /** Zend_Application */
> require_once 'Zend/Application.php';
> 
> // Create application, bootstrap, and run
> $application = new Zend_Application(
>     APPLICATION_ENV,
>     APPLICATION_PATH . '/configs/application.ini'
> );
> $application->bootstrap()
>             ->run();
> 
> 
> Here is the the source code viewed on browser after installing 1.8.5-1.
> 
> bootstrap() ->run();

That’s exactly what I get *if* the server is sending this with the MIME type text/html. Is it?

On my system, when the svn:mime-type property of this file is not set, it uses the MIME type application/x-httpd-php for .php files, which causes the browser to not display it at all but rather download it.

If you want it to display it unaltered, you could have the server send the MIME type text/plain.



Re: upgrade to subversion 1.8.5 suspected bug

Posted by Austin Mico <un...@gmail.com>.
Sorry, this is a private repository.

The subversion is 1.8.4 (r1534716)

mod_dav_svn.x86_64 1.8.4-2

Here is the yum update command:

 yum update subversion
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.arsc.edu
 * extras: mirrors.lga7.us.voxel.net
 * ius: archive.linux.duke.edu
 * updates: mirror.clarkson.edu
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package subversion.x86_64 0:1.8.4-2 will be updated
--> Processing Dependency: subversion = 1.8.4-2 for package:
mod_dav_svn-1.8.4-2.x86_64
---> Package subversion.x86_64 0:1.8.5-1 will be an update
--> Running transaction check
---> Package mod_dav_svn.x86_64 0:1.8.4-2 will be updated
---> Package mod_dav_svn.x86_64 0:1.8.5-1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                 Arch
Version                               Repository
 Size
=============================================================================================================================================================
Updating:
 subversion                              x86_64
1.8.5-1                               WANdisco
2.2 M
Updating for dependencies:
 mod_dav_svn                             x86_64
1.8.5-1                               WANdisco
 76 k

Transaction Summary
=============================================================================================================================================================
Upgrade       2 Package(s)

Total download size: 2.2 M
Is this ok [y/N]:
Downloading Packages:
(1/2): mod_dav_svn-1.8.5-1.x86_64.rpm
                                                          |  76 kB     00:00
(2/2): subversion-1.8.5-1.x86_64.rpm
                                                           | 2.2 MB
00:02
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total
                                                 616 kB/s | 2.2 MB     00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : subversion-1.8.5-1.x86_64

  1/4
  Updating   : mod_dav_svn-1.8.5-1.x86_64

 2/4
Stopping httpd: [  OK  ]
Starting httpd: [  OK  ]
  Cleanup    : mod_dav_svn-1.8.4-2.x86_64

 3/4
  Cleanup    : subversion-1.8.4-2.x86_64

  4/4
Stopping httpd: [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to
address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
  Verifying  : mod_dav_svn-1.8.5-1.x86_64

 1/4
  Verifying  : subversion-1.8.5-1.x86_64

  2/4
  Verifying  : subversion-1.8.4-2.x86_64

  3/4
  Verifying  : mod_dav_svn-1.8.4-2.x86_64

 4/4

Updated:
  subversion.x86_64 0:1.8.5-1

Dependency Updated:
  mod_dav_svn.x86_64 0:1.8.5-1

Complete!


On vhost config

This line exist:

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

<Location /repos>
 DAV svn
 SVNParentPath /var/svn-repos
 SVNPathAuthz off
 #...Authentication configuration here
</Location>

If you have this code below which can be viewed exactly like this on
browser on version 1.8.4

<?php

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) .
'/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ?
getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)));

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
            ->run();


Here is the the source code viewed on browser after installing 1.8.5-1.

bootstrap() ->run();

I hope these details should help.

Regards,

Austin

Re: upgrade to subversion 1.8.5 suspected bug

Posted by Ryan Schmidt <su...@ryandesign.com>.
Remember to Reply All so this conversation stays on the public mailing list instead of in private email.

On Jan 8, 2014, at 20:11, Austin Mico wrote:

> On Thu, Jan 9, 2014 at 1:13 AM, Ryan Schmidt wrote:
> 
>> On Jan 8, 2014, at 04:40, Austin Mico wrote:
>> 
>>> I have tried to upgrade with the latest version 1.8.5 but found to have the display of the repository with apache to be incorrect wherein php codes were displayed incorrectly. Some of the codes were truncated.
>> 
>> Please be more specific.
> 
> The repository is being served by apache through mod_dav_svn. The php source code can be checkout correctly but when you view it on with internet browser the codes were truncated. There are missing codes and there seems to be no new line character.

I mean: give me an exact set of commands I can use to reproduce this problem on my system. If this is a public repository, give me the URL I should look at. If it’s a private repository that you cannot give access to, give a set of steps to create from scratch a repository that demonstrates the problem.


Re: upgrade to subversion 1.8.5 suspected bug

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 8, 2014, at 04:40, Austin Mico <un...@gmail.com> wrote:

> I have tried to upgrade with the latest version 1.8.5 but found to have the display of the repository with apache to be incorrect wherein php codes were displayed incorrectly. Some of the codes were truncated.

Please be more specific.