Not simple

software development

#1

my (not simple) issue is as follows:

I am intending on having a video-upload section on my website. I have modified and implemented (through .htaccess) my own php.ini file, yet I cannot seem to circumvent a file-size restriction somewhere in the system, and DH support has always been great to me, but here they specifically do not offer technical support for this, yet they have told me I am allowed to, and they’ve directed me here to possibly find some help.

my main question would be: to avoid compiling and installing a custom PHP build, is there any other way to get rid of the file-size limit?

the description of my problem is as follows, followed by more questions. thanks for taking the time to read!

in using elgg, a versatile piece of software set up to work as a social-networking CMS, there is a file-upload option.

when uploading a large (10mb+) file, it tries for 30 seconds, and then the browser times out (tested in mozilla and ie).

when uploading a smaller (<10mb) file, it takes several minutes, but it successfully uploads. there is a second problem after that, but I’ll post that under a new topic, since it’s unrelated.

I would like users to be able to upload a file no matter how large it is. my understanding, after reading the wiki and chatting with DH staff, is that I need to make my own custom PHP build.

at least one DH staff said I wouldn’t have to, but another one confirmed my suspicion, so unless you know of another way to remove file-size limits on uploads, please consider these questions:

())) on a scale of 1-10, for a non-noob, non-expert geek, how difficult is it to install my own PHP build, following the DH support wiki?

())) what things should I watch out for?

())) how to I change the PHP-build-limited file-size limit for file uploads?

())) what else would you want to know if you were me?

I’m not in a super-rush to get this done, but the sooner the better… any help is greatly appreciated!

I’ll be checking here at least once a day over the next week or so.

thanks!


#2

You only need an editable php.ini to change the php upload filesize restrictions.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#3

I already attempted to set a higher filesize limit through the php.ini file.

here is an excerpt from the DH support wiki regarding changing the php.ini file:

( http://wiki.dreamhost.com/PHP.ini )
"Note that some variables (in particular, post_max_size and upload_max_filesize) are subject to internal limitations; increasing them significantly beyond the default values will not work correctly. "

I appreciate your response, and I look forward to hearing some more.

thanks!


#4

From your description it appears you’re hitting the default timeout (30 secs).

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#5

this is not the case, because when uploading a smaller (<10mb) file, it takes several minutes, but it successfully uploads.

(but thank you for your response! I’m still waiting for either a simple solution, or someone to offer to help explain how to achieve my goal of no file-size limits through a custom php installation…)


#6

There’s 3 ini settings that generally cause trouble. Two you’ve mentioned already and the third is mentioned at the link provided above. Can you indicate what your custom settings for those variables are presently set to?

post_max, upload_max, max_execution

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#7

I have experimented with these at different values, but they are presently set as follows:

max_execution_time = 86430
post_max_size = 15000M
upload_max_filesize = 15000M

thanks.


#8

Looks good to me.

Could be a user-limit setting in the script itself limiting upload size to 10MB.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#9

it’s not, though…

(from earlier)
here is an excerpt from the DH support wiki regarding changing the php.ini file:

( http://wiki.dreamhost.com/PHP.ini )
"Note that some variables (in particular, post_max_size and upload_max_filesize) are subject to internal limitations; increasing them significantly beyond the default values will not work correctly. "

I appreciate your response, and I look forward to hearing some more.

thanks!


#10

You’d have to test that theory using a different upload script :wink:

Have you checked phpinfo() to ensure your site is loading your custom ini?

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#11

I just checked and it’s not.

I thought I had set it to, but apparently not.

do you know how I should do this? I followed the instructions to the ‘t’ from using the custom php.ini ( http://wiki.dreamhost.com/PHP.ini ), and all indications were that it worked (no errors, everything completed properly).

that would be neat if this is the problem!!!

(and yes, I’ve tested with two different scripts, although within the same ‘elgg’ software…)

thanks!


#12

Your .htaccess file needs to direct the server to use your custom cgi.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#13

I added the following to the top of my .htaccess file, as per the DH wiki instructions.

custom php.ini directives

Options +ExecCGI
AddHandler php5-cgi .php
Action php-cgi /cgi-bin/php-wrapper.cgi
Action php5-cgi /cgi-bin/php-wrapper.cgi

it was a couple weeks ago when I did this, but I’m pretty sure I followed all of the instructions.

where should I go from here?

I really appreciate your time!


#14

Try an autoinstaller after removing any changes you’ve made thus far.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost