phpCOIN

  Closed TopicStart new topicStart Poll

> Upgrade looping, Process explanation and possible causes
lightman
Posted: December 30, 2007 10:18 am
Quote Post


The Janitor
***

Group: Admin
Posts: 3,638
Member No.: 3
Joined: August 25, 2006



We have received 2 or 3 reports of 'looping' during the upgrade process (where the upgrade screen endlessly returns to itself instead of allowing the user to continue into the phpCOIN program)

To clarify the process:

phpCOIN makes a query every time it is called between the version as written in the version.php file and the version as recorded in the database table phpcoin_versions v_ver field.

If these are NOT the same - phpCOIN will redirect to the setup page and invite the user to initiate an upgrade.



In order for an upgrade to fail, only one of 3 things can possibly happen:

1) The new version was not written to the database
2) The database is returning a 'cached' query for the table phpcoin_versions v_ver value (more of this later)
3) (later versions only) You have already attempted to upgrade phpCOIN and a cookie was set preventing you from running the upgrade a second time

To unravel what is going on if you get stuck in the upgrade loop, first use phpMyAdmin or similar to examine the value recorded in the phpCOIN_versions v_ver field. > this should be the version that you have just upgraded to.

* If it is still the OLD version - your setup script is failing to write to the database. Possible reasons may include an incomplete or corrupted file upload of the new version or incorrect file permissions.

* If the recorded value in the phpcoin_versions v_ver field DOES reflect the new version you are trying to upgrade to > suspect that the MySQL server is returning 'cached' data to the php process.

* --UPDATE-- In more recent versions of phpCOIN, and in order to prevent users 'accidentally' running the upgrade more than once and overwriting all their data, the application looks at the cookie that was set - if you are experiencing what appears to be 'looping' it may be a result of running the upgrade more than once - clear your cookies and try again paying special attention to any warning messages on screen indicating that you might be about to over-write your data set !!!


Please respect that the following is only a working hypothesis based on some logical thinking about the issue, and about 40 hours of - unsuccessful - testing in an effort to replicate the problem !

There exists within contemporary versions of MySQL, (usually entries in the my.cnf file) a runtime variable called Query cache. This has several settings that can be used to 'cache' MySQL queries and, in theory, speed up the server response time by calling frequently used queries from cache instead of making a new query. The most important one of these settings is the 'query cache type' which normally is set to 0 or OFF (if 'query cache size' is set to zero, it will not matter what the 'type' is set to). I shan't attempt to detail the usage of these settings - there are plenty of pages on the net explaining how it works and offering examples of setup values.

Use phpMyAdmin or similar to look for 'Show MySQL system variables' and scroll down to see what the query cache settings are. Whilst I have had NO success in replicating the upgrade loop problem with a variety of query cache settings - it doesn't necessarily follow that certain combinations of cache settings could cause the looping effect that these few users are experiencing.. If you do have caching enabled, there is an option to 'Flush Cache' in phpMyAdmin (this may not be available on shared servers) and it might be worth trying this if you get stuck in the loop if it is available.

Another possibility is that the server might be using some third party caching mechanism to cache MySQL queries - unfortunately, it is beyond the scope of this article to attempt to cover all the third party software possibilities out there - so have a look at your phpinfo and see if there is anything that stands out as obvious caching add-ons pertaining to MySQL queries.

We should be interested in hearing from anyone who may have further information or experiences regarding the whole MySQL caching issue, irrespective of whether the caching is via the built in Query Cache or via some third party add-on. (Please note that there also exists various options for caching php files themselves - intended so that the php process does not have to read and compile the php file each time it is called - this would seem to be a quite separate process and should have no influence on the upgrade process nor on the looping issues these few users are experiencing > if the php file cache was returning a cached version of the old version.php file - it would never redirect to the upgrade process in the first place ! )


--------------------
***** Unless otherwise stated, all replies refer to the following *****
====================================================================
--- The latest unmodified version of phpCOIN available from the phpCOIN download page on the date and time of this post.
--- All relevant HotFix files applied - One of the four included unmodified themes - The original language files .
--- Help will be given to install/configure/use phpCOIN, but not programming help to modify phpCOIN operations. If you are competent enough to make programming changes, you should be competent enough to read the source code and figure things out :)
PM
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Closed TopicStart new topicStart Poll

 


Inscrita el Registro Mercantil de Mallorca Tomo 2140, Hoja No. PM-51034, Folio 135
This website owned and operated by: Technology Services RPVW S.L. CIF# B57345084
Avda Constitucion 48 Bajos Alaro 07340 Baleares SPAIN
Tel:+34 971518362    Fax: +34 971518368    eMail: support@phpcoin.com