[oclug]RH 7.3 - php, postgresql & apache
Bob Lockie
bjlockie at lockie.ca
Mon Nov 11 11:47:40 EST 2002
Howard Krakower wrote:
>At 11:02 PM 11/10/02 -0500, you wrote:
>
>
>>>PHP is working - pages done as <page.php> do parse and display correctly,
>>>
>>>
>but
>
>
>>>pages that are done as <page.html> with php tags do not parse the php
>>>
>>>
>script.
>
>
>>>Is this something that has been disabled somewhere? BTW, I'm following the
>>>"Sams Teach Yourself PHP4" book, and they make a point of saying that PHP
>>>scripts can be included in HTML.
>>>
>>>
>>>
>>You'll have to modify your web server configuration to parse all HTML files.
>>
>>
>
>Does this present any security risk? I ask since I noticed that my
>production server behaves the same way. PHP files are parsed OK. I'm not
>sure I know where to make this change - is it in httpd.conf?
>
It's not a major security risk, it is about as dangerous as having a web
server at all (ie. not an issue).
Yes, modify httpd.conf.
Mine worked when I installed PHP.
I think it is the AddHandler directive, look at the online documentation.
>>>A second issue is with postresql -- it is installed, but running
>>></etc/init.d/postgresql start> fails. GnoRPM shows the required packages
>>>(postresql, postresql server, postgresql dev) to be installed.
>>>
>>>
>>>
>>What error do you get?
>>
>>
>
>When I run postresql start, the message is just [failed] -- no other
>details. The when I query the rpms (using GnoRPM) the message is that all
>is installed OK. All up2dates have been done as well.
>
Run 'dmesg | more' and what does it say about postgresql?
>>>A third question (hypothetical) - can PHP scripts pertaining to a postgresql
>>>database work on a server that has mysql instead of postgresql?
>>>
>>>
>>>
>>There are third party libraries that allow easy changing the database
>>but the PHP commands are
>>specific.
>>
>>
>>
>
>The reason for the question is that I want to use the notebook to learn and
>develop some PHP scripts -- at one time I had created a neat application in
>dBase IV for pedigrees, and I'd like to try it with PHP. Anyhow, the
>notebook has postresql and the production server has mysql. If postresql is
>going to be a problem, I suppose I can install mysql.
>
>As an aside, on the production unit I have Webmin 0.78 installed. I
>installed the new Webmin 1. on the notebook, and it is really quite nice.
>
>Howard.
>
>
Look at http://www.php.net for references on database abstraction layers.
----------------------------------------
More information about the OCLUG
mailing list