Fresh Install - Can't Upload

CharacterProfiler.lua file uploading issues

Fresh Install - Can't Upload

Postby bortolano » Wed Nov 22, 2006 5:43 am

I did a fresh install of 1.7.1 on our web server (no previous versions). All went well. I entered the guild name/server by copying it right out of the CharacterProfile.lua file. The next task seems to be to update the guild roster.

I generated the CharacterProfile.lua file and exited WoW. Went to the update.php page and navigated to the correct lua file in Account\savedvariables folder and entered the password for guild roster update.

Pause of a few seconds then I get the Update list which is blank and the same SQL statement in the bottom half as repeated here before "Select 'roster_config', etc etc.

I have ensured that I am using the correct file and the server diagnostics indicates no problem on the server. Checking the MySQL database shows 19 tables in there and all looks normal.

The server itself is running CGI/PHP4/MySQL4. I have seen some discussio on checking the temp directory for permissions but I don't have access to a php.ini file that I can see and don't know where this temp directory would be (shared server through hosting co).

Any ideas at what to check next?
bortolano
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Wed Nov 22, 2006 4:47 am

Fresh Install - Can't Upload

Postby zanix » Wed Nov 22, 2006 1:15 pm

Ask your host if your php's upload temp directory is readable by the web server software
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Fresh Install - Can't Upload

Postby bortolano » Wed Nov 22, 2006 3:20 pm

I checked and uploads are allowed up to 2M.

Is it possible to specify a different location for the upload to go to within my websites folders, such as a temp directory in the /roster folder?
Then I would be sure that I had control over the file, since I don't have access to look at the php temp dir when I connect.

Can you advise which script handles the actual upload that I could start playing with to see if I could get the file into this location for use?
bortolano
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Wed Nov 22, 2006 4:47 am

Fresh Install - Can't Upload

Postby zanix » Wed Nov 22, 2006 4:01 pm

update.php

lib/luaparser.php


Use a function called move_uploaded_file() in update.php, that should help
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Fresh Install - Can't Upload

Postby zanix » Mon Feb 26, 2007 3:04 am

Ok, I think this might work

First, create a directory in your roster folder
Give that new folder write permissions (chmod 777)
Remember the name of this directory


Open update.php
Find
Code: Select all
                    $data ParseLuaFile$file['tmp_name'],$file_type ); 


Replace with
(Changing REPLACE with the directory you created)
Code: Select all
                    $new_lua_file ROSTER_BASE.'REPLACE'.DIR_SEP.$file['name'];
                    
move_uploaded_file($file['tmp_name'],$new_lua_file);

                    
// Parse the lua file into a php array that we can use
                    
$data ParseLuaFile$new_lua_file,$file_type );
                    
                    @
unlink($new_lua_file); 
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Re: Fresh Install - Can't Upload

Postby Sundabar » Wed Mar 14, 2007 11:05 pm

Hi there.

I recently moved to a new webhost and I seem to be having the same problem. I tried your fix on my new install and got these new errors:

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/phpuze8B0) is not within the allowed path(s): (/vservers/sundabar) in /vservers/sundabar/htdocs/roster/update.php on line 104

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/phpuze8B0) is not within the allowed path(s): (/vservers/sundabar) in /vservers/sundabar/htdocs/roster/update.php on line 104

Warning: move_uploaded_file(/tmp/phpuze8B0) [function.move-uploaded-file]: failed to open stream: Operation not permitted in /vservers/sundabar/htdocs/roster/update.php on line 104

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpuze8B0' to '/vservers/sundabar/htdocs/roster/yawn/CharacterProfiler.lua' in /vservers/sundabar/htdocs/roster/update.php on line 104

Then I went and tried the same modification on a working install and it actually *broke* the install :)

Was anyone able to get this fix working? I might have done something incorrectly, but seems pretty straightforward to me.
Sundabar
WR.net Apprentice
WR.net Apprentice
 
Posts: 3
Joined: Wed Dec 20, 2006 6:05 am

Fresh Install - Can't Upload

Postby zanix » Fri Mar 16, 2007 1:45 am

Sundabar
Seems your server is restricting access to the temp directory for everything
You need to get your host to enable access to that directory
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US


Return to Uploading

Who is online

Users browsing this forum: No registered users and 1 guest

cron