USB XAMPP and NTFS "Directory Junctions" in htaccess

Problems with the Windows version of XAMPP, questions, comments, and anything related.

USB XAMPP and NTFS "Directory Junctions" in htaccess

Postby x92 » 10. December 2020 15:07

Hello,

Just a heads up, in case other people encounter the following situation:
- You use the USB installation of XAMPP.
- You have Directory Junctions (NTFS symlinks created with mklink /J) in htaccess that point to sourcecode folders on another drive letter than where XAMPP is installed.
- You see the following error when you get to the session_start() part of your code:

Code: Select all
session_start(): open(\[XAMPP_PATH]\tmp\sess_[SESSID], O_RDWR) failed: No such file or directory


The issue is that in "USB mode", all paths in the configuration files are relative, so PHP tries to look for the tmp folder in the current drive, whatever that is.

Assuming you are certain that your drive letter won't change, you need to manually go to \[XAMPP_PATH]\php\php.ini and edit at least the following variables, setting them to a fixed location:
- upload_tmp_dir
- session.save_path

You can always disable USB mode by editing \[XAMPP_PATH]\install\install.sys, setting usbstick = 1 and running setup_xampp.bat again.
x92
 
Posts: 2
Joined: 10. December 2020 14:52
XAMPP version: 8
Operating System: Windows 10

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 135 guests