Member
Member
lem45   2012-11-27, 10:35
#1
hi,

I would like to edit the .htaccess file. I would like to increase the

php_value post_max_size 100M
php_value upload_max_filesize 10M

But every time I edit the htaccess i get an server error 500 and my site doesnt work.

Can I edit the htaccess (containing all that rewwrite stuff) at all?

If so, where?

Thanks!
lemmy
Administrator
Administrator
acrylian   2012-11-27, 10:42
#2
Either your host does not allow to set those values via htaccess or at all. Yes, you can edit the htaccess file naturally (you might need to do it again on updates) but you should know what you are doing and where you need to add. In this case these need to go before the Zenphoto stuff.
Member
Member
lem45   2012-11-28, 11:21
#3
thanks.

Thing is, i dont know what I am doing Smile

I tried to add

php_value post_max_size 100M
php_value upload_max_filesize 10M

at the beginning of the .htaccess file. That brought up the same Server Error 500.

Putting the lines at the end or in the middle didnt help, too.

My htaccess looks like this:

`

# htaccess file version 1.4.3.1;

# When Zenphoto requires changes to the rewrite rules:

# First make a copy of this file as 'oldhtaccess' in the zp-core folder so setup can test for unmodified files

# Update the above and the define in setup.php

IndexIgnore *

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

# Redirection for site updates--remove the comment crosshatches from the following rules

# "closed.html" in the plugins/site_upgrade folder is the target for the rewrites. You can change

# this file to suit your needs.

# RewriteRule ^index\.php$ plugins/site_upgrade/closed.html [NC,R=302,L]

# RewriteRule ^$ plugins/site_upgrade/closed.html [NC,R=302,L]

# End redirection for site updates

RewriteRule ^admin/?$ zp-core/admin.php [R,L]

#Rewrite rules for replaced ?RSS-xxx query parameters

RewriteCond %{QUERY_STRING} ^rss-(.*)&

RewriteRule ^index\.php?$ index.php?rss=%1 [NC,L,QSA,R=301]

RewriteCond %{QUERY_STRING} ^rss-(.*)$

RewriteRule ^index\.php?$ index.php?rss=%1 [NC,L,QSA,R=301]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^albums/?(.+/?)?$ $1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [L]

##### put no rules before this line #######

#rewrite rule for tinyURLs

RewriteRule ^tiny/([0-9]+)/?$ index.php?p=$1&t [L,QSA]

RewriteRule index\.php$ index.php [L,QSA]

RewriteRule ^page/([0-9]+)/?$ index.php?page=$1 [L,QSA]

RewriteRule ^page/([A-Za-z0-9_\-]+)/?$ index.php?p=$1 [L,QSA]

RewriteRule ^page/([A-Za-z0-9_\-]+)/([0-9]+)/?$ index.php?p=$1&page=$2 [L,QSA]

RewriteRule ^(.*)/page/([0-9]+)/?$ index.php?album=$1&page=$2 [L,QSA]

RewriteRule ^(.*)/page/([A-Za-z0-9_\-]+)/?$ index.php?album=$1&p=$2 [L,QSA]

#### Rewrite rule addition for search

RewriteRule ^page/search/fields([0-9]+)/(.*)/([0-9]+)/?$ index.php?p=search&searchfields=$1&words=$2&page=$3 [L,QSA]

RewriteRule ^page/search/fields([0-9]+)/(.*)/?$ index.php?p=search&searchfields=$1&words=$2 [L,QSA]

RewriteRule ^page/search/archive/(.*)/([0-9]+)/?$ index.php?p=search&date=$1&page=$2 [L,QSA]

RewriteRule ^page/search/archive/(.*)/?$ index.php?p=search&date=$1 [L,QSA]

RewriteRule ^page/search/tags/(.*)/([0-9]+)/?$ index.php?p=search&searchfields=tags&words=$1&page=$2 [L,QSA]

RewriteRule ^page/search/tags/(.*)/?$ index.php?p=search&searchfields=tags&words=$1 [L,QSA]

RewriteRule ^page/search/(.*)/([0-9]+)/?$ index.php?p=search&words=$1&page=$2 [L,QSA]

RewriteRule ^page/search/(.*)/?$ index.php?p=search&words=$1 [L,QSA]

#### Rewrite additions for zenpage

RewriteRule ^pages/?$ index.php?p=pages [L,QSA]

RewriteRule ^pages/(.*)/?$ index.php?p=pages&title=$1 [L,QSA]

RewriteRule ^news/?$ index.php?p=news [L,QSA]

RewriteRule ^news/([0-9]+)/?$ index.php?p=news&page=$1 [L,QSA]

RewriteRule ^news/category/(.*)/([0-9]+)/?$ index.php?p=news&category=$1&page=$2 [L,QSA]

RewriteRule ^news/category/(.*)/?$ index.php?p=news&category=$1 [L,QSA]

RewriteRule ^news/archive/(.*)/([0-9]+)/?$ index.php?p=news&date=$1&page=$2 [L,QSA]

RewriteRule ^news/archive/(.*)/?$ index.php?p=news&date=$1 [L,QSA]

RewriteRule ^news/(.*)/?$ index.php?p=news&title=$1 [L,QSA]

####

RewriteRule ^(.*)/image/(thumb|[0-9]{1,4})/([^/\\]+)$ zp-core/i.php?a=$1&i=$3&s=$2 [L,QSA]

RewriteRule ^(.*)/image/([^/\\]+)$ zp-core/i.php?a=$1&i=$2 [L,QSA]

RewriteRule ^(.*)/album/(thumb|[0-9]{1,4})/([^/\\]+)$ zp-core/i.php?a=$1&i=$3&s=$2&album=true [L,QSA]

####

# Catch-all - everything else gets handled in PHP for compatibility.

RewriteRule ^(.*)/?$ index.php?album=$1 [L,QSA]

</IfModule>

`

Now, where could i put my stuff?

thanks!
Lemmy
Administrator
Administrator
acrylian   2012-11-28, 13:19
#4
You should place it before the `<IfModule mod_rewrite.c>` stuff. But make sure your host does actually allow to change these values via htaccess. Not all do.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.