Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

fopen ... failed to open stream: No error

Go to End

13 Posts   5975 Views


3 March 2010 at 4:07pm Community Member, 60 Posts

Hi I've got a website thats all but done, all I need to do is the image gallery, I'm looking at using [url=]this one[/url] ... this is my first website using SilverStripe so still figuring things out.
I downloaded the DataobjectManager and SWFUploadField Modules and unpacked them into the root folder as instructed, ran dev/build (tried db/build too with the same result) and i'm getting the following:

Warning] fopen(C:\Windows\TEMP\/silverstripe-cacheC--Users-Krissy-Work-Web-wamp-www-Kenpo-silverstripe-v2.3.4/manifestClassParse-C__Users_Krissy_Work_Web_wamp_www_Kenpo_silverstripe-v2.3.4_modules-dataobject_manager-r371_code_simple_html_editor_field_SimpleHTMLEditorField.php) [function.fopen]: failed to open stream: No error
GET /Kenpo/silverstripe-v2.3.4/dev/build

Line 398 in C:\Users\Krissy\Work\Web\wamp\www\Kenpo\silverstripe-v2.3.4\sapphire\core\ManifestBuilder.php

389       $parseCacheFile = TEMP_FOLDER . "/manifestClassParse-" . str_replace(array("/",":", "\\"),"_", realpath($filename));
390       if(!file_exists($parseCacheFile) || filemtime($parseCacheFile) < filemtime($filename)) {
391          $tokens = token_get_all($file);
392          $classes = self::getClassDefParser()->findAll($tokens);
393          $interfaces = self::getInterfaceDefParser()->findAll($tokens);
395          $cacheContent = '<?php
396             $classes = ' . var_export($classes,true) . ';
397             $interfaces = ' . var_export($interfaces,true) . ';';
398          if($fh = fopen($parseCacheFile,'w')) {
399             fwrite($fh, $cacheContent);
400             fclose($fh);
401          }
403       } else {
404          include($parseCacheFile);


* fopen(C:\Windows\TEMP\/silverstripe-cacheC--Users-Krissy-Work-Web-wamp-www-Kenpo-silverstripe-v2.3.4/manifestClassParse-C__Users_Krissy_Work_Web_wamp_www_Kenpo_silverstripe-v2.3.4_modules-dataobject_manager-r371_code_simple_html_editor_field_SimpleHTMLEditorField.php,w)
Line 398 of ManifestBuilder.php
* ManifestBuilder::parse_file(C:/Users/Krissy/Work/Web/wamp/www/Kenpo/silverstripe-v2.3.4/modules-dataobject_manager-r371/code/simple_html_editor_field/SimpleHTMLEditorField.php)
Line 348 of ManifestBuilder.php
* ManifestBuilder::allClasses(Array)
Line 213 of ManifestBuilder.php
* ManifestBuilder::get_manifest_info(C:/Users/Krissy/Work/Web/wamp/www/Kenpo/silverstripe-v2.3.4,Array)
Line 98 of ManifestBuilder.php
* ManifestBuilder::create_manifest_file()
Line 89 of DatabaseAdmin.php
* DatabaseAdmin->build()
Line 135 of DevelopmentAdmin.php
* DevelopmentAdmin->build(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 119 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/dev/build)
Line 118 of main.php

Can anyone point me in the right direction of what the problem is and how to fix it ?
I'm using Silverstripe version 2.3.4 running on WAMP server version 2.0.



4 March 2010 at 3:36am 4085 Posts

Looks like a permissions issue to me. fopen() needs that file to be writable. Also, I would just do a sanity check and make sure the file exists, as well.


4 March 2010 at 11:41am Community Member, 60 Posts

Hey thanks for the reply. How do I check permissions? And what exactly am I checking permissions on?
I had a look for the file C:\Windows\TEMP\/silverstripe-cacheC--Users-Krissy-Work-Web-wamp-www-Kenpo-silverstripe-v2.3.4/manifestClassParse-C__Users_Krissy_Work_Web_wamp_www_Kenpo_silverstripe-v2.3.4_modules-dataobject_manager-r371_code_simple_html_editor_field_SimpleHTMLEditorField.php that comes up in the error and it appears it does not exist.
As far as I can gather the manifestbuilder.php file is supposed to create that file when you dev/build .. am I right?


4 March 2010 at 1:43pm 4085 Posts

Well just for testing, you can open up your whole web root to 777. That should eliminate any questions.


4 March 2010 at 2:29pm Community Member, 60 Posts

Using wamp server on localhost so I can't use chmod permissions, have made sure all the 'read-only' boxes are unchecked in the file properties but that didn't help. Are there any other permission settings hidden somewhere?


5 March 2010 at 11:10am Community Member, 60 Posts

I just noticed the filepath in the error has a combination of forward and back slashes in it, could that be the problem? and if so how would i go about fixing that?


7 March 2010 at 1:54pm Community Member, 60 Posts

All the permissions seem to be fine, and have looked through the cache files and it's written half the files there for the dataobjectmanager so permissions don't seem to be the issue. Still getting the exact same error tho.
Any help would be apprecated.


7 March 2010 at 5:15pm 4085 Posts

Yeah, I had a client report this issue, and I tracked it down to the failed write to the /tmp/ dir. You can test it by putting SWFUpload in debug mode, and editing /sapphire/filesystem/Upload.php:

Line 85 (in 2.3.6)

      if(!$tmpFile['size']) {
         $this->errors[] = _t('File.NOFILESIZE', 'Filesize is zero bytes.');
         return false;

After an upload, you'll see the alert message come up with the output of the $tmpFile resource, including error #7, which is UPLOAD_ERR_CANT_WRITE.

Go to Top