Thread: String error

Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default String error

    I'm new and trying to setup my email and somehow screwed up line 42 in my create_account.php
    (according to debug log)
    I tried to fix it by deleting the file and replacing from my backup, which looks fine. Here it is , do you see anything wrong?
    PHP Code:
    define('EMAIL_GV_CLOSURE'"\n" 'Sincerely,' "\n\n" STORE_OWNER "\nStore Owner\n\n"'<a href="' HTTP_SERVER DIR_WS_CATALOG '">'.HTTP_SERVER DIR_WS_CATALOG ."</a>\n\n"); 
    using ver. 1.3.9h Thanks for the clues.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: String error

    There's nothing inherently wrong with that define. Exactly what error code are you getting? Is it the same as what you had before replacing the line? Had you touched that line at all, or were you editing something else? Often an error in one place will show up as causing a problem somewhere else.

  3. #3
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: String error

    I did indeed mess with that line, I had replaced STORE_OWNER with my name (before I had studied)
    I would have to re-enter all my log-in info to get the orig error message but here's the debug log:

    PHP Parse error: syntax error, unexpected T_STRING in /home/artbylow/public_html/shopping/includes/languages/english/theme1/create_account.php on line 42

    Thanks for the response.

  4. #4
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: String error

    Oh and this is the same error I got before I replaced the line.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: String error

    This is the kind of error you get if you are missing a closing quote on a previous line. Post a larger chunk of the file so we might be able to find the problem. An extra quote or apostrophe inside a text string will prematurely terminate that string, and what follows will be seen as code; or the intended closing quote will be read as opening a new text string.
    Using a good text/file editor like Notepad++ will show up these kinds of errors immediately, as the following code will change colors dramatically.

  6. #6
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: String error

    Here are the 2 previous lines, I removed only middle text just here to make it easier for you to read.

    define('EMAIL_TEXT', 'You are many services include:' . "\n\n<ul>" . '<li><strong>Order History</strong> - View the with us.' . "\n\n" . '<li><strong>Permanent Cart</strong> - Any there until you remove them, or check them out.' . "\n\n" . '<li><strong>Address Book</strong> - We canthe birthday-person themselves.' . "\n\n" . '<li><strong>Products Reviews</strong> - Share youcustomers.' . "\n\n</ul>");
    define('EMAIL_CONTACT', 'For help with any of our online services, please email the store-owner: <a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">'. STORE_OWNER_EMAIL_ADDRESS ." </a>\n\n");

    I am going to try reading it in another editor, as you suggested.

  7. #7
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: String error

    I didn't have any luck using UltraEdit to check color changes.
    Here is the message I get when I try to register as a new customer on my site:
    This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: String error

    Still don't see anything wrong. Are you absolutely certain there were no quotes or apostrophes in the bits you snipped out?
    Posting a larger section of the file here inside [php] [/php] tags might help.

  9. #9
    Join Date
    Jan 2012
    Location
    Catalina, Arizona
    Posts
    28
    Plugin Contributions
    0

    Default Re: String error

    OK these are lines 38 thru 42
    PHP Code:
    define('EMAIL_GV_LINK_OTHER','Once you have added the ' TEXT_GV_NAME ' to your account, you may use the ' TEXT_GV_NAME ' for yourself, or send it to a friend!' "\n\n");

    define('EMAIL_TEXT''You are now registered with our store and have account privileges:  With your account, you can now take part in the <strong>various services</strong> we have to offer you. Some of these many services include:' "\n\n<ul>" '<li><strong>Order History</strong> - View the details of orders you have completed with us.' "\n\n" '<li><strong>Permanent Cart</strong> - Any products added to your online cart remain there until you remove them, or check them out.' "\n\n" '<li><strong>Address Book</strong> - We can deliver your products to an address other than yours! This is perfect to send birthday gifts direct to the birthday-person themselves.' "\n\n" '<li><strong>Products Reviews</strong> - Share your opinions on our products with other customers.' "\n\n</ul>");
    define('EMAIL_CONTACT''For help with any of our online services, please email the store-owner: <a href="mailto:' STORE_OWNER_EMAIL_ADDRESS '">'STORE_OWNER_EMAIL_ADDRESS ." </a>\n\n");
    define('EMAIL_GV_CLOSURE'"\n" 'Sincerely,' "\n\n" STORE_OWNER "\nStore Owner\n\n"'<a href="' HTTP_SERVER DIR_WS_CATALOG '">'.HTTP_SERVER DIR_WS_CATALOG ."</a>\n\n"); 
    Actually there really should be no errors as I copied the entire file from my backup file. What else could it be?

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: String error

    The only thing I can think of is that somehow one of the constants like STORE_OWNER has bad content... not sure how that could interfere, but I can't think of anything else.

 

 
Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR