hai
I read that to create a project, execute the zf Windows windows command (zf.bat):
C:\>zf.bat create project newproject
I saw zf.bat in my C:\wamp\www\Zend\bin, I want to create a new project in c:\wamp\www
When I tried to run c:\wamp\www\zf.bat, I got an error message:
"zf.bat is not internal or external command, operable program or batch file.."
Then I tried another method:
c:\wamp\zend\bin\>zf.bat create project newproject
But I got the following error message:
"php is not recognised internal or external command,oprable program or batch file"
I put the Zend Framework in c:\wamp/Zend and I added C:\wamp\zend\library in to my php.ini.
Please help me troubleshoot this problem.
Thanks!
You need to add php and the zend framework paths to your system environmental variables:
Right click on My Computer and select properties
Go to the advanced tab, and click on Environmental Variables
In the system variables box, scroll till you find the "Path" variable, select it and click the edit button.
Paths are separated using a semicolon ";". Add the path to the zend framework bin folder, and your php bin folder.
Click ok,ok,ok
You should now be able to use the zf command line tool anywhere you need it by typing "zf" to get the help info and to ensure you put the paths in properly.
Hello you probably need to have php.exe on your path to use zf.bat
try to edit the zf.bat and make sure to use the full path in the script your php.exe is probably located in your wamp directory somewhee
Related
I have installed php, mysql and nginx properly.
I am able to run the PHP pages from Eclipse, i.e Eclipse opens up chrome, and pages are displayed correctly.
I imported my existing PHP project into Netbeans.
When I try to run any of the php pages, netbeans opens up chrome, but the web address is always the same, and not the real path of the PHP file.
Why netbeans refers to the same location, instead of trying to run the file from its real path? how can I fix it?
Thanks,
Qwerty
I found the solution.
The green "play" button in Netbeans does not run the current file, but runs the PROJECT! This caused eclipse to run the project path instead of the current file location!
Therefore, in order to run the current file click on "Run -> Run File" (Shift +F6), and then it works.
Just make sure that the project path is set properly in "Run->Set Project Configuration -> Customize", and then set the project URL to:
http://localhost/
That`s it!
Thanks,
Qwerty
I recently installed a cakephp with composer to learn about framework use, and trying the bookmarks tutorial, but I get stucked in the checking your installation where you have to open the command line AKA cmd, and writing bin\cake.
It replies back: the system cannot find the path specified.
I've seen some information about how to set up the path variables but I'm guessing it's for version 2+ because apparently the cakephp 3 doesn't have a LIB folder like such:
YOUR_CAKE_DIR/lib/Cake/Console/
Any ideas on how to fix this?
Thanks
best regards!
***************UPDATE**********************
well, I've finally fixed the problem, the path I used for the cakePHP 3 instalation was:
c:\xampp\htdocs\caketest\bin
so I assume that If you aren't using xampp, it should point at the end to: cakeinstallation\bin...
my problem was that I always typed bin\cake but actually all I had to do was type only:
cake
you can read more information in here
bin\cake shouldn't require any special path settings other than being in the correct directory. However, you should make sure that php-cli is on your system's PATH. Depending on how you install PHP it could be in any number of places, but if php -v doesn't output the version of PHP you installed, you'll need to find where your installer put PHP and then setup the PATH environment variable.
With your example, AFAI remember the working directory they were executing cake binary was the parent of "bin" folder, in your case "caketest". I am talking without trying it (I dont have an environment close) you should use:
c:\xampp\htdocs\caketest> "bin/cake"
Watch the quotes. I think they are the main reason of that "the system cannot find the path specified."
I am supossing you are under windows (I saw xampp written in your post) and probably the xampp installation has already added the php folder in the PATH environment variable.
I'm currently trying to add the Codeigniter framework to Netbeans. I followed all instructions to download the plugin as noted here : https://kenai.com/projects/nbphpci/pages/NBInstall , but after all is done and Netbeans is restarted, I try to create a new project but an error comes up saying
PHP Interpreter must be selected
I tried pointing it to my php.exe file found in my WAMP directory C:\wamp\bin\php\php5.3.13\php.exe but still nothing... any ideas? I attached an image where the error shows (in the options window)
You have to localize the php.exe file.
If you are using xampp it is located in c:\xampp\php\php.exe
In case you are using wamp it is located in c:\wamp\bin\php\php.exe
If you see the message above you have to...
Download xampp latest version from http://www.apachefriends.org/en/xampp.html.
After you run netbeans, you get the error message above you should
click the "Browse" button.
Go to xampp folder for example C:\xampp
Click on PHP folder C:\xampp\php
Click on php.exe to tell neatbeans the interpreter directory location. (because it does not come with netbeans package) xampp\php\php.exe
Run Netbeans as administrator
So you can set your path in the php setting
I am new to both PHP and Java. Currently I am working on a project which call java class and its methods in the PHP code. I am creating a proof of concept for this. The problem is I am not able to connect custom class I have created in java. More over it could be said I don't know how to do it. I have used java.inc and javabridge.jar files to connect to the system classes but not able to connect to a simple class.
The step I have followed is:
Created a java package, class called clsForPHP and it has a method sum() which takes 2 parameters and returns integer value. (This is created using MyEclipse IDE)
Now I am trying to call this function from PHP. I have copied the jar file containg the package to PHP project. (Eclipse- Helios is the IDE)
$d= new java("clsForPHP.class");
Please help!! I have searched a lot but couldn't able to find a proper solution. What I think is this package should be added in the java.inc file but I don't know how to do it.
First of all install Tomcat6 and Java in you Unix box. Most probably your Tomcat will be on 8080 port. Now Download JavaBridge.war from http://php-java-bridge.sourceforge.net/pjb/ unzip it. Then from WEB-INF/lib folder copy JavaBridge.jar ,php-servlet.jar and php-script.jar in lib folder of Tomcat. Then copy JavaBridge.war in your Tomcat6 webapps folder and restart your tomcat6 service which will deploy automatically JavaBridge folder in your webapps
Now try to browse http://localhost:8080/JavaBridge/. If you get working than your PHP/Java Bridge installed. First Part is over.
Now make test page in your apache as below
<?php
require_once("http://localhost:8080/JavaBridge/java/Java.inc");
echo java("java.lang.System")->getProperties();
?>
and run it. If it works then you can start working with your work. If it not work then you have problem with you php.ini file. Try to make allow_url_once=on in your php.ini.
Now just copy your java jar file in tomcat /webapps/JavaBridge/WEB-INF/lib/ folder
and Just always put following line in your page where ever you want java to work
require_once("http://localhost:8080/JavaBridge/java/Java.inc");
$yourObj = Javav("your java class");
$yourObj->yourMethod();
$yourObj->setProperty("xxx");
Hope this can help you out.
IF you have still any problem get back.
Yea it will throw error because you must not have copied your java compiled file may be your jar file in PHP / Java Bridge.
You can to do in following 2 options way
If you have define your CATALINA_HOME then copy
$CATALINA_HOME/webapps/JavaBridge/WEB-INF/lib
If you have not define your CATALINA_HOME then copy
/var/lib/tomcat6/webapps/webapps/JavaBridge/WEB-INF/lib
Path which I am telling it assumes that you have install tomcat6, may be your tomcat webapps folder may be in different path.
I have Windows 7 and WAMP localhost on drive D:. I installed Symfony2 correctly. When I open http://127.0.0.1/Symfony/web/config.php I can see the Welcome! message. But in the tutorial "Creating Pages in Symfony2" when I want to create a bundle by this command:
php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml
This message appears:
"php is not recognized as an internal or external command oprable program or batch file"
I don't know what I should do.
You are receiving that error because PHP is not in your system PATH. Check out this quick tutorial on installing PHP on Windows. Take note of Step 4 which is the installation step that should fix your problem.
Since you're using WampServer, the path you have to add to PATH will be something like this:
"C:\Program Files (x86)\Wamp\bin\php5.3.10"
This is only an example, change the path to the actual path to PHP on your system. If the path has spaces in it (like Program Files (x86) does) it is helpful to always surround it with quotes (").
Update: I ended up getting on a screen sharing program with #reza and discovered he had accidentally set his PATH variable to D:\php\wamp\bin\php\php5.3.10\php.exe rather than D:\php\wamp\bin\php\php5.3.10. Fixing this solved the problem.