Page 1 of 1

Issue with Xampp and accessing folders with Browser

PostPosted: 12. July 2014 06:02
by J0E24
I have been following Beginner tutorials for PHP with Buckysworld on Youtube. I am the 5th tutorial, which is writing your first PHP File, and in the video the person made a folder in htdocs called Series, and in that a folder called FirstFile and in that folder was where he was going to make the first PHP File. I was following step by step. Then when he typed localhost/series/firstfile in the address bar, it showed up with Index of /series/firstfile/ and had the parent directory, and the very first file he made for the tutorial named file.php

My issue is when i mad the Series folder in htdocs and made the firstfile in the series folder and made a file.php with notepad++ saving it under all files type, i get a blank page when i put localhost/series/firstfile in the address bar. but when i type in the address bar C:\xampp\htdocs\series\firstfile\file.php i get whatever is on the file at the time.


Any help on this would be great.

Thanks.

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 13. July 2014 20:26
by J0E24
anybody?

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 13. July 2014 20:34
by JJ_Tagy
Are you using short open tags?

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 13. July 2014 21:22
by J0E24
What do you mean by short open tags?

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 13. July 2014 22:47
by JJ_Tagy
http://php.net/manual/en/language.basic ... hptags.php

<?php code goes here ?> or <? code goes here ?>

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 13. July 2014 23:27
by J0E24
Oh no, that really doesnt even have anything to do with my problem, my first official document literally only has <php ?> , the thing is wehn i have apache and mysql running on xampp i cant see the index of the firstfile with the parent directory type of thing.

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 13. July 2014 23:46
by JJ_Tagy
If you have a blank index file, it will serve that page instead of the directory. You may also need to allow Indexes in your configuration.

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 13. July 2014 23:55
by J0E24
how do i allow indexes in the configuration?

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 14. July 2014 02:17
by JJ_Tagy

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 14. July 2014 02:39
by J0E24
Appreciate the link, But after searching in there and trying to find out how to allow indexes i might have missed it or something.

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 14. July 2014 03:01
by JJ_Tagy
J0E24 wrote:i might have missed it or something.

Yup, I would agree. A simple CTRL+F nets 9 locations for INDEXES. There are a few different ways to allow directory indexing. Read through the options and pick what fits for you.

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 14. July 2014 04:55
by J0E24
After doing the Search function and reading each one, i just cant seem to find the one that fits my situation.

If someone other than Tagy can explain my situation and maybe a fix in a better format then please do, instead of just giving me a broad overview of what may be my solution. Thanks.

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 14. July 2014 05:42
by gsmith
what happens in the browser when you type
http://localhost/series/firstfile/file.php ??

I did catch the "when mysql is running you see the index and mysql is not running you do not," that's an odd one that I cannot explain at the moment, not even close. This really makes no sense at all because these two applications are not tied together unless you use mysql for apache configuraion, and I see nothing in the default config to lead me to believe this is the case unless I overlooked it.

JJ is speaking mostly about the Options directive, but when I look at the default config that is installed, Indexes IS one of the listed options.

see shortly after <Directory "/xampp/htdocs"> in
http://sourceforge.net/p/xampp/code/HEA ... httpd.conf

Cheers

Re: Issue with Xampp and accessing folders with Browser

PostPosted: 15. July 2014 04:28
by J0E24
When i click the link you posted at the beginning it gives me a error page right now. Im not sure if im not making myself clear about what my issue is, maybe screenshots would help?

My bad if i dont get this stuff that much. But im still in the learning process, like stone age, still crawling to learn PHP before i get out of the army for college.