Follow corelegion on Twitter
Welcome, Guest
Please Login or Register.    Lost Password?

Flexi Custom Code Safe Mode issue?
(1 viewing) (1) Guest
This Place for All "News Display" Addons
Go to bottomPage: 1
TOPIC: Flexi Custom Code Safe Mode issue?
#1556
Flexi Custom Code Safe Mode issue? 1 Year, 6 Months ago Karma: 0
I'm not actually sure what's going on with the module, since it worked fine on my localhost. Now that I've got it installed on my remote server I'm getting a strange set of errors. You can see them here:
alicepiccola.com/index.php/contact

I've tried the module without any custom code in it and I still get the errors.I've check to make sure my /tmp path is correct and it seems to be. Is this an issue with Safe Mode being turned on in my hosting? My host (nearlyfreespeech.net) wont turn safe mode off. Is there someway I can stop this error from being triggered? Does anyone have advice for things I can try?

I'm basically an advanced beginner when it comes to this stuff, so my knowledge is limited. Any help would be great!
alipica
Acquainter
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#1558
Re: Flexi Custom Code Safe Mode issue? 1 Year, 6 Months ago Karma: 0
Well, I've switched to the Mod HTML module and I'm not getting any errors. Sad, because I liked the Flexi Custom Code Module better. The errors I had were below:


Warning: tempnam() [function.tempnam]: SAFE MODE Restriction in effect. The script whose uid/gid is 141897/25000 is not allowed to access /tmp owned by uid/gid 0/0 in /f2/alicepiccola/public/modules/mod_flexi_customcode/helper.php on line 19

Warning: fopen() [function.fopen]: Filename cannot be empty in /f2/alicepiccola/public/modules/mod_flexi_customcode/helper.php on line 20

Warning: fwrite(): supplied argument is not a valid stream resource in /f2/alicepiccola/public/modules/mod_flexi_customcode/helper.php on line 21

Warning: fclose(): supplied argument is not a valid stream resource in /f2/alicepiccola/public/modules/mod_flexi_customcode/helper.php on line 22

Warning: include_once() [function.include-once]: Filename cannot be empty in /f2/alicepiccola/public/modules/mod_flexi_customcode/helper.php on line 23

Warning: include_once() [function.include]: Failed opening '' for inclusion (include_path='.:/nfsn/apps/php5/lib/php/:/nfsn/apps/php/lib/php/') in /f2/alicepiccola/public/modules/mod_flexi_customcode/helper.php on line 23

Warning: unlink() [function.unlink]: Unable to access in /f2/alicepiccola/public/modules/mod_flexi_customcode/helper.php on line 24
alipica
Acquainter
Posts: 2
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2176
Re: Flexi Custom Code Safe Mode issue? 1 Year ago Karma: 0
I think the error may be caused by code in the custom flexi helper.php file. It tries to retrieve a temporary file name using the php function tempnam:

$tmpfname = tempnam("/tmp", "html");

The Joomla framework has its own configuration for the temporary directory set in configuration.php. The Joomla framework temporary file area may deviate from the PHP.INI setting. In a hosted environment it may be difficult to use the php setting.

So the $tmpfname set with the above code could end up pointing to somewhere outside the Joomla directory of your host environment which will make calls that try to open the file fail.

Try commenting out the above line and replace it with calls to the Joomla framwork to get a pointer to the Joomla framework temporary directory instead:

//$tmpfname = tempnam("/tmp", "html");
$config = JFactory::getConfig();
$tmpfname = $config->get('tmp_path') . '/' . uniqid('html');
flexiusr
Acquainter
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#2178
Re: Flexi Custom Code Safe Mode issue? 1 Year ago Karma: 3
Great thanks for your sharing
techicore
Supervisor
Posts: 116
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
Moderators: techicore, rboteam
Feel free to see the demo for addons at This Demo or you can also see the real action at TechnoTravels and TechiCore
Associated with RBO Teamget the latest posts directly to your desktop

Australia SEO

Selecting an Australian SEO company is only turning into a more difficult task as more technologies emerge. We conducted a search for Australia SEO and after speaking with multiple companies are confident in suggesting The Web Showroom.