Jump to content
The Uniform Server Community

UServer 3.3 w/ Worpress 2.0 Permissions


rhtrevino
 Share

Recommended Posts

I'm having some problems running WP 2.0 with the Uniform Server. When I try

to upload files using the inline uploader all the files are created

properly....but when I delete files from the UI they are not removed from the

file system. I think it's a permission issue as I don't have any problems on a Linux server or an OSX Apache install. Can anyone replicate this problem or give me any advice on how to

fix it?

Link to comment
Share on other sites

Windows does not uses permission. No such thing like that on the Windows OS. Wordpress might be trying to get the permission and checking to see if you have one, but that wont work on a Windows Machine.

 

I have deleted files on a Windows Machine using PHP before, so unless they are checking before deleting, then its the coding.

Link to comment
Share on other sites

Perhaps I'm using the wrong terminology. Actually, file and directory ACL's are a very important part of Windows security. Where I've seen this come into play is when running IIS. If the user under which IIS runs does not have proper access to the site document root then some file manipulations are not possible.

 

However, my knowledge of Apache on Windows is somewhat limited. By default, Apache2 runs under Local System which should be fine in most cases. Even running under a local computer admin account the files are still not deleted. You are correct in assuming it may be the code behind the image uploader (found at the Write post screens) in Wordpress 2.0....I would be curious to see if you can duplicate this with your own install of WP2.0 on the latest version of the Uniform Server.

 

UServer is a great product and I'm really frustrated with trying to get this file deletion problem solved.

Link to comment
Share on other sites

I really can't duplicate it now... too busy and in school. I also dont have internet connection yet at the apartment. I will see what i can do or contact the developers about it and what they are using... You may just have to edit a part of the code.

Link to comment
Share on other sites

I'm completely open to changing part of the code...that's no problem at all. Thanks for the quick responses....being a project manager myself I know that you time can be stretched very thin and your commitment to this project is awesome! I look forward to hearing the findings and I'll keep digging myself.

Link to comment
Share on other sites

I've managed to replicate the error I think.

 

What I've done is uploaded a file in the admin panel using the upload box on the bottom of the write page. I proceded to write a post and post the image.

 

I went back to the admin panel, hit browse all, and choose to delete the file.

 

It deleted from the admin panel. But not from the server. Im going to spend the next little while trying to find out why. I use wordpress on a couple of my websites, and I've never really payed attention to the upload area.

 

I'll post my findings when I come accross any :).

- Allan.

Link to comment
Share on other sites

Alright. I've spent the past while working on this bug. I was in every database, every WP2.0 php file, and tracked everything to everywhere, just to find out how simply stupid this bug actually is.

 

Along the way, I've learned how WP actually works inside and out, its kinda mind boggling.

 

 

Anyways, here is the quick, simple, stupid fix.

 

in the bottom of the wp-config.php file you'll find this:

017: /* That's all, stop editing! Happy blogging. */
018: 
019: define('ABSPATH', dirname(__FILE__).'/');
020: require_once(ABSPATH.'wp-settings.php');

 

on line 19, change the dirname(__FILE__) to the actual path, and put it in quotation mark. For my server, the change looks like this:

 

017: /* That's all, stop editing! Happy blogging. */
018: 
019: define('ABSPATH', 'w:/www/wordpress'.'/');
020: require_once(ABSPATH.'wp-settings.php');
021: ?>

 

The reason for this is that on windows, it uses backwards slashes in the file path, to php this looks like its trying to escape caractures.

 

Anyways, I hope this helps out, you'll have to delete the files that you where unable to delete before, as this change will not effect them.

 

Hope this all makes sense, im running on an empty tank 5 hours past my bedtime.

- Allan.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...