Allowing XAMPP permissions to files

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Allowing XAMPP permissions to files

Postby MeltingDog » 11. December 2011 08:49

Hi all,

I have actaully had this exact problem on Mac but now it is happening on Windows and I am not sure how to solve it.

I have a Wordpress Site and am running php scripts from within the pages (a plugin I have allows this). The scripts run fine but I cannot display images. FireBug just gives the error 'Failed To Load Given URL' (urls are fine). What I beleive is the issue is the file permissions - apache simply does not have permission to read the file.

Now, the easy thing to do would be to allow all permissions for those files, which is what I have done..but the problem persists. I can only think that the 'XAMPP Use' doesnt have the permissions. When I right click a file and go Properties>>Security tab I see the list of groups and user names which read:

Authenticated Users
SYSTEM
Administrators
Users

I have set full permissions for all of these. Do I need to add another type of user or group for xampp/apache? Can anyone help me out here? Thanks!
MeltingDog
 
Posts: 7
Joined: 29. November 2011 08:24
Operating System: OSX

Re: Allowing XAMPP permissions to files

Postby Altrea » 11. December 2011 08:58

Hi MeltingDog,

It is very very uncommon that NTFS permissions are your issue.
More common it is a permission issue inside Apache (.htaccess deny rules), or a misdirected rewrite rule.

You say the URLs are alright. How do you know? Can you access them if you type them in your browser address bar?
How does your Wordpress plugin works? and which syntax / functions are used? Which php scripts do you run within the pages?
I don't have any idea what you want to say. Wordpress is written in php so you can surely use php in your pages even without any plugins!?

You see, you have to be much more specific. Otherwise helping you will be very difficult.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: Allowing XAMPP permissions to files

Postby MeltingDog » 11. December 2011 09:11

Hi Altrea,

Sorry - I should have been more specific.

Actually, whilst trying to get you more info I have solved it (though not as I would have liked). My original php line read:

echo '<img src="productimage/display/'.$row['image'].'"/>';

But I tried adding the full URL and it worked:

echo '<img src="http://localhost/wpsite/wp-content/themes/sitetheme/productimage/display/'.$row['image'].'"/>';

Surely theres a cleaner way to do this (I mean without using the entire URL)?
MeltingDog
 
Posts: 7
Joined: 29. November 2011 08:24
Operating System: OSX

Re: Allowing XAMPP permissions to files

Postby Altrea » 11. December 2011 09:17

Sure, relative URLs should work too. But to get the correct syntax you have to analyse your 404 errors from the false relative urls.

Maybe you can use Wordpress related variables and constants too. I don't know your Plugin so i can't say anything about it.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 52 guests