Search code examples
phpwebserverportability

PHP 7.1.9 portable webserver issues


So I have a Portable Webserver program called USBWebserver, because the original program still uses php 5.3 (I believe) I went on an adventure to upgrade it so that not only me but the rest of my class can use it.

  • I upgraded the Apache server build to 2.4.27
  • I upgraded the PHP binary to 7.1.9

The thing is... Everything functions but one thing: For some reason MBString (Yes, just MBString) will not start up with a variable path anymore. If I set a manual path it functions it just no longer does this with a variable one.

Before people say:"Then why don't you just make it a manual path and be done with it." because it needs to stay portable and usable "out of the box" so to say.

I am quite stuck on how to fix this issue. If any info is needed, please ask and I will edit this post with the info. (Like if you need php.ini)


Solution

  • After a lot more messing about with it I finally found out what fixed this issue. I'll post it here so that others who might try to do this won't have this hurdle to combat.

    extension_dir's path at first was "php\ext" as php.exe wasn't liking that I changed it to ext, which php.exe liked but apache...not so much.

    After a long while I changed the path to extension_dir = ".\php\ext" and as if the gate of heaven opened... it functioned. Fully and completely without even one error.

    So now I have a modified USBWebserver running:

    • PHP 7.1.9
    • Apache 2.4.27
    • PHPMyAdmin 4.0.4.2
    • MySQL 5.6.13

    Fully portable, fully fuctional. I hope this little tid bit of info helps someone else some day and if some people want the program, ask and I will make a download link and edit it into my original post any this answer.