·¬ÇÑÉçÇø

University Systems help centre

Changing PHP and Python Versions

Both the PHP and Python versions running in webspace directories can be changed by adding the following lines to an .htaccess file. You must place the .htaccess file in the directories who's PHP and/or Python version you wish to change:

SetEnv UVPYTHON_VERSION 38
SetENV UVPHP_VERSION 73

Check your site before web host updates

We recommend testing your code regularly to keep it updated. This will save you time whenever the web hosts are upgraded. We send out notifications to all studentweb users before technical changes to the web hosts.

Check your site in the test environment

If you are using any PHP, Python, or Perl code in your website, you should test it in the dev environment.

To do this, add port 8444 to your website address. Example: https://studentweb.uvic.ca:8444/~NetLinkID

If everything works at this new URL, you don’t need to make any changes. Your website will continue to work after the upgrade.

If your code doesn’t work, you’ll need to update your code.

Update your code

To update your code for the new environment, start by copying all your content from the “www” folder into the “www-dev” folder.

Then access your site using the 8443 port number (e.g. https://studentweb.uvic.ca:8443/~NetLinkID). This port number directs your “www-dev” folder to the updated test environment.

Now you can update your code in the “www-dev” folder so that it works in this new environment.

WARNING! By default, there are no protections added to prevent other users from accessing dev URLs. We recommend adding user authentication to your “www-dev” folder to limit who can see it.

When you are done updating your code, your site is ready to move to production.

Due to the nature of the web host upgrades, you can’t move your updated code into your “www” folder until after the scheduled update.

Move to production

Once the web host server upgrades are completed, you can move your updated code into production.

To do this, copy your updated code from the “www-dev” folder back to the “www” folder.

Your website should be working as intended.