SUSE / openSUSEThis 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.
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.
Distribution: Windows XP. I gave up with Linux & I left LQ.
Posts: 502
Rep:
PhP not working correctly in Suse 9.3
I have Suse 9.3, Apache2 and php4 installed. I also have a php form generator. Now I want to create and test these php forms on suse 9.3 before I upload them to a website I am working on. But I seem to be doing something wrong becuase I can't view any php files in Suse 9.3. I tried opening them with firefox and konqueror and all I get is a window that pops up asking me what do do with the file.
Also I am using windowmaker, NOT kde or gnome.
If there is a link that has this question already answered that would be great. Please point me to it. I also am a bit pressed for time and I need to get this working ASAP, if not I will be installing another distro that I am sure it will work in. But again I really don't have time for that either. Any help is greatly appreciated.
Distribution: Windows XP. I gave up with Linux & I left LQ.
Posts: 502
Original Poster
Rep:
Wow. THe PhP list is very long and I can't cut and paste it, lol. I have things like modphp4core files, php4database, php4devel, php4-servelet, php4db, php4session and a lot more. Is there anything I should look for in particular or would you like me to type the whole list?
phpMyAdmin is for MySQL-database administration over the web ...
phprecode - im not even sure what it does, but I guess its some sort of character encoding thingy???
Distribution: Windows XP. I gave up with Linux & I left LQ.
Posts: 502
Original Poster
Rep:
Well. What I think I might have to do is re-install Suse. I tried do a minimal install this time and add only what I wanted/needed. But Suse doesn't seem to like that to much. This has not been the only problem I have had. Small problems but they are time consuming. Thanks.
Well ... before you re-install I would do something else. It seems to me that you do not have things configured to "work with each other".
Try this:
1. Create an html file (say you call it phptest.html).
2 Inside this file enter a simple paragraph like <p>just a test</p>
3. Following that enter a php statement like <?php echo"<p>printing from PHP</p>" ?>
If this works it means that apache was configured to parse PHP from within html files. If it does not try this:
1. Create a php file (say you call it phptest.php)
2. Inside this file enter <?php echo"<p>printing from PHP</p>" ?>
3. Try opening this file with your browser.
If this works you have apache to parse only .php files
If it does not work you need to configure apache server to parse these type of files.
Distribution: Windows XP. I gave up with Linux & I left LQ.
Posts: 502
Original Poster
Rep:
Quote:
Originally posted by ralvez Well ... before you re-install I would do something else. It seems to me that you do not have things configured to "work with each other".
Try this:
1. Create an html file (say you call it phptest.html).
2 Inside this file enter a simple paragraph like <p>just a test</p>
3. Following that enter a php statement like <?php echo"<p>printing from PHP</p>" ?>
If this works it means that apache was configured to parse PHP from within html files. If it does not try this:
1. Create a php file (say you call it phptest.php)
2. Inside this file enter <?php echo"<p>printing from PHP</p>" ?>
3. Try opening this file with your browser.
If this works you have apache to parse only .php files
If it does not work you need to configure apache server to parse these type of files.
Hope this helps.
Rick
LOL, I wish I read this before I did the re-install. Oh well. I tried it and it didn't work. Now I know where to start. Thanks.
Yes, you start by editing httpd.conf.
In Slackware it is located in /etc/apache/httpd.conf but it may be in a different location in your distro.
You have to add the following:
Code:
DirectoryIndex index.html index.php
# The following lines allow the server to parse php files
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# ==> mod_php configuration settings <==
Include /etc/apache/mod_php.conf
The last statement is only if it is not there. In my experience it is already there, but just in case.
Hope this helps.
Rick
p.s.
If you enable the use of the home directories ( look for :
# UserDir: The name of the directory which is appended onto a user's home
<Directory /home/*/public_html> ) you can then test your development files by creating a "public_html" directory inside your home directoy. Then you put your files there and access them by entering http://localhost/~yourhomedirectory/index.html.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.