LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Web Server....Newb (https://www.linuxquestions.org/questions/linux-newbie-8/linux-web-server-newb-320165/)

TFredrickson80 05-04-2005 04:38 PM

Linux Web Server....Newb
 
Hi. I've recently installed Fedora Core 3 on one of my secondary computers. It works so far and i can access my website from the outside world. But I have a Form set up on one page action is sendform.php method is post (sends to my yahoo address) anyway i keep getting the error that the PHP file couldnt be found. Is there a special folder these need to go into? And if there is and it happens to work is there anything else i need to set up as far as my server goes?

msound 05-04-2005 04:41 PM

double check your php/html for typos. remember its case sensitive. theres not special folder, php files can sit in the same directories as the rest of your web pages.

TFredrickson80 05-04-2005 05:32 PM

Ok double checked. It's now finding the page although its displayed blank when i have echo's in it. Could it be the version of Apache im running? or something else maybe I try not to over look anything if at all possable.

msound 05-04-2005 05:40 PM

to test and see if php is working correctly create a page called test.php, in it write:
Code:

<?php

phpinfo();

?>

browse to that page in your web browser and if it opens successfully and displays the specs of your php configuration then your apache/php are configured correctly. in that case, youll have to go back and double check your code because thats where your problem is.

if the test.php cannot be displayed then you have an issue with your php installation.

TFredrickson80 05-04-2005 05:44 PM

Heh i thought about the phpinfo() and was like duh... so i ran it and it keeps wanting to open it with... open office writer.org after which it just shows me the code. I access the site from my XP machine and type in the URL for the test page and it comes up blank... When i installed Linux as a server i installed all the server software was i supose to configure something?

msound 05-04-2005 05:48 PM

the only configuration ive had to do after the default installation was enable register_globals

find your php.ini file (probably /etc/php.ini)
open it with your text editor and find the line register_globals = Off
set it to register_globals = On
save the file and restart the apache service

service httpd restart maybe? i dont know how it works in fedora, you could just find the script in /etc/init.d and restart it that way.

after you restart apache with register_globals on try the test.php page again from your xp machine through your web browser.

TFredrickson80 05-04-2005 06:05 PM

Still a blank page. Guess i could install a different Version of Apache and possably PHP on it... Would rather not do that though..

msound 05-04-2005 06:12 PM

ive never used fedora but on my redhat 9 and suse default web server installs php has always worked just fine. i have no clue why it wouldnt work for you but maybe you could just install a new php rpm and give it another try. that should be a pretty painless installation. Here's file for Fedora core 3: ftp://rpmfind.net/linux/fedora/core/...3.9-3.i386.rpm
or you could just reinstall the package off of your installation disks. (if you used installation cds)

TFredrickson80 05-04-2005 06:51 PM

In the process of installing apache 2.0.54. I so hope i dont screw this up completely and have to reinstall linux

TFredrickson80 05-04-2005 07:16 PM

As i feared! I have to reinstall... Ah well... Dumping the Fedora Core and going with Linux 8 Hope i have better luck

msound 05-04-2005 07:34 PM

that doesnt make sense. just installing the apache rpm should completely screw up your fedora installation... if youre referring to redhat 8 then the defualt web server installation should work. seeing as how ive used that one myself. however redhat 8 is mad old like whoa so make sure youre sitting behind a firewall and get whatever updates are available. good luck.

TFredrickson80 05-04-2005 08:02 PM

Im sure installing the RPM wouldnt have messed it up but i installed apache 2.0.54 off the apache site and followed the instructions in my PHP 5 book which didnt work out to well... so i had two httpd configuration files... i basicly had two of everything with limited drive space. My Instructor said he ran into the same problem with his Fedora core 3 Httpd not likeing PHP so i figured Linux 8 is tryed and true. May as well...

Firewall... My router has one built in. Any other suggestions you can make for that? Antivirus software i can get for it? How to install it...

btmiller 05-04-2005 09:38 PM

There's no such thing as Linux 8. If you mean Red Hat 8 it's so old that you really shouldn't be using it for a new sever install. Even Fedora legacy isn't supporting it any more, which will make getting necessary security updates tricky.

You should be able to make Apache and PHP work easily in fedora. Did you verify you have the PHP RPMs installed? Can you check your httpd.conf to make sure that the PHP module is actually being loaded? You might want to read over the install directions at www.php.net as they will give you some idea of what to look for.


All times are GMT -5. The time now is 04:49 PM.