Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am new to this and using OpenSUSE 10.2. I originally posted in the programming forum but realized that this is probably such a newbie error that it belonged here, so here it goes :-):
I had the SUSE install program go ahead and install MySQL and PHP5 as wellnwhile I set up the operating system. When I run the "PHP Test" file that comes with it everything works great (even if I change the extension from .php5 to .php). However, when I tried my own test:
echo "If this works, we <i>really</i> did it!";
and saved this as "phptest.php" I received the following error:
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/srv/www/htdocs/phptest.php' (include_path='.:/usr/share/php5:/usr/share/php5/PEAR') in Unknown on line 0
I looked at the aforementioned directories and they appear to all have the "755" permissions. I also tried renaming the file to .php5 and it worked (??). But f I put HTML (i.e. <TITLE>PHPTest</TITLE> with appropriate added tags, it gives me the same error again.
I am running Apache 2, if that helps. My guess is there is some configuration I need to change somewhere. Anyone have any ideas?
I was able to get this answered in another thread:
If using the extension .php5 works but .php doesn't then I suspect that it is an apache error. You will need to modify the httpd.conf script (or a configuration file called by this script -- sorry I don't know how it is set up in SUSE) The lines you want to look for are as follows:
# Load php - you should have this since .php5 works
LoadModule php5_module modules/libphp5.so
# Cause the PHP interpreter to handle files with a .php extension.
AddHandler php5-script .php
AddType text/html .php
# Add index.php to the list of files that will be served as default
You need to check the permissions of every file created within.
If you see the permissions on '/srv/www/htdocs/phptest.php' it will be 700. For every new file you create in /srv/www/htdocs dir, it will be 700 (suppose you have permissions to write to that dir).
Changing every file permissions to 705 worked for me.