HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Suggest HOWTO (http://www.howtoforge.com/forums/forumdisplay.php?f=9)
-   -   Howto suggestion suse PhP ver 4 + Ver 5 (http://www.howtoforge.com/forums/showthread.php?t=2506)

wwparrish 12th February 2006 17:03

Howto suggestion suse PhP ver 4 + Ver 5
 
edit: forget all this junk ( I have edited it all out anyway), see later thread in this post. Thanks to Falko for getting me back on the right track.

=========original post before edits =====================
After following the suse 10 howto (and despite my fooling around and breaking a few things :p ) I now have a fully operational web and email server that works with secure mail transport with every mail client I have tried and can remotely add users etc.

THANK YOU !!!

Wait, wait for it, you know its coming -



But, (see, you knew it was coming, the dreaded "But" ) now that I am all setup my users almost instantly asked me for a group calendar and shared contact/address book program. The problem is everything I find is for PHP4 and wont, at least the 3 I tried, run on PHP5. I found the tutorials on debian on running PHP5 as a mod and PHP4 as CGI and while I tried to emulate them on SuSE, I did not get far.

As it appears that almost all the mature applications are PHP4 I need to be able to run it. Actually I think I would prefer to have PHP4 as the default thru-out the system. The good news is that the sever is still just a test box and not in production so I can do anything to it I want for the next couple of weeks.

Would love a SuSE 10 how to on getting PHP4 on the machine after the perfect install or as an option during the initial perfect setup. If possible with PHP4 installed as the primary (highest performance) PHP version and PHP5 as the alternative.

Perhaps my perception of applications is incorrect but it appears from my 2 days of digging thru sourceforge and freshmeat that it will be a while before we have php5 mature apps.

Anyway, give it some thought, even a quick and dirty do this, do this, do this, to get php4 on as a CGI alternative would be greatly appreciated (and save my ass ) I know you are super busy so thanks for even considering it.



Back to goggle hoping to find enough info to do it myself but with small hope of success. :confused:

Best Regards:
Bill Parrish.
<old csh programmer overwhelmed with apache and system stuff >

falko 12th February 2006 21:12

There shouldn't be many differences between SuSE and Debian.
Install SuSE's PHP4 Apache module and PHP5 as CGI, then enable the PHP4 module in the Apache configuration and add PHP5 as CGI. Of course, paths differ on both distributions, but the concept is the same.

wwparrish 13th February 2006 00:40

my god man, dont you sleep ! thanks. at a loss on what to do next either to get back to where I started or to get php4 installed.

reread your post, goint to try that, uninstall apache mod php5, install apache mod php4 then just php 5 (cgi -module only, not quite clear on that. )

well php4 is all I really need atm anyway. thanks again !

wwparrish 13th February 2006 00:55

ok, deleted all packages concerned with php off the machine
rebooted
going to install just apache php4 mod and and dependent sw and test php4.

/pray++

wwparrish 13th February 2006 02:01

SuSe10 perfect setup with php5 down-rev to php4 quick and dirty.
 
haha as usual I overthink everything, All that is needed is below. Ignore the crap in the first thread of this post.

to down rev the suse 10.0 perfect install to use php4 instead of php5 the following worked for me. Note this was a clean system with only a couple of empty web sites and test emails users. Your mileage my vary.

Might not be needed but I shut down apache and made sure it was off during the entire process until I was ready to test.

shutdown apache /etc/init.d/apache2 stop
use yast and remove everything concerned with php
(reboot = probally not needed but I did it anyway. )
use yast and grab the apache2 php4 mod
use yast to resolve any dependencies by loading any addional ph4 modules needed.
checked the vhosts file (which had the php and php4 stuff in it already.
just for reference:

...
...
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web5/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
AddHandler php-script .php4
AddType application/x-httpd-php .php .php3 .php4 .php5
Action php-script /cgi-bin/php4
ErrorLog /var/www/web5/log/error.log
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
...
...

restarted apache2

check log - clean !!!!!!!!

point browse at the test file (see the how-to)

BINGO !!!
PHP Version 4.4.0
Server API Apache 2.0 Handler


apps might require additional php4 modules just keep an eye on your logs if something does not work.

M.Behrens 2nd April 2006 17:17

Hello!

My Server is installed with SUSE 9.3 Prof.

I have some questions to this HowTo.

First I stop the Apache with /etc/init.d/apache2 stop
Then I go in the Yast2 --> Software --> install or delete software --> search
Now I search for php
Then I delete "apache2_mode_php5" (Is that right?) and "PHP5" as soon as "PHP5-..." (That are 50 packages) (Is that right?)
Now I reboot the Server.
Then I go in the Yast2 --> Software --> install or delete software --> search
Now I search for php and install "apache2_mode_php4", "PHP4" and "PHP4..." (That are only 43 packages) (Is that right?)
I need the following packages "mod_php4-..." (3 packages)???????? :confused:
Than I start the Apache.

Why are then still the following entries in the vHost (php5 is deleted or not, I which wrongly understood?)? :confused:

...
...
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web5/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
AddHandler php-script .php4
AddType application/x-httpd-php .php .php3 .php4 .php5
Action php-script /cgi-bin/php4
ErrorLog /var/www/web5/log/error.log
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>

...
...

Thanks for the assistance! :o

falko 2nd April 2006 22:34

Quote:

Originally Posted by M.Behrens
Hello!

My Server is installed with SUSE 9.3 Prof.

I have some questions to this HowTo.

First I stop the Apache with /etc/init.d/apache2 stop
Then I go in the Yast2 --> Software --> install or delete software --> search
Now I search for php
Then I delete "apache2_mode_php5" (Is that right?) and "PHP5" as soon as "PHP5-..." (That are 50 packages) (Is that right?)
Now I reboot the Server.
Then I go in the Yast2 --> Software --> install or delete software --> search
Now I search for php and install "apache2_mode_php4", "PHP4" and "PHP4..." (That are only 43 packages) (Is that right?)
I need the following packages "mod_php4-..." (3 packages)???????? :confused:
Than I start the Apache.

If you want to replace PHP5 with PHP4, it should work like this.

Quote:

Originally Posted by M.Behrens
Why are then still the following entries in the vHost (php5 is deleted or not, I which wrongly understood?)? :confused:

...
...
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web5/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
AddHandler php-script .php4
AddType application/x-httpd-php .php .php3 .php4 .php5
Action php-script /cgi-bin/php4
ErrorLog /var/www/web5/log/error.log
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>

...
...

Thanks for the assistance! :o

These entries mean the files with the extension .php5 are interpreted by the current PHP version. This is ok. If you have PHP4 installed, then files with the extension .php5 would also be interpreted by PHP4.

JaJunk 3rd April 2006 00:35

On SuSE 10.0 I was even able to do all Yast stuff in one step, removal of php5 and all modules and install php4 and modules, do an update just to make sure any know bugs are taken care of, then restart apache. no reboot required.

Boon-Dog-Danny 5th August 2006 08:09

wtf??
 
hey Falko.. you should make a perfect setup using php4 for suse 10.1 being everyknown script on the planet uses it.. or just a php5 to 4 walkthru just a thought.

php5 ..blows..

boy I wish I could figure out this yast panel stuff..
sounds like people have no trouble.. "removal of php5 and all modules and install php4 and modules"..
man I wish there were instructions and steps to follow or someone would make or say HOW TO REMOVE AND INSTALL..being there are no remove or install areas in yast labled that way..because I'm having nothing BUT trouble.. Im new to Linux.. and suse.. this is just like when I was trying to figure out some of the terminal window stuff.. like :save! or :quit.. real simple basic stuff easy to learn if someone actually says.. to edit a file type vi (view) then the path, example vi /etc/somefile to edit the file you need to hit the insert key once and then your in edit mode.. edit the file..when your finished hit the esc key and type :save! /ect/somefile then hit return.. then on success you'll see a written!.. near the bottom.. thats saved.. to leave this area type :quit.. OH SORRY if I let out some secret commands.. I know that took me about 30 forums and 3 days to pry that simple info out of people.. but this is what Im saying.. you guys are pretty informed on how this stuff works and assume people are as knowing as you are.. not me, I know jack ship..so to speak.. and jack just cut out, and the ship is sinking..

I was not in on the design of linux or suse 10.1 nor am I a linux programmer or all knowing systems admin, I'm a plain reg guy trying to run my own personal website server..asking questions and reading forums because I DONT KNOW..

anyway enough of my whine and crying.. sorry the whole vauge thing gets to me..look, this is it.. all my troubles, and I bet tons of other peoples troubles would be solved because having the perfect-fix-up for changing from php5 to php4 with detailed step by step instructions would rock...

falko 6th August 2006 13:48

Quote:

Originally Posted by Boon-Dog-Danny
hey Falko.. you should make a perfect setup using php4 for suse 10.1 being everyknown script on the planet uses it.. or just a php5 to 4 walkthru just a thought.

I could do this for any distro but SuSE. SuSE is the worst server distro for sure... I don't understand why people use it on servers.


All times are GMT +2. The time now is 13:24.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.