Results 1 to 10 of 10

Thread: [HOW To] Edit the global php.ini file in Mac OSX

  1. #1
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,968

    Default [HOW To] Edit the global php.ini file in Mac OSX

    This article assumes that you are running an Mac based operating system, and that you have a dedicated server or VPS and have root access.


    Connect to your host:

    Code:
    ssh your.hostname.com
    or
    Code:
    ssh 111.111.111.111
    Where 111.111.111.111 is your main server IP

    The system will ask you for a user and password. The username is "root" (no quotes1)

    The password is the root password. You will now be connected to your server.

    next type:

    Code:
    cd /usr/local/lib/
    Then:

    Code:
    cp php.ini php.iniBACKUP
    which makes a backup of the original file

    Next type:

    Code:
    pico php.ini
    You have now opened pico which is a Linux text editor.

    Now you can modify the variables that you need.

    When you are done press ctrl+x and when it asks if you want to save the modified buffer type "y" (no quotes needed) and press enter to save the new php.ini

    Then type:

    Code:
    service httpd restart
    This will load the new php configuration into Apache.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | Follow us on X |

  2. #2
    Vic's Avatar
    Vic
    Vic is offline Nearly a Glow Sage
    Join Date
    Nov 2009
    Location
    Nebraska
    Posts
    19

    Default

    Is this how I would fix the upload max files for uploading like videos? I have never messed with any of this stuff but I am trying to upload a video to try out the module that I installed. It says this
    Safe Mode Status: OFF
    Register Globals: OFF
    Server Uploads Status: ON
    Max Upload Size Permitted: 2M
    Max Post Size Permitted: 8M
    Max Time for running scripts: 30 sec
    I need to upload around 200MB I think LOL not sure just want to upload my music videos that I make

    thanks

  3. #3
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,968

    Default

    well, first you would want to make a phpinfo file and then view it in your browser so that you can see what directives, if any need to be changed from the default php configuration.

    Once you know if you need to set anything on or off, then the syntax for your php.ini would be like so:

    Code:
    safe_mode = Off
    register_globals = Off
    upload_max_filesize = 200M
    post_max_size = 200M
    max_execution_time = 900
    Safe Mode and Register Globals are already off. The 2 below that are for your 200Meg uploads. And the last one is set to 900 which is 15 minutes. (60 seconds * 15)
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | Follow us on X |

  4. #4
    Vic's Avatar
    Vic
    Vic is offline Nearly a Glow Sage
    Join Date
    Nov 2009
    Location
    Nebraska
    Posts
    19

    Default

    Well I only know that I have resellers account. But the videos upload and stuff when I am using Dophin on another site. So I am not sure if I have to edit anything or maybe I do not sure. I am really very new to all of this module stuff. And really new to the reseller thing. The only reason that I got it was to have separate cpanel for my domains. Someone told me that would be best cause things get messed up the other way.

    I don't know I've been trying this for hours and I am not getting anything uploaded. Somewhere it said that I needed to make a embedding code? Doe that have something to do with this not working I am wondering. I probably should be posting on XOOPS about this I suppose.

    Thanks

    Vic

  5. #5
    Vic's Avatar
    Vic
    Vic is offline Nearly a Glow Sage
    Join Date
    Nov 2009
    Location
    Nebraska
    Posts
    19

    Default

    OMG I'm a junior web sage! WHOO HOOO!!!

  6. #6
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,968

    Default

    have you tried a very small file to see how that goes?
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | Follow us on X |

  7. #7
    Vic's Avatar
    Vic
    Vic is offline Nearly a Glow Sage
    Join Date
    Nov 2009
    Location
    Nebraska
    Posts
    19

    Default

    Quote Originally Posted by Matt View Post
    have you tried a very small file to see how that goes?


    I have a broken thinker don't ya know

    OK it works so now I need to know how to do this I guess I just want to set this so I can upload my music videos LOL

    Now how do I do that php thinnggiee you were saying? I have to make something to check on something?

    phpinfo file

    Cause it is only set at 1 right now I know that from my admin. section. Or if I put in a support would they change it? Or maybe I should learn this stuff.

    Oh and I have a dell operating PC is that OK?

  8. #8
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,968

    Default

    If you make a php.ini file and put it in the directory that the script runs in, with the following lines, you should be able to upload larger files, provided the upload takes less than 15 minutes:

    safe_mode = Off
    register_globals = Off
    upload_max_filesize = 200M
    post_max_size = 200M
    max_execution_time = 900
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | Follow us on X |

  9. #9
    Vic's Avatar
    Vic
    Vic is offline Nearly a Glow Sage
    Join Date
    Nov 2009
    Location
    Nebraska
    Posts
    19

    Default

    OK I made a php.ini like ya said. I might have put it in the wrong area not sure. I put it in the public_html but that didn't work. It says this but I don't have a etc one can I just create a folder?

    The default value of php.ini. When
    memory_limit = 8M (default)
    post_max_size = 8M (default)
    upload_max_filesize =2M (default)
    If you need to allow larger uploads, please modify these values in your php.ini file (normally located in /etc/php.ini).
    1 KB = 10,241 MB=1048576

  10. #10
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,968

    Default

    /etc assumes that you have a dedicated server and have root access.

    In your case, the php.ini goes in the directory that the script runs in. You can see if your overrides are working by looking at php info.

    Code:
     
    <?
    phpinfo();
    ?>
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | Follow us on X |

Similar Threads

  1. [How-To] How do I do a traceroute on Mac OS X?
    By Matt in forum Knowledge Base
    Replies: 0
    Last Post: 08-12-2008, 06:58 PM
  2. Referencing a PHP Class inside a PHP Include
    By rickpugh in forum Programming Talk
    Replies: 1
    Last Post: 01-22-2006, 08:30 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14