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: Th
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
.
Edit the pear.conf: Adding a forward slash "/" to the end of the php_dir path, while keeping the s:44 solved the problem for me and a couple coworkers.
I have XAMPP installed, and I just deleted /xampp/php/pear.ini and that solved the same problem
Just chipping in with a late response for others finding this answer. My PEAR config had several issues and not just the php_dir config setting.
I had to go over all of my settings to verify that the count was correct. When all errors where fixed my PEAR was working fine again.
Seeing this message in the terminal:
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.
/MAMP/bin/php/php7.0.10/conf/pear.conf
)pear version
)Just for clarifying for others finding this issue. The PEAR Config file is a serialized object that is unserialized when running commands.
A serialized object looks like s:5:"value"
with the s:5 defining the length the string.