Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Mar 2011
    Posts
    164
    Thanks
    7
    Thanked 0 Times in 0 Posts

    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!

  • #2
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,415
    Thanks
    269
    Thanked 32 Times in 31 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Mar 2011
    Posts
    164
    Thanks
    7
    Thanked 0 Times in 0 Posts
    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

  • #4
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,415
    Thanks
    269
    Thanked 32 Times in 31 Posts
    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.


  •  

    Posting Permissions

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