Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in shipping.php


Guest

Recommended Posts

Posted

Parse error: parse error, unexpected T_STRING in /home/virtual/site10/fst/var/www/html/cart/includes/languages/english/shipping.php on line 16

 

 

And, this is how line 16 + looks. I'm sure I just deleted the wrong code somewhere

 

define('TEXT_INFORMATION', All videos are sold fully guaranteed against defects <p>All videos, unless otherwise specified, are new and original,

purchased from the distributor

Posted

You need to enclose your text in single quotes like so

define('TEXT_INFORMATION', 'All videos are sold fully guaranteed against defects <p>All videos, unless otherwise specified, are new and original, 

purchased from the distributor');

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

Parse error: parse error, unexpected T_STRING in /home/virtual/site10/fst/var/www/html/cart/includes/languages/english/shipping.php on line 25

 

I had a single quote at the end, just not at the beginning, but now I have this error.

Posted

Verify that all entries are enclosed in single quotes.

 

If they are, then post line 23-27.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

All entries?

 

SO every line has to have single quotes at the beginning, and at the end?

Posted

Obviously not

 

:(

 

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/virtual/site10/fst/var/www/html/cart/includes/languages/english/shipping.php on line 19

Posted

Every line that begins with define should look like:

define('name-of-constant', 'text for constant');

 

Does that help?

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

It should .. but my shipping.php is still broken

 

The privacy policy is a wreck, I'm assuming I can't have HTML in a php file?

 

define('TEXT_INFORMATION', 'All videos are sold fully guaranteed against defects'

 

'All videos, unless otherwise specified, are new and original,

purchased from the distributor'

 

'Defective videos will be replaced for same-title videos only'

 

'Defective videos must be returned to the offices of hidden.'

 

'If you don't like a video, tough noogies. You buy it, it's yours. No returns allowed unless defective'

 

'If you receive the wrong video, return it immediately to hidden. If you keep it more than two days, consider it yours with no refund or replacement due');

?>

Posted

You misunderstood me. All of the text should be enclosed in single quotes but not on separate lines.

 

If you wish for the lines to be on a new line, place a <br> or <p> tag in the text.

 

For example,

define('TEXT_INFORMATION', 'All videos are sold fully guaranteed against defects.<br>All videos, unless otherwise specified, are new and original, purchased from the distributor.<br>Defective videos will be replaced for same-title videos only.<br>Defective videos must be returned to the offices of hidden.<br>If you don't like a video, tough noogies. You buy it, it's yours. No returns allowed unless defective.<br>If you receive the wrong video, return it immediately to hidden. If you keep it more than two days, consider it yours with no refund or replacement due');

and do not forget proper punctuation. ;)

 

If you need to have a single quote (apostrophe) in your text, then you need to escape it with a backslash like so

'Pam's'

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

oh good lord

 

Now I've totally broken it, I can't even LOAD the cart to check if it works

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/virtual/site10/fst/var/www/html/cart/includes/configure.php on line 39

 

Fatal error: Failed opening required 'DIR_WS_FUNCTIONSsessions.php' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site10/fst/var/www/html/cart/includes/application_top.php on line 148

 

NOW what??? I edited configure.php, ftp'd it in auto mode, didn't change a single chmod

 

I edited shipping.php as you said through the program

Posted

Here are some things you need to know:

 

If your text is enclosed in 's then anything ' inside your enclosed text will have to be "escaped" (so that the PHP processor doesn't think you've ended your quote before you have)

 

Anyway, I don't have an PHP files handy right now, but the escape char is I believe. (It might be the other slash, I get it confused sometimes)

 

At any rate like so:

 

define('TEXT_INFORMATION', 'Here be's my quote');

 

You said your assuming it doesn't understand HTML in PHP, it does but what you typed isn't html.

 

If you want two lines don't re single quote them. PHP knows that until you put another ' everything is a string.

 

With what you're telling it, It's amazing that your web server hasn't had some kind of nuclear meltdown hehehe.

 

Anyway, like so:

 

define('TEXT_INFORMATION', 'Here be's my quote Line 1<BR>Here it be's line 2');

 

The <BR> tag is html. (New line)

 

An enter in HTML isn't the same as a new line. Html ignores whitespace over single spaces.

 

Also, FYI: There are some other characters that need to be escaped too.

 

Like has to be escaped too .

 

Does it all make sense now?

- - - -

Sometimes, ignorance is bliss.

Posted

Remove the single quote from in front of the DIR_WS_FUNCTIONS define. Anything that is all caps in the second section (after the comma, should not be enclosed in single quotes.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

Right now I have a total database crash, I can't access ANYTHING at all

 

It's not affecting all my mysql databases because I just checked 9 of my sites using mysql db and all are up

 

I did a backup in mysqlphpadmin after everything began crashing because I really did not want to lose the 50+ products and configurations I spent all day putting in.

 

Warning: Access denied for user: 'me@localhost' (Using password: YES) in /home/virtual/site10/fst/var/www/html/cart/includes/functions/database.php on line 19

 

Warning: MySQL Connection Failed: Access denied for user: 'me@localhost' (Using password: YES) in /home/virtual/site10/fst/var/www/html/cart/includes/functions/database.php on line 19

Unable to connect to database server!

Posted

Check your configure.php file for a missing single quote and that your database information is correct.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

 

 

that's the ONLY thing I changed in that file, I swear

Posted

That entry is correct but remove the mysql and see if it does not start working again.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Posted

Wait -- just 'remove' it?

 

remove the single quote mysql single quote?

 

It had a double quote in there before I changed it

Posted

I've tried every configuration, and no matter what I do, it will not work

 

Parse error: parse error, unexpected ')' in /home/virtual/site10/fst/var/www/html/cart/includes/configure.php on line 39

 

Fatal error: Failed opening required 'DIR_WS_FUNCTIONSsessions.php' (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site10/fst/var/www/html/cart/includes/application_top.php on line 148

 

Is there somewhere online I can view the way this looked originally so I can fix it somehow??

Posted

Had to get my coder/programmer in Bolivia to fix it for me.

 

This is why I never touch files when I have no knowledge of what I'm doing and always ask him to do it.

 

I'll try shipping.php and privacy.php again but the way tonight is shaping up ....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...