Issue Migrating Website

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
methodize
Forum Newbie
Posts: 7
Joined: Sat Apr 10, 2010 3:14 am

Issue Migrating Website

Post by methodize »

I moved my website from my dev server here: www.blazing-media.com/strongman

to the live server here: www.stevestrongman.com/test

Copied the database, and front-end files exactly, but it is generating this error:
<b>Warning</b>: BlockView::include(/www/stevestrongman.com/web/test/concrete/config/../blocks/autonav/templates/header_menu.php) [<a href='function.BlockView-include'>function.BlockView-include</a>]: failed to open stream: Permission denied in <b>/www/stevestrongman.com/web/test/concrete/libraries/block_view.php</b> on line <b>265</b><br />
<br />
<b>Warning</b>: BlockView::include() [<a href='function.include'>function.include</a>]: Failed opening '/www/stevestrongman.com/web/test/concrete/config/../blocks/autonav/templates/header_menu.php' for inclusion (include_path='.:/usr/share/php:/www/stevestrongman.com/php:/www/stevestrongman.com/web/test/libraries/3rdparty:/www/stevestrongman.com/web/test/concrete/config/../libraries/3rdparty') in <b>/www/stevestrongman.com/web/test/concrete/libraries/block_view.php</b> on line <b>265</b><br />

Any suggestions as to where/why it went wrong?

Thanks a ton in advance.

Glyn
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Issue Migrating Website

Post by Eran »

failed to open stream: Permission denied
You need to set up permissions/groups correctly for your files so Apache/PHP could read them
methodize
Forum Newbie
Posts: 7
Joined: Sat Apr 10, 2010 3:14 am

Re: Issue Migrating Website

Post by methodize »

pytrin wrote:
failed to open stream: Permission denied
You need to set up permissions/groups correctly for your files so Apache/PHP could read them
How do I go about doing that?

Thanks for the fast reply.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Issue Migrating Website

Post by Eran »

That would according to the groups / permissions used in your server, so none can tell but you / your server administrator. My guess is that you uploaded some files using FTP or something like that which uses a different user/group from the one used by Apache/PHP. Of course, I can't tell which would those be since it's unique to your system.
methodize
Forum Newbie
Posts: 7
Joined: Sat Apr 10, 2010 3:14 am

Re: Issue Migrating Website

Post by methodize »

pytrin wrote:That would according to the groups / permissions used in your server, so none can tell but you / your server administrator. My guess is that you uploaded some files using FTP or something like that which uses a different user/group from the one used by Apache/PHP. Of course, I can't tell which would those be since it's unique to your system.
I think I understand what you're saying here.

Below are pictures of the same file on the dev and live server. As you can see, the owner and group got changed when I uploaded through FTP to the new server. So, what I think you were saying is that some files on the original dev server would have had the owner as www, so the server could run them. So when I uploaded these, they would have been changed to "sstrongman" and the server would no longer have permission to use them. My question to you: How do I find out which files on my dev server have a different owner (such as www), so I can go back through my FTP and change the owner back to www manually? I have attached two pictures of a sample folder from both the original and new (live) server.
Original server: Image New server: Image

Thanks again for your help!
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Issue Migrating Website

Post by Eran »

You should check what group/user apache is running under and change all the project files to that user. You can do it by FTP sometimes, but the correct way would be to do it from the shell using the chown command
http://ss64.com/bash/chown.html
Post Reply