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.
Looks from the second error like you're trying to include one PHP file into the other (using include or require). Is that the case? If so, does the UID of the file you're including from match the UID of the file you're including? Safe mode makes this a requirement in PHP. If you're not doing inclusion, check the permissions of the PHP file to make sure your apache user can read it. Otherwise check the Apache error_log and see if any more useful info got output there -- it's known to happen on occasion.
UID = user ID, your numeric user ID. Anyhow, given the PHP script you posted, that's probably not your problem here. Let's see ... this is a weird error. Did you restart Apache after you had modified its configuration file? When all else fails sometimes I restart the server anyway just to be safe . Also check the permissions on the PHP module itself and make sure that they're the same as all the other Apache modules. Maybe try another PHP script like:
in case there's something odd with getting the environment variables in phpinfo ... but this really is a strange error. It sounds like Apache is handing the processing over to PHP (if it was unable to do so, you'd probably get some sort of 500 internal server error from Apache proper) but it's futzing out. Since it reports a problem with /usr/local/lib/php, maybe trying seeinf if that directory exists and has proper permissions.
I've made the folder writeable and executable for all users and groups but I'm still getting the error :/ I'm starting to wonder if it's the text editors but I don't see how that'd be....
Here's a story from yesterday which is interesting:
I decided to move my files for my personal site from one place to another and it went flawlessly (using a third-party server). Then when I created a new file in linux, (the others were made in windows), that file gives that same error that my own file server uses. So I'm going to test one of the files from my other site to see if it runs on the linux server, if so, I can assume it's the text editor, right? Or is it something else still ><
Hate to post twice in a row, but the above experiment turned out the way I expected. The files made in windows worked. So localhost/index.php doesn't work, but localhost/test/index.php works fine. .... I would REALLY hate to have to do all this in windows T_T
Another interesting note:
dos2unix on index.php (the one that worked) made it stop working. It now produces the above error....
Do all the editing in windows, and use linux for hosting since gedit adds chars at the beginning of the file that makes php not wanna work with it (or at least it is so with my fedora build o_O)...OR...use OpenOffice and save as .txt and then open in gedit and delete the first char (it will be invisible, but it's there). And voila, it works.
Hopefully this is resolved with this, and maybe if someone else can't get passed this error this will help @_@...but anyway, this is what works for me
Thanks to everyone who looked at this and made an effort to help out (even if you didn't reply that you were trying to figure it out). ^_^
I guess you didn't read all the posts in this thread before replying (this has been fixed)@_@ But just in case you did read them all, what would I be looking for that would cause/prevent this error w/o having to use the method I found.