It is currently Fri Sep 10, 2010 1:42 pm


Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Problem with web app indexing and PHP
PostPosted: Wed Feb 03, 2010 2:40 am 
Offline

Joined: Thu Dec 17, 2009 2:34 am
Posts: 3
I 'm currently teaching myself PHP and to test them out I've made a web app called 'mysite' and I put my websites into the /var/hda/web-apps/mysite/html/ file. I also recursively changed the group of mysite to 'users'. (I copied the owner and premissions layout from the homeinv app)

I would like to go to 'mysite' and browse the directory to find the page I would like to load, but when I type in 'mysite' into the url is comes up with the page 'Test Page for the Apache HTTP Server on Fedora', and if I go to a directory like 'mysite/images' it comes up with the directory contents titled 'Index of /images'.
Who an I able to browse the initial directory 'mysite'?

Also if I go to a PHP file it opens up but without the PHP script proccessed. How do I enable PHP on the web app?


Top
 Profile  
 
 Post subject: Re: Problem with web app indexing and PHP
PostPosted: Thu Feb 04, 2010 10:41 pm 
Offline
Administrator
User avatar

Joined: Wed Dec 03, 2008 7:40 am
Posts: 1727
webapps are the perfect thing for learning php and web development!

i just tried this: create a webapp called mysite. when i go to http://mysite i see an empty index:
Attachment:
empty-index.png
empty-index.png [ 14.57 KiB | Viewed 82 times ]


i can create files in /var/hda/web-apps/mysite/html (as root, just to not bother with permissions right now) and see them in the browser.

i can do this:

Code:
echo "<?php echo phpinfo(); ?>" > test.php


and i see a file test.php. when i click on test.php, i see the trillion php settings. not the code.

maybe you have a permission issue?

_________________
My HDA: 2.2GHz Dual Core on Asus MB, 8GB RAM, 740GB+400GB+400GB+1TB


Top
 Profile  
 
 Post subject: Re: Problem with web app indexing and PHP
PostPosted: Sun Feb 07, 2010 11:05 pm 
Offline

Joined: Thu Dec 17, 2009 2:34 am
Posts: 3
I deleted mysite and remade the web app so it went back to its defaults. Now PHP works but I'm still not able to look at the root directory.
URL: http://mysite/ comes up with;
Attachment:
File comment: Page displayed when accessing root directory without any type of index page
Fedora Test Page.JPG
Fedora Test Page.JPG [ 67.82 KiB | Viewed 70 times ]


I tried removing the index pages of other web-apps and the Test page come up as well. When I actually read the Test page it said, edit /etc/httpd/conf.d/welcome.conf when the index page is not present. And in here it has Options -Indexes. Commenting out this line I'm now able to view the root directory, but is this advisable or should I add a new <Location Match ...> or option so it only works for mysite?


Top
 Profile  
 
 Post subject: Re: Problem with web app indexing and PHP
PostPosted: Sun Feb 07, 2010 11:10 pm 
Offline
Administrator
User avatar

Joined: Wed Dec 03, 2008 7:40 am
Posts: 1727
i don't understand why it would be behaving different than mine.

why not use index.php though?

_________________
My HDA: 2.2GHz Dual Core on Asus MB, 8GB RAM, 740GB+400GB+400GB+1TB


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: