About Store Forum Documentation Contact



Post Reply 
Uploader tool bug in 2nd step
Author Message
alkirah Offline
Member

Post: #1
Uploader tool bug in 2nd step
Hello, after setting up patch data, if I reset it and a file have been modified, generated php file don't delete the file first, it only try to rename de @new over the existing one, resulting in an error.

In this exemple, I modified the settings.ini file. Running the script leave me with f-settings.ini (old one) and f-settings.ini@new (new one)

Could you update uploader tool please?, or tell me what I do wrong?

also, specifying the installer file seems to work, create a "<filename> installer.exe" file on the server but tutorial don't update it at all.
PHP Code:
<?php
function ren($src$dest) {if(!rename($src$dest))echo("Error renaming ".$src." file.\n");}
function 
exist  ($name) {return file_exists($name);}
function 
delFile($name) {if(exist($name))unlink($name);}
function 
delDir ($name) {if(exist($name))rmdir ($name);}
ren("eo/d-bin/f-settings.ini@new""eo/d-bin/f-settings.ini");
ren("eo.installer.txt@new""eo.installer.txt");
ren("eo.index.pak@new""eo.index.pak");
delFile("EO Installer.exe");
unlink("eo.update.php");
?>
Update Finished! 

Here is the result in internet browser
PHP Code:
Error renaming eo/d-bin/f-settings.ini@new fileError renaming eo.installer.txt@new fileError renaming eo.index.pak@new fileUpdate Finished
(This post was last modified: 10-14-2011 02:08 AM by alkirah.)
10-14-2011 01:48 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Uploader tool bug in 2nd step
on Windows OS you may need to setup write permissions for the PHP

http://www.esenthel.com/wiki/index.php?t...ermissions

if "IIS_IUSRS" group won't help, try setting "USERS"
10-14-2011 11:46 AM
Find all posts by this user Quote this message in a reply
alkirah Offline
Member

Post: #3
RE: Uploader tool bug in 2nd step
write permission are there, script can rename/delete files, but on windows, you can't rename a file over an existing one since rename command won't delete the old one.

I'll check php.ini in case it's an option there but permissions are fine.

I added everyone with full control before posting without help.
10-14-2011 12:58 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Uploader tool bug in 2nd step
Quote:but on windows, you can't rename a file over an existing one since rename command won't delete the old one.
I've tested it and it works on Windows Server 2008 and Linux

check for php log errors in your php output folder
10-14-2011 01:17 PM
Find all posts by this user Quote this message in a reply
alkirah Offline
Member

Post: #5
RE: Uploader tool bug in 2nd step
Reinstalling php solved the problem smile thanks
10-14-2011 01:58 PM
Find all posts by this user Quote this message in a reply
Post Reply