Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
php.ini (Recommend a good standard one to use)
Old 08-29-2008, 05:25 PM php.ini (Recommend a good standard one to use)
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
I'm looking to increase the security of my sites by turning their REGISTER_GLOBALS to OFF

I was told I ought to make a php.ini, and i've Googled tons about it. I'm seeing lots of different versions out there, leaving more confused the more I read than achieving solutions.

so, Would you recommend a good, Standard php.ini to use for the purpose of turning the R-Globals to OFF?


thanks,
Lashtal
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE

Last edited by Lashtal; 08-29-2008 at 05:26 PM..
Lashtal is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-29-2008, 05:44 PM Re: php.ini (Recommend a good standard one to use)
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
a friend just told me I should do the following...

1) create a file called "php.ini"

2) put the following text in it: "register_globals=Off"

3) upload to root directory.


Should I keep that friend or get a new one?
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 08-29-2008, 06:00 PM Re: php.ini (Recommend a good standard one to use)
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
That's a good thing to add. Check the php site for values in the php.ini file and what they mean along with recommendations for settings.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 09-01-2008, 02:19 AM Re: php.ini (Recommend a good standard one to use)
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Does your hosting still have regster_globals on? Is it run by schoolboys? Check phpinfo(), I am sure that you do not have to bother about it.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 09-01-2008, 06:05 AM Re: php.ini (Recommend a good standard one to use)
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
I had called the customer support from Godaddy.com, and I asked him: "Are register globals set to OFF?"

He looked at my hosting account, saying some people have a file in there that already sets it to off, while some people do not. He didn't have a good reason as to why this may be so, but he said it was "a rather funny thing."

Anyhow, he finds out my account wasn't set to OFF

So he told me I ought to make a php.ini

So that's what I did.
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 09-01-2008, 06:10 AM Re: php.ini (Recommend a good standard one to use)
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
In this case I'd rather use .htaccess entry: php_flag register_globals off
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 09-03-2008, 04:40 AM Re: php.ini (Recommend a good standard one to use)
Junior Talker

Posts: 4
Name: Sean Proske
Location: Canada
Trades: 0
What I would recommend is to start with the php.ini file your web host is currently using. If you have shell access, you can simply copy the file into your own directory. It's usually located in /usr/lib, but if it isn't, then you can verify the location by calling the phpinfo function which will tell you where the configuration file is (amongst other things).

Once you've got a copy of the default php.ini file in your own directory, go ahead and edit it to your liking, turn register globals off and any other changes you would like to make.

Then, create a .htaccess file in your root document directory and add the following line:

SetEnv PHPRC /path/to/directory/containing/YOUR/php.ini

Then view the phpinfo function output again to ensure your configuration file is the one that's loaded.

To view phpinfo output, simply create a php file with the following code, then load the file in your browser.

Code:
<?php echo phpinfo(); ?>
__________________
theWebHostCompany.com
Unlimited
Please login or register to view this content. Registration is FREE

2 Years for the price of 1 with promo code: FALL2FOR1
thewebhost is offline
Reply With Quote
View Public Profile Visit thewebhost's homepage!
 
Old 09-03-2008, 05:09 AM Re: php.ini (Recommend a good standard one to use)
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
OMG

Most directives that you need can be set with php_value or php_flag in .htaccess. Most directives that you cannot set that way will not be affected by adding your own php.ini anyway so it is not worth bothering about.
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 09-03-2008, 05:13 AM Re: php.ini (Recommend a good standard one to use)
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
And BTW, should not you restart apache after adding new php.ini file into the system?
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to php.ini (Recommend a good standard one to use)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.28274 seconds with 12 queries