Hi guys,
Had similar problem with SUSE 11 because it was outdated, so I decided to try the same on my SUSE 12 box. So all I want to do is get dokuwiki on my server, but php has been giving me so much trouble lately. I installed apache, tested it with a few webpages, and that works. I tried to do the same with php, and it wont load through the browser.
I installed php by entering:
zypper in php5 php5-mysql apache2-mod_php5
Refreshing service 'spacewalk'.
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following 11 NEW packages are going to be installed:
apache2-mod_php5 php5 php5-ctype php5-dom php5-iconv php5-json php5-pdo php5-sqlite php5-tokenizer php5-xmlreader php5-xmlwriter
The following 8 recommended packages were automatically selected:
php5-ctype php5-dom php5-iconv php5-json php5-sqlite php5-tokenizer php5-xmlreader php5-xmlwriter
11 new packages to install.
Overall download size: 3.4 MiB. Already cached: 0 B After the operation, additional 20.0 MiB will be used.
Continue? [y/n/? shows all options] (y): u
Invalid answer 'u'. [y/n/? shows all options] (y): y
Retrieving package php5-5.5.14-42.2.x86_64 (1/11), 1.5 MiB ( 10.0 MiB unpacked)
Retrieving: php5-5.5.14-42.2.x86_64.rpm ..................................................................................................................................[done]
Retrieving package php5-xmlwriter-5.5.14-42.2.x86_64 (2/11), 52.1 KiB ( 51.0 KiB unpacked)
Retrieving: php5-xmlwriter-5.5.14-42.2.x86_64.rpm ........................................................................................................................[done]
Retrieving package php5-json-5.5.14-42.2.x86_64 (3/11), 55.6 KiB ( 42.7 KiB unpacked)
Retrieving: php5-json-5.5.14-42.2.x86_64.rpm .............................................................................................................................[done]
Retrieving package php5-dom-5.5.14-42.2.x86_64 (4/11), 90.6 KiB (184.2 KiB unpacked)
Retrieving: php5-dom-5.5.14-42.2.x86_64.rpm ..............................................................................................................................[done]
Retrieving package php5-tokenizer-5.5.14-42.2.x86_64 (5/11), 46.3 KiB ( 18.5 KiB unpacked)
Retrieving: php5-tokenizer-5.5.14-42.2.x86_64.rpm ........................................................................................................................[done]
Retrieving package apache2-mod_php5-5.5.14-42.2.x86_64 (6/11), 1.3 MiB ( 9.4 MiB unpacked)
Retrieving: apache2-mod_php5-5.5.14-42.2.x86_64.rpm ......................................................................................................................[done]
Retrieving package php5-ctype-5.5.14-42.2.x86_64 (7/11), 44.6 KiB ( 14.4 KiB unpacked)
Retrieving: php5-ctype-5.5.14-42.2.x86_64.rpm ............................................................................................................................[done]
Retrieving package php5-pdo-5.5.14-42.2.x86_64 (8/11), 81.0 KiB (131.5 KiB unpacked)
Retrieving: php5-pdo-5.5.14-42.2.x86_64.rpm ..............................................................................................................................[done]
Retrieving package php5-iconv-5.5.14-42.2.x86_64 (9/11), 56.2 KiB ( 42.9 KiB unpacked)
Retrieving: php5-iconv-5.5.14-42.2.x86_64.rpm ............................................................................................................................[done]
Retrieving package php5-xmlreader-5.5.14-42.2.x86_64 (10/11), 51.1 KiB ( 35.0 KiB unpacked)
Retrieving: php5-xmlreader-5.5.14-42.2.x86_64.rpm ........................................................................................................................[done]
Retrieving package php5-sqlite-5.5.14-42.2.x86_64 (11/11), 64.2 KiB ( 79.9 KiB unpacked)
Retrieving: php5-sqlite-5.5.14-42.2.x86_64.rpm ...........................................................................................................................[done]
Checking for file conflicts: .............................................................................................................................................[done]
( 1/11) Installing: php5-5.5.14-42.2 .....................................................................................................................................[done]
( 2/11) Installing: php5-xmlwriter-5.5.14-42.2 ...........................................................................................................................[done]
( 3/11) Installing: php5-json-5.5.14-42.2 ................................................................................................................................[done]
( 4/11) Installing: php5-dom-5.5.14-42.2 .................................................................................................................................[done]
( 5/11) Installing: php5-tokenizer-5.5.14-42.2 ...........................................................................................................................[done]
( 6/11) Installing: apache2-mod_php5-5.5.14-42.2 .........................................................................................................................[done]
( 7/11) Installing: php5-ctype-5.5.14-42.2 ...............................................................................................................................[done]
( 8/11) Installing: php5-pdo-5.5.14-42.2 .................................................................................................................................[done]
( 9/11) Installing: php5-iconv-5.5.14-42.2 ...............................................................................................................................[done]
(10/11) Installing: php5-xmlreader-5.5.14-42.2 ...........................................................................................................................[done]
(11/11) Installing: php5-sqlite-5.5.14-42.2 ..............................................................................................................................[done]
restarted apache2 as mentioned in the guide:
service apache2 restart
Then checked my php version:
php -v
PHP 5.5.14 (cli)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
Then created info.php inside /srv/www/htdocs with the code:
<?php
phpinfo();
?>
Just to verify my php version which I verified earlier through the command line, and the file will not load through the browser when I call on it using http://myservername/info.php
PHP still will not load through my browser, meaning the browser asks to download the file as opposed to just displaying through the browser when i call on it. Any idea on why this is happening? BTW the guide I am referring to is as follows : http://www.itzgeek.com/how-tos/linux/opensuse/install-apache2-with-php5-and-mysql-lamp-on-opensuse-12-1.html
Thanks in advance for you’re help guys.