Getting PEAR to work on XAMPP (Apache/MySQL stack on Windows)

后端 未结 8 1472
醉酒成梦
醉酒成梦 2020-11-30 06:24

I\'m trying to install Laconica, an open-source Microblogging application on my Windows development server using XAMPP as per the instructions provided.

The website c

相关标签:
8条回答
  • 2020-11-30 06:37

    Another gotcha for this kind of problem: avoid running pear within a Unix shell (e.g., Git Bash or Cygwin) on a Windows machine. I had the same problem and the path fix suggested above didn't help. Switched over to a Windows shell, and the pear command works as expected.

    0 讨论(0)
  • 2020-11-30 06:38

    You need to fix your include_path system variable to point to the correct location.

    To fix it edit the php.ini file. In that file you will find a line that says, "include_path = ...". (You can find out what the location of php.ini by running phpinfo() on a page.) Fix the part of the line that says, "\xampplite\php\pear\PEAR" to read "C:\xampplite\php\pear". Make sure to leave the semi-colons before and/or after the line in place.

    Restart PHP and you should be good to go. To restart PHP in IIS you can restart the application pool assigned to your site or, better yet, restart IIS all together.

    0 讨论(0)
  • 2020-11-30 06:38

    AS per point 1, your PEAR path is c:\xampplite\php\pear\

    However, your path is pointing to \xampplite\php\pear\PEAR

    Putting the two one above the other you can clearly see one is too long:

    c:\xampplite\php\pear\

    \xampplite\php\pear\PEAR

    Your include path is set to go one PEAR too deep into the pear tree. The PEAR subfolder of the pear folder includes the PEAR component. You need to adjust your include path up one level.

    (you don't need the c: by the way, your path is fine as is, just too deep)

    0 讨论(0)
  • 2020-11-30 06:44

    I fixed

    avast deletes your server.php in your directory so disable the antivirus

    check the (server.php) file on your laravel folder

    server.php

    <?php
    
    /**
     * Laravel - A PHP Framework For Web Artisans
     *
     * @package  Laravel
     * @author   Taylor Otwell <taylor@laravel.com>
     */
    
    $uri = urldecode(
        parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
    );
    
    // This file allows us to emulate Apache's "mod_rewrite" functionality from the
    // built-in PHP web server. This provides a convenient way to test a Laravel
    // application without having installed a "real" web server software here.
    if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
        return false;
    }
    
    require_once __DIR__.'/public/index.php';

    0 讨论(0)
  • 2020-11-30 06:45

    If you are using the portable XAMPP installation and Windows 7, and, like me have the version after they removed the XAMPP shell from the control panel none of the suggested answers here will do you much good as the packages will not install.

    The problem is with the config file. I found the correct settings after a lot of trial and error.

    Simply pull up a command window in the \xampp\php directory and run

    pear config-set doc_dir :\xampp\php\docs\PEAR
    pear config-set cfg_dir :\xampp\php\cfg
    pear config-set data_dir :\xampp\php\data\PEAR
    pear config-set test_dir :\xampp\php\tests
    pear config-set www_dir :\xampp\php\www
    

    you will want to replace the ':' with the actual drive letter that your portable drive is running on at the moment. Unfortunately, this needs to be done any time this drive letter changes, but it did get the module I needed installed.

    0 讨论(0)
  • 2020-11-30 06:52

    On Windows use the Xampp shell (there is a 'Shell' button in your XAMPP control panel)

    then

    cd php\pear
    

    to go to 'C:\xampp\php\pear'

    then type

    pear
    
    0 讨论(0)
提交回复
热议问题