LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2005, 09:36 PM   #1
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Rep: Reputation: 15
*@!Z Yarg!!!! Web site in Apache not showing - think it is Permissions!


Hi Everyone,

I think my head is about to explode... It seems I make a few good steps forward and then make giant slides backward!!!

I have for weeks been working on a web site and have been testing it both on my non-production systems and my production server, which by the way is a Suse 9.1 Linux box, Running Apache/2.0.49 and PHP 4.4.3.4-26.

This morning (10:00 A.M est) I decide to do a refresh of all the material on the production server as I had made some cross-site changes. I first backed-up my old site on the production server and I copied the root site folder into the htdocs folder in Apache www. This differed from what I normally did because before I was copying only files not folder and files and not replacing all the sub-folders within the root web directory; however by copying the new root directory with new content over the old root directory I effectively replaced everything.

I then chmod 755 the root directory and all the sub directories and I chmod 644 all the files within the rood and sub directories.

so the root and sub directory permissions look like this:

drwxr-xr-x

and the files all have these permissions:

rwxr-xr-x


All the the web files are .php. The content pages are only .php pages that contain variables that are propagated with data. The also have an included .php file that utilizes the variables that are propagated from the variables in the content pages.

currently if I browse to the index.php file I get an absolutely blank screen. If I view source I get :

<html><body></body></html>

This means that none of the php variables data is being placed in the file and only the basic non php base html tags are showing.

I then have tested to see if php is working; so in the content pages rather than using variables I added a simple:

echo "this is really ticking me off!";

When I refreshed the blank page I get:

this is really ticking me off

This means that PHP is working.

This is why I believe that it has to be a permissions based issue, namely that it doesn't have permission to read the one or all of the files so it just doesn't display the data.

This is what my Apache permission structure looks like:

Code:
drwxr-sr-x: htdocs
     drwxr-xr-x: Web
          drwxr-xr-x: CSS
              -rwxr-xr-x: web.css
          drwxr-xr-x: Images
                -rwxr-xr-x: web_logo.gif
                -rwxr-xr-x: background.gif
               drwxr-xr-x: Diagrams
                    -rwxr-xr-x: common_lifecycle.gif
           drwxr-xr-x: Includes
                -rwxr-xr-x: interior.php
           drwxr-xr-x:  Music
                 -rwxr-xr-x: Serco.mp3
      -rwxr-xr-x: index.php
      -rwxr-xr-x: faq.php
      -rwxr-xr-x: tech_ov.php
I have rebooted the server.

I have checked to ensure that PHP is working

I have written test PHP files not based on those files shown above and while in the Web root folder they do not show their content if using variables and an include only straight up PHP.

I have checked and verified that apache virtual hosts are set up correctly for this group of files and it appears to be.

I have gone through the index.php and the include file interior.php, looking for any unclosed tag or missed ; or delimiter and they all check out fine.

I copied all the backed up files & folders into the root and it still didn't work. I then overwrote the entire folder with the old backup and it didn't work. Thus I think that it is permissions.

I hope that I have described enough for you to get a good picture of what I am dealing with.

Your Help would be fantastic as I am getting frazzled and for the time being running out of ideas. I am quite new to Linux and to apache and php, so it could be something simple that I am missing.
 
Old 03-16-2005, 11:57 PM   #2
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Hi Everyone,

I found the problem. It seems that my permissions where fine, but the interiors.php file had become corrupt - I didn't know that Linux text files could do that. I opened a new file and typed character for character everything in the interiors.php file and then I save it over the other interiors.php.

Bingo, the site now works. Has anyone else had a basic text (.php) file corrupt before, and if so, do you know how it happens? It worries me a bit that it became corrupt. I had saved on the files prior to transferring them to the production server in Unix (not windows) format. The conversion from Windows to Unix format may have done it? I copied the file over several times and each time it was corrupted so it is unlikely that the copying process corrupted it.

If you have any ideas, Id like to hear them.

Truly,
ServerStorm
 
Old 03-17-2005, 02:15 AM   #3
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
did you transfer it by ftp ?? binairy or txt?

.php needs txt
 
Old 03-17-2005, 10:03 AM   #4
ServerStorm
Member
 
Registered: Oct 2004
Posts: 76

Original Poster
Rep: Reputation: 15
Hi thermite_1033,

Thanks for your reply. As far as I know the files where transferred in text. They were copied across a samba network share as a drag and drop on Windows into the relevant Linux share.

Truly,
ServerStorm
 
Old 03-17-2005, 11:17 AM   #5
thermite_1033
Member
 
Registered: May 2004
Location: Antwerp, Belgium
Distribution: slackware
Posts: 112

Rep: Reputation: 18
then i have no clue what went wrong
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache not showing web page harisund Linux - Software 3 11-25-2005 01:31 PM
Apache started but web site don't work acercatealaluz Linux - Newbie 2 05-25-2005 11:59 AM
Apache-HTML can't open dir on web site comprookie2000 Linux - Networking 4 03-07-2005 03:40 PM
File permissions for web site files/folders mackayr Linux - Networking 1 12-01-2004 12:49 PM
Apache Web site updating? munzza Linux - Newbie 1 05-17-2002 03:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration