0

System: redhat

Configure:

./configure --prefix=/path/to/php/share/php --with-apxs2=/path/to/apache2/bin/apxs --with-mysql --with-libdir=lib64 --with-ldap --with-ldap-sasl --with-config-file-path=/path/to/php/share/php.ini 

In php.ini i set upload_max_filesize to 50 and restart apache.

I use

<?php phpinfo(); ?> 

to check. The configuration file (php.ini)path is correct but upload_max_filesize is still 2M. Does anyone know why the configure failed? Thanks.


; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 50M ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = Asia/Shanghai 
6
  • No. In fact, I also set other parameters, eg date.timezone. All of them doesn't work. Commented May 31, 2012 at 4:02
  • I've listed some of the php.ini file. Commented May 31, 2012 at 4:07
  • 1
    I don't have access to my server, so I cannot check it now, but you can try to follow the directions in this link and see if solves your problem. Commented May 31, 2012 at 4:08
  • Thanks bacchus. The .htaccess works! But I still can't understand why the php.ini doesn't work. Commented May 31, 2012 at 4:37
  • As you have solved the question, you should post it as an answer for future visitors ;) Commented May 31, 2012 at 4:44

3 Answers 3

1

Inside the information that phpinfo() shows the path to php.ini, double check that you are editing the right one, also after making the modifications you should restart apache :-).

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. I've double checked all of these. I doubt the real work php.ini is not the one showed in phpinfo()
dumb question, have you tried to restart the webserver already?
0

What does your phpinfo output look like exactly? You might have to also increase the post_max_size setting.

1 Comment

I set all the three parameters:post_max_size,upload_max_filesize and memory_limit.
0

I don't have access to my server, so I cannot check it now, but you can try to follow the directions in this link and see if solves your problem. – bacchus

Thanks bacchus. The .htaccess works! But I still can't understand why the php.ini doesn't work.

1 Comment

You should put the actual solution and the steps that you did to solve the problem and not my comment ;)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.