Re: reCaptcha addon not showing in page
I'm running ZC v1.5.0 and I just installed reCaptcha v1.3.2, revision ce41a91dfcf9 which I downloaded from https://bitbucket.org/pickupman/zenc...tcha/downloads
Per the instructions, it says to log in to your admin once the files have been uploaded and click the install button at the top of the page. When I went to my admin login page, a blank page was loaded - preventing me from entering my login credentials. The error log generated states the following:
[18-May-2012 17:06:21] PHP Parse error: syntax error, unexpected T_IF in /admin/includes/init_includes/init_reloadedstack.php on line 1
Can you please advise?
Re: reCaptcha addon not showing in page
@ScriptJunkie
Try reuploading the file, as I don't see any syntax errors in the file that would cause that error. If that doesn't work, try removing the comment block (lines 2-5) and upload without the comment block.
Sorry I didn't get your PM. I didn't have notifications for that turned on somehow.
Re: reCaptcha addon not showing in page
No worries on the PM - should have posted here in the first place :smile:
Ok, removed comment block, but no joy. New error is:
Quote:
PHP Parse error: syntax error, unexpected '{' in admin/includes/init_includes/init_reloadedstack.php on line 1
The code is as follows:
PHP Code:
<?phpif (isset($_SESSION) AND is_numeric($_SESSION['admin_id']) AND is_object($reloadedStack) ){ foreach ($reloadedStack->errors as $message) { $messageStack->errors[] = $message; $messageStack->size += 1; }}
Now, I did have to do file merges on 4 files prior to install due to other mods and personal customizations....but I was very careful. Wondering if I made a merging error in another file that affects the init file? Below is a list of files I merged:
\includes\templates\custom_template\templates\tpl_contact_us_default.php
\includes\templates\custom_template\templates\tpl_product_reviews_write_default. php
\includes\modules\pages\contact_us\header_php.php
\includes\modules\pages\product_reviews_write\header_php.php
Quote:
Originally Posted by
pickupman
@ScriptJunkie
Try reuploading the file, as I don't see any syntax errors in the file that would cause that error. If that doesn't work, try removing the comment block (lines 2-5) and upload without the comment block.
Sorry I didn't get your PM. I didn't have notifications for that turned on somehow.
Re: reCaptcha addon not showing in page
@ScriptJunkie
This line should be:
Code:
<?php
if (isset($_SESSION) AND is_numeric($_SESSION['admin_id']) AND is_object($reloadedStack) ){
foreach ($reloadedStack->errors as $message) {
$messageStack->errors[] = $message;
$messageStack->size += 1;
}
}
Not sure if it was a copy and paste error but there needs to a space or line break between the php and if on that line.
Re: reCaptcha addon not showing in page
Sorry, I think that's just the way it was formatted by the forum's text editor when I selected the php tags. This is what it looks like in the file:
Code:
<?php
if (isset($_SESSION) AND is_numeric($_SESSION['admin_id']) AND is_object($reloadedStack) )
{
foreach ($reloadedStack->errors as $message)
{
$messageStack->errors[] = $message;
$messageStack->size += 1;
}
}
The coding is the same as what you posted (expect for spacing), but to be safe, I copied what you posted and pasted it into the file, saved, and uploaded it to the server. Result is the same: a blank login page with the following error log:
Quote:
PHP Parse error: syntax error, unexpected '{' in admin/includes/init_includes/init_reloadedstack.php on line 1
Quote:
Originally Posted by
pickupman
@ScriptJunkie
This line should be:
Code:
<?php
if (isset($_SESSION) AND is_numeric($_SESSION['admin_id']) AND is_object($reloadedStack) ){
foreach ($reloadedStack->errors as $message) {
$messageStack->errors[] = $message;
$messageStack->size += 1;
}
}
Not sure if it was a copy and paste error but there needs to a space or line break between the php and if on that line.
Re: reCaptcha addon not showing in page
@ScriptJunkie,
You have to have some sort of syntax error somewhere else. The syntax of the code you and both posted is correct. Try deleting the contents of the file, but leave the file in place and see if you have any other errors.
Re: reCaptcha addon not showing in page
The mystery deepens....After deleting the contents of the file and uploading the empty file to the server, I am able to access my admin login page with no errors generated in the cache file. Also, I am able to log in to my admin successfully - but there is no install button at the top of the page, nor is reCAPTCHA displayed in the config menu.
Quote:
Originally Posted by
pickupman
@ScriptJunkie,
You have to have some sort of syntax error somewhere else. The syntax of the code you and both posted is correct. Try deleting the contents of the file, but leave the file in place and see if you have any other errors.
Re: reCaptcha addon not showing in page
Quote:
Originally Posted by
ScriptJunkie
The mystery deepens....After deleting the contents of the file and uploading the empty file to the server, I am able to access my admin login page with no errors generated in the cache file. Also, I am able to log in to my admin successfully - but there is no install button at the top of the page, nor is reCAPTCHA displayed in the config menu.
Resolved!!
I noticed that before I emptied out the file, the file size was only 24 bytes. So I opened a new file in Notepad++, pasted in the code, saved it over the empty file and uploaded to the server. Logged in without incident, found the install button, and successfully installed. Will configure, test, and report results here.
I'm thinking something went wrong with decompression when I unzipped the fileset.
Re: reCaptcha addon not showing in page
Whew. That explains the mystery. Let me know how it goes. Should be over the hump now.
Re: reCaptcha addon not showing in page
Quote:
Originally Posted by
pickupman
Whew. That explains the mystery. Let me know how it goes. Should be over the hump now.
Configured and tested - works beautifully :)
Thanks for a great mod and thank you so much for supporting it!!