When trying to upgrade MAMP pear the following error is raised:
Notice: unserialize(): Error at offset 276 of 1133 bytes in Config.php on line 1050
ERROR: The default config file is not a valid config file or is corrupted.
Some suggestions how to fix this?
Steps to reproduce:
Update (1):
Based on answer 8375349/420953 I tried 2 possibilities to fix this
both resulted in error:
Could not get contents of package "/Applications/MAMP/bin/php/php5.3.6/bin/pear". Invalid tgz file.
upgrade failed
Update (2):
running
results in output
With this, I noticed that I was using the "local" version of PEAR.
I removed it with
and then tried to upgrade the MAMP version of PEAR with
this results in error
Cannot install, php_dir for channel "pear.php.net" is not writeable by the current user
upgrading with
installs it locally (again).
running
outputs
this brings me back to the starting point of Update (2). Seems that I am not able to upgrade PEAR under a MAMP directory.
Update (3):
I posted question
because my assumption is that the root of this issue is related to MAMP PEAR config.
Update (4):
I did not install a local PEAR version and this was causing quite some issues. After also installing a local version (and not only the MAMP) version, upgarding the MAMP version worked perfectly.
People with the your exact problem seem to has solved it in this MAMP forum thread.
You can either delete /Applications/MAMP/bin/php/php5.3.6/conf/pear.conf
, or change a line in that file from "php_dir";s:44
to "php_dir";s:43
.