You should delete all the files and folders in the zp-core folder except for the zp-config.php. Also delete all the files and folders in the themes folder. Then copy the contents of these two folders from the nightly build. I suggest you wait until tomorrow for this, though. We have found a small problem with plugins in last night's build.
just a quick question regarding the latest zenphoto build and email notifications: what PHP version is required to be able receive notifications?
I'm asking this because I have 2 identical latest builds of zenphoto running on 2 separate servers one on
[b]PHP version 5.2.5[/b]
the other one on
[b]PHP version 4.3.11[/b]
on the older version of PHP 4.3.11 which in the documentation it says is supported - can't receive any email notifications -none(but only using the latest zenphoto build)with older builds work fine
on the PHP v. 5 all notifications work ok
I'm having a very similar issue. I have random comments being made on my site about valtrax and viagra and I would like them to be sent to me for moderation. I receive emails about password resets, but I do not receive them when someone makes a comment on an image. I am running version 1.1.7[1842]. Any ideas on how I can get this to work? I don't know what php version my server is running. I'm using GoDaddy as my WebHost. Thanks for any advice you can give...
Jason
jcase16: You should see if this problem still exists for you in the 1.2 (or better current nightly build) version of zenphoto.
You can see what version of PHP you are using when you run the setup program. It will display the PHP version in the system check information.
ImDude: what other possible differences are there between the two installations? We have not had a problem in the past with email on PHP version 4.
Hi sbillard,
After months ago, I have finally tested your code that you have posted before :
To debug this you could add an output statement after the line:
$message = chunk_split(base64_encode($message));
add
echo "Mail message reads:".$message;
If this shows text, then the message is still intact and something is happening during the sending or receiving.
And they shows no text.
So i have try to sending me a password, and i have received a mail for reset my password but empty. Same problem with the comment that i have received.
The bug is still running since 1.1.4 and now I have upgrade to 1.2.1 and the problem is staying.
Is it not a problem in the zp-config.php file?
Thank you for your answer!
print out the $message content before and after the $message = chunk_split(base64_encode($message)); statement. If it is empty before you will have to back track and put some debug output at the calling location.
This would be in the zp_mail function in functions.php. Check to see if it was passed the text. If so, check where in its processing the text gets lost, e.g. the UTF8 conversion.
If the message is empty when zp_mail is called check the call on zp_mail in auth_zp.php.
I have tried but it's a little complicated for me so i have paste the code here :
From functions.php :
function zp_mail($subject, $message, $headers = '', $admin_emails=null) {
echo "message=$message";
`
if (is_null($admin_emails)) { $admin_emails = getAdminEmail(); }
if (count($admin_emails) > 0) {
// Make sure no one is trying to use our forms to send Spam
// Stolen from Hosting Place:
// http://support.hostingplace.co.uk/knowledgebase.php?action=displayarticle&cat=0000000039&id=0000000040
$badStrings = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:");
foreach($_POST as $k => $v) {
foreach($badStrings as $v2) {
if (strpos($v, $v2) !== false) {
header("HTTP/1.0 403 Forbidden");
die("Forbidden");
exit();
}
}
}
foreach($_GET as $k => $v){
foreach($badStrings as $v2){
if (strpos($v, $v2) !== false){
header("HTTP/1.0 403 Forbidden");
die("Forbidden");
exit();
}
}
}
if( $headers == '' ) {
$headers = "From: " . get_language_string(getOption('gallery_title'), getOption('locale')) . "";
}
// Convert to UTF-8
if (getOption('charset') != 'UTF-8') {
$subject = utf8::convert($subject, getOption('charset'));
$message = utf8::convert($message, getOption('charset'));
echo "UTF8 converted message=$message";
}
// Send the mail
foreach ($admin_emails as $email) {
UTF8:end_mail($email, $subject, $message, $headers);
}
}
}
`
From auth_zp.php, zp-mail is only call here :
if (isset($_POST['login']) && isset($_POST['user']) && isset($_POST['pass'])) { $post_user = sanitize($_POST['user'],3); $post_pass = sanitize($_POST['pass'],3); $redirect = sanitize($_POST['redirect'],3); if ($_zp_loggedin = checkLogon($post_user, $post_pass)) { zp_setcookie("zenphoto_auth", md5($post_user . $post_pass), time()+5184000, $cookiepath); if (!empty($redirect)) { header("Location: " . FULLWEBPATH . $redirect); } } else { // Clear the cookie, just in case zp_setcookie("zenphoto_auth", "", time()-368000, $cookiepath); // was it a request for a reset? $admins = getAdministrators(); $admin = array_shift($admins); $key = $admin['pass']; $code_cypher = md5(bin2hex(rc4($key, trim($post_pass)))); if (isset($_POST['code_h'])) { $code_hash = sanitize($_POST['code_h'],3); } else { $code_hash = ''; } if (($code_cypher == $code_hash) && strlen(trim($post_pass)) == CAPTCHA_LENGTH) { if (empty($post_user)) { $requestor = 'You are receiving this e-mail because of a password reset request on your Zenphoto gallery.'; } else { $requestor = sprintf(gettext("You are receiving this e-mail because of a password reset request on your Zenphoto gallery from a user who tried to log in as %s."),$post_user); } $admins = getAdministrators(); $user = array_shift($admins); $adm = $user['user']; $pas = $user['pass']; setOption('admin_reset_date', time()); $req = getOption('admin_reset_date'); $ref = md5($req . $adm . $pas); $msg = "\n".$requestor. "\n".sprintf(gettext("To reset your Zenphoto Admin passwords visit: %s"),FULLWEBPATH."/".ZENFOLDER."/admin-options.php?ticket=$ref") . "\n".gettext("If you do not wish to reset your passwords just ignore this message. This ticket will automatically expire in 3 days.");
echo "message to be passed=$msg";
zp_mail(gettext("The Zenphoto information you requested"), $msg); $_zp_login_error = 2; } else { $_zp_login_error = 1; } } } }
Can you help me with this please?
Thank you very much for your help!