How to fix extension configuration error in visual studio code? - php

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.

Related

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

How to configure FlashDevelop to debug in web browser?

I'm following directions to set up a debugging in FlashDevelop in web browser. I'm getting confused on 'Configure your project' step. It says:
Open the Project properties and change the "Test Movie" option to
"Open Document...". Click on the button which should appear,
and enter bin/index.html (path to html page, relative to project root)
in the prompt.
What is the bin/index.html file? Is it where my SWF is loaded? I currently have a SWF that loads from a PHP page. So I pointed it to my PHP project's index.php page build project. After build I get a generic Windows message that Windows cannot open the file with that extension.
Is it possible for me to debug my SWF from my PHP page which loads it?
I don't have experience directly with what you're talking about, but I guess you have to point to a PHP file which is running in a webserver. Otherwise it can't be interpreted and run.
If you are running locally, you can use xampp, put your things in htdocs, and use localhost url to reference the file: http://localhost/projectname/index.php

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.

how to run php script in phpeclipse

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 !

Categories