Third-party scripts, Again.

10 posts / 0 new
Last post
#1 Thu, 12/01/2005 - 06:57
Blueforce

Third-party scripts, Again.

Hi Joe,

Refering to my previous post: Third-party scripts.

It would be nice to know if a solution is on it's way or if I can do any manual configuration to get things working. We have a new colocation server running FC4 and Virtualmin Pro to where our customers are about to move. Our company(we are mainly workin with hardware and support) have been offering web hosting to our customers for two years now. Our customers are mainly swedish companies, although we do have customers that are world wide with office all over the world.

If anyone have some guidelines how to install the Third-partiy scrips (and some of our own scrips for PHP4) on PHP5 or how to install PHP4 without breaking the PHP, please let me know. Some of our own scripts runs ok on PHP5 but most of the scripts refuses to install on PHP5. The server seems to be set up ok and works fine apart from this. The old servers are still running but the transfer to our new server should have been done a couple of weaks ago.

I don't want to mess things up on our new FC4 server. Our old servers are running Windows Server OS which I'm very familiar with and beeing a new Linux user I often feel that "I don't know what I'm doing" smile.

Regards, Leif Blåfors Sweden

Thu, 12/01/2005 - 15:03
Joe
Joe's picture

Hey Leif,

Sorry for the delay on this. Too many things going on this week.

But I'm working on a solution right now. I will, at the very least, have instructions for how to switch your default php to php4 on FC4 so that all of the Script Installers will run.

--

Check out the forum guidelines!

Fri, 12/02/2005 - 19:02
Blueforce

Hi Joe,

When i get the instruction, and have switch my default php to PHP4 and run a yum update, will the update switch back to PHP5 as default or can I safely do yum update.

I do realize that you and the other devs are working hard to do fixes and updates and at the same time answer all your clients questions. In spite of that, I would like to know if you have come up with the instruction yet and if not I would like to know when they will be available.

In my case this is the only roadblock before I can continue. I think have been checking the forum posts at least every second hour *smile* since your first answer(11/27/05) to my post(11/26/05) regarding this.
I would appreciate if you could give me some approximate time or date when I can expect the instructions.

Regards
Leif Blåfors
Sweden

Sat, 12/03/2005 - 12:55
ChrisBlackwell

Hi Leif,

I'm also running FC4, and i've just swapped over to PHP4 until Joe gets PHP4 & 5 working together.

The following worked ok for me, but double check your happy with everything before doing it yourself.

> yum list php*

gives me the following
[pre]

Installed Packages

php.i386 5.0.4-10.5 installed

php-gd.i386 5.0.4-10.5 installed

php-mysql.i386 5.0.4-10.5 installed

php-pear.i386 5.0.4-10.5 installed

Available Packages

...

php4.i386 4.3.11-2.6vm virtualmin

php4-devel.i386 4.3.11-2.6vm virtualmin

php4-domxml.i386 4.3.11-2.6vm virtualmin

php4-gd.i386 4.3.11-2.6vm virtualmin

php4-imap.i386 4.3.11-2.6vm virtualmin

php4-ldap.i386 4.3.11-2.6vm virtualmin

php4-mbstring.i386 4.3.11-2.6vm virtualmin

php4-mysql.i386 4.3.11-2.6vm virtualmin

php4-ncurses.i386 4.3.11-2.6vm virtualmin

php4-odbc.i386 4.3.11-2.6vm virtualmin

php4-pear.i386 4.3.11-2.6vm virtualmin

php4-pgsql.i386 4.3.11-2.6vm virtualmin

php4-snmp.i386 4.3.11-2.6vm virtualmin

php4-xmlrpc.i386 4.3.11-2.6vm virtualmin[/pre]

The first 4 are the currently installed PHP5 packages from Fedora, the ones below are the PHP4 packages as supplied by Virtualmin.

So to swap all i did was

> yum remove php*
> yum install php4*

Both these commands will give you a summary of all actions to be performed.

I then logged into Webmin and went to Servers] Apache Webserver] Re-Configure Known Modules. You should see that there is now a tick in "mod_php4" and not "mod_php5", click Configure, and then "Apply Changes" to restart Apache.

If you have system information turned on in Virtualmin it should now show the new php version in the sys info section below the server list.

I then tryed to install "PHP Support Tickets v1.9" which worked fine, i havent tried any of the others, but this was one that had previously failed saying it required "mod_php4".

To answer your question about updating with yum, PHP4 and PHP5 are different packages so "yum -y update" will not remove PHP4 and replace with PHP5. The yum update command will only update to a newer version of the same package.

Sat, 12/03/2005 - 13:35
ChrisBlackwell

Also note that some scripts may require the following flags to operate correctly. There might be other config values needed by some, but these are two that i have encountered.

php_value magic_quotes_gpc 1
php_flag register_globals on

These can be placed in the body of your httpd.conf file to enable them on all servers, inside the <virtualhost> directive for a server, or inside a <directory> directive to enable it for just one directory.

cheers, chris

Sat, 12/03/2005 - 14:00
Blueforce

Hi Chris,

Thank you for your nice and detailed information.
I will do the install later this evening and follow the instructions you provided.

Thanks again, this has been a big and so far the only "roadblock". I'll keep you posted how everything turns out.

Best Regards,
Leif Blåfors
Sweden

Sun, 12/04/2005 - 22:22
Blueforce

Hi Chris,

Thanks! The switch from PHP5 to PHP4 worked like a charm *smile*. However I didn't install all (yum install php4*) available packages, just the ones I needed. I tryed this before on our local test-server but that time I just installed PHP4 without removing PHP5 first, that didn't work. And beeing a new Linux user I don't want to "fool around" with our new serve, mess things up and maybe have to reinstall it... and our test-server broke down due to a cpu-fan failur :(

Thanks again for the instructions.

I really like the fine support here, from Joe, Jamie and all the other folks here. Althoug this simple instruction took some time to get! I also did post a bug report regarding this, maybe I should close that one.. the problem is in fact resolved now.

Regards
Leif Blåfors
Sweden

Mon, 12/05/2005 - 02:41 (Reply to #7)
Joe
Joe's picture

Hey guys,

I'll add some comments to this:

It isn't necessary to uninstall php 5 for php4 to work. They just can't <i>both</i> be configured to operate on the same extension (which is a conflict between the packages currently--but it is kind of unavoidable, for a few reasons).

To still have php 5 installed, you just need to move it's php.conf file out of the way and restart apache (i.e. &quot;mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.disabled; service httpd restart&quot;). You can then call it as a standard CGI (instead of as mod_php), if you need php 5 features. Very soon, there will be a Virtualmin provided mechanism for selecting either one...it's more complicated than this method of resolving the issue, but is definitely more interesting.

--

Check out the forum guidelines!

Mon, 12/05/2005 - 02:48
Joe
Joe's picture

I've added a brief FAQ about this query, which will stick around until I've solved the problem in a general way.

http://www.virtualmin.com/faq/one-faq?faq_id=1511

There's nothing new in it, but it's probably easier to find than a forum post.

--

Check out the forum guidelines!

Mon, 12/05/2005 - 03:42
Blueforce

Hi Joe,

Thanks for the information. I have installed PHP4 and some packages that I needed, and everything works fine. The possibility to select PHP4 or PHP5 sounds great.

By the way... Virtualmin Pro is great, I really like it!

Regards,
Leif Bl&Atilde;&yen;fors