vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   The coorrect place for the overrided php.ini (https://vborg.vbsupport.ru/showthread.php?t=316091)

Rabso 12-18-2014 03:11 AM

The coorrect place for the overrided php.ini
 
I am planning to increase size the "post_max_size"; my webhost says that I can change my php settings using php.ini file and apache settings using .htaccess file.

1. my trail with .htaccess file:

I tried add the following in my .htaccess that comes with VB5:
php_value post_max_size "15M"

but keeping giving me "Internal Server Error". I did the same with VB4 and it works just fine!

2. my trail with adding php.ini:

My webhost says the following:

Quote:

Using a php.ini file to override the default settings will only alter the PHP settings for all PHP files in the directory where it is saved.

This means that any PHP files in subfolders will not recognize the changes you've made in the php.ini file. You will have to copy the file to any subdirectories needed or created symbolic links in subfolders to the custom php.ini file
and

Quote:

Basically, you do not need to place the php.ini file in every folder of your website files. For example, in wordpress. you need to increase the upload_max_filesize for you to upload larger files in your Wordpress admin. The php.ini file will be then uploaded in the /wp-admin folder only. So you better make sure with of the specific folder where you want the php.ini activated

My question now is which one is better to change? I have feeling that VB5 deals with .htaccess differently so please what is the correct way?

or if I go to php.ini (it is recommended), which place is correct to place my new php.ini?

Zachery 12-18-2014 04:26 AM

These are questions for your webhost :)

ForceHSS 12-18-2014 04:59 AM

The php.ini file is located before the public_html folder

WEBDosser 12-18-2014 05:46 AM

imo best way is to edit the php.ini file on the server if you have ssh access

Rabso 12-18-2014 06:53 AM

Quote:

Originally Posted by Zachery (Post 2527855)
These are questions for your webhost :)

Dear Zachery.

believe me I did a lot :( I am confused and lost.

my Webhost allows me to change both php.ini or .htaccess and provides for me the limits that I should not exceed.

My question to you why when I edited the .htaccess in VB4 it worked well but in VB5 it gave me "Internal Server Error"?


@ForceHSS and WEBDosser;
I can not edit the global php.ini, my webhost allows me to override the global php.ini but I don't know where I have to place the override php.ini. i.e. in which directory VB5 needs this file to be placed?

WEBDosser 12-18-2014 07:51 AM

Try this:
Create a file called php.ini and include this in it.

upload_max_filesize = "15M"
post_max_size = "15M"

Then save it in the same location as your .htaccess file.

Rabso 12-18-2014 08:12 AM

Quote:

Originally Posted by WEBDosser (Post 2527875)
Try this:
Create a file called php.ini and include this in it.

upload_max_filesize = "15M"
post_max_size = "15M"

Then save it in the same location as your .htaccess file.

I already did this and my admin page shows the results exactly. but my question is does adding the php.ini in same location of .htaccess enough for my fourm work well?

According to the webhost that any PHP files in subfolders will not recognize the changes I have made in the main folder.

this sentence made me confuse and ask where is the right location.

Rabso 12-21-2014 08:21 AM

Any confirmation for the above?

HM666 12-22-2014 01:17 AM

You might want to ask your web host to change the values in your main php.ini file for the server if you do not have direct access to it. It would depend on what type of host setup you have as to whether you would have access to this or not.


All times are GMT. The time now is 07:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00954 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete