Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php3 vs php4


mhunter

Recommended Posts

Posted

I checked the bug area for this ... didnt see anything

 

we've transferred our store from a server with php3 where it ran fine to a server with php4 and I keep getting call to undefined functions like this:

 

 

PHP Fatal error: Call to undefined function: tep_rand() in /srv/www/htdocs/shop/catalog/includes/classes/sessions.php on line 446

 

and

 

[client 10.1.19.1] PHP Warning: reset(): Passed variable is not an array or object in /srv/www/htdocs/shop/catalog/includes/classes/sessions.php on line 195

 

 

Any ideas ? All files have the same permissions on both servers

Posted

I'm pretty sure the second error is a result of the first. Answer the following in as much detail as you can:

 

1. Create a text file called info.php, and within it, put

 

<?php

phpinfo();

?>

 

and save. FTP this file to your website, then navigate to www.yourdomain.com/info.php. You will get a big long list of information. Look for the section entitled Sessions. It should something look like this:

 

session

Session Support enabled

Registered save handlers files user

 

Post the results.

 

 

2. What operating system?

 

3. What exact version of PHP?

Contributions

 

Discount Coupon Codes

Donations

Posted

Dear kgt

 

Thank you for helping !

 

Guess what? On the new server there is no information on Sessions whatsoever in the phpinfo() And - in the configure part at the top I can see 'disable-session'

 

However the following is in the php.ini file on the new server:

 

[session]

; Handler used to store/retrieve data.

session.save_handler = files

 

; Argument passed to save_handler. In the case of files, this is the path

; where data files are stored. Note: Windows users have to change this

; variable in order to use PHP's session functions.

session.save_path = /tmp

 

; Whether to use cookies.

session.use_cookies = 1

 

 

; Name of the session (used as cookie name).

session.name = PHPSESSID

 

; Initialize session on request startup.

session.auto_start = 0

 

; Lifetime in seconds of cookie or, if 0, until browser is restarted.

session.cookie_lifetime = 0

 

; The path for which the cookie is valid.

session.cookie_path = /

 

; The domain for which the cookie is valid.

session.cookie_domain =

 

; Handler used to serialize data. php is the standard serializer of PHP.

session.serialize_handler = php

 

; Percentual probability that the 'garbage collection' process is started

; on every session initialization.

session.gc_probability = 1

 

; After this number of seconds, stored data will be seen as 'garbage' and

; cleaned up by the garbage collection process.

session.gc_maxlifetime = 1440

 

; Check HTTP Referer to invalidate externally stored URLs containing ids.

session.referer_check =

 

; How many bytes to read from the file.

session.entropy_length = 0

 

; Specified here to create the session id.

session.entropy_file =

 

;session.entropy_length = 16

 

;session.entropy_file = /dev/urandom

 

; Set to {nocache,private,public} to determine HTTP caching aspects.

session.cache_limiter = nocache

 

; Document expires after n minutes.

session.cache_expire = 180

 

; use transient sid support if enabled by compiling with --enable-trans-sid.

session.use_trans_sid = 0

 

url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

 

***************************************

 

 

Also new server info is:

 

PHP version 4.3.4

x86_64-suse-linux

server API Apache 2.0 Handler

 

 

What do you think ... ?

Posted
PHP version 4.3.4

x86_64-suse-linux

server API Apache 2.0 Handler

What do you think ... ?

 

I suspected SuSE. You'll need to install a package called something like php-session-4.3.4. I'm willing to bet you simply don't have sessions capability, no matter what php.ini may say.

Contributions

 

Discount Coupon Codes

Donations

Posted

Yeah - I just got through going over both php.ini and they are identical ... I will see what I can find on the php site for this download and get with my network admin

 

Thank you very much for at least giving me something to go on

Posted

Ok - according to my admin - he has already installed the thing that it mentioned on the linux forum site. But it still is not showing in php_info() so something is still screwed up -

 

My network admin and the server support guy are both blaming osc software ... but I agree with you - it's a php config/server issue

Posted
My network admin and the server support guy are both blaming osc software ... but I agree with you - it's a php config/server issue

 

Yeah, it's got to be. phpinfo() reports that you don't have sessions.

Contributions

 

Discount Coupon Codes

Donations

Posted
My network admin and the server support guy are both blaming osc software ... but I agree with you - it's a php config/server issue

 

Also, make sure they restart apache. It's one of those "duh" things, but it's amazing how often people forget to try it.

Contributions

 

Discount Coupon Codes

Donations

Posted

I'm going to try and see what I can find out from the php site/forums/docs ... regarding the sessions problems on Suse.

 

I'm getting call to undefined functions all seemingly having to do with sessions on both the old install and updated install both on this new Suse server. I cant figure out why sessions does not appear in php_info() - my NW admin thinks its because he loaded the sessions module separately .... whatever that means.

 

And - yeah - I've restarted apache ... :(

 

Thx

Archived

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

×
×
  • Create New...