Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Day 1 Script 1 Line 1. Bad omen.


Frankie3142

Recommended Posts

Hi Gang

 

After careful deliberation I decided that OSCommerce might be the best solution for my sister's e-commerce needs, so I tried to set it up. It failed so fundamentally that I'd laugh if it wasn't such a waste of so much time just to get to this point. Line 1 of script 1 failed with the message:

 

Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/textfwho/public_html/oscommerce/index.php on line 9

 

I see that line nine (actually line 1 insofar as it's the first executable (non-comment) line) reads:

 

use osCommerce\OM\Core\Autoloader;

 

Yes I have the install set up correctly. I have installed to /public_html/osCommerce, and the line you see above is from index.php situated in /public_html/index.php. Of course the installation instructions on the website are less than useless, refering as they do to the 'catalog' folder, which doesn't exist in the install at all.

 

I also note that most of the .htaccess file's proposed elements cause apache to crash, so I had to abandon most of that. Notably it won't take:

# <Directory "/public_html">

# AllowOverride Options

# </Directory>

 

or

 

 

#php_value session.use_trans_sid 0

#php_value magic_quotes_gpc 0

 

... but I don't think these explain the crash at line 1 (9) of the index.php file.

 

All in all the omens seem to be that I should abandon this mess and get out now. I see that there are over 89,000 messages to the 'Installation and Configuration' part of this forum, so it seems that one or two others here might agree with me, but, before I dump osCommerce as a bad idea, I thought it worth posting this to the forum, so, anyone any idea why this happens and how to fix it?

 

Thank you for your thoughts.

 

Frankie.

Link to comment
Share on other sites

Don't uncomment and use .htaccess lines unless you understand what they are supposed to do, and why you need them. In particular, phpinfo and phpflag entries should be used only if your host does not support some sort of "php.ini" file.

 

If you are trying to use osC 3.0, that's a problem right there, although it shouldn't crash and burn like that. As suggested, go to 2.3.3. If this is from 2.3.3, please copy here the first 15 lines or so, and indicate which one you think is line 9. It sounds like your file got corrupted during handling -- you might try getting a fresh copy. Did someone try to edit that file?

Link to comment
Share on other sites

Hi Gang

 

After careful deliberation I decided that OSCommerce might be the best solution for my sister's e-commerce needs, so I tried to set it up. It failed so fundamentally that I'd laugh if it wasn't such a waste of so much time just to get to this point. Line 1 of script 1 failed with the message:

 

Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/textfwho/public_html/oscommerce/index.php on line 9

 

I see that line nine (actually line 1 insofar as it's the first executable (non-comment) line) reads:

 

use osCommerce\OM\Core\Autoloader;

 

Yes I have the install set up correctly. I have installed to /public_html/osCommerce, and the line you see above is from index.php situated in /public_html/index.php. Of course the installation instructions on the website are less than useless, refering as they do to the 'catalog' folder, which doesn't exist in the install at all.

 

I also note that most of the .htaccess file's proposed elements cause apache to crash, so I had to abandon most of that. Notably it won't take:

# <Directory "/public_html">

# AllowOverride Options

# </Directory>

 

or

 

 

#php_value session.use_trans_sid 0

#php_value magic_quotes_gpc 0

 

... but I don't think these explain the crash at line 1 (9) of the index.php file.

 

All in all the omens seem to be that I should abandon this mess and get out now. I see that there are over 89,000 messages to the 'Installation and Configuration' part of this forum, so it seems that one or two others here might agree with me, but, before I dump osCommerce as a bad idea, I thought it worth posting this to the forum, so, anyone any idea why this happens and how to fix it?

 

Thank you for your thoughts.

 

Frankie.

 

The error means your server doesn't meet the minmum PHP version requirements.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Hi Gang

 

Thanks for the feedback, it's clear I had picked up the wrong version of osCommerce - thanks Bob!!

 

The PHP version on the server is 5.2.17, and (in case it matters) MySQL is version 5.1.68-cll. I assume that's all within spec. I will go back to the drawing board and install 2.3.3 now.

 

I have rarely been more happy to say, in my best Homer Simpson, "Doh!".

 

Thanks again for your thoughts.

 

Frankie.

Link to comment
Share on other sites

Did you get 3.0 from this site's download section (ignoring the warning that it's not for production use), or did you get it from somewhere else that is promoting it as "the latest and greatest"? If the latter, please inform them that they should NOT be distributing osC 3.x until it is cleared for production site usage. I did that with Softaculous and they're now offering 2.3.x in their one-button install.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...