Jump to content

apache and php


Guest BerndS
 Share

Recommended Posts

Guest BerndS

Hi,

 

I have MDK 9.1 installed, which did not come with the apache server. Thus, I installed apache 1.3.2.6 from somewhere else and it works fine. Now, I wanted to get php running. However, the versions of the php files on MDK 9.1 seem to require me to upgrade to apache2? -- I have spent hours trying to accomplish this task either getting rpm conflict messages or missing unavailable files. The latest was that I was almost done installing apache2, but was missing numerous perl modules (e.g. carp, DBM, FileHandle, Socket ...) which I cannot get a hold of from anywhere. I tried installing perl 5.8.3 in hopes these modules are included, but that did not work either.

 

There must be a practical way to get my version 9.1 running with both some version of apache and some version of PHP, isn't there?

 

Thanks for your answer.

 

Bernd

Link to comment
Share on other sites

Guest emetib

go here-

http://rpm.pbone.net/

 

and get the urpmi.setup package for 9.1.

# rpm -ivh urpmi.setup.....

 

# urpmi.setup

grab a couple of the mirrors for each, main, contribs, updates. once that is done then verify them. grab the mirrors first.

 

remove apache 1.3 and install apache 2.

 

# urpmi -y apache

this will list out all of the apache packages that mdk has.

 

# urpmi -y php

same ^

 

make sure that both are running on boot.

make sure that you define your vhosts, if multiple hosts are on your machine. you will have to adjust your /httpd2.conf file for the docroot.

 

start to have fun.

Link to comment
Share on other sites

Guest BerndS

Hello, thanks for your quick answer. Your precise instructions give me hope again.

 

However, when I tried to rpm the urpmi.setup, the requirement for perl-libwww-perl was indicated. Upon rpm of that, I get about the same error message that I got when trying to rpm apache2, yesterday:

 

rpm -i perl-libwww-perl-5.69-2mdk.noarch.rpm

error: failed dependencies:

perl(AnyDBM_File) is needed by perl-libwww-perl-5.69-2mdk

perl(Carp) is needed by perl-libwww-perl-5.69-2mdk

perl(Digest::MD5) is needed by perl-libwww-perl-5.69-2mdk

perl(Exporter) is needed by perl-libwww-perl-5.69-2mdk

perl(Fcntl) is needed by perl-libwww-perl-5.69-2mdk

perl(Getopt::Long) is needed by perl-libwww-perl-5.69-2mdk

perl(Getopt::Std) is needed by perl-libwww-perl-5.69-2mdk

perl(HTML::Entities) is needed by perl-libwww-perl-5.69-2mdk

perl(IO::Select) is needed by perl-libwww-perl-5.69-2mdk

perl(IO::Socket) is needed by perl-libwww-perl-5.69-2mdk

perl(MIME::Base64) is needed by perl-libwww-perl-5.69-2mdk

perl(Net::NNTP) is needed by perl-libwww-perl-5.69-2mdk

perl(Time::Local) is needed by perl-libwww-perl-5.69-2mdk

perl(URI) is needed by perl-libwww-perl-5.69-2mdk

perl(URI::Escape) is needed by perl-libwww-perl-5.69-2mdk

perl(URI::Heuristic) is needed by perl-libwww-perl-5.69-2mdk

perl(URI::URL) is needed by perl-libwww-perl-5.69-2mdk

perl(integer) is needed by perl-libwww-perl-5.69-2mdk

perl(strict) is needed by perl-libwww-perl-5.69-2mdk

perl(vars) is needed by perl-libwww-perl-5.69-2mdk

 

So, I am missing something essential from perl? Where do I get that without urmpi?

Link to comment
Share on other sites

Guest BerndS

Well, thanks folks, the installation worked!

 

Now, I think I have an apache configuration problem:

 

I am using Webmin and it tells me that apache 2.0.47 is installed and running.

 

Under "re-configure known modules", neither mod_php nor mod_php3 nor mod_php4 will configure (mod_perl neither). If I run e.g. urpmi -v mod_php, the output is that "everything is already installed".

 

Under "default server", there is an icon for php. When I click it, there are two blank fields titled "PHP Configuration Values" - anything to enter there? Also, below there is a blank field "PHP Configuration Flags" with a radio button choice after it "on" or "off". Anything to enter there?

 

The default server settings are: Address Any, Port Any, Server Name Automatic, Document Root /var/www/html. I put a "hello world" php script in that directory, but it showed nothing in the browser.

 

I can configure another virtual server with the following options:

Handle connections to address, Those not handled by another server, Any address, Specific address .., Add name virtual server address (if needed), Listen on address (if needed), Port Default Any, Document Root, Server Name Automatic, Add virtual server to file, Standard httpd.conf file, Selected file.., Copy directives from.

 

Any hint on how I can proceed from here? Thanks.

Link to comment
Share on other sites

Guest emetib

i'll try and help, but first- i don't use webmin, it's neat and powerfull from what i've seen, but i've just become accustomed to the command line.

 

q #1- do you get the default page when you go to your address?

 

if your getting the default page, then you will have to get rid of it to see the page that you want to see. this is what the page should be close to looking like. i didn't vim anything in it, so it might be a little different.

 

q #2- are you looking at running anyother domain names other than just yours? yourdomainname.org, new.yourdomainname.org, if this is what you would like to do, then you will have to adjust the vhosts file in /etc/.

 

one of the friendlyist commands that you will find on advx is-

httpd2 -S

httpd2 -t

these will check to make sure all of your syntaxes are correct.

 

ADVXctl

this will give you some options for your apache server checking.

 

 

on a different note. i would update the whole system since you now have urpmi.

as root-

urpmi.update -a

urpmi --auto-select

 

if you get a failed because of curl put a --wget on the end of things. if you don't have wget install it.

 

once this is all done, then i would play with the configs once more.

cheers.

Link to comment
Share on other sites

Guest BerndS

Well, doesn't look too bad, it seems.

 

Quest1: If I type in my own address, I do get the "Welcome to ... ADVX" page.

Quest2: For this box I only want to be able to run web-applications (for any other access from outside I want to install sshd). So, no other domains.

 

Here is the output of the two given hhpd2 commands:

[root@sl bernd]# httpd2 -S

[Thu Mar 11 09:48:00 2004] [warn] NameVirtualHost 192.16x.x.xx:0 has no VirtualHosts

VirtualHost configuration:

Syntax OK

[root@silent bernd]# httpd2 -t

[Thu Mar 11 09:48:29 2004] [warn] NameVirtualHost 192.16x.x.xx:0 has no VirtualHosts

Syntax OK

 

Does that reveal anything to you?

 

Concerning the upgrade: I am somewhat of a coward in this area because of bad previous experience. I will upgrade on a weekend that I may be able to re-install from scratch if needed. Or is urmpi upgrade really safe in terms of that it will not "mess up" the existing system to where I would not be able to boot (that's what happended previously with another distribution).

Link to comment
Share on other sites

Guest emetib

first for the sshd, you will have to add

sshd:ALL

to the /etc/hosts.allow

 

if this is a stand alone box, no gui, no apps besides being a server, then the urpmi will do just fine. you shouldn't have any troubles with it. if you haven't updated yet, then expect a whole lot of things to be d/led and installed/updated.

 

for just a the standard web apps, apache, mail, maybe a dbi, then you won't have to do anything to the vhosts, shouldnt' anyway.

 

now first, are your ports forwarded properly? that is, if you have more than one machine on this lan and they're being given their ips from the router in dhcp form, then you have to make sure that your forwarding is correct. since i've only played with my cisco, i might not be of much help. i'll do my best if you do need help in this area though.

 

second. put in your lan address in the nav bar of your browser and see if you can see your "hello world" page. if so and you can't see it from the address your isp has given you then your ports are off, and you have to fix them. don't put in your domainname, put in the ip address.

 

third, the results from the httpd2 commands will only show you that things are ok in that area, so your fine there.

 

something that i would put in the vhost, now that i think about it, is the domainname of the server. just take a look at the /etc/httpd/conf/vhosts/Vhosts.conf. work off of the named virtualhosts and you should be fine, just follow the example there.

Link to comment
Share on other sites

Guest BerndS

I have added to the hosts.allow.

 

Now, perhaps this is simpler than expected. Let me clarify the original result I aimed at. The box concerned is my PC that I work on here in the office, with X and all kinds of applications. It is part of a mini LAN with one laptop and one other box. All I use the LAN for is to make backups to the other PC and to do ssh and scp among the three. This works fine.

 

My problem is that I am not able to test little php and perl scripts which I write for use in our web sites prior to copying them onto the www-server (run by a provider), nor can I run web based programmes like phpMyAdmin or phpgroupware right here on my PC. Thus, my conclusion was that I need mod_php and mod_perl to run with e.g. an apache server here on this box. Maybe I was wrong?

 

If I put in the LAN address in the nav bar, I get a "not found" message on any php file I tried it with. Strange enough, if I use my browser to file - open - filename.php, I get a blank page on my hello.php script, but get the script contents displayed if I open e.g. www/html/phpgroupware/index.php.

 

The Vhosts.conf so far has no entries (except for the #comment lines). Am I correct in that for my purposes I only need to complete the IP-Based Virtual Host part? Should I make one entry each for root and my home/user directory or is the latter enough?

 

Hope, this makes sense.

Link to comment
Share on other sites

Guest emetib

ok, for the groupwares you will ahve to have apache going also.

 

do each of yoru computers on the lan know about each other through names? that is, can you just 'ssh bern@peter' and it will go there? if so then i would just use the named vhosts. well i would use it anyhow unless you are having two different nics doing two different things. that is, is one for lan and the other for wan? if so then you just have to put the ip address of the lan nic in teh named vhosts and go from there.

 

for the testing, yes you will have to have both, just like you thought.

 

for the index.php that you get are you on a different box when this happens? if not then it's just your browser doing things for you. try it out from a different box and type in the address of the one your trying to run things off of.

 

you will also have to be running the scripts from a specific /dir. /var/www/html is the one that is choosen for you if you havent' changed the doc root dir around in httpd2.conf.

 

that could be your problems right there. your trying to run things from the wrong directory.

Link to comment
Share on other sites

Guest BerndS

:D

Well, you gave me the solution right there when talking about "names". Within my LAN, I can use machine IP numbers as well as machine names for ssh and scp. This I had tried in the browser before and it didn't work. However, what I seemed to have messed up is that, in this case, I should indicate the LAN name as well. So, I typed into the nav bar: http//:boxname.lannetwork.name/wwwdocrootdir/hello.php ... and there it was!

 

Now, I would just like to know, why??? But I will read up on it more in my "running Linux" book.

 

Thanks a million for bearing with me and your help.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...