Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Problems with file rights !!!!!!
Old 11-12-2010, 03:56 AM Problems with file rights !!!!!!
Novice Talker

Posts: 9
Name: Rohan Chopdekar
Trades: 0
I had copied some project files from a friends Mac to my Windows machine..
Due to some strange reason those floders and files have light green text and when i try to access those files using my localhost it shows following error::::


Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Fatal error: Unknown: Failed opening required 'C:/wamp/www/marinesjob/index.php' (include_path='.;C:\php5\pear') in Unknown on line 0

Now i am new to php development and i am not sure why the error is occuring..

Other projects done on my machine work fine
I have also tried to reset the file permissions but that have not worked>
Plz help if u can....
rohan210 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-12-2010, 04:21 AM Re: Problems with file rights !!!!!!
shivaji's Avatar
Ultra Talker

Posts: 321
Trades: 0
I don't think this is file permission error. It is looking like different include path. If your include path (include_path='.;C:\php5\pear) is defined then script try to call include file then maybe you get this error. Try to put some files in pear folder and see what happened.
__________________

Please login or register to view this content. Registration is FREE
- uncommon free scripts

Please login or register to view this content. Registration is FREE
- Städte, Sport, Party, Gourment, Apartments, Hotels
shivaji is offline
Reply With Quote
View Public Profile Visit shivaji's homepage!
 
Old 11-12-2010, 11:14 PM Re: Problems with file rights !!!!!!
Backslider's Avatar
Experienced Talker

Posts: 40
Trades: 0
Quote:
Originally Posted by shivaji View Post
I don't think this is file permission error.....Try to put some files in pear folder and see what happened.
That's really funny

Its a file permissions error. If the file was not found the error would include. "No such file or directory".

You can reset the folder/file permissions in Windows. Just Google "reset folder and file permissions on windows" for your particular version of Windows.

You can open your index.php in notepad, then re-save it. This also should remove the error, but you will have problems with other files.
Backslider is offline
Reply With Quote
View Public Profile
 
Old 11-13-2010, 04:18 AM Re: Problems with file rights !!!!!!
shivaji's Avatar
Ultra Talker

Posts: 321
Trades: 0
Quote:
Its a file permissions error. If the file was not found the error would include. "No such file or directory".
Really??? I never get this error.
__________________

Please login or register to view this content. Registration is FREE
- uncommon free scripts

Please login or register to view this content. Registration is FREE
- Städte, Sport, Party, Gourment, Apartments, Hotels
shivaji is offline
Reply With Quote
View Public Profile Visit shivaji's homepage!
 
Old 11-13-2010, 08:39 PM Re: Problems with file rights !!!!!!
Backslider's Avatar
Experienced Talker

Posts: 40
Trades: 0
Quote:
Originally Posted by shivaji View Post
Really??? I never get this error.
Create a file dix.php and put the following code in it:

Code:
<?php
      require('blogs.php');
?>
Then browse to your file on your web server. Tell me what you see

This is what I see:

Code:
Warning:  require(blogs.php) [function.require]: failed to open stream: No such file or directory in C:\wamp\www\dix.php on line 2

Fatal error:  require() [function.require]: Failed opening required 'blogs.php' (include_path='.;C:\php5\pear') in C:\wamp\www\dix.php on line 2
Perhaps you will understand "Permission denied"...?

Last edited by Backslider; 11-13-2010 at 08:40 PM..
Backslider is offline
Reply With Quote
View Public Profile
 
Old 11-14-2010, 07:14 AM Re: Problems with file rights !!!!!!
shivaji's Avatar
Ultra Talker

Posts: 321
Trades: 0
Did you will get this error if you create and put blogs.php in same directory where is dix.php???
__________________

Please login or register to view this content. Registration is FREE
- uncommon free scripts

Please login or register to view this content. Registration is FREE
- Städte, Sport, Party, Gourment, Apartments, Hotels
shivaji is offline
Reply With Quote
View Public Profile Visit shivaji's homepage!
 
Old 11-14-2010, 09:09 AM Re: Problems with file rights !!!!!!
Backslider's Avatar
Experienced Talker

Posts: 40
Trades: 0
Quote:
Originally Posted by shivaji View Post
Did you will get this error if you create and put blogs.php in same directory where is dix.php???
The point is to show YOU the error that PHP throws when a require file is missing.
Backslider is offline
Reply With Quote
View Public Profile
 
Old 11-14-2010, 10:18 AM Re: Problems with file rights !!!!!!
shivaji's Avatar
Ultra Talker

Posts: 321
Trades: 0
In that case the problem is not in file permissions. Ok, maybe PHP generate file permission error because cannot find and give permission for missing file, but how is this in any correlation with CHMOD or Win file permission what you are writing in your first post? He just need to find which and where to insert a missing file.
__________________

Please login or register to view this content. Registration is FREE
- uncommon free scripts

Please login or register to view this content. Registration is FREE
- Städte, Sport, Party, Gourment, Apartments, Hotels
shivaji is offline
Reply With Quote
View Public Profile Visit shivaji's homepage!
 
Old 11-17-2010, 11:13 PM Re: Problems with file rights !!!!!!
Backslider's Avatar
Experienced Talker

Posts: 40
Trades: 0
Quote:
Originally Posted by shivaji View Post
He just need to find which and where to insert a missing file.
Ur too funny!!

There is no file missing. PHP cannot open the file because it has restrictions placed on it by the MAC operating system. Our friend needs to reset permissions on the files.

Yes, you can move over files from a MAC machine to Windows and find you have permission problems, try it some time
Backslider is offline
Reply With Quote
View Public Profile
 
Old 11-18-2010, 06:22 AM Re: Problems with file rights !!!!!!
Experienced Talker

Posts: 44
Name: Douglas
Trades: 0
I faced the same problem sometime back and so far not been able to get the right solution!
__________________

Please login or register to view this content. Registration is FREE
dougy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Problems with file rights !!!!!!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.39751 seconds with 12 queries