I am using User-Friendly SVN on my Raspberry Pi. The Pi is running with Debian Wheezy.
Creating repositories is working and I can checkout and update the repository without any problem. But when I create a file, add it to the repository and try to commit, I get this message:
svn: E175002: Commit failed (details follow):
svn: E175002: Server sent unexpected return value (500 Internal Error) in response to POST request for '/usvn/svn/test/!svn/me'
svn: E175002: Your commit message was left in a temporary file:
svn: E175002: '/svntest/test/svn-commit.tmp'
There is nothing in the error.log, but in the access.log I can find this:
192.168.10.34 - - [22/Sep/2013:10:23:14 +0200] "OPTIONS /usvn/svn/test/trunk HTTP/1.1" 401 653 "-" "SVN/1.7.5 neon/0.29.6"
192.168.10.34 - admin [22/Sep/2013:10:23:17 +0200] "OPTIONS /usvn/svn/test/trunk HTTP/1.1" 200 1347 "-" "SVN/1.7.5 neon/0.29.6"
192.168.10.34 - admin [22/Sep/2013:10:23:18 +0200] "POST /usvn/svn/test/!svn/me HTTP/1.1" 500 548 "-" "SVN/1.7.5 neon/0.29.6"
The SVN-Path has read and write access for www-data.
What can I do?
I ran into this same problem and wasn't satisfied with py3r3str's fix. I figured out if I changed the usvn/public/.htaccess file I could exclude the repos from the rewrite rule and this fixed the problem for me:
<Files *.ini>
Order Allow,Deny
Deny from all
</Files>
php_flag short_open_tag on
php_flag magic_quotes_gpc off
RewriteEngine on
#RewriteCond
RewriteBase "//usvn/"
RewriteRule ^svn/ - [L,NC] #this is the rule I added to fix the 500 errors
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Are you on 64 bit OS ?
I'm facing the same error with win7 64Bit and not with win7 32bit.
Try remove tortoise 64 and install tortoise SVN for 32 bit OS :
http://www.oldversion.fr/windows/tortoisesvn-1-6-10
I have same issue.
I've notice that /svn/test/!svn/me request is catch by usvn web application instead of svn server.
My solution of this problem is to change subdomain of svn server that works for me.
Cheers
I could not avoid the error in the description method of htaccess of allen.
So I fix this.
<Files *.ini>
Order Allow,Deny
Deny from all
</Files>
php_flag short_open_tag on
php_flag magic_quotes_gpc off
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /usvn
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule !^svn\/ index.php [L]
</IfModule>
Related
When I request the file https://www.hello.com.au/myfile.txt
I got an error "Not Found. The requested URL https://www.hello.com.au/myfile.txt was not found on this server."
Here's my .htaccess rule, which is working fine on my dev site, but not working on Production.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^(?:www\.)?hello\.com\.au$ [NC]
RewriteRule ^myfile\.txt$ - [NC,F]
</IfModule>
I found, the file myfile.txt doesn't exists in Production. Thanks everyone for your help.
I have the following structure:
- root
- css
- test.css
- index.php
Is there a way to throw a 404 error when I try to open anything in CSS folder in my browser as:
http://localhost:1993/css
http://localhost:1993/css/test.css
but still accessible from the browser? I want CSS to load normally, but to throw a 404 error when someone opens this path. Or turn off the directory listing for everything in the directory (with all files inside)? Or something like that? Its possible?
You can try mod_access,
<FilesMatch "\.css$">
order deny,allow
deny from all
allow from 127.0.0.1
allow from localhost
</FilesMatch>
With mod_rewrite
RewriteEngine On
RewriteCond %{HTTP_HOST} ^!localhost
RewriteCond %{REQUEST_URI} ^/css [OR]
RewriteCond %{REQUEST_FILENAME} \.css$
RewriteRule ^ - [R=404]
I've created a laravel project which is working fine on localhost and my hosting server but when I upload it on my client's server it just doesn't work (he's using bluehost).
When I open the URL which is pointing to /public folder, it should display the homepage. Instead it is showing the listing of all files and folders (except public folder).
When I try to open myurl.com/public or myurl.com/public/index.php in browser, it gives following error:
Forbidden
You don't have permission to access /license/public/ on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I can see public folder via FTP and I've changed permissions for /app/storage to 777
Here is my public/.htaccess:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
I've checked my /public/error_log, its showing following error:
[21-Aug-2015 09:06:01] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required '__DIR__/../bootstrap/autoload.php' (include_path='.:/usr/lib64/php:/usr/share/pear') in /home6/parentv3/public_html/eldercareapp/license/public/index.php on line 21
Any help?
Well the problem is with your PHP version. If you see your PHP Version, you might get what is wrong with your application. You must use version greater than PHP 5.5
Ok, I had contacted client's hosting company and asked them to upgrade PHP version. They took a couple of days and upgraded PHP to 5.5.
But the problem was still there even after updating PHP. I wasn't able to access /public folder so the problem was somewhere else. After some searching and trying I've found a solution.
The problem was actually in my /public/.htaccess file. I've added just one line in my .htaccess and it solved the problem: Options +FollowSymLinks
My updated .htaccess in /public now looks like:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
Options +FollowSymLinks
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Cheers
Changing permissions to 777 is a terrible idea because it will be vulnerable, instead try with sudo chmod -R 775 project/ where project is the name of your project's folder, then do the next sudo chown -R $USER:$USER project/ to make the project's folder be owned by your user, finally, if you haven't done it, cd into the project's folder and run composer install
I have installed a website made with joomla on a new linux CentOS6 server.
I have installed and configured Apache
Installed and Configure PHP
Installed and configured MySQL
Installed PhpMyAdmin
Installed and Configured FTP
Set the firewall rules
Everything is working right, except the single article pages:
The web site is accessible from outside The user is under the group
www-data and has read-write permission on all the folders I can
upload media to the website and this has the right privileges once uploaded
FTP is working perfectly
httpd.conf has the permission to AllowOverride All to the directory where the site is (/var/www/sites/clientname/sitename.it )
When I start httpd, I get no error or warning.
if I try to access to the following URL I get 404:
http://ldgsocial.brainsen.com/index.php/test
that it's a page configured as "single article", pointing to a published article.
The article is not even accessible typing the real URL:
http://ldgsocial.brainsen.com/index.php?option=com_content&view=article&id=110
The record with id=110 is present in the database, and visible in the list of articles in Joomla Admin.
All the folders of joomla are readable and writable.
SEF is activated, I've tried to deactivate but both above URL return always 404
mod_rewrite is loaded
the htaccess.txt is renamed after the FTP upload to .htaccess
in the .htaccess I have the following directives:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /var/www/sites/clientname/sitename.it
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
I've tried also putting:
RewriteBase /var/www/sites/clientname/sitename.it/public_html
and
RewriteBase /
but nothing to do.
The articles are accessible only if I create a new menu voice with type Category List.
From there all the articles are accessible and correctly displayed.
I'm pretty desperate as I don't know what to do next...
here is the installation details:
database Version 5.1.69
Collation database utf8_general_ci
PHP Version 5.3.3
Web Server Apache/2.2.15 (CentOS)
Joomla! Version Joomla! 2.5.14 Stable [ Ember ] 01-August-2013 14:00 GMT
Joomla! Platform Version Joomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT
jdog, thanks, you have given me the input!
The problem was on the server system date, that was wrong and set to the past.
So the articles was published, because was set on a different server, but on the new server, they were not shown as they publishing date was future to the system date..
My client has asked for a cake php app i've made for them to go into a sub directory on their existing server.
All works perfectly on my test remote and local installations.
Initially I had a problem with htaccess and had to add RewriteBase /quotesystem/ to my htaccess files in order to see the site at all. So I have changed my htaccess as below:
cake root .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /quotesystem/
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
app .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /quotesystem/app/
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
and webroot .htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /quotesystem/app/webroot/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
</IfModule>
Now I can access my site but i get loads of warnings about the temp directory:
Warning (2): SplFileInfo::openFile(/web/sites/_p/_e/_t/petersen-stainless.co.uk/public/www/quotesystem/app/tmp/cache/persistent/cake_core_cake_en-gb) [function.SplFileInfo-openFile]: failed to open stream: No such file or directory [CORE/Cake/Cache/Engine/FileEngine.php, line 295]
You can see it here: http://www.petersen-stainless.co.uk/quotesystem
Now, i've CHMOD the temp directory to 777 so everyone should have permissions but i still get these errors.
I've deleted all of the files in these folders so that the temp directories have been cleaned.
When I use my ftp client - transmit - to look at the file permissions the owner appears as (?) and if i try to change it i get an error:
Could not change owner of “tmp”. Server said: 'SITE CHOWN' not understood
I dont get this with any other site I work on.
I don't understand enough to know what is going on, is this a permissions problem or an .htaccess problem or both? Or is it a server configuration problem?
If anyone can help shed some light on this and help my understanding i'd be very grateful.
UPDATE:
My directory structure on the server is as follows:
-- public
--- www
----- quotesystem
------- lib
------- app
--------- config
--------- webroot
In my experience, the SplFileInfo warning appears when Cake attempts to read/write cache that it does not have permission to access. Make sure your application has permission to read/write the cache/tmp folder (depending on your Cake version).
It's probably a .htaccess problem. The RewriteBase should be the same for both the webroot and app .htaccess. So the line in both files should be:
RewriteBase /quotesystem/
I personally never touch the .htaccess in the Cake root directory as it doesn't seem to be necessary to alter anything there.
In addition, /tmp/cache and it's subdirectories should be writable as well.