Results 1 to 5 of 5

Thread: [URGENT]: phpsuexec--need .htaccess and php.ini directives!

  1. #1
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default [URGENT]: phpsuexec--need .htaccess and php.ini directives!

    I apologize for the cross posting but I am hoping someone sees this and can help me.

    My host changed to phpSuExec over night and now none of my vShare sites work. At first I got a 500 internal server error due to php directives in the .htacess. I renamed .htaccess to php.ini and the front page loads, but when you go to log in you get 404 error.

    I don't know what goes into .htaccess and what goes into php.ini to get vShare to work with phpSuExec and I checked the article at https://support.apthost.com/index.php?_ ... icleid=716 but it's all so bloody confusing to me.

    Here's an example php.ini they have:

    Code:
    Options +FollowSymLinks
    RewriteEngine = on
    
    RewriteRule ^admin$ - [L]
    RewriteRule ^admin/(.*) - [L]
    RewriteRule ^install$ - [L]
    RewriteRule ^install/(.*) - [L]
    RewriteRule ^$ index.php
    RewriteRule ^view/(.*)/(.*)/ view_video.php?id=$1  [L,QSA]
    RewriteRule ^tag/(.*)/(.*) tag.php?search_id=$1&page=$2  [L,QSA]
    RewriteRule ^channel/(.*)/(.*)/recent/(.*) video.php?
    
    category=recent&chid=$1&page=$3
    RewriteRule ^channel/(.*)/(.*)/viewed/(.*) video.php?
    
    category=viewed&chid=$1&page=$3
    RewriteRule ^channel/(.*)/(.*)/ channel_detail.php?id=$1
    
    RewriteRule ^detailed/recent/(.*) video.php?
    
    category=recent&page=$1&viewtype=detailed
    RewriteRule ^detailed/viewed/(.*) video.php?
    
    category=viewed&page=$1&viewtype=detailed
    RewriteRule ^detailed/discussed/(.*) video.php?
    
    category=discussed&page=$1&viewtype=detailed
    RewriteRule ^detailed/favorites/(.*) video.php?
    
    category=favorites&page=$1&viewtype=detailed
    RewriteRule ^detailed/rated/(.*) video.php?
    
    category=rated&page=$1&viewtype=detailed
    RewriteRule ^detailed/featured/(.*) video.php?
    
    category=featured&page=$1&viewtype=detailed
    RewriteRule ^detailed/random/(.*) video.php?
    
    category=random&page=$1&viewtype=detailed
    RewriteRule ^recent/(.*) video.php?category=recent&page=$1
    RewriteRule ^viewed/(.*) video.php?category=viewed&page=$1
    RewriteRule ^discussed/(.*) video.php?category=discussed&page=$1
    RewriteRule ^favorites/(.*) video.php?category=favorites&page=$1
    RewriteRule ^rated/(.*) video.php?category=rated&page=$1
    RewriteRule ^featured/(.*) video.php?category=featured&page=$1
    RewriteRule ^random/(.*) video.php?category=random&page=$1
    RewriteRule ^rss/new/ rss.php?type=new [L]
    RewriteRule ^rss/comments/ rss.php?type=comments [L]
    RewriteRule ^rss/views/ rss.php?type=views [L]
    RewriteRule ^group/(.*)/members/(.*) group_members.php?urlkey=$1&page=$2
    RewriteRule ^group/(.*)/videos/(.*) group_videos.php?urlkey=$1&page=$2
    RewriteRule ^group/(.*)/add/(.*) add_video.php?urlkey=$1&page=$2
    RewriteRule ^group/(.*)/fav/(.*) add_favour.php?urlkey=$1&page=$2
    RewriteRule ^group/(.*)/topic/(.*) group_posts.php?urlkey=$1&tid=$2
    RewriteRule ^group/(.*)/invite/ invite_members.php?urlkey=$1 [L,QSA]
    RewriteRule ^group/(.*)/ groups_home.php?urlkey=$1  [L,QSA]
    RewriteRule ^groups/(.*)/(.*)/(.*) groups.php?chid=$1&page=$3
    RewriteRule ^groups/(.*)/(.*) groups.php?category=$1&page=$2
    RewriteRule ^include/(.*) http://www.vshare.in
    RewriteRule ^pages/(.*).html$ show_page.php?name=$1 [QSA,L]
    RewriteRule ^([^/\.]+)/favorites/(.*) user_favorites.php?username=$1&page=$2
    RewriteRule ^([^/\.]+)/playlist/(.*) playlist.php?username=$1&page=$2
    RewriteRule ^([^/\.]+)/friends/(.*) user_friends.php?username=$1&page=$2
    RewriteRule ^([^/\.]+)/public/(.*)$ user_videos.php?
    
    username=$1&type=public&page=$2
    RewriteRule ^([^/\.]+)/private/(.*)$ user_videos.php?
    
    username=$1&type=private&page=$2 [L,QSA]
    RewriteRule ^([^/\.]+)/groups/(.*)$ user_groups.php?username=$1&page=$2 [L,QSA]
    RewriteRule ^([^/\.]+)?/?$ user.php?username=$1 [L,QSA]
    
    
    <IfModule mod_security.c>
    SecFilterEngine = Off
    SecFilterScanPOST  =Off
    </IfModule>
    
    <IfModule mod_gzip.c>
    mod_gzip_on = No
    </IfModule>
    
    
    upload_max_filesize = 100M 
    post_max_size = 100M 
    output_buffering = on 
    max_execution_time = 1000 
    max_input_time = 1000 
    session.gc_maxlifetime = 14400 
    
    <IfModule mod_security.c>
    SecFilterEngine = Off
    </ifModule>
    
    max_execution_time = 6000000
    max_input_time = 600000
    output_buffering = On
    
    
    RewriteEngine = On
    
    php_flag register_globals = off
    Order allow,deny
    Allow from all 
    
    Options All -Indexes
    
    RewriteEngine = on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?sca-video.com(/)?.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?grynmoors.org(/)?.*$ [NC]
    RewriteRule \.(flv|swf|png|bmp|js|css|jpg|jpe?g|gif)$ templates/images/logo.jpg 
    
    [L,NC]
    I still don't know what goes where...what goes into .htaccess and what goes into php.ini!!! Anybody?
    If it's not fun, stop doing it!

  2. #2
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: [URGENT]: phpsuexec--need .htaccess and php.ini directives!

    OK, I *think* I have it figured out. I did this and so far things seem to work. Does this look right to you guys?

    .htaccess (note the last bit, that needs to be changed to your URL if you use this code)
    Code:
    Options +FollowSymLinks
    RewriteEngine on
    
    RewriteRule ^admin$ - [L]
    RewriteRule ^admin/(.*) - [L]
    RewriteRule ^install$ - [L]
    RewriteRule ^install/(.*) - [L]
    RewriteRule ^$ index.php
    RewriteRule ^view/(.*)/(.*)/ view_video.php?id=$1  [L,QSA]
    RewriteRule ^tag/(.*)/(.*) tag.php?search_id=$1&page=$2  [L,QSA]
    RewriteRule ^channel/(.*)/(.*)/recent/(.*) video.php?category=recent&chid=$1&page=$3
    RewriteRule ^channel/(.*)/(.*)/viewed/(.*) video.php?category=viewed&chid=$1&page=$3
    RewriteRule ^channel/(.*)/(.*)/ channel_detail.php?id=$1
    
    RewriteRule ^detailed/recent/(.*) video.php?category=recent&page=$1&viewtype=detailed
    RewriteRule ^detailed/viewed/(.*) video.php?category=viewed&page=$1&viewtype=detailed
    RewriteRule ^detailed/discussed/(.*) video.php?category=discussed&page=$1&viewtype=detailed
    RewriteRule ^detailed/favorites/(.*) video.php?category=favorites&page=$1&viewtype=detailed
    RewriteRule ^detailed/rated/(.*) video.php?category=rated&page=$1&viewtype=detailed
    RewriteRule ^detailed/featured/(.*) video.php?category=featured&page=$1&viewtype=detailed
    RewriteRule ^detailed/random/(.*) video.php?category=random&page=$1&viewtype=detailed
    RewriteRule ^recent/(.*) video.php?category=recent&page=$1
    RewriteRule ^viewed/(.*) video.php?category=viewed&page=$1
    RewriteRule ^discussed/(.*) video.php?category=discussed&page=$1
    RewriteRule ^favorites/(.*) video.php?category=favorites&page=$1
    RewriteRule ^rated/(.*) video.php?category=rated&page=$1
    RewriteRule ^featured/(.*) video.php?category=featured&page=$1
    RewriteRule ^random/(.*) video.php?category=random&page=$1
    RewriteRule ^rss/new/ rss.php?type=new [L]
    RewriteRule ^rss/comments/ rss.php?type=comments [L]
    RewriteRule ^rss/views/ rss.php?type=views [L]
    RewriteRule ^group/(.*)/members/(.*) group_members.php?urlkey=$1&page=$2
    RewriteRule ^group/(.*)/videos/(.*) group_videos.php?urlkey=$1&page=$2
    RewriteRule ^group/(.*)/add/(.*) add_video.php?urlkey=$1&page=$2
    RewriteRule ^group/(.*)/fav/(.*) add_favour.php?urlkey=$1&page=$2
    RewriteRule ^group/(.*)/topic/(.*) group_posts.php?urlkey=$1&tid=$2
    RewriteRule ^group/(.*)/invite/ invite_members.php?urlkey=$1 [L,QSA]
    RewriteRule ^group/(.*)/ groups_home.php?urlkey=$1  [L,QSA]
    RewriteRule ^groups/(.*)/(.*)/(.*) groups.php?chid=$1&page=$3
    RewriteRule ^groups/(.*)/(.*) groups.php?category=$1&page=$2
    RewriteRule ^include/(.*) http://www.vshare.in
    RewriteRule ^pages/(.*).html$ show_page.php?name=$1 [QSA,L]
    RewriteRule ^([^/\.]+)/favorites/(.*) user_favorites.php?username=$1&page=$2
    RewriteRule ^([^/\.]+)/playlist/(.*) playlist.php?username=$1&page=$2
    RewriteRule ^([^/\.]+)/friends/(.*) user_friends.php?username=$1&page=$2
    RewriteRule ^([^/\.]+)/public/(.*)$ user_videos.php?username=$1&type=public&page=$2
    RewriteRule ^([^/\.]+)/private/(.*)$ user_videos.php?username=$1&type=private&page=$2 [L,QSA]
    RewriteRule ^([^/\.]+)/groups/(.*)$ user_groups.php?username=$1&page=$2 [L,QSA]
    RewriteRule ^([^/\.]+)?/?$ user.php?username=$1 [L,QSA]
    
    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>
    
    <IfModule mod_gzip.c>
    mod_gzip_on No
    </IfModule>
    
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?YOURDOMAIN.COM(/)?.*$ [NC]
    RewriteRule \.(flv|swf|png|bmp|js|css|jpg|jpe?g|gif)$ templates/images/logo.jpg [L,NC]
    php.ini
    Code:
    upload_max_filesize = 100M 
    post_max_size = 100M 
    output_buffering = on 
    max_execution_time = 1000 
    max_input_time = 1000 
    session.gc_maxlifetime = 14400 
    
    max_execution_time = 6000000
    max_input_time = 600000
    output_buffering = On
    If it's not fun, stop doing it!

  3. #3
    Join Date
    Jun 2007
    Posts
    197

    Default Re: [URGENT]: phpsuexec--need .htaccess and php.ini directives!

    Hi,

    Your rewrites and php.ini file seems to be fine. You could have also done it all within .htaccess but that's another story!

    Regards,
    galnet
    ------------------------------------
    Make an arse of yourself:
    http://www.youtwatonline.com
    ------------------------------------

  4. #4
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: [URGENT]: phpsuexec--need .htaccess and php.ini directives!

    Thanks!

    My webhost said that I had to remove the php directives from .htaccess and put them in php.ini so...I'm just doing as I am told ;).

    One other question: Do I REALLY need to have this line in there:

    RewriteRule ^include/(.*) http://www.vshare.in


    ???
    If it's not fun, stop doing it!

  5. #5
    Join Date
    May 2007
    Location
    Planet Earth
    Posts
    1,389

    Default Re: [URGENT]: phpsuexec--need .htaccess and php.ini directives!

    The php.ini settings, I discovered, are listed here:

    http://www.vshare.in/requirements.html

    Problem is the way the site lists it, you can't just copy and paste. They have it listed as a bulleted list, making copy and paste ridiculous. So, here it is:

    Code:
    safe_mode = off
    register_globals = on
    open_basedir = 
    output_buffering = on
    upload_max_filesize = 100M 
    post_max_size = 100M 
    max_execution_time = 60000
    max_input_time = 60000
    memory_limit = 32M
    error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
    display_errors = On
    file_uploads = On
    session.gc_maxlifetime = 14000
    If it's not fun, stop doing it!

Similar Threads

  1. .htaccess
    By jiffyspop in forum Installation Support
    Replies: 1
    Last Post: 09-08-2008, 04:42 AM
  2. [URGENT]: phpsuexec--need .htaccess and php.ini directives!
    By grynmoors in forum Installation Support
    Replies: 1
    Last Post: 04-14-2008, 11:02 AM
  3. Please Help question about .htaccess
    By brenea in forum General Discussions
    Replies: 3
    Last Post: 09-04-2007, 04:26 AM
  4. Copy of htaccess
    By bdwebb in forum Installation Support
    Replies: 1
    Last Post: 08-07-2007, 01:47 PM
  5. .htaccess
    By ostendo in forum Installation Support
    Replies: 5
    Last Post: 05-08-2007, 06:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •