This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Problem with Pear Installation using xampp

Installation and environment issues, mainly on 1.x but there's some 2.x here too.

Problem with Pear Installation using xampp

by spascoe » Sat Nov 12, 2005 7:57 am

Hi,

First post here, looks like really cool stuff. (Experienced programmer, PHP newbie)

I'm trying to set up an environment to work in. I installed the apachefriends xampp distribution that includes apache, mysql, and php 5 on my WinXP SP2 system.

I used pear to install symfony 0.4.1 (also tried 0.5.99). When I run symfony.bat, I get the following error:

Could not open input file: C:\xampp\php\..\bin\symfony.php
Looking at the batch file, I noticed right away that I don't have a PHP_COMMAND set, nor a PHP_CLASSPATH. Neither is SYMFONY_HOME set.

What would be appropriate settings for these values?
My xampp install is c:\xampp, with php as a subdirectory of xampp.

Thanks for the assistance,
Scott
spascoe
Member
 
Posts: 52
Joined: Sat Nov 12, 2005 7:50 am
Location: Indianapolis

Re: Problem with Pear Installation using xampp

by fabien » Sat Nov 12, 2005 3:49 pm

Is php in your PATH?

The 0.5.99 release is better on windows because 0.4.1 has several windows issues.
fabien
Faithful Member
 
Posts: 487
Joined: Sat Oct 22, 2005 9:01 am

Re: Problem with Pear Installation using xampp

by spascoe » Sat Nov 12, 2005 4:24 pm

Hi Fabien,

Yes, my path contains c:\xampp\php.

I had tried this with the 0.5.99 release as well. After using pear to uninstall symfony 0.4.1, I used pear to install the symfony-beta.

I was in the c:\xampp\php directory when I ran the install. After it installed, I ran symfony with no commandline options. It gave me the same error as documented above.

I remarked out the @echo off in symfony.bat and attached the output.

Thanks, Scott
Attachments

[The extension txt has been deactivated and can no longer be displayed.]

spascoe
Member
 
Posts: 52
Joined: Sat Nov 12, 2005 7:50 am
Location: Indianapolis

Re: Problem with Pear Installation using xampp

by randallemery » Tue Nov 15, 2005 5:02 pm

When you do a "pear config-show" does everything look ok?
If not, check out this post:
http://www.symfony-project.com/forum/index.php/t/69/

Also, it's possible to install PEAR and run it from the command line without having the PATH environment variable set in windows, so I think it might be possible to install Symphony without PATH, too (if you first cd to the PHP directory in the command window).

Don't know if this is your situation... I'm going from the error message and the following note in the text output you attached:

REM echo WARNING: Set environment var PHP_COMMAND to the location of your php.exe
REM echo executable (e.g. C:\PHP\php.exe). (Assuming php.exe on Path)

Anyway, here's instructions on how to set environment variables in Windows XP:

1. From the desktop, right click My Computer and click properties.
2. In the System Properties window, click on the Advanced tab.
3. In the Advanced section, click the Environment Variables button.
4. Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon:
C:\Program Files;C:\Winnt;C:\Winnt\System32
randallemery
Member
 
Posts: 35
Joined: Sat Nov 12, 2005 7:29 pm

Re: Problem with Pear Installation using xampp

by spascoe » Wed Nov 16, 2005 5:31 am

I figured out part of the solution tonight. The Pear that comes in xampp 1.5.0 and xampp 1.5.0 pl1 is slightly broken.

The pear.bat contains three lines

ATTRIB +R %PHP_PEAR_BIN_DIR%\pear.bat >nul
ATTRIB +R %PHP_PEAR_BIN_DIR%\peardev.bat >nul
ATTRIB +R %PHP_PEAR_BIN_DIR%\pecl.bat >nul

This are wrong and need to be REM'd out.

Pear will then successfully upgrade.

I'm continuing on now to see if the symfony stuff will successfully install.

Thanks, Scott
spascoe
Member
 
Posts: 52
Joined: Sat Nov 12, 2005 7:50 am
Location: Indianapolis

Re: Problem with Pear Installation using xampp

by spascoe » Wed Nov 16, 2005 5:53 am

Yep, that fixed my symfony problems. I've been creating a document that shows my example from the very beginning. I will post it to the wiki soon, and hopefully it will provide yet another example of how to get this up and runing.

Now Posted at: http://www.symfony-project.com/trac/wiki/BeginningSymfonyWit hPear

Scott
spascoe
Member
 
Posts: 52
Joined: Sat Nov 12, 2005 7:50 am
Location: Indianapolis