Where should I put my practice PHP files?

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Where should I put my practice PHP files?

Postby rusloc » 21. January 2008 04:42

I installed XAMPP to facilitate my learning of PHP.
I guess I must save my php files to a user directory in http://localhost/, but don't know how to do it. What should I do to create a folder which will be visible from a browser?

Detailed instructions will be appreciated. If this is FAQ - point me to an answer please. TIA
rusloc
 
Posts: 5
Joined: 21. January 2008 03:44

Postby skuipers » 21. January 2008 07:59

All user written html and php files should go into /opt/lampp/htdocs. So create a new folder, f.i. /opt/lampp/htdocs/php and put all your learning files in this folder and subfolders.

You should now be able to access your php files in the browser: f.i. http://your_url/php/practise.php

(Note that php must be enabled in httpd.conf in order to run php files. It probably already is, but you can check this on http://your_url/xampp/status.php)
skuipers
 
Posts: 99
Joined: 21. January 2005 16:27
Location: The Netherlands

Postby rusloc » 21. January 2008 22:06

skuipers wrote:create a new folder, f.i. /opt/lampp/htdocs/php and put all your learning files in this folder and subfolders.

You should now be able to access your php files in the browser: f.i. http://your_url/php/practise.php
Thanks for your help.
I did as you suggested, but I cannot save a test file to that folder.
Image

What should I do?
rusloc
 
Posts: 5
Joined: 21. January 2008 03:44

Postby Scory » 21. January 2008 22:15

>What should I do?

Simply follow the error message:

"Check that you have write access to this file".
Scory
 

Postby rusloc » 21. January 2008 22:26

Scory wrote:>What should I do?

Simply follow the error message:

"Check that you have write access to this file".
I feel that I need to change permissions not only to the folder that I created, but to the parent as well... but I don't remember how / where to do it...
Folks, I forgot to mention, that I am VERY new to Linux, and I am very old (61 years, poor memory as you may guess).

I'll appreciate it if you tell me HOW I could check it? I just started learning the terminal commands, and even finding things on my computer is a challenge.

Let's say, I am in KDE (openSUSE), where should I begin?
TIA
rusloc
 
Posts: 5
Joined: 21. January 2008 03:44

Postby rusloc » 21. January 2008 23:56

Scory wrote:"Check that you have write access to this file".
Why don't I have write access to it? I myself created it and try to save it. Puzzling.

I just had a thought: maybe I should have installed XAMPP not as "root", but as a normal user?
rusloc
 
Posts: 5
Joined: 21. January 2008 03:44

Postby rusloc » 23. January 2008 22:43

The answer was pretty simple, I was helped in another forum:
From the CLI as root:

chown -R rusloc:users /opt/lampp/htdocs/testfolder

Assuming your login is rusloc

It worked!
rusloc
 
Posts: 5
Joined: 21. January 2008 03:44


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 6 guests