Parsing PHP Scripts using Apache in SuSe 9.3 (without a dedicated server)
Suse/NovellThis Forum is for the discussion of Suse Linux.
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.
Parsing PHP Scripts using Apache in SuSe 9.3 (without a dedicated server)
\\I have been using SuSe Linux for some time now. I am happy with Linux, except for some of its package system management, non parallel booting, general lagging. All of which are things I am willing to work with since I have a strong belief in Open Source. I think SuSe is one of the few distributions that can appeal and succeed.\\
That being said I have set up my graphics card, network card, keyboard and other hassles one runs into when running linux on laptops. But for some reason I have been unable to get Apache to parse my PHP scripts so I can view there HTML output. I have ran a lot of searches on configuring LAMP for SuSe 9.3 But nothing seems to work. (I'll admit that I am a novice searcher)
I have configured my sysconfig/apache2.conf to parse PHP5 files, activated apache2 for runtime level services, configured it for booting up, gone through all of the obvious YaST protocols. Nothing seems to work. Maybe its because I switched from PHP4 (default install) to PHP5?
I have a feeling that this might have something to do with the fact that that I Don't know much about configuring Apache manually. I am trying to go straight into PHP5 programming. I create my hello world script and save it as hello.php and navigate with firefox to its directory, but it asks me which application to open it with! Ahh! Does this have something to do with mime file types? Where do I find that? I just want to test my PHP installation to see if Apache is correctly parsing my scripts!
i see 2 considerable options:
1. throw away php5 and start with php4 and the usual suse installation.
2. get and build a new apache from source, configure with php5
The second step is very well documented and is only necessary if you need php5. The first is much easier and faster.
To edit the suse config files is a job for those who know what they are doing or those who have plenty of time i. e. some weeks...
i see 2 considerable options:
1. throw away php5 and start with php4 and the usual suse installation.
2. get and build a new apache from source, configure with php5
The second step is very well documented and is only necessary if you need php5. The first is much easier and faster.
To edit the suse config files is a job for those who know what they are doing or those who have plenty of time i. e. some weeks...
I've started learning php4 programming myself so I understand what your going through, it's best to use php4, i've heard of a lot of poeple having issues trying to get php5 to run right. I always best to download the tar files instead of using rpm's and compile them from source, a lot of distros seem to place files in different places from the standard installs.
Yes is does matter how and which order you configure both apache and php, here's the order and the configuration for both apache and php, step 15 and 16 you can leave out and will still work:
Apache Module
PHP can be compiled in a number of different ways as an Apache module. First we show the quick instructions. Following this is a list of various examples with explanations, to provide an overview of how to accomplish certain things.
You can select arguments to add to the configure on line 8 below from the Complete list of configure options.
Example 2-1. Quick Installation Instructions (Apache Module Version)
Thanks! I appreciate some real help! Only problem is I have a book on learning PHP5 not PHP4. How different are the two? Can I pretty much use most of my book? Or will I have to buy a new one if I want PHP4?
Unfortunately i'm only new to it too, about a week or so I could say what the differences are between the two. Step 8 and 12 may be the only thing you have to change to compile php5, might need to check out some php5 sites, they will probably have an answer some where about the configuration.
I'd say you could pretty well use most of the book you already have, the php5 version will probably only be different by the security updates and some new features, but the core of the language will be the same, but don't quote me on that.
u can use it, no doubt. most of syntax and functions are the same. there are differences in object oriented approach and possibilities. php4 is still in use on most production servers anyway. ISPs take their time to make changes and accept new technologies. So i guess it will take more than a year from now until php5 pushes thru...
I don't want to use a deprecated version of Apache! So I downloaded the source for Apache2. I then downloaded the source for PHP5. I compiled them from source (in the order described), but the options for ./configure didn't work (even with changing to the obvious new syntax). So, I had to do a plain ./configure without any options. I think the options are necessary for getting Apache2 to parse because it didn't work at all. I am going to look for documentation on compiling the newer sources together. I also tried uninstalling all apache, php and mySQL packages. Then I tried installing mySQL, PHP4 and then Apache2 (using YaST and SuSe's sources). I used the necessary Yast protocols to have the Apache server run and again, firefox asks me which application to open the page with, no HTML output!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.