Comments (23)
Which version of Symphony ? Which version of PHP ?
from mailchimp.
Sorry, I forgot to include these important details:
Symphony version: 2.3.1
PHP version: 5.6.2 and 5.3.29 (I tried both of these through MAMP).
from mailchimp.
Symphony 2.3.1 won't work with 5.6.x (so use 5.3.29 instead)
saveConfig
has been renamed to write A LONG TIME AGO and it looks like nobody ever uninstall this extension. (a fix is on its way...)
Finally, AFAICT, the only fwrite
call in Symphony is this one: https://github.com/symphonycms/symphony-2/blob/2.3.1/symphony/lib/toolkit/class.general.php#L837
How can $handle be boolean blows my mind...
Maybe try to replace it with
if (!($handle = fopen($file, $mode))) {
?
from mailchimp.
2.1.1 is out with the saveConfig fix...
from mailchimp.
@nitriques Thanks for the suggestion and for the fix :) I'll let you know what happens.
from mailchimp.
@finferflu my pleasure 😄
from mailchimp.
I just tried by modifying line 837 in symphony/lib/toolkit/class.general.php
as you suggested, however I still get that fwrite
error, now I even get it when I try to uninstall the extension. Additionally, I'm seeing a few of these errors in the PHP log (I'm using version 5.3.29 now as you suggested):
PHP Catchable fatal error: Argument 1 passed to Configuration::setArray() must be an array, null given, called in /path/to/symphony/install/www/symphony/lib/core/class.symphony.php on line 171 and defined in /path/to/symphony/install//www/symphony/lib/core/class.configuration.php on line 81
Additionally, I have tried to remove the mailchimp folder from the extensions folder, and now Symphony is just blank, showing the above error whenever I try to load the page. I have reverted the changes in class.general.php
and I have put the mailchimp folder back into the extensions folder, but Symphony is still just blank.
from mailchimp.
To make the Symphony install work again, go in the DB, the table sym_extensions and delete the row holding the mailchimp extension.
As for your fwrite error, I am speechless since I can't reproduce it...
from mailchimp.
Also, can you confirm that the file is writeable ?
from mailchimp.
Actually, the problem was that the Symphony configuration file was completely blank, something must have emptied it as I tried to uninstall the mailchimp extension. Fortunately I had a backup, and after I restored it Symphony is working again.
Back to the original issue, the strange thing is that I can see that the extension is enabled in the database, however nothing is really showing up in the Preferences page…
from mailchimp.
Which file should be writable (I assume by the web server)?
Thanks! :)
from mailchimp.
manifest/config.php and yes by the user running the php process (which can be different from the user running apache)
from mailchimp.
Yes, it is. PHP is running as an Apache module, and the Apache process is owned by my user.
from mailchimp.
And you're back with the fwrite error ?
Can you try to delete the row in the extension table and install from scratch ?
from mailchimp.
Yes, I'm back to that error. I have tried removing that row from the database and I have installed from scratch both with the original line in class.general.php and the modified line you suggested. Nothing seems to help so far :(
from mailchimp.
:(
Let me recapitulate:
- The extension is not enable nor installed
- You try to install it.
- You get the error message about fwrite
- Extensions is somehow installed (?)
- Config values are NOT saved in config.php ?
If that 100% correct, can you please try to change the same line to
if (($handle = fopen($file, $mode)) === false) {
Also, could you try to var_dump the parameter ? (just before the fopen if)
var_dump($file, $data, $perm, $mode);die;
from mailchimp.
That is 100% correct although I'm not sure about what the extension should do in the background as it is being installed (from what you say I suppose it should write something to config.php), all I know is that I can't find any Mailchimp options in the Symphony Preferences page.
Anyway, I've edited line 837 in class.general.php just as you instructed, and I got the same fwrite
issue. I then tried to var_dump
those variables just above line 837 as you told me, but no variables are displayed on the screen when I try to enable/disable the extension, just the usual fwrite
error again.
from mailchimp.
OK, what you said about the extension writing to config.php just opened my eyes. I double checked the permissions, and while config.php itself was writable by the web server, its containing folder wasn't. I have updated the permissions and the extension is finally enabled! :)
On a side note, uninstalling the extension now doesn't empty the config.php file any longer.
Thanks a lot for your help, and sorry for taking so long for figuring out this simple permissions issue (I don't know too much about the internals of Symphony unfortunately).
from mailchimp.
I just wanted to mention that when I tried to open the Events page, Symphony threw and error and I found that the file mailchimp/lib/mailchimp-api/MailChimp.php
isn't included in the extension. I went ahead and downloaded it from the official repo and everything seems to work now. So it might be a good idea to have that file included with the extension.
from mailchimp.
Also, the extension version shown in the Mailchimp event is outdated: "2.0 released on 16 November 2013".
(I hope I'm paying back all the time you've wasted for me by finding these :)
from mailchimp.
Thanks a lot for your help, and sorry for taking so long for figuring out this simple permissions issue
No problem! Glad you found out the problem. But it is still weird since there is a check about both the directory and the file (https://github.com/symphonycms/symphony-2/blob/2.3.1/symphony/lib/toolkit/class.general.php#L829).. I might log and issue in the core...
So it might be a good idea to have that file included with the extension.
It is, but as a git submodule, so you need to git submodule init && git submodule update
when you check it out.
*EDIT: * just went to check the .zip download and it's missing. DAMN. Thanks for reporting!
from mailchimp.
Finally, there was a bug in the write function in Symphony 2.3 (that's where the fwrite error comes from) and it has been fixed. Pffffeeewww!!
from mailchimp.
Oh I see, thanks for the heads up! :)
from mailchimp.
Related Issues (13)
- No @result = 'success' maybe because I insert other fields? HOT 11
- MailChimp.class.php not be included HOT 4
- .zip download is missing the mailchimp api since it's a submodule HOT 1
- Symphony Fatal Error: email is already subscribed to the list. HOT 8
- Symphony Fatal Error: Class 'Drewm\MailChimp' not found HOT 2
- Injclude path for mailchimp api is wrong
- Symphony Warning: The use statement with non-compound name 'MailChimp' has no effect HOT 4
- Error in the readme HOT 1
- Missing abstract class JSONPage? HOT 5
- Duplicate email addresses leads to Symphony Recoverable Error HOT 5
- 500 errors when using Ajax HOT 50
- Update to mailchimp's v2 API HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailchimp.