Since my remote server was recently migrated I am receiving an error message generally which goes like this
Warning: session_start() [function.session-start]: open(c:/wampserver/tmp/sess_4bkd7oiqmi7298mhikv09447t6, O_RDWR) failed: No such file or directory (2) in /home/safetyte/public_html/portal/woodwork_sub/ws_member_profile.php on line 2
Lines 1 and 2 are
<?php
session_start();
This message is coming from the remote server but refers to a folder on my local computer. This message is displayed on any computer that links to as well as several other online links, though not all.
Any help would be appreciated. My webhost isn't doing much for me.

Dani AI

Generated

As suggested, the live PHP process is trying to use a Windows-style session path left over from a WAMP development copy. That almost always means a hard-coded session save path or a per-directory PHP override survived the migration, so the production server is attempting to open files under a non-existent Windows path and generating the warning seen in the first post. The original error is symptomatic of an environment/config mismatch, not of session_start() itself.

A practical checklist to find the culprit and confirm which PHP config is active:

  • Publish a minimal info file containing <?php phpinfo(); ?> and inspect the "Loaded Configuration File" plus the session section (session.save_path, session.save_handler).
  • Search the codebase and per-directory configs for overrides (examples shown below are safe patterns to run from the server shell):
find /home/safetyte/public_html -name ".user.ini" -o -name ".htaccess"
grep -Rni --exclude-dir=.git --exclude-dir=cache "wampserver\|session.save_path\|session.savepath\|ini_set" /home/safetyte/public_html

If an override is found in application code, .htaccess, or a .user.ini, remove or update it so the server uses a valid Unix path (or simply let the system php.ini decide). Ensure the target directory exists and is writable by the web-server user (adjust user/group to match the host):

mkdir -p /home/safetyte/tmp
chown webserver-user:webserver-group /home/safetyte/tmp
chmod 700 /home/safetyte/tmp

Additional notes: check for php-fpm pool settings or vhost-level php_admin_value entries that can set session paths; disable display_errors in production to avoid leaking paths; and inspect server error logs after changes. If the hosting environment manages PHP centrally (shared hosting), providing the host with the phpinfo output and the failing URL will speed resolution. For , removing the leftover Windows path override or pointing it at a proper Linux session directory will stop the warnings and restore normal session file storage.

open(c:/wampserver/tmp/sess_4bkd7oiqmi7298mhikv09447t6, O_RDWR

It's trying to open a session file using a Windows-style filepath... That's odd. It might be a configuration parameter being set inside your PHP code, for example:

ini_set('session.savepath', 'c:/wampserver/tmp/')

You shouldn't need a line like the above, but it sounds like someone/something put that into your code, which means that the live copy will be trying to open a file in a path which doesn't exist, hence your error messages. Without this option, PHP will stick to its configuration file on the web server, which will normally be the system default.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.