[TriLUG] PHP for Mandrake 9.1

Andrew DeFaria Andrew at DeFaria.com
Fri Jan 9 03:33:25 EST 2004


Tanner Lovelace wrote:

> Andrew DeFaria wrote: =
>
>> Hello. I hope you don't mine me emailing you directly (I've also 
>> cc'ed trilug at trilug.org but I don't read that mail list regularly) 
>> but I seen you post the following:
>>
>>     BTW, I'm currently running apache2 and mod_php on Mandrake 9.1 and
>>     didn't have any of the problems you're describing. What instructions
>>     where you using? With Mandrake, everything should just work if you
>>     install it using their rpms (using urpmi above).
>>
>> I have Mandrake 9.1 running Apache 2.0 and have not been able to get 
>> php working. I'd appreciate it if you could help me out.
>
> Sure, I'll give it a shot.

Your help is appreciated.

> Well, for one, on mandrake you shouldn't ever have to run rpm by 
> itself.  Just like on Debian people say to not use dpkg directly, use 
> apt-get instead, on Mandrake you should always use urpmi.  It will 
> take care of
> all the dependencies for you.

Well until I saw your post I had never even heard of urpmi! Sure wish 
all the distros would get their acts together and standardize on one 
common and known way of doing things!

>> I also looked at the urpmi at http://plf.zarb.org/~nanardon but it 
>> tells me to run:
>>
>> $ urpmi.addmedia main 
>> ftp://ftp.stealth.net/pub/mirrors/ftp.mandrake.com/Mandrake/9.1/i586/Mandrake/RPMS 
>> with ../base/hdlist.cz
>>
>> That doesn't look right! The relative path of ../base/hdlist.cz 
>> assumes I'm supposed to be in some particular directory. Which 
>> directory am I supposed to be in?
>
> You're assuming that's a path on your local system.  It's not.  It's a 
> path on the repository side.  It *IS* correct.  

The assumption came after the above command failed.

> If you follow the instructions given on the Easy URPMI site, it's 
> trivial to setup urpmi.  Do what it says and have faith that it's 
> correct.

I had faith until it failed! :-)

I was at work when I was doing this and had logged in remotely to my 
Mandrake machine at home. My home DSL has been spotty so perhaps that 
was the problem. I'm attempting to reproduce the error...

OK, here it is:

# urpmi.addmedia main 
ftp://ftp.stealth.net/pub/mirrors/ftp.mandrake.com/Mandrake/9.1/i586/Mandrake/RPMS 
with ../base/hdlist.cz
added medium main
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.update_source.cz]
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.Local RPMs.cz]
retrieving description file of "main"...
retrieving source hdlist (or synthesis) of "main"...
    
ftp://ftp.stealth.net/pub/mirrors/ftp.mandrake.com/Mandrake/9.1/i586/Mandrake/base/hdlist.cz
...retrieving failed: curl failed: exited with 7 or signal 0

retrieve of source hdlist (or synthesis) failed
no hdlist file found for medium "main"
examining synthesis file [/var/lib/urpmi/synthesis.hdlist.main.cz]
problem reading synthesis file of medium "main"
unable to update medium "main"

Since this didn't work I'm not sure I can get any further.

Trying another mirror (mirrors.usc.edu)... ah that one's working!

> Now, as to which rpm you should install.  This is what I have working 
> on my Mandrake 9.1 box:
>
> % rpm -qa | grep apache
> apache2-mod_suexec-2.0.44-2mdk
> apache2-mod_dav-2.0.47-1.6.91mdk
> apache2-mod_php-2.0.44_4.3.1-2mdk
> apache2-modules-2.0.47-1.6.91mdk
> apache-conf-2.0.44-11.1mdk
> apache2-common-2.0.47-1.6.91mdk
> apache-modules-1.3.27-8.1.91mdk
> apache2-2.0.47-1.6.91mdk
> apache2-mod_ssl-2.0.47-1.6.91mdk
> apache2-manual-2.0.47-1.6.91mdk

Here's my current list:

# rpm -qa | grep apache
apache-conf-2.0.44-2mdk
apache2-common-2.0.44-4mdk
apache2-modules-2.0.44-4mdk
apache2-2.0.44-4mdk

> Notice the rpm is "apache2-mod_php".  Just plain "mod_php" is the one 
> for apache 1.x.  Don't install that.  If you type this command (after 
> setting up urpmi), it should install apache2 and mod_php together. 
> (Note you should do this as root.  That's what the # prompt stands 
> for, so don't type that.)
>
> # urpmi apache2-mod_php

Since the above finally worked this is working. Hey I'm getting 
somewhere! Cool.

Alright so it installed and stop and started various services, etc. 
However now httpd fails to come up!

> That's it.  That will look up all the dependencies and install them.  
> You can then do
>
> # service httpd start

OK but this fails:

service httpd start
Starting httpd2: Syntax error on line 36 of /etc/httpd/conf/httpd2.conf:
Cannot load /etc/httpd/2.0/modules/mod_proxy.so into server: 
/etc/httpd/2.0/modules/mod_proxy.so: cannot open shared object file: No 
such file or directory
                                                                [FAILED]

So I commented out line 36 as I don't use a proxy, then:

service httpd start
Starting httpd2: Syntax error on line 39 of /etc/httpd/conf/httpd2.conf:
Cannot load /etc/httpd/2.0/modules/mod_proxy_http.so into server: 
/etc/httpd/2.0/modules/mod_proxy_http.so: cannot open shared object 
file: No such file or directory
                                                                [FAILED]

So I commented out line 39...

Whew it started!

Now the test... PHP... Works! Cool

Thanks a lot.

>
> And apache will be started.  Configuration files are in /etc/httpd.  
> If you still need help with configuration,
> e-mail the list, please.


-- 
I put contact lenses in my dog's eyes. They had little pictures of cats 
on them. Then I took one out and he ran around in circles.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Andrew.vcf
Type: text/x-vcard
Size: 320 bytes
Desc: not available
URL: <http://www.trilug.org/pipermail/trilug/attachments/20040109/0c0ca3d0/attachment.vcf>


More information about the TriLUG mailing list