Forum Moderators: coopster
script works on other sites
the sample does a simple file copy but results in my echo error message "failed to open..."
I do not manage that server although my address source and destiantion has been verified and is fine
so the question is where should I look, what can go wrong?
thanks
<<<
$source="/pub/comwww/site_name/main/biz_templates/any_name_tpl.php";
$dest="/pub/comwww/site_name/main/biz_members/any_name_tpl.php";
if (!copy($source, $dest)) {
print ("failed to copy $dest...\n");
}
>>>>
php.ini to turn on error_reporting. See PHP Troubleshooting [webmasterworld.com] in the PHP Forum Library [webmasterworld.com] for examples. Hopefully, with ALL error-reporting ON, including NOTICES you will get a message from PHP describing the issue it is having. Yes, you can use a URL rather than a path/file. However, review the notes in the manual, particularly:
Note: As of PHP 4.3.0, both source and dest may be URLs if the "fopen wrappers" have been enabled. See fopen() [php.net] for more details. If dest is an URL, the copy operation may fail if the wrapper does not support overwriting of existing files.
I got
unable to create ........ not a directory in etc...
which does not mean much for the path is still correct
and all named ffilesand directory in the warning are there without typos or path error
I will try with a full url, I should not have a wrapper problem
regards
Henry
pwd command and have a look at the filepath of the working directory. It should match your variable. (Some FTP clients also have the ability to display the working directory if you cannot get command line access). biz_templates as well as the biz_members directory permission settings.I am shmod to the roof!
I even for test purpose deleted a few hundred lines out of the scrit in order to retain only the 2: source and dest lines
It is pointing (what else left?) to a server setting that ought to be the problem source
I will within minutes speak with them (ISP)
definitely need to know what's happening
If I had a good server security knowledge
I would transfer some of the sites I manage
on my own server but not there yet..
thanks