|
|
#1 (permalink) |
|
Registered User
Fresh Surpasser
Joined in May 2008
Lives in Texas
Hosted on sh141
4 posts
Gave thanks: 1
Thanked 0 times
|
Shared Hosting and php.ini
Hello there I have read through a few of the threads and I have learned that using .htaccess, I can create a php.ini which will allow me to a) turn register globals on (temporarily) and b) make all error messages displayed However, I am very confused at what .htaccess is and where I create the php.ini (as well as what do I put in .htaccess)
|
|
|
|
|
|
#2 (permalink) |
|
Registered User
Seasoned Poster
Joined in Aug 2004
61 posts
Gave thanks: 5
Thanked 1 Time in 1 Post
|
You can place a file called "php.ini" in the root folder of your site (public_html) or you can place a file called ".htaccess" in the highest folder of the section of the site you want to affect.
php.ini is the preferred way, .htaccess is limited under suexec - see PHP SuExec Explained (previously posted) Also see the "PHPsuexec" section of https://desk.surpasshosting.com/inde...barticleid=176 Also: for php.ini PHP: Runtime Configuration - Manual PHP: Description of core php.ini directives - Manual for .htaccess PHP: How to change configuration settings - Manual (is written for Apache module configurations, some of this applies to suExec installs...) Last edited by Samatva; May 28th, 2008 at 12:04 AM. |
|
|
|
| This user thanks Samatva for this great post! | vraa (May 28th, 2008) |
|
|
#3 (permalink) |
|
Registered User
Fresh Surpasser
Joined in May 2008
Lives in Texas
Hosted on sh141
4 posts
Gave thanks: 1
Thanked 0 times
|
Hello Okay that means it's easier than i thought I just create a php.ini file in my public_html directory with the contents "register_globals = On" (without quotes) For the error handling, the same thing on another line I don't have to copy a full php.ini right? I have some experience managing my own server, so I know that in debian boxes php.ini is usually in /etc/php5/apache2/ How do I check if it's working or not Also I think I read that it doesn't apply to subdirectories Does that mean instead of my public_html, I should put it in the directory of my script (and only that directory) ? I guess to test if it works is to test it with my application right? Or is there a surefire method of testing? I am in cPanel, I am checking "PHP Configuration" (or something), that shows register_globals for php4 and php5, but I don't understand what it means (or why it doesn't reflect the php.ini I already put in my public_html directory) Thanks for your reply
|
|
|
|