Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-17-2013, 04:07 AM   PM User | #1
listerdl
Regular Coder

 
Join Date: Mar 2011
Posts: 157
Thanks: 7
Thanked 0 Times in 0 Posts
listerdl is an unknown quantity at this point
Basic question about php5.ini please!

OK I am new to PHP and have a question.

I am trying to install a learning management system that runs off PHP.

The error I get on installation is this:

"magic_quotes_gpc" are "ON" - but these need to be "OFF"

I am unable to edit the php5.ini file, so, apparently I need to upload a new php5.inito my root folder using FTP.

My questions please!

Where do I find a clean version of php5.ini that I can edit to "magic_quotes_gpc" - I have searched everywhere but cannot find this file? Can you please point me to where I can get this?

Also, do you see uploading a new edited version of php5.ini causing problems with other installations?

Thanks very much!
listerdl is offline   Reply With Quote
Old 02-17-2013, 05:07 AM   PM User | #2
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,191
Thanks: 217
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
Just create a text file in a text editor like notepad or programmers notepad, do not use a word processing software to create it, they use hidden codes and it can really screw things up.

Just name it php.ini and upload it. Inside that file you do basic stuff like this. Of course many of these are up to you.

PHP Code:
register_globals Off
upload_max_filesize 
57M
post_max_size 
57M
magic_quotes_gpc 
OFF

display_errors 
On
log_errors 
On

allow_url_fopen 
Off
allow_url_include 
Off 
you can also use the htaccess to do things as well if you dont have or dont want to use the ini file.

in your .htaccess file you can post this

PHP Code:

php_flag magic_quotes_gpc Off 

Last edited by durangod; 02-17-2013 at 05:09 AM..
durangod is offline   Reply With Quote
Old 02-17-2013, 05:17 AM   PM User | #3
listerdl
Regular Coder

 
Join Date: Mar 2011
Posts: 157
Thanks: 7
Thanked 0 Times in 0 Posts
listerdl is an unknown quantity at this point
Hey thanks! OK that sounds simple enough.

Interestingly GoDaddy doesnt allow the htaccess to influence the php5.ini (from what I have researched) -

So if I create a text file and named it php5.ini then any rules in that root folder (where I put my new .ini file) would overwrite any other existing php5.ini file?

So the text file I need to create just simply has:

Code:
php_flag magic_quotes_gpc Off
Is that right? Thanks again!

Really appreciate your help
listerdl is offline   Reply With Quote
Old 02-17-2013, 05:24 AM   PM User | #4
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,191
Thanks: 217
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
unless godaddy has an established naming rule where as it must be php5.ini, it is just php.ini as i have never seen anything different. you can actually have a php.ini file in side any dir you just need to point your respective files to it.

The best thing to do however is to just put in inside the root public_html and it should be ok any other place and you will need to direct your files where to find it.

and no if you are going to use the ini file its just

PHP Code:
magic_quotes_gpc OFF 

Last edited by durangod; 02-17-2013 at 05:38 AM..
durangod is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 08:05 AM.


Advertisement
Log in to turn off these ads.