View Single Post
  #1   (View Single Post)  
Old 3rd June 2013
yce44 yce44 is offline
New User
 
Join Date: Jun 2013
Posts: 2
Default openbsd 5.3 - php not working

Hello,

I can't make php works on an openbsd5.3 box. The php files are displayed as plain text files, or even worst, I'm asked if I want to download them, it seems that the server not parse at all the php code.
After installing the OS, I followed a tutorial for installing the MySQL and PHP support for it, installing the latest packages available (pkg_add). I can't post the link to it since this is my first post here .
Everything installed with no problems, I did created the suggested soft links.
I started Apache server and works. When I wanted to test php with the classic test file: <?php phpinfo(); ?> I get the file content displayed as plaint text file.

In httpd.conf I did the following changes:
- uncomment:
#AddType application/x-httpd-php .php
- add index.php to DirectoryIndex
DirectoryIndex index.html index.php

I copied the development php-5.3.ini file to /var/www/conf/php.ini

Running in term
Code:
php -v
doesn't work. I found the problem to be from the name of php binary which is /usr/local/bin/php-5.3. I created a soft link to php-5.3 as php and now
Code:
php -v
works, the output being:
Code:
PHP 5.3.21 with Suhosin-Patch (cli) (built: Feb 25 2013 20:15:10)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
    with Suhosin v0.9.33, Copyright (c) 2007-2012, by SektionEins GmbH
What's wrong?

Thanks for anything..
Reply With Quote