how to run php script in phpeclipse - php

I was downloaded the phpeclipse from the eclipse downloads.
i have wamp in my machine(c:/wamp/).
i set path like c:/wamp/php/php.exe in system environmental varariables path.
now i want to run php script from phpeclipse.
what i have to do to run php script.
is there any runconfigurations in the phpeclipse.
if exists...how can i configure those things?
is there any documents exists related to that?
is anybody explain me in detail?
thanks in advance.
regards
kk

In order to run your php project in Eclipse you need to edit the server configuration in the Eclipse . do the following .
In Eclipse Go to Window->preferences
On the left panel you see PHP expand the tab click on PHP Servers
On the right side you will see Name as Default local host with url click on it and edit it
A pop up will appear you will see two menus Server and Path Mapping click on Path Mapping
Enter the Path of the virtual directory ie path of wamp www directory , if you are on linux just enter /var/www.
Finally run the project
Hope it helps !

Related

How to fix extension configuration error in visual studio code?

I have a project on a hosted server. I downloaded the whole Laravel folder and launched the website in visual studio code using IIS express. I successfully ran command line code to enable show directory listing for the site however when I try to access the index.php file I get an error "The page you are requesting cannot be served because of the extension configuration. It is possible that a handler mapping is missing."
I already downloaded PHP to my computer and added "php.validate.executablePath": "c:/php/php.exe" to the settings.json file. Do you know what else I need to do to view the site in localhost?
In Windows in the control panel go to Advanced System Settings
In the System Properties window click the Environment Variables button.
Select System Variables -> PATH and click new.
Enter the folder where your PHP.exe is located.
Then in visual studio code open the commandline and enter php artisan serve to run the site in the browser.

Eclipse 2019-06 PHP autocomplete (content-assist) not working

I've juste installed the latest version of Eclipse, Eclipse 2019-06.
Infortunatly, the PHP content-assist or autocomplete doesn't work anymore when working on remote system.
I've searched for solutions but didn't find anything...
The files are on a remote workspace, not local. It was OK with and old version of Eclipse (Mars), there are illustrations above.
I've checked in the preferences at PHP->Editor->Content assist, the Auto-Activation is checked.
Here is an illustration :
https://ibb.co/MD72NKv
With an old version, it worked well :
https://ibb.co/R7xQShL
Thank you in advance !
OK the problem is solved.
It occured only with files on remote system, not on a local file in the workspace.
Thi solution here work perfectly :
https://drupalsun.com/patrick/2011/07/25/how-setup-eclipse-php-pdt-remote-system-explorer-theme-manager-and-drupal-plugins
Now we are going to use RSE to edit an eclipse RSE .project file. So in your 'Remote System' tab open up your local files and navigate to you workspace folder. Look for a folder called 'RemoteSystemsTempFiles' and open that. Now you are going to edit the '.project' file. Open up that file.
You are going to add two line in between the <natures> tag, those lines are
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.eclipse.php.core.PHPNature</nature>
Save that file and restart eclipse. If you did everything correctly you should now have auto complete that will look like so

netbeans 8 does not refer to the actual PHP file path, when running a PHP file

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

Cant add PHP 5 Interpreter on Netbeans

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

Adding an external server in Aptana Studio 3

How can I add an external server in Aptana Studio 3, since there is no Servers view?
Here are some instructions on how to do it but they both use Windows > Show view > Servers which is no longer available in Aptana 3. With the console is possible? How?
I have a wamp server installed and I can run correctly php files stored inside the htdocs folder. Now I want to run those php files from Aptana but I was getting blank pages.
In Project > Run Configurations I noticed the "Use selected server" option but no possibilty to add a server there, so I used "Use base URL" together with "Append project name" and now I can run php files from Aptana but I am still wondering if it is the best option and how I could tell Aptana to use the wamp server.
In Aptana Studio 3 you need to open Preferences, Aptana/ Web Servers node and add your local apache server there.
If you set the document root correctly, your apache server will be used for previewing in Studio (See Preview button on toolbar).
Just add an alias in my apache config like
Alias /aptana "C:/Aptana/Aptana Studio 3 Workspace"
where I have MyApp project in Aptana,
Then in Run cnfiguration, Web Browser, My Apache Server,
Use base url = http://<domain><port>/aptana/
In my browser URL : http:///aptana/MyApp
That's all
I solved it by following method:
1.find the httpd.conf in {path to Apache}/conf/, set the "DocumentRoot" value as your
Aptana workspace.
2.Run->Run Configurations.. choose a web browser, set the "Use base URL" value as http://localhost/{here is your project name}/
3.run.

Categories