Module: External Phorummail
Posted by Thomas Seifert
|
Re: Module: External Phorummail October 06, 2010 11:54AM |
Registered: 17 years ago Posts: 754 |
|
Re: Module: External Phorummail October 06, 2010 12:01PM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: Module: External Phorummail October 06, 2010 12:31PM |
Registered: 17 years ago Posts: 754 |
I received these error messages after a cronjob completion:
<b>Warning</b>: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied in <b>.../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php</b> on line <b>147</b><br />
<br />
<b>Warning</b>: fopen(/tmp8020-1/jhj.jpg) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in <b>.../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php</b> on line <b>154</b><br />
- Show quoted text -
<b>Fatal error</b>: Uncaught exception 'ezcBaseFileNotFoundException' with message 'The file '/tmp8020-1/jhj.jpg' could not be found.' in .../mods/ext_phorummail/ezc/Mail/src/parts/fileparts/disk_file.php:86
Stack trace:
#0 ../mods/ext_phorummail/ezc/Mail/src/parts/file.php(86): ezcMailFile->__set('fileName', '/tmp8020-1/jhj....')
#1 ../mods/ext_phorummail/ezc/Mail/src/parts/fileparts/disk_file.php(32): ezcMailFilePart->__construct('/tmp8020-1/jhj....')
#2 ../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php(269): ezcMailFile->__construct('/tmp8020-1/jhj....')
|
Re: Module: External Phorummail October 06, 2010 06:19PM |
Admin Registered: 22 years ago Posts: 8,532 |
I don't know this code, but it definitely looks like a slash is missing in there. /tmp8020-1/ should have been /tmp/8020-1/ probably.
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
Maurice Makaay
Phorum Development Team
my blog
linkedin profile
secret sauce
|
Re: Module: External Phorummail October 06, 2010 06:50PM |
Registered: 17 years ago Posts: 754 |
|
Re: Module: External Phorummail October 07, 2010 01:19AM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: Module: External Phorummail October 07, 2010 09:02AM |
Registered: 17 years ago Posts: 754 |
Thanks, Thomas!
I corrected it but I still experience problems:
[code="php"]
That was the response from my ISP:
The error messages you posted to us indicated that your scripts attempted to create a folder called "tmp25373-1" on the Root folder of the server.
This is a problem as you do not have any access to the / (root) folder of the server. You do have access to the /tmp/ folder on the server,
therefore you will need to configure your script to load files there, instead of trying to make a new folder.
To configure this, you might try configuring your mods/ext_phorummail/ezc/Mail/src/parser/parser.php file to load the proper path.
private static $tmpDir = null;
try setting it to:
private static $tmpDir = "/tmp";
Also, you may want to check the output of the following function in the mods/ext_phorummail/ezc/Mail/src/parser/parser.php file.
public static function getTmpDir()
{
if ( self::$tmpDir === null )
{
self::$tmpDir = sys_get_temp_dir();
if ( substr( self::$tmpDir, strlen( self::$tmpDir ) - 1 ) !== DIRECTORY_SEPARATOR )
{
self::$tmpDir = self::$tmpDir . DIRECTORY_SEPARATOR;
}
}
return self::$tmpDir;
}
[/code]
What is your opinion?
I corrected it but I still experience problems:
<b>Warning</b>: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied in <b>.../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php</b> on line <b>147</b><br />
<br />
<b>Warning</b>: fopen(/tmp2864-1/jhj.jpg) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory in <b>.../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php</b> on line <b>154</b><br />
- Show quoted text -
<b>Fatal error</b>: Uncaught exception 'ezcBaseFileNotFoundException' with message 'The file '/tmp2864-1/jhj.jpg' could not be found.' in .../mods/ext_phorummail/ezc/Mail/src/parts/fileparts/disk_file.php:86
Stack trace:
#0 .../mods/ext_phorummail/ezc/Mail/src/parts/file.php(86): ezcMailFile->__set('fileName', '/tmp2864-1/jhj....')
etc...
[code="php"]
That was the response from my ISP:
The error messages you posted to us indicated that your scripts attempted to create a folder called "tmp25373-1" on the Root folder of the server.
This is a problem as you do not have any access to the / (root) folder of the server. You do have access to the /tmp/ folder on the server,
therefore you will need to configure your script to load files there, instead of trying to make a new folder.
To configure this, you might try configuring your mods/ext_phorummail/ezc/Mail/src/parser/parser.php file to load the proper path.
private static $tmpDir = null;
try setting it to:
private static $tmpDir = "/tmp";
Also, you may want to check the output of the following function in the mods/ext_phorummail/ezc/Mail/src/parser/parser.php file.
public static function getTmpDir()
{
if ( self::$tmpDir === null )
{
self::$tmpDir = sys_get_temp_dir();
if ( substr( self::$tmpDir, strlen( self::$tmpDir ) - 1 ) !== DIRECTORY_SEPARATOR )
{
self::$tmpDir = self::$tmpDir . DIRECTORY_SEPARATOR;
}
}
return self::$tmpDir;
}
[/code]
What is your opinion?
|
Re: Module: External Phorummail October 07, 2010 09:10AM |
Admin Registered: 23 years ago Posts: 9,240 |
|
Re: Module: External Phorummail October 07, 2010 09:51AM |
Registered: 17 years ago Posts: 754 |
|
Re: Module: External Phorummail October 09, 2010 07:59PM |
Registered: 17 years ago Posts: 754 |
After it worked for a while, I suddenly receive this warning again when Phorum is attempting to import email messages from my email account:
ext_phorummail/ezc/Mail/src/parser/parts/parser.php
[/code]
from [code="php"]
private static $tmpDir = null;
to
private static $tmpDir = "/tmp";
[/code]
These are warnings from the Event module:
[code="php"]
PHP warning: fclose(): supplied argument is not a valid stream resource
PHP warning generated at .../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php:253
Back trace:
Function fclose called at
{path to Phorum}/mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php:253
----
Function finish called at
{path to Phorum}/mods/ext_phorummail/ezc/Mail/src/parser/parts/multipart_parser.php:146
----
Function parseBody called at
{path to Phorum}/mods/ext_phorummail/ezc/Mail/src/parser/parts/rfc822_parser.php:102
----
Function parseBody called at
{path to Phorum}/mods/ext_phorummail/ezc/Mail/src/parser/parser.php:236
----
Function parseMail called at
{path to Phorum}/mods/ext_phorummail/ext_phorummail.php:108
----
Function phorum_ext_phorummail_scheduled called
----
Function call_user_func called at
{path to Phorum}/common.php:1693
----
Function phorum_hook called at
{path to Phorum}/script.php:248
----
Request info:
10/09/2010 05:50PM ext_phorummail Module PHP warning: fwrite(): supplied argument is not a valid stream resource details
User info:
Anonymous user
User IP address =
Additional details:
Message:
PHP warning: fwrite(): supplied argument is not a valid stream resource
PHP warning generated at .../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php:240
[/code]
What else could I do? Thank you.
Edited 1 time(s). Last edit at 10/09/2010 08:54PM by korsakov.
<b>Warning</b>: mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied in <b>.../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php</b> on line <b>147</b><br />I created a /tmp directory in this path and I also corrected line 91 in [code="php"]
ext_phorummail/ezc/Mail/src/parser/parts/parser.php
[/code]
from [code="php"]
private static $tmpDir = null;
to
private static $tmpDir = "/tmp";
[/code]
These are warnings from the Event module:
[code="php"]
PHP warning: fclose(): supplied argument is not a valid stream resource
PHP warning generated at .../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php:253
Back trace:
Function fclose called at
{path to Phorum}/mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php:253
----
Function finish called at
{path to Phorum}/mods/ext_phorummail/ezc/Mail/src/parser/parts/multipart_parser.php:146
----
Function parseBody called at
{path to Phorum}/mods/ext_phorummail/ezc/Mail/src/parser/parts/rfc822_parser.php:102
----
Function parseBody called at
{path to Phorum}/mods/ext_phorummail/ezc/Mail/src/parser/parser.php:236
----
Function parseMail called at
{path to Phorum}/mods/ext_phorummail/ext_phorummail.php:108
----
Function phorum_ext_phorummail_scheduled called
----
Function call_user_func called at
{path to Phorum}/common.php:1693
----
Function phorum_hook called at
{path to Phorum}/script.php:248
----
Request info:
10/09/2010 05:50PM ext_phorummail Module PHP warning: fwrite(): supplied argument is not a valid stream resource details
User info:
Anonymous user
User IP address =
Additional details:
Message:
PHP warning: fwrite(): supplied argument is not a valid stream resource
PHP warning generated at .../mods/ext_phorummail/ezc/Mail/src/parser/parts/file_parser.php:240
[/code]
What else could I do? Thank you.
Edited 1 time(s). Last edit at 10/09/2010 08:54PM by korsakov.
Sorry, only registered users may post in this forum.



