Forums / Upgrading from 1.3.x to 1.3.9 / failed to open stream: Permission denied

failed to open stream: Permission denied

Locked

Views: 6,596

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
29 Jun 2010, 12:59 AM
#1
platte avatar

platte

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

failed to open stream: Permission denied

Well, so much for that. Believe me, I am not inexperienced with a little code, but that (upgrade) resulted in not being able to get to the admin area. After fooling around with some permissions, I get this:

Warning: main(includes/application_top.php): failed to open stream: Permission denied in /home/sitename/public_html/zen-cart/admin/index.php on line 10

Fatal error: main(): Failed opening required 'includes/application_top.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sitename/public_html/zen-cart/admin/index.php on line 10

So, I guess my best solution is to start from scratch, again.

29 Jun 2010, 1:17 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: failed to open stream: Permission denied

The "Permission denied" message is telling you that your /admin/includes/application_top.php file has permissions set on it too low for the server to be able to access, or whatever you used to upload the file caused it to be owned by someone that the webserver doesn't have permission to share files from. That can happen if you use browser-based tools for transferring files, instead of using a proper regular FTP program. And proper access permissions for files are typically 644 for files (and 755 for folders).

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jun 2010, 1:29 AM
#3
platte avatar

platte

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: failed to open stream: Permission denied

I am using Adobe GoLive to transfer files, should be a considered a proper ftp program. Permissions on application_top are 644.

29 Jun 2010, 1:37 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: failed to open stream: Permission denied

GoLive isn't exactly dedicated to FTP. It's more like it's got FTP capability bolted on. But, that said, while I've seen tons of FTP problems using Adobe Dreamweaver, the reports of problems with GoLive are decidedly fewer.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

29 Jun 2010, 2:07 AM
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: failed to open stream: Permission denied

You do not need to start again from scratch, nor should you. What you should do is use another program to verify file permissions and ownership. A regular FTP program would be a good choice for such a thing. :wink:

The learning is in the doing.

Potent Products

4 Jul 2010, 1:56 AM
#6
platte avatar

platte

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: failed to open stream: Permission denied

I did reinstall from scratch. So many things were going on, it seemed like the cleanest solution. And now all is fine, but I am a little hesitant to update from 1.3.9c, to 1.3.9d.

I did have plenty of other headaches along the way, as my host installed a new ip for the SSL, AND I figured out GoLive was adding encoding to php files as I opened them. I would erase the encoding info and reupload, but there it still was. Now, how did I remain patient through that!!!

Anyway, that was fixed with some global settings changes in GoLive, so now it tells me everytime when opening that the page has no encoding, and I am comforted at the thought it is telling me and not just changing the files.

So I think the problems I was having was way more than just permissions.

4 Jul 2010, 2:03 AM
#7
platte avatar

platte

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: failed to open stream: Permission denied

Oh, and I came to prefer changing permissions through cpanel's file manager, as I figured it was doing a better job, and GoLive does not have the number translation available. Nice to see the chmod numbers as you click the boxes.

4 Jul 2010, 2:40 AM
#8
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: failed to open stream: Permission denied

All programs come with their quirks and we either get used to them or change programs. Don't use GoLive but sounds like you will be able to live with its quirks. :smile:

The learning is in the doing.

Potent Products

4 Jul 2010, 4:04 AM
#9
platte avatar

platte

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: failed to open stream: Permission denied

Yep! We expect the programs to be perfect, but then we get to know them. Thanks for your input, Website Rob and DrByte.

4 Jul 2010, 4:44 AM
#10
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: failed to open stream: Permission denied

platte:

..... And now all is fine, but I am a little hesitant to update from 1.3.9c, to 1.3.9d....

That upgrade is the easiest of them all - shouldn't take you longer than 10 mins. No database upgrade required either.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

6 Jul 2010, 3:26 AM
#11
platte avatar

platte

New Zenner

Join Date:
Jun 2010
Posts:
19
Plugin Contributions:
0

Re: failed to open stream: Permission denied

I know you are right, but until I get more familiar with the workings of the whole cart, I hesitate. It isn't the time in doing the updates, it is more what might happen that I am naive about, and then have to take hours to fix because I was unaware of what might be getting overwritten.