"zf" Command Launches Code Editor No Matter What

For programming and general questions on Zend Framework

Re: "zf" Command Launches Code Editor No Matter What

Postby us2rn4m2 on Mon Jul 02, 2012 11:38 pm

In wamp there are 2 php.ini files !
Set the include_path in C:\wamp\bin\apache\Apache2.2.17\bin\php.ini
Set the include_path in C:\wamp\bin\php\php.ini

(include_path = "C:\wamp\library")

When you need to update the php.ini:
update this one: C:\wamp\bin\apache\Apache2.2.17\bin\php.ini
us2rn4m2
 
Posts: 48
Joined: Mon Jun 18, 2012 12:41 am

Re: "zf" Command Launches Code Editor No Matter What

Postby i_banks on Wed Jul 04, 2012 7:35 pm

Okay I've followed the latest advice step by step..........same thing. Code editor still launching. I've restarted the computer after the updates as well as restarted the Wamp server. This is unbelievable.
i_banks
 
Posts: 9
Joined: Thu Jun 28, 2012 10:23 pm

Re: "zf" Command Launches Code Editor No Matter What

Postby us2rn4m2 on Wed Jul 04, 2012 9:02 pm

okay okay ...
First:
- Me and you have windows and wamp
- The path configuration that I give you is my own.
- Now we have the same configuration. It works for me and I use zf tool every day.
- I'm not professionnal. I have an intermediate level with Zend and PHP.
- and sorry for my poor English, I'm French.

Now:
Code editor is it your 'default code editor' ?
When code editor is open is it blank or there is a file inside and witch file ?

open command line and:
>cd C:\wamp\bin\php\php5.3.5
press enter
>zf ?
press enter

what's happened ?

If you see a listing do:
> zf ?
like in my last post ....

If code editor is launching change your code editor preferences for files and make again the last test
what's happened ?

At this point if it doesn't work you have probably a problem with your paths or with your environment variables
(I repeat I'm not professionnal)


This is my complete environment variables -> system variables -> Path
Compare with yours.

C:\Program Files\Common Files\Microsoft Shared\Windows Live;
%SystemRoot%\system32;
%SystemRoot%;%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;
C:\wamp\bin\php\php5.3.5;
C:\wamp\bin\mongo;
C:\Extends\Tortoise\bin;
C:\wamp\bin\php\php5.3.5\PEAR;
C:\wamp\bin\mysql\mysql5.5.8\bin;
C:\Extends\Gwt\_sdk\2.2.0;
%ANT_HOME%\bin;%M2_HOME%\bin;%JAVA_HOME%\bin;
C:\Extends\Python\2.7.1;
C:\Program Files\GnuWin32\bin;
C:\Extends\QuickTime\QTSystem\;
"C:\Program Files\Zend\ZendServer\bin";
"C:\Program Files\Zend\ZendServer\share\ZendFramework\bin";
C:\Program Files\Zend\MySQL51\bin;
c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;
c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;
C:\Program Files\Windows Live\Shared;
C:\Users\Packard-Bell\AppData\Roaming\npm;
C:\Program Files\nodejs\;
us2rn4m2
 
Posts: 48
Joined: Mon Jun 18, 2012 12:41 am

Re: "zf" Command Launches Code Editor No Matter What

Postby us2rn4m2 on Wed Jul 04, 2012 9:24 pm

I have a little picture for you:
https://docs.google.com/document/d/1CwPaiPbbHxBzA3wUo1BPuy2ryTNayHByQ3djs3JGK0I/edit

Look the icon zf.bat .It's like yours ?
us2rn4m2
 
Posts: 48
Joined: Mon Jun 18, 2012 12:41 am

Re: "zf" Command Launches Code Editor No Matter What

Postby us2rn4m2 on Wed Jul 04, 2012 11:42 pm

try:
- go to C:\wamp\bin\php\php5.3.5
- rename zf.bat by test (just the name)
- now zf.bat = test.bat
- close all you folder

- open command line and:
> test
press enter

what's happened ?

If it' works, GREAT !! You have probably more than one zf.bat on your system. Search and destroy it.
us2rn4m2
 
Posts: 48
Joined: Mon Jun 18, 2012 12:41 am

Re: "zf" Command Launches Code Editor No Matter What

Postby i_banks on Thu Jul 05, 2012 5:22 pm

Your Questions 1:

“Code editor is it your default code editor?”


At first it kept pulling up Dreamweaver. I got rid of DW and now it asks which program will I like to use to open up the following file.

When code editor is open is it blank or there is a file inside and witch file ?


It opens the file zf.php


Your Questions 2:

open command line and:
>cd C:\wamp\bin\php\php5.3.5
press enter
>zf ?
press enter

what's happened ?


The same thing. It’s asks what program will I like to choose to open and read the zf.php file. I chose Notepad just to test it out.


Your Questions 3:


If code editor is launching change your code editor preferences for files and make again the last test
what's happened ?


Okay this time I choose for the file preference the same CMD that I’m using. C:\Windows\System32\cmd.exe and it opened another CLI window asking me the same thing, going through the same repeated steps, creating a looping issue.

Your Questions 4:

Look the icon zf.bat .It's like yours ?


Yep. That’s how I have it setup.

Your Questions 5:


try:
- go to C:\wamp\bin\php\php5.3.5
- rename zf.bat by test (just the name)
- now zf.bat = test.bat
- close all you folder

- open command line and:
> test
press enter

what's happened ?


Okay. I ran it and it performed just like the ‘zf’ command with no code editor launching with only one exception there was an error printed that reads:

Code: Select all
An Error Has Occurred
An action and provider is required.

Zend Framework Command Line Console Tool v1.11.12
Usage:
    zf [--global-opts] action-name [--action-opts] provider-name [--provider-opt
s] [provider parameters ...]
    Note: You may use "?" in any place of the above usage string to ask for more
specific help information.
    Example: "zf ? version" will list all available actions for the version prov
ider.

Providers and their actions:
  Version
    zf show version mode[=mini] name-included[=1]
    Note: There are specialties, use zf show version.? to get specific help on t
hem.


The rest is just like the 'zf' command should work. I haven't tried matching my environment variables with yours just yet. I'm working on that right now.
i_banks
 
Posts: 9
Joined: Thu Jun 28, 2012 10:23 pm

Re: "zf" Command Launches Code Editor No Matter What

Postby i_banks on Thu Jul 05, 2012 5:48 pm

I just destroyed another .bat file I had on my system on the desktop. Then I changed it back from test.bat to zf.bat. Still the same result though.
i_banks
 
Posts: 9
Joined: Thu Jun 28, 2012 10:23 pm

Re: "zf" Command Launches Code Editor No Matter What

Postby i_banks on Thu Jul 05, 2012 7:22 pm

Okay!!! I got something!

Here's what I have. The issue is that I have the following values for the variable PATHEXT.

On system-->environment variables-->PATHEXT-->.COM;.EXE;.PHP;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

I took out the .PHP value and the 'zf' command looks like it worked, but still had the little error message that I documented in the previous post when I ran it as 'test'. I manually put that .PHP value in there and I noticed it was before the .BAT value. What was I telling my system to do?
i_banks
 
Posts: 9
Joined: Thu Jun 28, 2012 10:23 pm

Re: "zf" Command Launches Code Editor No Matter What

Postby us2rn4m2 on Thu Jul 05, 2012 9:11 pm

WHOOO !! A LOT OF GOOD NEWS !!!

This is my system -> environment variables -> PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
There is no '.PHP' value !!
If think you can delete it.

Now don't be worry about this message :
'An Error Has Occurred
An action and provider is required.'

This is not really an error. It's just a little message who say to you:
'your command was ' zf ' or ' test ' in your last test. But it' not enought ! '

To fix that problem use the good syntax when you call zf, look:
Good syntax: zf ? or zf --help // You see the question mark ' ? ' after ' zf ' ! zf ? -> that's the Minimun Syntax !!!
Bad syntax: zf or test in your last test

try !
You see an error !
But with or whitout this error, it's the same thing ! IT WORKS ! IT WORKS !!

Please for your convenience associate a default code editor for php file !
us2rn4m2
 
Posts: 48
Joined: Mon Jun 18, 2012 12:41 am

Re: "zf" Command Launches Code Editor No Matter What

Postby i_banks on Thu Jul 05, 2012 10:47 pm

It does finally work on both my computers now. I really appreciate your assistance in this journey. I've learned a lot. Now I can begin learning Zend. Thanks again!
i_banks
 
Posts: 9
Joined: Thu Jun 28, 2012 10:23 pm

Previous

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 1 guest