Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2011
    Location
    Lumberton, TX
    Posts
    596
    Plugin Contributions
    0

    Default How to Contribute to Zen-Cart - Part III PHP

    In the previous post, I mentioned "attention to detail." For those of you who have served in the US military, you know this common phrase. It is taught in the most demanding ways. A smudge on a buckle or a dull spot on your shoes are both good examples. For what we are doing here, that smudge can be a typo. The dull spot can be putting one file in the wrong directory. This part is fully in the weeds so paying close attention is required.
    • Read the step instructions
    • Locate the needed resources including URLs, software and files
    • Complete the step
    • Verify the steps by walking through them a second time. I can promise you that you can save yourself hours of time and angst by catching a mistake at this point.



    So, I installed XAMPP with PHP 7.4.29. You could have easily chosen to install 8.1 first. For some reason, I always seem to start low and work up. But this is documented by others to work either way. For whats if worth, I did not choose the method shown below initially as mentioned in a post a while back. lat9 metioned she had used the method below before and so far, I have found it to be a better solution. So let's get started.

    • In you favorite file manager, navigate to C:/xamp
    • for me, my /php folder is version 7.4.29 which is my base install. Create a new folder for the version(s) of php you want to add. Specifically, I created /php8 and /php81
    • Now we need to download the correct php version from
      https://windows.php.net/download#php-8.1. I used the VS16 x64 Thread Safe version for both PHP 8.0.19 and PHP 8.1.6.
    • Copy both files into the applicable folder that you just created. Extract both files. This zip file does not have a folder inside the zip so the files install into the chosen destination. So many times I say extract to /temp and get /temp/zipfilename instead. That is not the case here.
    • There is one file missing that seems to cause problems and that is browsecap.ini. So go find this file in /php/extras and copy it into both the new folders at /php8/extras and /php81/extras.
    • You will need to repeat these steps below for each php version you want to use.
    • It may be that you do not have a php.ini file for this version. The instructions linked to above says to open php.ini-development and rename as php.ini. I tried that...and got a 500 server error. I used php.ini-production.
    • Now open php.ini and look for
      Code:
      extension_dir="ext"
      The instructions also say to uncomment if by removing the leading semicolon. Mine had
      Code:
      extension_dir="C:\xampp\php\ext"
      and I know that I need the php part to adjust with the version so I changed it to
      Code:
      extension_dir="ext"
      Save the php.ini file.
    • Launch XAMPP Control Panel as Administrator.
    • Click "Configure" and you get the screen below so that we can configure Apache.

      Click image for larger version. 

Name:	Untitled.png 
Views:	111 
Size:	58.1 KB 
ID:	20025

      When clicking on these, Notepad will open the file for editing. Following the instructions from
      https://themanish.com/run-multiple-v...ultiple-xampp/ for Steps 2 and Step 3 (we have already done Step 1 above).
    • Click on httpd-xampp.conf and this should open in Notepad.
    • Go to the bottom on the file and add the following code for PHP 8.0. You may edit this code for other versions.

      Code:
      ScriptAlias /php8 "C:/xampp/php8"
      <Directory "C:/xampp/php8">
          AllowOverride None
          Options None
          Require all denied
          <Files "php-cgi.exe">
              Require all granted
          </Files>
      </Directory>
      For PHP 8.1 this code has be changed so you can compare the two for other versions.

      Code:
      ScriptAlias /php81 "C:/xampp/php81"
      <Directory "C:/xampp/php81">
          AllowOverride None
          Options None
          Require all denied
          <Files "php-cgi.exe">
              Require all granted
          </Files>
      </Directory>
    • So the original instructions have two options. One is folder based but the really flexible one is to create specific ports for each php version. So we are following Step 4 Option 2.
    • In the same file add the following under what you just added.

      for PHP 8.0

      Code:
      Listen 8080
      <VirtualHost *:8080>
          UnsetEnv PHPRC
          <FilesMatch "\.php$">
              php_flag engine off
              SetHandler application/x-httpd-php8
              Action application/x-httpd-php8 "/php8/php-cgi.exe"
          </FilesMatch>
      </VirtualHost>
      and for PHP 8.1
      Code:
      Listen 8081
      <VirtualHost *:8081>
          UnsetEnv PHPRC
          <FilesMatch "\.php$">
              php_flag engine off
              SetHandler application/x-httpd-php81
              Action application/x-httpd-php81 "/php81/php-cgi.exe"
          </FilesMatch>
      </VirtualHost>
    • Save the file.
    • Restart your Apache server.


    If you did everything correctly, you should be able to get the following screenshots simply by changing the port in your broswer. See examples below...

    For my base install, no port is specified
    Click image for larger version. 

Name:	Untitled2.jpg 
Views:	77 
Size:	50.9 KB 
ID:	20026

    for PHP 8.0, specify Port 8080 ie localhost:8080
    Click image for larger version. 

Name:	Untitled3.jpg 
Views:	77 
Size:	50.3 KB 
ID:	20027

    for PHP 8.1, specify Port 8081 ie localhost:8081
    Click image for larger version. 

Name:	Untitled4.jpg 
Views:	76 
Size:	51.9 KB 
ID:	20028

    This was rather long but let me know if you have any questions. We will spend some time adding xDebug to the new php versions in the next segment.

    Thanks
    Chris

  2. #2
    Join Date
    Jul 2012
    Posts
    16,778
    Plugin Contributions
    17

    Default Re: How to Contribute to Zen-Cart - Part III PHP

    You may or may not know this. First the text of the three images at the bottom is not very legible even when zooming in, though clicking on the image does make it legible. Second, if there is text that is considered important in those displays, may I suggest copying and pasting whatever content is considered important so this using screen readers may glean the associated or important content? I'm sure that this is helpful to anyone having related issues.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Feb 2011
    Location
    Lumberton, TX
    Posts
    596
    Plugin Contributions
    0

    Default Re: How to Contribute to Zen-Cart - Part III PHP

    Quote Originally Posted by mc12345678 View Post
    You may or may not know this. First the text of the three images at the bottom is not very legible even when zooming in, though clicking on the image does make it legible. Second, if there is text that is considered important in those displays, may I suggest copying and pasting whatever content is considered important so this using screen readers may glean the associated or important content? I'm sure that this is helpful to anyone having related issues.
    Thank You! I will get updated screenshots with closeups of what his important.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,778
    Plugin Contributions
    17

    Default Re: How to Contribute to Zen-Cart - Part III PHP

    Quote Originally Posted by g2ktcf View Post
    Thank You! I will get updated screenshots with closeups of what his important.
    Well upon clicking on the image, the text is visible, but the point is that text reading software has no text to read. Thus those individuals that use software to "read" this helpful information do not reap the benefit of what is contained in those images. (Consider the visually impaired which are a fair number of developers in the forum.)
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. How to Contribute to Zen-Cat - Part II xDebug
    By g2ktcf in forum General Questions
    Replies: 0
    Last Post: 4 Jun 2022, 02:52 PM
  2. How to Contribute to Zen-Cat - Part I XAMPP
    By g2ktcf in forum General Questions
    Replies: 0
    Last Post: 4 Jun 2022, 02:10 PM
  3. How to Contribute to Zen-Cart - aka Zen-Cart for Dummies!
    By g2ktcf in forum General Questions
    Replies: 6
    Last Post: 1 Jun 2022, 05:10 PM
  4. can i remove the cart part of zen cart?
    By h_2_o in forum General Questions
    Replies: 2
    Last Post: 20 Jan 2009, 07:55 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR