This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

getmypid() SimpleMimeEntity.php
#1

I noticed that when I send a message .. page shows these errors..

Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 85
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 687
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 85
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 687
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 85
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 687
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 85
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 687
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 85
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 687
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 85
Notice: getmypid() has been disabled for security reasons in /membri/xxxxxx/commenti/includes/external/swift_mailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 687

85)   $this->_cacheKey = md5(uniqid(getmypid().mt_rand(), true));
687)   $idLeft = md5(getmypid() . '.' . time() . '.' . uniqid(mt_rand(), true));

the message is posted ok.. and after reload errors disappear
which can be the security reasons to disable ??
tks
Reply
#2

Hi,

You'd need to ask your host why they have disabled that function. If it's in Swift Mailer (one of the most popular email scripts available) then it must be rare for hosts to disable it. Fortunately it doesn't seem to be doing anything particularly special, it's just generating a random string.

Try replacing line 85 with this:

PHP Code:
<?php 
$this
->_cacheKey = md5(uniqid(mt_rand(0, 32000), true));

And line 687 with this:

PHP Code:
<?php 
$idLeft
= md5(mt_rand(0, 32000) . '.' . time() . '.' . uniqid(mt_rand(), true));

Have you completed the interview?
Reply
#3

Now.. works fine..
just in case of other.. similar problems, I'll ask my host about the function disabled.

great as usual..
tks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)