Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

tep_rand function


ukdomains

Recommended Posts

Posted

Just managed to install the package but now when I follow the link to catalog (http://www.ukwebhost.co.uk/catalog/default.php) i get the following error:

 

Fatal error: Call to unsupported or undefined function tep_rand() in /home/admin/public_html/ukwebhost/catalog/includes/classes/sessions.php on line 445

 

I have checked the general.php file and the function is there.

 

Any assistance gratefully received :)

Posted

Hi Xtian - thanks for taking the time to reply. Did I change anything with which file? With default.php and sessions.php? No. I had to change/correct certain paths in some files after installation to make it to the point where I finally hit the brick wall of the tep-rand function.

 

Thanks again.

Posted

Normally, you only have to change configure.php. All other paths and filenames are derived from there. This is why I asked.

 

The error is very strange. Maybe you could put: print 'In sessions.php<br>'; at the start of (you guessed it) sessions.php to check the file is correctly included.

Christian Lescuyer

Posted

Hello again Xtian - this driving me nuts! Went for a new install. I get problems from the start! I upload catalog and admin directories and place admin dir inside catalog. Then I set folder and file prmissions as stated. Then when I go to the install.php page and immediately get failed opening errors as it cannot find things it needs. I correct the paths so that it eventually finds what it needs and finally manage to get to the "Welcome" page with "new install" and "upgrade" . I then enter all the info in the boxes (but they seem to be automatically filled in anyway) and it imports the database info etc (so mysql is ok). I get to the second confirmation screen and continue. I then do get the links to "Catalog" and "Admin Tool" but when I go to "Catalog" I then get continued errors such as below:

 

 

Warning: Failed opening 'includes/classes/sessions.php' for inclusion in ./includes/application_top.php on line 156

 

Again I seem to correct some but surely I should not be getting all these errors with file paths?

 

Do you have any advice or any idea where I am going wrong?

 

Many thanks again for taking the time with me. I "thought" I was ok at this stuff but this experience has dented my confidence!

 

Lee.

  • 1 month later...
Posted

I have the same problem. The message is as follows:

 

Fatal error: Call to unsupported or undefined function tep_rand() in includes/classes/sessions.php on line 445

 

Could you please inform the solution.

 

Thank you

-------------

 

Just managed to install the package but now when I follow the link to catalog (http://www.ukwebhost.co.uk/catalog/default.php) i get the following error:

 

Fatal error: Call to unsupported or undefined function tep_rand() in /home/admin/public_html/ukwebhost/catalog/includes/classes/sessions.php on line 445

 

I have checked the general.php file and the function is there.

 

Any assistance gratefully received :)

  • 3 weeks later...
Posted

I had the same error- I did two installs of this on two different servers. When I first installed it on my testing server, everything worked perfectly, but when I went to install on my live server, I got the tep_rand error....

 

Turned out that the only difference was that my test server was running php4 and the live server was php3

Once I upgraded to php4, it worked just fine......

I'm suspecting there is a problem with the php3 session set/ read functions......

Posted

Okay- here's my new problem.... The server I'm on is using php4 for the non-secure end, but only php3 on the secure side..... When I switch to the secure end, I'm now getting the error" Fatal error: Call to unsupported or undefined function session_set_save_handler() in includes/classes/sessions.php on line 63"

 

Any suggestions, aside from switching hosting providers?

  • 3 months later...
Posted

Has anyone managed to find a fix to this yet? I'm desperate to find a solution to this! We've told a customer that we can have osCommerce up and running for them to replace their existing site, and having installed it numerous times in the past we were confident of getting it working. The provider only has PHP3 (version 3.0.14) installed on the server, but as we read osCommerce is PHP3 compatible, we didn't think this would be a problem. However, our install on the PHP3 server is giving the same error ukdomains was originally getting:

 

Fatal error: Call to unsupported or undefined function tep_rand() in includes/classes/sessions.php on line 445

 

Our provider wont upgrade to PHP4 (no idea why) so I need to find a fix - any ideas?! Sorry to grovel, but... please!!

 

:D

  • 4 weeks later...
Posted

Hello!

 

I also had that error:

Fatal error: Call to unsupported or undefined function tep_rand() in includes/classes/sessions.php on line 445

Then I re-installed directly to /htdocs/catalog/ instead of /htdocs/fahrrad-de/catalog/ , and now it works perfectly!

I have no idea why that difference matters. It's quite a simple solution - I'm curious if it works for you?!?

Archived

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

×
×
  • Create New...