Announcement

Collapse
No announcement yet.

Php5 / Mysql 4.1.9 Howto

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by IWorx-Chris
    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
    Last edited by pascal; 06-20-2005, 07:15 PM.

    Comment


    • #32
      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

      Comment


      • #33
        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...

        Comment


        • #34
          Paul,

          You should be all set, I'll be posting a HOWTO as soon as I get the info together.

          Chris
          Chris Wells
          InterWorx L.L.C. | http://interworx.com
          InterWorx Control Panel

          Comment


          • #35
            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

            Code:
            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.

            Code:
            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

            Code:
            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.

            Code:
            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

            Code:
            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
            Chris Wells
            InterWorx L.L.C. | http://interworx.com
            InterWorx Control Panel

            Comment


            • #36
              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

              Comment


              • #37
                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
                Chris Wells
                InterWorx L.L.C. | http://interworx.com
                InterWorx Control Panel

                Comment


                • #38
                  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

                  Comment


                  • #39
                    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
                    Chris Wells
                    InterWorx L.L.C. | http://interworx.com
                    InterWorx Control Panel

                    Comment


                    • #40
                      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

                      Comment


                      • #41
                        It's actually cos3x
                        Chris Wells
                        InterWorx L.L.C. | http://interworx.com
                        InterWorx Control Panel

                        Comment


                        • #42
                          Great - thanks.

                          Comment


                          • #43
                            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

                            Comment


                            • #44
                              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
                              [ JUSTIN ]
                              [ OFF unit ]
                              [ WEB DESIGN / DEVELOPMENT, GRAPHIC DESIGN, OTHER STUFF
                              ]

                              Comment


                              • #45
                                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!

                                Originally posted by Justec
                                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

                                Comment

                                Working...
                                X