Page 1 of 2

Can't see my php/html files in browser

PostPosted: 20. October 2007 13:57
by Zed420
Hi All

I have been using XAMPP on windows for a while which is fairly straight forward but on Linux its giving me bit of grief, installation was fine I've tested localhost I can see "Welcome to XAMPP for Linux 1.6.4 ! " etc. The problem is when I'm creating my own php or html scipts and placing them in htdocs folder I can Not see them the message shows this file is Not on serever. Can someone please help !!!

Thanks

Zed420

Re: Can't see my php/html files

PostPosted: 21. October 2007 17:32
by wakish
Zed420 wrote:Hi All

I have been using XAMPP on windows for a while which is fairly straight forward but on Linux its giving me bit of grief, installation was fine I've tested localhost I can see "Welcome to XAMPP for Linux 1.6.4 ! " etc. The problem is when I'm creating my own php or html scipts and placing them in htdocs folder I can Not see them the message shows this file is Not on serever. Can someone please help !!!

Thanks

Zed420


Assuming everything was installed to this path on your distro: "/opt/lampp" and you have a small background in using linux:
Your Html files is here: "/opt/lampp/htdocs"
But due to permission issues you will not be granted write access unless you are logged as root.
If you want to still have write/read access to htdocs as a normal user, just go in a Terminal (bash shell) and SU (that is, switching to root).. then go to your "/opt/lampp/htdocs" folder and "CHMOD 777"
You will then have write access and you can create another folder, for example "forum" and install your scripts there..

This should work, feel free to ask if you any more doubts.

- Wakish -

PostPosted: 21. October 2007 22:14
by Zed420
Hi

Thanks for replying I've set the htdocs folder's permissions to 777 as you suggested but It still doesn't work. Like I said the index page displays fine. Any more suggestions

Zed420

PostPosted: 23. October 2007 12:37
by wakish
Ok.. Zed can you once again decribed what exactly the problem is? I will try to help out..
You mean you cannot see your file in your folder or you mean the file is not displayed in your browser?

PostPosted: 23. October 2007 20:53
by Zed420
wakish wrote:Ok.. Zed can you once again decribed what exactly the problem is? I will try to help out..
You mean you cannot see your file in your folder or you mean the file is not displayed in your browser?



Thanks for replying Wakish, the files are in the htdocs folder but not displaying in the browser. This is the error it displays;

Not Found

The requested URL /quiz.html was not found on this server.
Apache/2.2.6 (Unix) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e PHP/5.2.4 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 Server at localhost Port 80

quiz.html is my own file that I have placed in htdocs folder. Xampp index.html (Welcome etc.)file shows in browser perfectly fine. I have given permission to htdocs folder as you suggested it didn't make any difference.

Thanks once again
Zed420

PostPosted: 27. October 2007 19:45
by Zed420
Zed420 wrote:
wakish wrote:Ok.. Zed can you once again decribed what exactly the problem is? I will try to help out..
You mean you cannot see your file in your folder or you mean the file is not displayed in your browser?



Thanks for replying Wakish, the files are in the htdocs folder but not displaying in the browser. This is the error it displays;

Not Found

The requested URL /quiz.html was not found on this server.
Apache/2.2.6 (Unix) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8e PHP/5.2.4 mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 Perl/v5.8.7 Server at localhost Port 80

quiz.html is my own file that I have placed in htdocs folder. Xampp index.html (Welcome etc.)file shows in browser perfectly fine. I have given permission to htdocs folder as you suggested it didn't make any difference.

Thanks once again
Zed420



Does anyone have any idea to my problem, It's been whole week I've been banging my head on this pc still not getting anywhere. Please...

PostPosted: 31. October 2007 14:01
by wakish
Zed sorry, I completetly forgot to come back here..
About your problem, well this is very strange..
With http://localhost/quiz.html you get the error?

Try creating a folder, name it as "test".. put your quiz.html in it and now try to access like this: http://localhost/test/quiz.html

Do you still get a problem?

PostPosted: 31. October 2007 16:43
by Zed420
Wakish

Thanks for getting back to me, I've tried this already it doesn't work. I've tried to make some amendments to httpd.conf file in all sort of ways which ever smiler post I saw it hasn't made any difference. I'm well lost..... :(

PostPosted: 02. November 2007 02:25
by ray429
I have the same problem too...........I have placed all my php files in a folder called myminer and then using the chmod go_rwx *.* command to set the permission of the folder and the file inside but a 404 error still comes out when it is accessed from the browser. However, all the php and even js scripts from the package are able to be accessed in the browser.

So please help me to find a way through this...........thanks very much

PostPosted: 02. November 2007 05:11
by Zed420
Hi

Which version of Linux are you using? I'm with Fedora 7, cos I'm new to Linux I wasn't aware that Apachy and MySQL are already in its system they just need to be activated and configure so I did and all is OK now. I ended up uninstalling Xampp. However I did a lot of tweaking with Xampp's httpd.config file nothing really worked for me you can have go see it works for you.

I added
AddType text/html php
and AddHandler php5-script php
to the httpd.conf

See if it works. Sorry I wasn't much help!!

Zed420

PostPosted: 04. November 2007 08:25
by ray429
Thanks for ur advice Zed but I have solved the problem already.

The problem is simply due to I didn't put my files inside /opt/lampp/htdocs. I have placed the files inside the lampp folder where I first download the installation software and this is why it didn't work.

I am using Ubuntu in uni but at home I use windows. There are some differences in the two OS for running xampp so I just got mixed up with them.

PostPosted: 09. November 2007 14:00
by wakish
Zed420 wrote:[...] I ended up uninstalling Xampp. However I did a lot of tweaking with Xampp's httpd.config file nothing really worked for me [..]
Zed420


Zed I now believe that Xampp is down to our expectation.
It has very very poor support and it's system does not work for everyone..

It's better to manually install Apache/Php/MySql packages on linux.. might be a bit tedious to configure each of them, but I think IMHO that this is the BEST solution in the long run..

Keep going Zed, might see you somewhere somehow on the net ;)
Cheers!

PostPosted: 09. November 2007 14:32
by Scory
wakish wrote:It's better to manually install Apache/Php/MySql packages on linux.. might be a bit tedious to configure each of them, but I think IMHO that this is the BEST solution in the long run..


Youre wrong - Xampp is simply a collection of tools (like Apache, MySQL etc.) including a VERY SIMPLE installation routine.

All other problems in this thread were due to lack of linux knowledge. Same problem will appear in what you call "manual installation" of the same tools. But the manual installation is by far(!) more difficult than the automated installation by Xampp.

There is no mystery about Xampp.

Regards
Scory

PostPosted: 09. November 2007 20:02
by wakish
Scory wrote:
wakish wrote:It's better to manually install Apache/Php/MySql packages on linux.. might be a bit tedious to configure each of them, but I think IMHO that this is the BEST solution in the long run..


Youre wrong - Xampp is simply a collection of tools (like Apache, MySQL etc.) including a VERY SIMPLE installation routine.

All other problems in this thread were due to lack of linux knowledge. Same problem will appear in what you call "manual installation" of the same tools. But the manual installation is by far(!) more difficult than the automated installation by Xampp.

There is no mystery about Xampp.

Regards
Scory


What about my previous thread them? Was that a "lack of linux knowledge too? NO!
The pure fact is that Xamp still lacks good support and is not 100% running!
Manual installation difficult? LMAO, unless if you don't have that knowledge of course!

Anyway, I still maintain all I said!

PostPosted: 10. November 2007 23:20
by Scory
wakish wrote:What about my previous thread them? Was that a "lack of linux knowledge too? NO!


Which previous thread?

wakish wrote:The pure fact is that Xamp still lacks good support and is not 100% running!
Manual installation difficult? LMAO, unless if you don't have that knowledge of course!

Anyway, I still maintain all I said!


Youre still wrong - Xampp is no "tool" and there is no need for "support". Xampp means a collection (X = LinuX, A = Apache, M = MySQL, P = PHP, P = Pearl, all together XAMPP), nothing else. If you need support, ask any LinuX Team, Apache Team, MySQL Team, PHP Team and so on.

Xampp is NOT an application. Its only a collection of precompiled tools including a superb(!) and easy installation process. Nothing more.

Regards
Scory