HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


fixed: fopen warns filename can't be open in sources/abstract_file_manager.php on line 594

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#55494 (In Topic #12074)
Avatar

Fan in training

Error

Hi there,

I did some CMS stuff with drupal, silverstripe and joomla before. So I didn't hesitate to install ocPortal since its features seem to match my requirements. Installation went ok so far. The FTP-Upload function for customizing styles/theme and in this case ZONES didn't work at all. Chmoding all specific directories to 777 did not make a difference. As I#m not familiar w/ PHP - may you have a clue w/ this stuff here:


PHP WARNING [2] fopen() [<a href='http://www.php.net/manual/en/function.fopen.php'>function.fopen.php</a>]: Filename cannot be empty in /is/htdocs/XSFSGDFT/www/kulturportal/sources/abstract_file_manager.php on line 594 (version: 4.2.0, PHP version: 5.2.10, URL: /adminzone/index.php?page=admin_zones&type=_add)

File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/failure.php'
Line'509'
Function'get_html_trace'
Args

File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/global2.php'
Line'751'
Function'_fatal_exit'
Args'PHP WARNING [2] fopen() [<a href=\'http://www.php.net/manual/en/function.fopen.php\'>function.fopen.php</a>]: Filename cannot be empty in /is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/abstract_file_manager.php on line 594'


File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/failure.php'
Line'138'
Function'fatal_exit'
Args'PHP WARNING [2] fopen() [<a href=\'http://www.php.net/manual/en/function.fopen.php\'>function.fopen.php</a>]: Filename cannot be empty in /is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/abstract_file_manager.php on line 594'


File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/global2.php'
Line'649'
Function'_ocportal_error_handler'
Args'warning'

2

'fopen() [<a href=\'http://www.php.net/manual/en/function.fopen.php\'>function.fopen.php</a>]: Filename cannot be empty'

'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/abstract_file_manager.php'

594


Function'ocportal_error_handler'
Args2

'fopen() [<a href=\'http://www.php.net/manual/en/function.fopen.php\'>function.fopen.php</a>]: Filename cannot be empty'

'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/abstract_file_manager.php'

594

array ( 'basic_path' => 'Musik/pages/comcode_custom/EN/start.txt', 'contents' => '

Your new zone

Welcome to your new zone. You can now start setting up your menu, customising your panels, and writing this front page ( Musik:musik ).

', 'world_access' => true, 'path' => '/www/kulturportal/Musik/pages/comcode_custom/EN/start.txt', 'access' => 438, 'conn' => NULL, 'tmp_path' => '/tmp/', 'path2' => false, )


File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/abstract_file_manager.php'
Line'594'
Function'fopen'
Args''

'wb'


File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/zones2.php'
Line'82'
Function'afm_make_file'
Args'Musik/pages/comcode_custom/EN/start.txt'

'

Your new zone

Welcome to your new zone. You can now start setting up your menu, customising your panels, and writing this front page ( Musik:musik ).

'

true


File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/adminzone/pages/modules/admin_zones.php'
Line'462'
Function'actual_add_zone'
Args'Musik'

'Musik'

'musik'

'Musik ist alles, was klingt.'

'-1'

1

0

1


File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/adminzone/pages/modules/admin_zones.php'
Line'88'
Function'_add_zone'
Class'Module_admin_zones'
Type'->'
ObjectModule_admin_zones::__set_state(array( ))
Args

File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/zones.php'
Line'331'
Function'run'
Class'Module_admin_zones'
Type'->'
ObjectModule_admin_zones::__set_state(array( ))
Args

File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/site.php'
Line'880'
Function'load_module_page'
Args'adminzone/pages/modules/admin_zones.php'

'admin_zones'


File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/sources/site.php'
Line'701'
Function'request_page'
Args'admin_zones'

true


File'/is/htdocs/wp1114981_P3SSIYER52/www/kulturportal/adminzone/index.php'
Line'51'
Function'do_site'
Args



Last edit: by digitalpublic
Back to the top
 
Posted
Rating:
#55500
Avatar

Hi,

This is strange. It's failing to create a temp file, but not giving any error message about why it failed. The error you see is when it fails to write to the non-existent temp file.

ocPortal is quite smart about only trying to create a temp file in a place that is valid – it checks safe mode and open basedir restrictions to see if it can save into the main server temporary directory, and if it cannot it saves into ocPortal's own temp directory.

Because it's not giving an appropriate error it's hard for me to say what is happening. Knowledge of whether your server uses PHP Safe Mode and it's open_basedir setting might help though (both can be found from PHP-Info, in the tools section of the Admin Zone).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#55503
Avatar

Fan in training

Thanks for ur fast answer. I was a bit confused by the error, cause it didn't make sense to me either, although I'm not a programming guy…

open_basedir:

/is/htdocs/user_tmp/wp1114xxx_XYZ:/tmp:/dev/null:/dev/urando
m:/bin:/usr:/is/default.erro
rs:/is/htdocs/wp1114xxx_XYZ

No value

########

safe_mode is off

####

and yes it is below the webspace's root directory


btw: I couldn't find any /temp should it be directly under the installdir?


thanks a lot, vry much appreciated your help. If I get along w/ this stuff I can contribute w/ translations into german, since there is none on your download/language page

bye

Joerg

p.s. Thought it was the file management function, but as I tried out to set a module in german it went all well and I got a nice editor for translating the entire .po by functions and stuff…

Hm. I didn't work with the style theme wizard and zones…


Last edit: by digitalpublic
Back to the top
 
Posted
Rating:
#55508
Avatar

Please try the attached. It changes our temp-file logic to fall back to ocP's temp dir (safe_mode_temp) if it fails to create a temp file in the normal place. It's working around a PHP bug most likely, but if the workaround works that's all that matters…

Attachment
sources/sitemap.php
» Download: sitemap.php (13 Kb, 125 downloads so far)

Attachment
sources/support.php
» Download: support.php (38 Kb, 123 downloads so far)

Attachment
sources/abstract_file_manager.php
» Download: abstract_file_manager.php (21 Kb, 139 downloads so far)

Attachment
sources/downloads2.php
» Download: downloads2.php (31 Kb, 131 downloads so far)

Attachment
sources/upgrade.php
» Download: upgrade.php (43 Kb, 167 downloads so far)

Attachment
sources/uploads.php
» Download: uploads.php (21 Kb, 135 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#55510
Avatar

Fan in training

Thanks again. You guys are faster than light….

I'll try this. Hope it'll work out…


Ciao

Joerg
Back to the top
 
Posted
Rating:
#55511
Avatar

Fan in training

OK Chris. You do an awesome job. All worked well. I'm proud to be a new member of the oc Portal Community. Never experienced an efficient and fast help as with you. As I said, I will start to translate the .po in german. btw is there any translation for your new version or should i better start from scratch?


You really made my day. My first impression was good. Now I'm convinced, I want to become your german evangelist if needed…

maybe you can help me with a bigger project I'm planning to realize with oc portal. Could you send me your PM so that I can elaborate more on that?

;-)

again thank you very much!

Bye

Joerg
Back to the top
 
Posted
Rating:
#55518
Avatar

Hi,

Always happy to get problems fixed when they come up :).

Launchpad hasn't updated with the translation files for 4.2 yet, it always is a bit slow to import files. Hopefully they'll be up this week some time. When the files are up I'm not sure whether the existing launchpad translations for the previous versions on Launchpad are going to carry over. They might not, in which case I will need to filter then upload those. We do have some translation for 4.1.x on there to work from as a base.

maybe you can help me with a bigger project I'm planning to realize with oc portal. Could you send me your PM so that I can elaborate more on that?

If this is a commercial project could you open a ticket please :).
https://ocportal.com/site/tickets/ticket.htm?ticket_template=agency&cost=free

I'm a bit behind on my email (read this as "my inbox is about to explode" ;)) but someone will get back to you within a few days.

Nice to see you here.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: