Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8490437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:07:08+00:00 2026-06-10T22:07:08+00:00

I’m using Zend Framework at the office in a Windows7+XAMPP environment; I’m not able

  • 0

I’m using Zend Framework at the office in a Windows7+XAMPP environment; I’m not able to change this even if I want to, so I need to adapt. SO, I naturally installed Cygwin and Console2 in order to work in a more Linux-like environment.
The PHP and MySQL paths are in the environmental variables of Windows, so if I do in CMD this:

php --version
PHP 5.4.4 (cli) (built: Jun 13 2012 21:27:06)

There is a reponse. If I do the same in my Cygwig environment I also got response, so Cygwin can find the PHP path.
About Zend Framework, I downloaded the zip file and extracted the contents of the ZF bin directory to C:\xampp\php (that means zf.sh, zf.bat and zf.php) and all the library folder content to C:\xampp\php\pear\Zend so those are in the right path to be used.

In Windows CMD I managed to create something similar to an alias this way:

#cmd_aliases.txt
zf=php C:\xampp\php\zf.php $*

#cmd_autorun.cmd
@echo off
cls
doskey /macrofile=C:\Users\hector.ayala\Documents\cmd_aliases.txt

#cmd_autorun_install.cmd
reg add "hkcu\software\microsoft\command processor" /v Autorun /t reg_sz /d C:\cmd_autorun.cmd

And now in CMD I can do:

>zf show version
Zend Framework Version: 1.11.12

…as intended. HOWEVER I can’t do something similar in CygWin…
I did this in Cygwin:
$ cd ZendFramework-XX
$ mv bin/* /usr/local/bin
$ chmod +x /usr/local/bin/zf.sh
$ ln -s /usr/local/bin/zf.sh /usr/local/bin/zf

That means I did a symlink to the zf.sh in order to launch ZF just with zf. However I got this:

$ zf show version
Could not open input file: /usr/local/bin/zf.php

Then I said, Oh well! Maybe it’s ZF problem… My PHP returns me it’s version so PHP works, surely any kink of php file will work:

$ php simple_test.php
Could not open input file: simple_test.php

What the…? Why PHP works but at the same time it doesn’t?
Any ideas what can I do to just call Zend Framekork CLI with a simple custom zf as I did with CMD?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:07:10+00:00Added an answer on June 10, 2026 at 10:07 pm

    I’ve found way!!!!
    I didn’t knew about cygpath It’s a command line utility for converting between Windows and POSIX paths. Because Windows couldn’t understand the path, the zf.sh couldn’t process it and because of that I could get PHP version, but PHP couldn’t comprehend the path to files to work with them, thus the Could not open input file error. So all PHP needed was to understand the path.

    So reading the help of cygpath in the given link, I was able to understand this command and adapt the official zf.sh to my needs. So I changed into it the very last line from this:

    "$PHP_BIN" -d safe_mode=Off -f "$PHP_DIR/zf.php" -- "$@"
    

    To this:

    "$PHP_BIN" -d safe_mode=Off -f "$(cygpath -aw $PHP_DIR/zf.php)" -- "$@"
    

    Now it works!

    $ zf show version
    Zend Framework Version: 1.11.12
    

    Hopefully someone will find this useful 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I have thousands of HTML files to process using Groovy/Java and I need to
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.