Announcement

Collapse
No announcement yet.

Wich php Version is minimum needed for vb3.0?

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

  • Wich php Version is minimum needed for vb3.0?

    I got like many other non-server Webmaster PHP 4.06, cause most of them, like me cant upgrade it myself.
    Can you say something to me thtat sound like: "yes , you wont have any problems with that php version"

    Greets
    from Germany
    owner of 2 licenses

  • #2
    4.0.6 is the minimum version for v3.0

    Comment


    • #3
      hell..yeahh so i am lucky cause i can use vb3.0 .. GREAT..cause many developers got the new developed php codes on PHP 4.10 or higher.
      I recognize this, when i search a ready written script on www.php-ressource.de. So many CMS Systems or Link/Content Database Systems have only support for higher versions.

      ONE MORE QUETSIONS i ot:
      vbContent is integrrated or is it an extra software?

      Comment


      • #4
        Making your code work with PHP < 4.1.0 doesn't take a lot of effort... don't know why they can't do it.

        Comment


        • #5
          Ever tried to create superglobal variables in PHP? I couldn't find a way yet... would be happy to learn it
          GameCrash

          Project Tools Importer for forum threads
          Current Version: 1.0.0 Beta 3

          Comment


          • #6
            You cannot create superglobal variables in PHP.

            in PHP versions below 4.1.0, you need to bring $HTTP_*_VARS into the global namespace within functions.

            But it still doesn't take a lot of effort.

            Comment


            • #7
              Originally posted by GameCrash
              Ever tried to create superglobal variables in PHP? I couldn't find a way yet... would be happy to learn it
              Why do you want to create superglobal variables anyway?

              Just write a fakeglobals.php with something like:
              PHP Code:
              foreach($HTTP_POST_VARS as $key => $value) {
              $MY_GLOBALS[$key] = $value;
              }
              foreach(
              $HTTP_SERVER_VARS as $key => $value) {
              $MY_SERVER[$key] = $value;
              }
              foreach(
              $HTTP_GET_VARS as $key => $value) {
              $MY_GET[$key] = $value;

              and in front of each of your scripts:

              if (!ereg("^4",phpversion())) {
              require('fakeglobals.php);
              }

              Comment


              • #8
                yeah or:
                PHP Code:
                if (phpversion() < 4.1)
                {
                    
                $_SERVER =& $HTTP_SERVER_VARS;
                    
                $_COOKIE =& $HTTP_COOKIE_VARS;
                    
                $_POST =& $HTTP_POST_VARS;
                    
                $_GET =& $HTTP_GET_VARS;
                    
                $_FILES =& $HTTP_POST_FILES;
                    
                $_REQUEST array_merge($_GET$_POST$_COOKIE);

                that would pretty much cover it.
                Last edited by Cyborg from DH; Mon 26th May '03, 11:36am.

                Comment


                • #9
                  Of course I know that. But this means that you have to use a
                  PHP Code:
                  global $_POST
                  in your functions. And that is something which is not recommered (I have read some problem reports about this, stating sometimes the content of the the array in the function is different to the array outside - don't ask me why...
                  GameCrash

                  Project Tools Importer for forum threads
                  Current Version: 1.0.0 Beta 3

                  Comment


                  • #10
                    global is there for a reason, and that happens to be it.


                    (I still prefer to write generic functions which have the required args passed to it.)


                    And I'd like to see those reports, chances are they weren't doing it correctly, or using a really old PHP version. (I can't remember any PHP4 bugs like that)

                    Comment


                    • #11
                      Well, I've read this... don't know if it's true of course...
                      GameCrash

                      Project Tools Importer for forum threads
                      Current Version: 1.0.0 Beta 3

                      Comment


                      • #12
                        Originally posted by Cyborg from DH
                        Making your code work with PHP < 4.1.0 doesn't take a lot of effort... don't know why they can't do it.
                        It involves more hassle than you might think. It's not just the super global arrays like $_POST etc., quite a bunch of functions have been added between 4.0.6 and 4.3 for which you would need to create work-arounds for your scripts in order to have backwards compliance with older PHP versions.

                        Let's take str_word_count, it has been added with the introduction of PHP 4.3.0 . I would have loved to use this function for my site, but I can't. Why? My webhost's server runs 4.2.3, so I had to write my own function to count the number of words within a given string (and i bet the use of str_word_count would have been faster).

                        Comment


                        • #13
                          Actually it doesn't involve more hassle than I might think. I know how much hassle it is quite well, and it only takes an extra 2-3 days of work to get something to work on < 4.1, so I don't think it would be that big of a deal for these people to do.

                          Comment


                          • #14
                            well you could actually just create the super globals

                            $_POST = &$HTTP_POST_VARS;

                            would be a prime example, though you'd need to call global $_POST; which vB3 does anyway.
                            Scott MacVicar

                            My Blog | Twitter

                            Comment


                            • #15
                              /me looks at my post 6 posts up... and then the post right below it....

                              you're on the ball today scott good work,

                              (i'm just kidding, lol)

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X