Sorry about the duplicate post
How do I get round this error message?
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in D:\Clients\13335\dbnbf.com\dbnbf.com\install.php on line 767
TIA
That means it's trying to change to a non-existing directory... Not sure how you get rid of that or what's causing it.
Sounds like the directory structure is not correct, you are trying to install right?
The relevent lines in install.php are:
return doStep2a();
}
if (!file_exists($sourcedir . '/Subs.php'))
{
echo '
<div class="error_message">
<div style="color: red;">', $txt['error_subs_missing'], '</div>
</div>
<br />';
return doStep2a();
}
updateSettingsFile(array('webmaster_email' => $_POST['email']));
chdir(dirname(__FILE__));
define('SMF', 1);
require_once($sourcedir . '/Subs.php');
require_once($sourcedir . '/Subs-Auth.php');
$result = mysql_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE memberName = '$_POST[username]' OR emailAddress = '$_POST[email]'
LIMIT 1");
if (mysql_num_rows($result) != 0)
I have checked all files and re uploaded everything, directory structure is right, but error persists when trying to install. It's the line chdir(dirname(__FILE__)); that seems to be having problems.
What version are you trying to install ?
Put this in a file, upload it to your SMF directory and run it. Post the results here...
<?php
echo dirname(__FILE__);
?>
Prior to 4.3.0, PHP returned "." for the current directory.
Quote from: Oldiesmann on September 27, 2005, 07:04:26 PM
Put this in a file, upload it to your SMF directory and run it. Post the results here...
<?php
echo dirname(__FILE__);
?>
Prior to 4.3.0, PHP returned "." for the current directory.
File returned:-
D:\Clients\13335\dbnbf.com\dbnbf.com
which is the path to the SMF directory at http://www.dbnbf.com
Which at the moment has the permissions set wrongly, as every time I upload files their permissions are set back to the default and it seems the only way to change them is one at a time (takes for ever) via my hosts control panel, unles you know how to do it on a Windows server via ftp?
Change the folder and file permissions using your ftp software ?
I don't know if you can change permissions via FTP on a windows server as I've never tried it. I'm not sure what the problem could be - if dirname(__FILE__) returns the appropriate directory name, then it should be able to open it...
Good point Oldiesmann damn windows!
TID Have you are asked your hosting company to set permissiions?
I just followed your basic domain and it trys to run the SMF install straight off with the following message
You're on a windows server, and some crucial files are not writable. Please ask your host to give write permissions to the user PHP is running under for the files in your SMF installation. The following files or directories need to be writable:
* attachments
* avatars
* Packages
* Packages/installed.list
* Smileys
* Themes
* agreement.txt
* Settings.php
* Settings_bak.php
Click here to try this step again.
I had them set the relevent files and folders to the unix equivelent of 777 when I uploaded 1.0.5. That is when install.php started to throw up the error in this thread. I thought I'd try 1.1-rc1, so I uploaded the files which changed the permissions back to whatever my host set as the default, I'm now waiting for them to reset the permissions to 777 or whatever that equates to on a Windows server.
Windows is avery apt name, the O/S is as easy to break as a window. Why the hell can't you change permissions while logged on remotely like unix?
Hmm? Windows. . . Gates. . . What's next? . . . Doors maybe? ;D
I think that D:\Clients\13335\dbnbf.com\dbnbf.com is a bad link -- windows will try to exec dbnbf.com as a file . try not using the .com and see if that fixes the problem
Quote from: Ray on September 28, 2005, 03:31:07 PM
I think that D:\Clients\13335\dbnbf.com\dbnbf.com is a bad link -- windows will try to exec dbnbf.com as a file . try not using the .com and see if that fixes the problem
I don't have that option. That is the default driectory structure for all domains hosted by m6.net.
I have four more domains hosted with them that work ok with that structure, mind you they are just straight html sites, no php or MySQL
http://www.the-iron-dutchess.com - D:\Clients\13335\the-iron-dutchess.com\the-iron-dutchess.com
http://www.the-iron-dutchess.co.uk - D:\Clients\13335\the-iron-dutchess.co.uk\the-iron-dutchess.co.uk
http://www.replica-dutch-barge.com - D:\Clients\13335\replica-dutch-barge.com\replica-dutch-barge.com
http://www.drugs-4u.com - D:\Clients\13335\drugs-4u.com\drugs-4u.com
I run windows and have the smf Dir set to read and write all when I install -- then I cut back after the install was done. In windows if you just make the smf Dir (or whatever you call it dbnbf.com) writeable, then copy the files over all the files and Dir will be writeable. Not sure if this will help you but it is something.
You can try changing that line to this:
chdir('"' . dirname(__FILE__) . '"');
Quote from: Oldiesmann on September 30, 2005, 10:28:59 AM
You can try changing that line to this:
chdir('"' . dirname(__FILE__) . '"');
WooHoo! Well done that man!!!
Install.php still threw up a similar error at a different line number, but the install completed OK anyway.
Many thanks :D