Question

I have a website hosted by FatCow.

I am trying to install the Securimage PHP CAPTCHA on my site by mimicking their quickstart guide, but it failed to work off the bat, so I ran their PHP Test Script on my site to determine the problem.

It threw this error:

The following error occurred when attempting to call session_start(): session_start() [function.session-start]: open(/temp/sess_5e72461407b4ac6283d9897cc49dc4e3, O_RDWR) failed: No such file or directory (2)

Now, I had an issue before surrounding sessions, so I made a temp folder through my FTP client on my domain's home ('/') folder, and set its file permissions to 777. Then I had proceeded to put a php.ini file also in my domain's home folder with the following declarations:

session.save_path = "/temp"
session.cookie_path = "/temp"

What is the issue? Why can't it create these sessions?

Was it helpful?

Solution

If the system doesn't contain a temp/tmp directory, this appears to be a hosting configuration issue, so you'd have to take that up with your provider.

Your solution to create your own temp directory may work, but your path wouldn't be correct. "/" is only the root as perceived by your FTP session because FTP sessions are typically chroot'd. Your home's root directory as perceived by the web server is going to be your home directory, which may be something like /home/my-domain. You can use the PHP getcwd() function to find out exactly what it is.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top