Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

FATAL ERROR !!!!!


doorwish

Recommended Posts

Posted

Hi Everybody! :rolleyes:

 

I have downloaded "register_globals_v1.2.1" since my host is not going to enable the settings in php.ini.

 

I followed the installation the way it was written and managed to install OSC. ALL GOOD TILL HERE!! :-"

 

But as soon as want to load the index.php i get this error...

 

Fatal error:  Call to undefined function:  tep_session_name() in ...httpsdocs/catalog/includes/application_top.php on line 145

 

 

In that file "application_top.php" i just commented out the following lines the way it was described in the installation dokument.

 

// >>> BEGIN REGISTER_GLOBALS

// check if register_globals is enabled.

// since this is a temporary measure this message is hardcoded. The requirement will be removed before 2.2 is finalized.

//  if (function_exists('ini_get')) {

//    ini_get('register_globals') or exit('FATAL ERROR: register_globals is disabled in php.ini, please enable it!');

//  }

// <<< END REGISTER_GLOBALS

 

 

I have postet my problem 2 times now and have received one hint....which was to put everything back on to the standard mode ?!?

But that would mean i would get the "register_global error" instead! Or isn?t that true :blink:

 

I would appreciate it if someone could help me out with this. And i am sure there is someone out there who had the same server situation and used this contribution too. :blush:

 

PLEASE HEEEEEELP! :( :'(

 

thnx!

IT?s ALL good!!!

Posted

This error points to the httpsdocs (ssl) folder. Are you trying to run all of your site behind ssl? If you are then all of your files in httpdocs need to be mirrored in httpsdocs.

 

Vger

Posted
This error points to the httpsdocs (ssl) folder.  Are you trying to run all of your site behind ssl?  If you are then all of your files in httpdocs need to be mirrored in httpsdocs.

 

Vger

 

First of all thnx a lot Vger for the fast reply! (w00t)

 

yes, i am running it behind ssl.

but my catalog folder is already in httpsdocs. i don?t have anything in httpdocs.

Sorry if it sounds stupid but i am a rookie! :blush:

 

Is that normal to mirror in order to use ssl? What is the best solution to use ssl? :huh:

And how do i mirror a folder or file???? :blink: :blush: :-"

IT?s ALL good!!!

Posted

for some reason the functions required are somehow remarked out, etc or whatever. what i found is that the functions needed to be put back in and it enabled the register globals fix.

Posted
for some reason the functions required are somehow remarked out, etc or whatever.  what i found is that the functions needed to be put back in and it enabled the register globals fix.

 

Hi Mibble! :thumbsup:

 

So you mean if i enable the commented out lines the system will work? But wouldn?t it ask for the register globals and figure out the it is disabled in the php.ini?? :blink:

IT?s ALL good!!!

Posted

First of all, follow up on Mibble's suggestion.

 

Secondly, it's not a good idea to run all of the site as https. SSL pages are encrypted and take longer to load. On the catalog side of things, osCommerce will decide what needs to be behind https and which does not. On the 'admin' side of things, by all means run all of it behind ssl.

 

Vger

First of all thnx a lot Vger for the fast reply!  (w00t)

 

yes, i am running it behind ssl.

but my catalog folder is already in httpsdocs. i don?t have anything in httpdocs.

Sorry if it sounds stupid but i am a rookie! :blush:

 

Is that normal to mirror in order to use ssl? What is the best solution to use ssl?  :huh:

And how do i mirror a folder or file???? :blink:  :blush:  :-"

Posted

well i just tried out Mibbles suggestion and it didn?t work. I enabled the lines i commented out and it gives me the fatal error and tells me to disable register global in the php.ini. :blush:

 

but i will follow your hint with running the whole thing in http.

i have never worked with ssl so everything is new for me.

maybe that?s the main problem than?!? :huh:

 

can i just move over the folder from https to http???? what do i have to change? :blink:

IT?s ALL good!!!

Posted

Don't 'move' the folder to http, download the contents of httpsdocs, and then upload (copy) the folder to http. And then edit the website includes/configure.php to show http://yourdomain.com for an http pathway, and https://yourdomain.com for an https pathway. Cookie domain, in both cases will be www.yourdomain.com

 

You won't need to keep the 'admin' folder in httpsdocs, nor will you need to keep both of the configure.php files (which you will have placed in htttpdocs).

 

Vger

Posted

i am sorry for asking but i am german and i have to double check this :rolleyes: :-"

with content you mean all the files which are in the catalog folder?!? right? there is not a folder somewhere which is called content which i have to copy and paste/upload?!??? :huh:

 

the rest is understood! :thumbsup:

 

is it always like that that you have to have the catalog folder in both http and https???

Or should i have installed it in http in the beginning and just let OSC do the rest with https ???? :blink:

 

if yes, than i think i rather reinstall in http and delete the files in https since i haven?t been able to do anything like uploading things to the catalog :blush:

 

but if it is normal to have it in both http and https than shall it be o:) :sweating:

IT?s ALL good!!!

Posted

oh yeah vger!

 

so do you think that could be the problem with my fatal error :huh: or do you think it is alone the fact with ssl???? :blink:

IT?s ALL good!!!

Posted
oh yeah vger!

 

so do you think that could be the problem with my fatal error  :huh:  or do you think it is alone the fact with ssl????  :blink:

 

ok i read this and figured i wrote '%&/ :-" thinking faster than i write :P

 

 

do you think that coould be something with commenting out things in the file or the ssl fact?

:rolleyes:

IT?s ALL good!!!

Posted

HI EVERYBODY!!!!! <_<

 

well this is what i did:

 

1.) i deleted the catalog in the https. :thumbsup:

2.) i reinstalled the catalog in th http :thumbsup:

3.) installed OSC. successfully! :thumbsup:

4.) i try to load the catalog...

 

FATAL ERROR!!!! :'(

Fatal error:  Call to undefined function:  tep_session_name() in ...httpdocs/includes/application_top.php on line 145

 

i really don?t know what the problem is???? :huh:

 

DOES ANYBODY KNOW THE "register_globals" CONTRIBUTION???????? :'(

and can help me out.

by the way i am a newbie

IT?s ALL good!!!

Posted

Okay!

 

First. You appear to have a full ssl certificate. Is that correct?

 

Your server is the type where you have an httpdocs folder and an httpsdocs folder. Most don't. You are unfortunate that the server your site is on uses this kind of setup. It makes things difficult.

 

I did tell you NOT to delete the files in httpsdocs folder, but you did this anyway. This is why you have a problem.

 

Download the files from httpdocs folder, and upload them to httpsdocs folder.

 

Leave the files in httpdocs as they are - don't delete them.

 

Vger

Posted
First.  You appear to have a full ssl certificate.  Is that correct?

 

Your server is the type where you have an httpdocs folder and an httpsdocs folder.  Most don't.  You are unfortunate that the server your site is on uses this kind of setup.  It makes things difficult.

 

I did tell you NOT to delete the files in httpsdocs folder, but you did this anyway.  This is why you have a problem.

 

 

Hi Vger! :thumbsup:

 

well, yes my host has a ssl certificate. and yes i have 2 folders one is httpdocs and the other is httpsdocs! :rolleyes:

 

well i deleted because i wanted to know what i am doing since i am actually planing to learn and get this going on. and since i didn?t get any satisfing answer i went on with the plan of learning by doing ;)

 

i thank you for posting again and giving me another clue. i will follow your suggestions now and try that out. but i would still really want to know....

 

....are both folders updated than and which one is the "right one" than. i mean do i have to configure both http and https?

 

i would be thankfull if you could clear up my sky :blink: :blush:

IT?s ALL good!!!

Posted

by the way....maybe this could be important too!

 

the http site is a subdomain. so the root would be:

...my domain/subdomains/httpdocs/

 

the httpsdocs is in the main root, such as:

...my domain/httpsdocs

 

 

maybe its not even important but just in case :blush:

IT?s ALL good!!!

Posted

Okay, on most servers you just have one web root, and all of your osCommerce files go into there. When you install a full ssl certificate, other than making a few changes to your configure.php files there are no other changes to be made.

 

On the crazy system you are on, when an ssl certificate is installed you get an httpsdocs folder, and it is only the contents of this folder that are protected. Therefore you need to copy the files you have in httpdocs into httpsdocs.

 

Every time you change the website you need to make sure that both folders are in sync with each other.

 

The alternative is to find a hosting company that doesn't use this wierd setup.

 

Vger

Posted
Every time you change the website you need to make sure that both folders are in sync with each other.

 

 

is there a possiblity to mirror these folders like an alias. i mean without having to download and upload everytime? a code or something that copies one changed file to the other folder?!

IT?s ALL good!!!

Posted

i just did the copy to httpsdocs and it still gives me the same error! >_<

 

i am really clueless :blink:

 

the only thing it could be is the fact with the subdomains, or????? :huh:

IT?s ALL good!!!

Posted

Fatal error: Call to undefined function: tep_session_name() in ...httpdocs/includes/application_top.php on line 145

 

Hello,

 

Only just come across the PM that you sent me.

 

I can't comment on any SSL issue that you may have. It all seems a bit strange but I think I agree with Vger - you seem to have a very strange set up.

 

Af for the Register Globals issue, your problem would seem not to be in application_top.php but in .../includes/functions/sessions.php. In this file, there should be a function called tep_session_name() and it would seem that there is not ! Go back and look at this file and make sure you have not removed this function, and if you have (it seems that you have !), then put it back in.

 

Mibble : You seem to be suggesting that you know of a problem with the register globals contribution - is this the case ?

 

Rich.

Posted
the http site is a subdomain. so the root would be:

...my domain/subdomains/httpdocs/

 

the httpsdocs is in the main root, such as:

...my domain/httpsdocs

 

This is a totally cock-eyed setup. If you can't have the osCommerce website in the root of your main domain (presumably because you're using it for something else), then install it in a folder of the main domain. Having httpdocs in a subdomain and httpsdocs in the main domain complicates things needlessly.

 

Having osCommerc in a subdomain is not a problem normally, but it is with the kind of ssl setup you have.

 

Vger

Posted

Hi Rich ! :rolleyes:

 

thanks a lot for your post. I was about to give up and use another shoping system :( ,

since nothing seemed to help and i am on this problem since almost a week now :blink: .

 

well, i will try out your suggestion rightaway. just wanted to let you know first! :)

 

I will be back here with "hopefully" good news!

 

later :thumbsup:

IT?s ALL good!!!

Posted

well i reedited the catalog session.php.

i had something edited wrong in the first file i guess.

 

but now i did all the changes and i get this error:

 

Fatal error:  Call to undefined function:  link_session_variable() in

.../httpdocs/includes/functions/sessions.php on line 95

 

:blink: :huh:

any ideas ??????

IT?s ALL good!!!

Posted

here is the reedited part in session.php. this is how it looks like at the moment:

 

  function tep_session_start() {
// >>> BEGIN REGISTER_GLOBALS
   $success = session_start();

   // Work-around to allow disabling of register_globals - map all defined
   // session variables
   if ($success && count($_SESSION))
   {
     $session_keys = array_keys($_SESSION);
     foreach($session_keys as $variable)
     {
       link_session_variable($variable, true);
     }
   }

   return $success;
// <<< END REGISTER_GLOBALS
 }

 function tep_session_register($variable) {
   global $session_started;

// >>> BEGIN REGISTER_GLOBALS
   $success = false;

   if ($session_started == true) {
// -skip-   return session_register($variable);

     // Work-around to allow disabling of register_globals - map session variable
     link_session_variable($variable, true);
     $success = true;
   }

   return success;
// <<< END SESSION_REGISTER
 }

 function tep_session_is_registered($variable) {
// >>> BEGIN REGISTER_GLOBALS
//    return session_is_registered($variable);
   return isset($_SESSION[$variable]);
// <<< END REGISTER_GLOBALS
 }

 function tep_session_unregister($variable) {
// >>> BEGIN REGISTER_GLOBALS
   // Work-around to allow disabling of register_gloabls - unmap session variable
   link_session_variable($variable, false);
   unset($_SESSION[$variable]);

//  return session_unregister($variable);
   return true;
// <<< END REGISTER_GLOBALS
 }

 function tep_session_id($sessid = '') {
   if (!empty($sessid)) {
     return session_id($sessid);
   } else {
     return session_id();
   }
 }

 function tep_session_name($name = '') {
   if (!empty($name)) {
     return session_name($name);
   } else {
     return session_name();
   }
 }

 function tep_session_close() {
   if (PHP_VERSION >= '4.0.4') {
     return session_write_close();
   } elseif (function_exists('session_close')) {
     return session_close();
   }
 }

 function tep_session_destroy() {
// >>> BEGIN REGISTER_GLOBALS
   // Work-around to allow disabling of register_gloabls - unmap all defined
   // session variables
   if (count($_SESSION))
   {
     $session_keys = array_keys($_SESSION);
     foreach($session_keys as $variable)
     {
       link_session_variable($variable, false);
       unset($_SESSION[$variable]);
     }
   }
// <<< END REGISTER_GLOBALS
   return session_destroy();
 }


 function tep_session_save_path($path = '') {
   if (!empty($path)) {
     return session_save_path($path);
   } else {
     return session_save_path();
   }
 }

 function tep_session_recreate() {
   if (PHP_VERSION >= 4.1) {
     $session_backup = $_SESSION;

     unset($_COOKIE[tep_session_name()]);

     tep_session_destroy();

     if (STORE_SESSIONS == 'mysql') {
       session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
     }

// >>> BEGIN REGISTER_GLOBALS
//    tep_session_start();
//    $_SESSION = $session_backup;

     session_start();
     $_SESSION = $session_backup;

     // Work-around to allow disabling of register_globals - map all defined
     // session variables
     if (count($_SESSION))
     {
       $session_keys = array_keys($_SESSION);
       foreach($session_keys as $variable)
       {
         link_session_variable($variable, true);
       }
     }
// <<< END REGISTER_GLOBALS

     unset($session_backup);
   }
 }

IT?s ALL good!!!

Posted

link_session_variable()

 

This is a new function added by the register globals contribution. I suggest you go back to the register globals instructions and find out where to add it.

 

You really must be more more careful when changing your code - things tend not to work otherwise :-)

 

If you still have problems then go back and check everything again against the instructions - the contribution DOES work so if you have problems it is because you have done something wrong or you have a non-standard set up or you have some other contribution that is conflicting with it.

 

Rich.

Posted

well, thanks anyway!

 

i went through the code a several times and don?t have any contributions installed except the "register_globals".

 

I will go on trying to solve this. that?s what i have been doing for a week now

 

:blush:

 

if you have an idea please post it here. i will write back as soon as this works so everybody else with the same problem knows what to do ;)

 

but till that day comes i will go through codes...... :blink: :blush: :rolleyes:

IT?s ALL good!!!

Archived

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

×
×
  • Create New...