ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
At least I think that is what it is doing. Well first of all I'm very new to linux [only been using it for a week] and I have my website up and running the way I want it [this question is more out of curiosity]. But durring the building phase I was running into problems with PHP. For example; I tried to have a drop down menu so users could select different styles, but when you picked one, all you got was a blank page. The same thing happened when I tried a Guestbook/Shoutbox, when you hit 'Submit' all you got was a blank page. And in all the cases where this happened the address bar had the path the the 'whatever.php' page. So my question is.........what could have caused this to happen? Was it a 'permission' thing? Or maybe my PHP wasn't configured right? Anyway, this has been driving me nuts.
For the 'www' folder and the sub-folders and files
Owner = Me
Group = Apache
Is that OK, or should it have a differnet owner and group?
I really Like Linux and will never use Windows again [it crashed and I lost everything] but my biggest problem with linux is the 'permissions' concept. In Windows I just put the script in my 'httpd' folder opened up my browser and it just worked, not with Linux.
I really hope this is the Right Section to post this, I wasn't real sure, as it pertains to Programming and Linux
Originally posted by Herbalist At least I think that is what it is doing. Well first of all I'm very new to linux [only been using it for a week] and I have my website up and running the way I want it [this question is more out of curiosity]. But durring the building phase I was running into problems with PHP. For example; I tried to have a drop down menu so users could select different styles, but when you picked one, all you got was a blank page. The same thing happened when I tried a Guestbook/Shoutbox, when you hit 'Submit' all you got was a blank page. And in all the cases where this happened the address bar had the path the the 'whatever.php' page. So my question is.........what could have caused this to happen? Was it a 'permission' thing? Or maybe my PHP wasn't configured right? Anyway, this has been driving me nuts.
No I don't think this is permissions. A blank screen in a PHP site can mean quite a lot of things. In the PHP sites we develop at Polar Design, a blank page usually means that a "select" statement has fallen through due to a subfunction call being misspelled or typed incorrectly. I doubt if this is your problem - you say it "sometimes" does not execute? That is extremely strange - it it supposed to either work or not - consistently. Maybe "post" forms is disabled in your PHP settings? I don't know if that is possible, but since you can either HTTP "post" form data or HTTP "get", I am guessing that either of these functions / function sets is disabled in your PHP installation (if that's even possible) and now it seems to you as if some forms work and others do not - since some forms -might- use get to store data and others use post to store data.
Quote:
For the 'www' folder and the sub-folders and files
Owner = Me
Group = Apache
Is that OK, or should it have a differnet owner and group?
The permissions you set should normally have no effect on how the script executes. If you can browse to it and get a response from it, your permissions are in order for browsing. If your permission were wrong, you'd be unable to navigate to the page. In that sense permissions has no effect on the type of problem you describe.
Quote:
I really Like Linux and will never use Windows again [it crashed and I lost everything] but my biggest problem with linux is the 'permissions' concept. In Windows I just put the script in my 'httpd' folder opened up my browser and it just worked, not with Linux.
Well, that's one of the main strengths of Linux and Unix-like operating systems - the permissions system. If it just bothers you or gets in your way, try
chmod -R a+rw *
in all directories that you wat to behave like your Windows "httpd" folder.. This will make the directory contents and all subdirectories and files of that directory world-writable, which means ANYBODY can read AND write (and also delete) files in that directory and all its subdirectories. Functionally, this is then a "Windows" directory with no permissions. For the Apache htdocs directory, you more likely want
(note I am working from memory, don't trust me on these! Test them first somewhere safe)
These should mean
1. Make nobody besides root able to read or write ANY file in htdocs.
2. Make the user (i. e. the guy who created a file) able to create/write/delete/read files created by him.
3. Make everybody else ((o)thers and (g)roup)) only able to read files, not write, create, or delete any.
Quote:
I really hope this is the Right Section to post this, I wasn't real sure, as it pertains to Programming and Linux
This is a VERY useful site to bookmark (if you haven't already got it). http://www.php.net/manual/en/
Basically the full PHP manual (searchable) with examples for every cmd
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.