SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Custom php.ini within web directory

    I registered a domain and am setup with a hosting company, one thing I am trying to do is upload a file greater then 2M, I was able to modify a .htaccess file to modify the upload_max_filesize to 1024M, and that worked, but the post_max_size would not set the value.

    Code:
    php_value post_max_size 1024M
    php_value upload_max_filesize 1024M
    Because upload_max_filesize stays at the default of 8M It will not modify this value.

    ini_set() does not work. So the last solution I can think of is too upload a custom php.ini file.

    If anyone know how to set this up. please help.

  2. #2
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Are you setting up your hosting company on a dedicated server, or a reseller plan? Contact your host if it's a reseller plan, some of them allow custom php.ini files (VenturesOnline's VPS plans, for example). The rest don't.
    Mike
    It's not who I am underneath, but what I do that defines me.

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    Perth, Australia
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Before going any further, have you tried asking your hosting co to increase the size values in php.ini for you? I've only asked one site host to do this and they did it within 2 hours, no questions asked; saved me a lot of pain.

  4. #4
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have you even tried to upload an 8M file yet? you may well have trouble...


    Quote Originally Posted by naramation
    some of them allow custom php.ini files
    multiple php.ini's? i don't think that's possible is it?
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  5. #5
    SitePoint Zealot
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by peDey
    Before going any further, have you tried asking your hosting co to increase the size values in php.ini for you? I've only asked one site host to do this and they did it within 2 hours, no questions asked; saved me a lot of pain.
    Yeah I asked, and they said out right they would not modify it at all.

    I have a server at home that I play with, but I only have php4 and apache2. When I modify the .htaccess file with post_max_size it seems to work no problems, but with earlier version of apache it breaks.

    Has anyone tried restarting apache to see if the .htaccess modifications take place.

    Thanks.

  6. #6
    SitePoint Zealot
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DR_LaRRY_PEpPeR
    have you even tried to upload an 8M file yet? you may well have trouble...




    multiple php.ini's? i don't think that's possible is it?

    I have uploaded 8MB but over then I can not. According to my phpinfo(), upload_max_filesize is 1024, and post_max_size stays at 8MB.

    I am hoping there is a way to customize or have multiple php.ini files.

  7. #7
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by DR_LaRRY_PEpPeR
    multiple php.ini's? i don't think that's possible is it?

    I've never done it, but there are Reseller Plans out there that have it. My best guess is that they have their own HDD partitions.
    Mike
    It's not who I am underneath, but what I do that defines me.

  8. #8
    jigga jigga what? slider's Avatar
    Join Date
    Oct 2002
    Location
    Utah (USA)
    Posts
    309
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hope this is me needlessly stating the obvious, but if you're just trying to get large files uploaded to your site you should be able to use FTP with no problems. Now if you're trying to make it so visitors to your site can upload big files that's something else.
    $slider = 'n00b';

  9. #9
    SitePoint Zealot
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by slider
    I hope this is me needlessly stating the obvious, but if you're just trying to get large files uploaded to your site you should be able to use FTP with no problems. Now if you're trying to make it so visitors to your site can upload big files that's something else.
    And of course it will be visitors to my site, they will be able to upload files into a database through http.

    I am investigating right now the possibility of using jupload to upload the files and then from thier upload into the database. (It would be easier to from HTML though.


Bookmarks

Posting Permissions

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