View Full Version : Php5 / Mysql 4.1.9 Howto
IWorx-Chris
02-02-2005, 11:05 PM
I tried to make this easy but I only did it for CentOS at this time due to my busy schedule. I'll accept RPMs for other platforms as well if people would like to submit them.
!! WARNING !! WARNING !!
THIS IS DEEMED EXPERIMENTAL AND WILL NOT BE SUPPORTED DIRECTLY BY US. IT MAY BREAK YOUR BOX, IT MAY WORK FINE.
We have it running on a few internal servers and it has been fine, but you have been forewarned.
To upgrade your iworx-CP boxes to use php5 and mysql 4.1 you can add this to your /etc/yum.conf
[interworx-php5-mysql4.1]
name=InterWorx-CP - CentOS - PHP 5.X / MYSQL 4.1.X
baseurl=http://updates.interworx.info/iworx/RPMS/cos3x/php5-mysql4.1/$basearch
#gpgcheck=1
Then just 'yum update' and restart httpd
NOTE: THE ABOVE WILL ONLY WORK FOR CENTOS BOXES.
If you'd like to get your Fedora/RedHat/WhiteBox boxes working just compile and install the following RPMS in the following order:
http://updates.interworx.info/iworx/SRPMS/experimental/mysql-shared-compat-4.1.9-100.iworx.src.rpm
http://updates.interworx.info/iworx/SRPMS/experimental/mysql-4.1.9-100.iworx.src.rpm
http://updates.interworx.info/iworx/SRPMS/experimental/php-5.0.3-100.iworx.src.rpm
If you'd like to submit binaries of the other platforms just PM me.
Chris
pascal
02-03-2005, 09:15 AM
To upgrade your iworx-CP boxes to use php5 and mysql 4.1 you can add this to your /etc/yum.conf
Does it means there will be only php5 / mysql 4.1 on the box, or does it mean there will be both php4/php5 and mysql 4.0x/4.1 working together ?
Thanks
Pascal
IWorx-Chris
02-03-2005, 12:19 PM
This is for php5/mysql4.1 only, any previous version(s) for php and/or mysql will be upgraded and not exist on the box anymore.
Justec
06-10-2005, 01:05 AM
What's the latest (easiest) way to install PHP5 now on an Iworx box?
IWorx-Chris
06-10-2005, 09:59 AM
We've had some other recent questions about this and I'll post a whitepaper on how it's most easily done. There have been some nonsense rumors that iworx-cp doesn't "support" PHP5 and it's partly our fault for lack of info on the subject.
Chris
Justec
06-10-2005, 02:53 PM
Thanks Chris, I want to setup my test box with PHP5 so I can start internally testing my PHP scripts on the new engine.
PaulK
06-13-2005, 12:24 PM
Just a bump to see if there's any news on this front. I have a new box that should be coming online today or tomorrow and I'd like to set it up with PHP 5.0.4 and MySQL 4.1.12 if possible. :)
IWorx-Chris
06-13-2005, 12:26 PM
100% possible. If you'd like to 'donate' the use of your server for the setup I can do the howto on it Paul. I've just been short on time and we don't have any free boxes with a fresh iworx-cp on them.
I can do another quickie howto like I did for the jailed shell if that's ok.
Chris
PaulK
06-13-2005, 12:38 PM
A quickie howto would be fine, but I can donate my new server for a bit (when Sago sends me the information) if you'd like to do it that way.
Justec
06-13-2005, 03:45 PM
Chris,
I have a CentOS fresh install of InterWorx on my 'now working' test box you could set it up on as well.
I also have a fresh install of RH9 on the same box, but haven't install InterWorx on that as of yet (at least I don't think I did). But I could give you access to that as well.
Let me know
IWorx-Chris
06-13-2005, 05:41 PM
If one or both of you could provide your login info I can get going on this howto. Feel free to either open a ticket or drop your root info here: https://secure.interworx.info/iworx-cp/support/rootdrop.php
Chris
PaulK
06-14-2005, 12:47 AM
Dropped the info for you.
pascal
06-14-2005, 06:48 PM
Do you know if PHP5 is still not 100% full compatible with PHP4 ?
Also, did some of you tried to install PHP5 as CGI with PHP4 on an existing Interworx Box ?
If yes, a quick howto could help a lot of people (and me first)
Thanks
Pascal
IWorx-Chris
06-14-2005, 06:54 PM
It isn't, and never will be Pascal. It was not designed for full backwards compatibility.
Chris
pascal
06-14-2005, 07:12 PM
Indeed.
In fact I'm thinking of installing php5 as CGI and use the apache module suPHP, maybe try to use fastcgi.
The idea behind this is to try to offer two types of config to my customers :
php 4 as module = quicker but with safemod on and openbasedir
php 4 & php 5 as CGI with suPHP = less quick but more secure. So without safe mod and open base dir
Before doing this, I'd like to only install PHP5 as cgi with suPHP, just to try and to allow some customers to tests PHP5
All your comments about this idea are really welcome. If you already done it, a quick howto may help. Also I'm open to hear the bad and good thinks about this idea
Maybe fastCgi would be the best solution, but I really don't know it.... I've already tried suPHP and I find it very usefull, it's like suexec
Thanks for your comments / howto / points of view / discussion about this
Pascal
Sounds nice. I am planning on putting PHP 5 on our box in the background soon. I have it working on my non-IWorx box at home. PHP4 is installed as normal as an Apache module and PHP5 is located in the cgi-bin. If I have PHP5 files in a directory I can add these lines to a .htaccess file (or for IWorx, .htaccess or /etc/httpd/conf.d/domain.tld.conf for domain-wide changes)
AddType application/x-httpd-php-cgi .php
Action application/x-httpd-php-cgi /cgi-bin/php5
I don't know how well this works because my PHP5 code there is still pre-pre-alpha.
pascal
06-15-2005, 03:25 AM
CMI
did you install php5 from RPMs ?
Could you please provide a brief Howto.
For me there is only to install PHP with the option --force-redirect-cgi ?
then apply this (I'd prefer to have .php5 than .php but not sure)
AddType application/x-httpd-php-cgi .php5
Action application/x-httpd-php-cgi /cgi-bin/php5
Does it means that all php5 have to be in the cgi-bin/php5 repertory and are readable from http://domaine.tld/cgi-bin/php5/ or can they be readable from http://domaine.tld ?
What about the location of the BIN php, where did you install it, and the php.ini ?
I'm looking for a php5-cgi RPM for centos
arff not have too much time at the moment, but I'd really like to di this asap
Thanks CMI
Pascal
I installed from source as to not clobber anything, although I'm using Gentoo at home and I could install mod_php4 while using PHP5 for CLI and CGI. When you build the source code you can look for sapi/cgi/php which will be suitable for dropping in cgi-bin.
If you go with the .php5 extension, you can do this server-wide. Personally, I think .php5 is ugly and will cause problems in the future which is why I didn't do it.
/cgi-bin/php5 needs to be where ever Apache will look for it. For me, it looks under the localhost site. The actual files can be anywhere, so long as they are accessable by the php5 app.
As a reminder, I haven't tried this on our IWorx box yet, only at home. I didn't look into security considerations and performance tweaking yet, so I wouldn't do this in a production environment without a little review first.
pascal
06-17-2005, 05:05 AM
As a reminder, I haven't tried this on our IWorx box yet, only at home. I didn't look into security considerations and performance tweaking yet, so I wouldn't do this in a production environment without a little review first.
Absolutly, it's the reason why we would like to install it on our iworx test box.
My idea was to ask to interworx team if they already have an php5-cgi rpm home made. (I prefer rpm, as it is easly removable)
If not, I think I'll use the ./configure that is in the php.spec file of the php4 iworx's rpm. Of course I'll add --force-redirect-cgi (think it is enough)
Thanks CMI for your advises
Pascal
IWorx-Chris
06-17-2005, 10:33 AM
My idea was to ask to interworx team if they already have an php5-cgi rpm home made. (I prefer rpm, as it is easly removable)
We don't Pascal, and probably won't, at least in the near future.
Btw, PaulK, will be finisihing up your box today I hope.
Chris
pascal
06-17-2005, 12:13 PM
Thanks Chris
I have installed php5 from source.
I used a minimum ./configure to only do some tests.
./configure \
--prefix=/usr/php5/ \
--with-config-file-path=/etc/php5/ \
--with-config-file-scan-dir=/etc/php5/php.d/ \
--disable-debug \
--disable-rpath \
--with-xml \
--with-zlib \
--with-mysql
In an existing domain I added in at the bottom of the vhost config file :
AddHandler application/x-httpd-php5 .php5
Action application/x-httpd-php5 /bin/php
ScriptAlias /bin/ /usr/php5/bin/
and I have created a file called phpinfo.php5 with only
<?
phpinfo();
?>
When I launch it from the box
/usr/php5/bin/php /home/account/domain.tld/html/phpinfo.php5
it works great
but when I launch it from the web
http://hebergement-serveurs.fr/phpinfo.php5
I have an error 500 (internal server error)
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@hebergement-serveurs.fr and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Looking at the log I only have this
[error] [client xxx.xxx.xxx.xxx] Premature end of script headers: php
Any idea ?
Pascal
pascal
06-17-2005, 12:15 PM
Erff of course !!!
It is due to the SuexecUserGroup xxxxxxx xxxxxxxx
I have commented it and now it works fine
http://hebergement-serveurs.fr/phpinfo.php5
Pascal
I ran into the same problem on my test machine but haven't yet had the time to work on that. I'd like suEXEC working with PHP5 as a CGI but considering the paranoia around the suexec binary I can't really tell what the problem is. If anyone has an idea I'd be greatfull for the time saver.
IWorx-Chris
06-17-2005, 01:22 PM
The /var/log/httpd/suexec* log files will shed light. suexec just does a series of checks before it execs a script. The usual culprits of suexec not working are:
1. your script is owned by some other user than suexecusergroup says.
2. the directory in which your script lives in owned by someone other than suexecusergroup
3. the perms on your script and/or directory are too lenient (711 for each is fine).
The list goes on, and the options are better prioritized here:
http://httpd.apache.org/docs/suexec.html#model
Chris
Thanks Chris. I forgot about the minimum UID restriction. That's what was killing me.
pascal
06-18-2005, 03:18 AM
The error is because the doc_root is not set correctly
[2005-06-18 10:10:59]: uid: (xxx/zzzzz) gid: (xxx/xxx) cmd: php
[2005-06-18 10:10:59]: command not in docroot (/usr/php5/bin/php)
indeed, if I copy the php binary in /home/account/domain.tld/html/cgi-bin/
then chown it to the user account
and change the vhost config file to add
AddHandler application/x-httpd-php5 .php5
Action application/x-httpd-php5 /cgi-bin/php
ScriptAlias /cgi-bin/ /home/hebergem/hebergement-serveurs.fr/html/cgi-bin/
then it works fine
The pbm with this mean that I'll have to copy the php binary in the doc root.
I wouldn't do this for every account that would like to use php5
Have you got an idea
Pascal
Well pascal, that is the best thing to do I can think of at the moment. (You should be able to put the binary in the skel directory, and run some script to update the binary in everyone's directories. Doing things this way is no different then having the individual users use their own cgi scripts, which just happen to be the php5 binary in this case. The other option is to modify the suEXEC binary to skip the requirement to have target UID/GID match script UID/GID.
IWorx-Chris
06-18-2005, 07:21 PM
What command are you trying to run from the browser here Pascal? php itself? Or are you trying to run a script that uses PHP #!/usr/bin/php style?
The php binary itself doesn't need to be in the webspace, just as /usr/bin/perl doesn't for perl based CGI scripts. There must be something else going on here.
Chris
PaulK
06-20-2005, 11:54 AM
Btw, PaulK, will be finisihing up your box today I hope.
Chris
Thanks Chris, I see that MySQL 4.1.10a has been on there for a bit, but PHP has not been upgraded to 5 yet. Are you planning on doing that today?
IWorx-Chris
06-20-2005, 11:55 AM
Going to try Paul, it's been a bigger pain than I had wanted trying to generalize the php5 RPM. But I will give it a go today and let you know.
Chris
pascal
06-20-2005, 06:42 PM
What command are you trying to run from the browser here Pascal? php itself? Or are you trying to run a script that uses PHP #!/usr/bin/php style?
The php binary itself doesn't need to be in the webspace, just as /usr/bin/perl doesn't for perl based CGI scripts. There must be something else going on here.
Chris
I try to launch a php script without the #!/usr/bin/php as Perl does (in my case #!/usr/php5/bin/php)
something like
http://domaine.com/script.php5
I understand what you mean, but the log did return me an suexec error
But idealy I don't xant have to use the sembang
In my case when I used
Action application/x-httpd-php5 /usr/php5/bin/php
it didn't work
Pascal
pascal
06-20-2005, 07:34 PM
In fact I don't know
It is the only rules I found to have php5 as cgi running on my box.
I've tried a lot of things but The only one that work is
- to copy the php binary somewhere in the docroot
- add
AddHandler application/x-httpd-php5 .php5
Action application/x-httpd-php5 /cgi-bin/php5-cgi
If I change the Action for the real path of the php binary it doesn't work, if I add a ScriptAlias, it also doesn't work.
Maybe there is a better way to have php5 as cgi and php4 as module both running on the same box, but I didn't find it
Pascal
Well, the other option is to modify mod_php's source code, adding "5" to everything. So you could load "mod_php5" instead of "mod_php". If it checks for a modified content type as well, they may work along side each other. The problem here is you need to modify the code on EVERY release of PHP. Well... with a context-sensitive patch...
IWorx-Chris
06-21-2005, 12:33 PM
Paul,
You should be all set, I'll be posting a HOWTO as soon as I get the info together.
Chris
IWorx-Chris
06-21-2005, 12:50 PM
PHP5 / MYSQL 4.1 MINI HOWTO:
We are not (yet) releasing RPMs as php5 is not officially part of the iworx RPM set so you'll have to build the RPMs yourself. This HOWTO is meant to help you out getting a php5 / mysql 4.1 box running.
1. Install rpmbuild if needed
yum install rpm-build
2. Build the MySQL server for your platform. This needs to be done first so we can link php5 against it.
rpmbuild --rebuild --with rhe4x http://updates.interworx.info/iworx/SRPMS/experimental/mysql-4.1.12-100.iworx.src.rpm
NOTE: The previous command may barf out a list of dependencies that need to be installed. Just 'yum install' them and then continue.
3. Upgrade your system to MySQL 4.1
rpm -Uvh RPMS/i386/mysql*.rpm
4. Build PHP5 for your platform:
NOTE: YOU MAY NEED TO INSTALL MANY -DEVEL RPMS FOR THIS BUILD TO WORK.
rpmbuild --rebuild --with rhe4x http://updates.interworx.info/iworx/SRPMS/experimental/php-5.0.4-100.iworx.src.rpm
5. Upgrade your system to PHP5
rpm -Uvh RPMS/i386/php*.rpm
This will give you php 5 + mysql 4.1 with php as a module and as a cgi.
THIS HAS ONLY BEEN TESTED ON CENTOS 4.1 AND CENTOS COMES WITH MYSQL 4.1 SO I USED THE DEFAULT MYSQL 4.1 FOR CENTOS (I.E. SKIP THE FIRST FEW STEPS UP TO THE PHP BUILD.
THIS IS STILL DEEMED EXPERIMENTAL AND WE CAN'T DIRECTLY SUPPORT IT AS WE WOULD OTHER IWORX PROVIDED RPMS.
Chris
pascal
06-21-2005, 01:10 PM
Chris,
When you said php5 as module and CGI what do you mean exactly ?
Is php5 is installed in /usr under php5 or under php ?
the Apache conf file is created as php.conf or php5.conf ?
Well i'm sure you understand why I ask this :-p
Does this rpm will erase previous install of php4 or not ? ( :-p )
Thanks and well done as usual
Pascal
IWorx-Chris
06-21-2005, 01:17 PM
When you said php5 as module and CGI what do you mean exactly ?
Both /usr/bin/php and the .so that is run within apache are built / installed using the above method.
Is php5 is installed in /usr under php5 or under php ?
In "the usual spot", the same as our php4 RPMs and the php cgi interpreter is at /usr/bin/php.
the Apache conf file is created as php.conf or php5.conf ?
php.conf
Well i'm sure you understand why I ask this :-p
Does this rpm will erase previous install of php4 or not ? ( :-p )
It will, it's no different than upgrading from 4.3.9 to 4.3.11 it just seen as "the next version" and will overwrite previous versions.
Chris
orangechicken
09-11-2005, 09:27 PM
A few questions:
How do we get the CLI version installed?
Would we have to build from source if not?
Would we still use "--with rhe4x" if we're on CentOS 3.x?
Thanks,
Dave
IWorx-Chris
09-11-2005, 09:30 PM
Yep, you'd have to build from source and change the SPEC file to build the cli instead of the cgi Dave. And yes, you'll still need the --with <distro> string.
Chris
orangechicken
09-11-2005, 10:35 PM
OK, thanks. Could you clarify which <distro> string I'd need for CentOS 3.5? rhe3x? rhe4x?
Any plans to put out a supported MySQL 4.1 RPM?
-Dave
IWorx-Chris
09-11-2005, 10:37 PM
It's actually cos3x
orangechicken
09-12-2005, 02:04 AM
Great - thanks.
Reviving an old thread :S
I'm going to need to install PHP5 very soon, because I will be purchasing a Support system that requires it.
I have a few concerns. I see instructions on updating my Iworx contained box to PHP5 and MySQL 4.1, however, is this still deemed experimental? Is there an easier, safer, surefire way of doing this yet?
Also, as for backward compatibility issues with PHP 4.x, is this really an issue for a lot of users? I have a few web-hosting clients already and though i'm not completely in the loop as to if they use PHP on their pages (would be easy to check) -- is there a possibility that i could get some complaints out of these kind folks? :o
I don't want to do anything to upset my customers, however PHP5 will be necessary eventually (preferably soon!)
Any ideas guys?
EDIT: Using RH9 on my box
Justec
02-25-2006, 04:02 PM
PHP 5 could break some scripts, so testing would is a must before upgrading your server.
Also, i know there are some thread on this forum about running both PHP4 and 5. Like leaving the default PHP4 as it then running PHP5 as a CGI.
Not sure how stable it is to run two PHP on the same server, but if it was that would be the way I would go. I would just make *.php default to PHP4 and *.php5 go to PHP5
Hey Justec - thanks for the reply! I saw it the same day you wrote it (subscribed to the thread)
What i'd like to know is -- are the guys at InterWorx hard at work on updates or something? I've been waiting for confirmation on the PHP upgrade (I need to do it soon! This CGI thing you speak of might be very helpful to me!) But either way, i'd like to hear from them what their suggestions are for a RH9 box and what my options are.
Also, I emailed Sales@Interworx... about licensing a few days ago as well --- still no word.
I don't mean to sound impatient, because I'm well aware that any absence from the forums by these guys always results in good news for InterWorx users =) I just wanted to re-iterate that although Justec was kind enough to reply to my question with some suggestions, i'd still like to hear the InterWorx team's take on it =)
Thanks!
PHP 5 could break some scripts, so testing would is a must before upgrading your server.
Also, i know there are some thread on this forum about running both PHP4 and 5. Like leaving the default PHP4 as it then running PHP5 as a CGI.
Not sure how stable it is to run two PHP on the same server, but if it was that would be the way I would go. I would just make *.php default to PHP4 and *.php5 go to PHP5
IWorx-Chris
02-27-2006, 06:12 PM
int, can you re-send your sales@ inquiry. I do remember seeing something and I could have swore I responded but it wouldn't have been the first time if it slipped through the cracks. Sorry for having to make you post here to get a response :(
Chris
int, can you re-send your sales@ inquiry. I do remember seeing something and I could have swore I responded but it wouldn't have been the first time if it slipped through the cracks. Sorry for having to make you post here to get a response :(
Chris
Thanks for the Sales reply by email Chris.
Can someone please look into my PHP question? I want to install PHP 5 on my Redhat 9 Sago box -- My concern is that I see instructions on updating my InterWorx box to PHP5 and MySQL 4.1 but is this still deemed experimental? Is there an easier, safer, surefire way of doing this yet?
Also, Justec mentioned running both PHP4 and PHP5 (as a CGI script) on my server --- is this possible? Is it stable? I need PHP5 to run a support system as I stated earlier. I would also, however, like to be able to offer PHP5 to my web-clients.
Please let me know soon - i'm anxious to purchase the Support system and start playing with it/ customizing it.
IWorx-Chris
03-07-2006, 06:07 PM
It's experimental in the sense that we don't provide RPMs for it and won't debug problems stemming from an install of it on an iworx-cp box. We will still support iworx-cp itself on a box with php5 as long as it isn't the direct cause of any issues.
Chris
It's experimental in the sense that we don't provide RPMs for it and won't debug problems stemming from an install of it on an iworx-cp box. We will still support iworx-cp itself on a box with php5 as long as it isn't the direct cause of any issues.
Chris
Hmmm - well now i'm reluctant to install it :p
Is there any timeframe on when it might be supported - so that if I break my box during the upgrade process, or if a problem arises because of PHP5 --- I *will* still be supported?
I don't use support often, but I would hate to be on my own if I broke my box somehow :eek:
IWorx-Chris
03-07-2006, 06:19 PM
It's not high on the list at this point int. As folks request it more and standardize on 5 we'll get it in the mix, but at the moment there are other things in the iworx-cp interface proper we're focusing on.
Chris
awalsh
03-10-2006, 01:27 PM
Is it just me or is the listed mirror down? I cannot seem to get yum to upgrade to php5 and mysql 4.x (which i really want :) )
IWorx-Chris
03-10-2006, 01:31 PM
It's not down, no, but the package names may have changed. Just browse:
http://updates.interworx.info/iworx/SRPMS/experimental/
awalsh
03-10-2006, 04:58 PM
Is there a yum mirror somewhere, so i can use yum to upgrade. Im likely to break everything i spent ages setting up if i use RPMS :)
IWorx-Chris
03-11-2006, 11:33 AM
There are no pre-built binaries, just source RPMs since this is still deemed experimental. Instructions for building are in this thread.
Chris
There are no pre-built binaries, just source RPMs since this is still deemed experimental. Instructions for building are in this thread.
Chris
I was afraid I might screw something up during the PHP5 install, so I had an expert try to perform the install for me. However, in doing so, the person had some trouble.
Question: During compilation, to compile PHP as a DSO for Apache2, it looks for the apu-config packages, which are made available with the httpd-devel packages. Doing an "rpm -q httpd" however, one finds a custom interworx httpd daemon instead of the apache httpd distribution, and no httpd-devel package. Do they have their own httpd-devel that should be used? Or is it safe to use the standard, same-version httpd-devel rpm.
IWorx-Chris
03-13-2006, 12:36 PM
The apu-config bin is made avail via the apr-util-devel package I believe, and you might as well install the apr-devel package as well if it's not there already.
Chris
Saeven
03-13-2006, 04:37 PM
Hi Chris/Int,
I've done the work, and have posted the how-to here, hope it helps. I see many PHP5-how-to requests in these forums :)
http://www.interworx.com/forums/showthread.php?t=1189
Cheers.
Alex
Hi Chris/Int,
I've done the work, and have posted the how-to here, hope it helps. I see many PHP5-how-to requests in these forums :)
http://www.interworx.com/forums/showthread.php?t=1189
Cheers.
Alex
Alex - thank you for your efforts. They are sure to help every InterWorx user who will attempt an update to PHP5.
I don't know why I'm so surprised by this, since in my experience, this is how the Saeven team has been forever with their Whois.Cart product, and now, i'm sure, with the Auracle Support Engine. I don't mean for this to be a plug for Saeven products, but if anyone is looking for a Cart that works well with InterWorx, that's a great one to go with (www.whoiscart.net)
From all InterWorx users, thank you so very much Alex!
I tried updating MySQL to version 4.1.12 by following the instructions to build RPMs.
I got it to create:
/usr/src/redhat/RPMS/i386/mysql-server-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-client-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-bench-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-devel-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-shared-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-max-4.1.12-100.rht90.iworx.i386.rpm
However, whenever I try to rpm -Uvh on any of those, i get dependency errors which I can't simply fix with a "yum install packagename"
Does anyone have a simpler way for me to upgrade MySQL? I'm going nuts over here...
IWorx-Tim
03-14-2006, 11:09 PM
I tried updating MySQL to version 4.1.12 by following the instructions to build RPMs.
I got it to create:
/usr/src/redhat/RPMS/i386/mysql-server-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-client-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-bench-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-devel-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-shared-4.1.12-100.rht90.iworx.i386.rpm
/usr/src/redhat/RPMS/i386/mysql-max-4.1.12-100.rht90.iworx.i386.rpm
However, whenever I try to rpm -Uvh on any of those, i get dependency errors which I can't simply fix with a "yum install packagename"
Does anyone have a simpler way for me to upgrade MySQL? I'm going nuts over here...
You're on the right track int, but you need to do is to all of them at once
rpm -Uvh --force rpm1 rpm2 rpm3 etc
one very LONG command
You're on the right track int, but you need to do is to all of them at once
rpm -Uvh --force rpm1 rpm2 rpm3 etc
one very LONG command
[root@server devel]# rpm -Uvh --force /usr/src/redhat/RPMS/i386/mysql-server-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-client-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-bench-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-devel-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-shared-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-max-4.1.12-100.rht90.iworx.i386.rpm
error: Failed dependencies:
libmysqlclient.so.10 is needed by (installed) php-mysql-4.3.11-100.rht90.iworx
No go =(
IWorx-Tim
03-15-2006, 12:35 AM
Take a look at this I found in Google
http://www.faqts.com/knowledge_base/view.phtml/aid/29818
IWorx-Socheat
03-15-2006, 05:51 AM
Hi Int,
Also, the mysql-shared-compat package provides this library:
yum install mysql-shared-compat
Should do the trick.
Socheat
Hi Int,
Also, the mysql-shared-compat package provides this library:
yum install mysql-shared-compat
Should do the trick.
Socheat
Thanks for the replies guys.
Here's what happened:
[root@server devel]# yum install mysql-shared-compat
Gathering header information file(s) from server(s)
Server: Red Hat Linux 9 - Base
Server: Red Hat Linux 9 - Fedora Legacy - Updates
Server: InterWorx-CP - Generic
Server: InterWorx-CP - Red Linux 9
Server: Red Hat Linux 9 - Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
Dependencies resolved
I will do the following:
[install: mysql-shared-compat 4.0.21-100.iworx.i386]
Is this ok [y/N]: y
Downloading Packages
Getting mysql-shared-compat-4.0.21-100.iworx.i386.rpm
mysql-shared-compat-4.0.2 100% |=========================| 481 kB 00:01
Running test transaction:
Test transaction complete, Success!
mysql-shared-compat 100 % done 1/1
Installed: mysql-shared-compat 4.0.21-100.iworx.i386
Transaction(s) Complete
[root@server devel]# rpm -Uvh --force /usr/src/redhat/RPMS/i386/mysql-server-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-client-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-bench-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-devel-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-shared-4.1.12-100.rht90.iworx.i386.rpm /usr/src/redhat/RPMS/i386/mysql-max-4.1.12-100.rht90.iworx.i386.rpm
Preparing... ########################################### [100%]
Giving mysqld a couple of seconds to exit nicely
mysqld: no process killed
1:mysql-server ########################################### [ 17%]
Restarting mysqld.
Stopping MySQL: [FAILED]
Starting MySQL: [ OK ]
2:mysql-client ########################################### [ 33%]
3:mysql-bench ########################################### [ 50%]
4:mysql-devel ########################################### [ 67%]
5:mysql-shared ########################################### [ 83%]
6:mysql-max ########################################### [100%]
Restarting mysqld.
It turns out it did not automatically restart mysql, I had to start the process from within InterWorx. Having done that, using the phpinfo.php page, it still shows MySQL as being version 3.23.58 (Client API version) :(
IWorx-Tim
03-15-2006, 12:47 PM
It turns out it did not automatically restart mysql, I had to start the process from within InterWorx. Having done that, using the phpinfo.php page, it still shows MySQL as being version 3.23.58 (Client API version) :(
run rpm -qa | grep mysql
and paste the output.
run rpm -qa | grep mysql
and paste the output.
[root@server devel]# rpm -qa | grep mysql
php-mysql-4.3.11-100.rht90.iworx
mysql-bench-4.1.12-100.rht90.iworx
mysql-shared-compat-4.0.21-100.iworx
mysql-iworx-4.0.21-3.rht90.iworx
mysql-client-4.1.12-100.rht90.iworx
mysql-devel-4.1.12-100.rht90.iworx
mysql-max-4.1.12-100.rht90.iworx
mysql-server-4.1.12-100.rht90.iworx
mysql-shared-4.1.12-100.rht90.iworx
------
That worries me since PHP was just updated from 4.3.11 to 5.1.2 on my server the other day. It's working perfectly and so I was trying really hard not to mess with that
IWorx-Chris
03-16-2006, 01:00 PM
int, if you didn't change PHP on your system it's still linked against the old MySQL libs. The only way to get PHP to "see" the new MySQL is to link against it (or use an RPM that was previously linked against it).
So I'd recompile PHP at this point and it should link against the new MySQL libs you installed.
Chris
int, if you didn't change PHP on your system it's still linked against the old MySQL libs. The only way to get PHP to "see" the new MySQL is to link against it (or use an RPM that was previously linked against it).
So I'd recompile PHP at this point and it should link against the new MySQL libs you installed.
Chris
Alright, got it. Thanks Chris
I'm getting this when trying to compile PHP5:
Error: Missing Dependency: php = 4.3.11-100.rhe4x.iworx is needed by package php-mhash
Error: Missing Dependency: php = 4.3.11-100.rhe4x.iworx is needed by package php-mcrypt
Error: Missing Dependency: libmhash.so.2 is needed by package php-mhash
Installed PHP RPMs:
[root@yoda ~]# rpm -qa | grep php
php-mysql-4.3.11-100.rhe4x.iworx
php-4.3.11-100.rhe4x.iworx
php-pear-4.3.11-100.rhe4x.iworx
php-iworx-4.3.9-6.rhe4x.iworx
php-snmp-4.3.11-100.rhe4x.iworx
Any ideas?
Dj-Grobe
06-27-2006, 10:02 PM
this how to not work chris, you should update or delete.
Bets regards.
Justec
06-28-2006, 10:59 AM
Maybe you could give Chris some more info as to why its not working for you.
Dj-Grobe
06-28-2006, 01:20 PM
on centos 4.3 , the original post of chris not work.
I added that to /etc/yum.conf
Then run
yum upgrade
And that return error:
yum upgrade
Setting up Upgrade Process
Setting up repositories
Cannot open/read repomd.xml file for repository: interworx-php5-mysql4.1
failure: repodata/repomd.xml from interworx-php5-mysql4.1: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from interworx-php5-mysql4.1: [Errno 256] No more mirrors to try.
You can't download the .rpms for PHP5 and MySQL 4.1 anymore - at least not from IWorx. You need to download the .srpms (source rpms), compile them and then you can install them :)
I think the instructions for that are on one of the pages of this thread too :p
newmind
07-03-2006, 07:04 PM
Hey all.
Newbie here with an easy question.
Where do I get the -devel RPMs that Chris mentions one will likely need when upgrading to PHP5?
I've got a CentOS 4.3 box and I get the following error when attempting to "rpmbuild --rebuild --with rhe4x http://updates.interworx.info/iworx/SRPMS/experimental/php-5.0.4-100.iworx.src.rpm"
************************************************** **
Installing http://updates.interworx.info/iworx/SRPMS/experimental/php-5.0.4-100.iworx.src.rpm
error: Failed build dependencies:
libgcrypt-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
bzip2-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
libc-client-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
db4-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
expat-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
freetype-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
gdbm-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
gmp-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
aspell-devel >= 0.50.0 is needed by php-5.0.4-100.rhe4x.iworx.i386
libjpeg-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
libpng-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
pam-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
libstdc++-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
ncurses-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
pcre-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
libmcrypt-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
postgresql-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
unixODBC is needed by php-5.0.4-100.rhe4x.iworx.i386
unixODBC-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
libxslt-devel >= 1.0.18-1 is needed by php-5.0.4-100.rhe4x.iworx.i386
libxml2-devel >= 2.4.14-1 is needed by php-5.0.4-100.rhe4x.iworx.i386
cyrus-sasl-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
openldap-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
readline-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
libmhash-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
net-snmp-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
elfutils-devel is needed by php-5.0.4-100.rhe4x.iworx.i386
**************************************************
Thanks for feedback...
IWorx-Paul
07-03-2006, 11:04 PM
Hi newmind,
Usually it's as easy as
yum install <dependency name here>
example:
yum install libgcrypt-devel bzip2-devel etc
you can do one at a time or many at once.
Paul
newmind
07-04-2006, 09:44 AM
Thanks, Paul.
I'll give it a shot this evening...
--Noah
newmind
07-04-2006, 07:26 PM
I notice that there are 2 SRPMs for PHP5: 5.0.4 & 5.1.2.
Will Iworx Chris's "rpmbuild --rebuild --with rhe4x http://updates.interworx.info/iworx/SRPMS/experimental/php-5.0.4-100.iworx.src.rpm"
work for 5.1.2, or should I just use 5.0.4?
Thanks,
--Noah
customs
07-31-2006, 06:50 AM
Hi guys!
I want to upgrade php to the 5th version on CentOS 3.7 (final).
I can ask my admin to do it, but need to be sure that he will not break
the Iworx box accidentally.
Can you point me to some tutorial? I read few forum posts, but
found nothing about CentOS 3.7
IWorx-Tim
08-01-2006, 11:39 AM
Hi guys!
I want to upgrade php to the 5th version on CentOS 3.7 (final).
I can ask my admin to do it, but need to be sure that he will not break
the Iworx box accidentally.
Can you point me to some tutorial? I read few forum posts, but
found nothing about CentOS 3.7
InterWorx has it's own PHP installed to run the panel itself. Upgrade the one on the box to your heart's content.
WebScHoLaR
12-18-2006, 01:38 PM
I am trying to upgrade the PHP, as per Chris post I have installed most of the devel packages but this is the one that is causing conflict:
[root@interworx i386]# rpmbuild --rebuild --with rhe4x http://updates.interworx.info/iworx/SRPMS/experimental/php-5.2.0-100.iworx.src.rpm
Installing http://updates.interworx.info/iworx/SRPMS/experimental/php-5.2.0-100.iworx.src.rpm
error: Failed build dependencies:
libc-client-devel is needed by php-5.2.0-100.rhe4x.iworx.i386When I try to install it using Yum,
[root@interworx i386]# yum install libc-client-devel
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package libc-client-devel.i386 0:2002e-14 set to be updated
--> Running transaction check
--> Processing Conflict: libc-client-devel conflicts imap-devel
--> Finished Dependency Resolution
Error: libc-client-devel conflicts with imap-develAny suggestions are much appreciated.
WebScHoLaR
12-18-2006, 03:15 PM
No worries.I have taken care of it.
IWorx-Socheat
12-18-2006, 03:39 PM
Glad you got it sorted out. In case others have the same problem, what was the fix?
WebScHoLaR
12-18-2006, 03:58 PM
Glad you got it sorted out. In case others have the same problem, what was the fix?
It was a Virtuozzo VPS on which I was upgrading the PHP.Virtuozzo had installed the IMAP and that was conflicting. As I am using InterWorx on that VPS so the IMAP server installed by the Virtuozzo was useless. So the solution is to simply remove the installed Virtuozzo IMAP server.
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.