Upgrading PHP on redhat 5



I updated the php ona redhat box today.

This upgrade now seems to fix a bug in PHP that wouldn’t allow values of > 1.5 Gig on file uploads

I have the settings now set to allow up to 2.5Gig.

The steps I took to upgrade it were:

 

Be sure to save the /etc/php.ini  file first:

cp /etc/php.ini /etc/php.ini.save

 

service httpd stop

 

yum erase php.x86_64 php-cli.x86_64 php-common.x86_64 php-devel.x86_64 php-mysql.x86_64 php-pdo.x86_64 php-pear.noarch php-pear-MDB2.noarch php-pear-MDB2-Driver-mysql.noarch

 

yum install php53.x86_64 php53-cli.x86_64 php53-common.x86_64 php53-devel.x86_64 php53-mysql.x86_64 php53-pdo.x86_64 php-pear.noarch php-pear-MDB2.noarch php-pear-MDB2-Driver-mysql.noarch

 

Edit the Newly installed php.ini file and copy the customizations we have ( at the top of the file )  (NOTE these also exist further down in the file and need to be commented out there in the new file so the only reference to those settings is at the top with our desired values.

 

service httpd start

[root@svn_repo etc]# vi /etc/php.ini

[PHP]

***** Customizations *******

allow_call_time_pass_reference = On

include_path=”.:/usr/share/pear:/php/includes:/usr/local/lib/php/Smarty”

max_execution_time = 60000

max_input_time = 60000

memory_limit = 2500M

upload_tmp_dir = /www/upload_tmp_dir

 

; Maximum allowed size for uploaded files.

;  IMPORTANT NOTE

;  DO NOT SET THESE variables > 1500M

;  apache gets confused and treats it as a negative number

;  and not allow anything to post..  K. Meek 10/09

; NOTE — make sure the post_max_size and upload_max_filesize is not set to another value below!!

post_max_size = 2500M

upload_max_filesize = 2500M

 

;*****  end customizations ****

 

 

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published.