Adding an external server in Aptana Studio 3 - php

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.

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.

How to set up a new PHP project in NetBeans IDE (version 8.2 or 11.3) using WampServer?

I have done the following steps, but still I get the error 'Not Found' (with the description: Not Found
The requested URL was not found on this server. Apache/2.4.41 (Win64) PHP/7.3.12 Server at localhost Port 80) in tow different versions of NetBeans 8.2 and 11.3.
Step 1. Running WampServer Version 3.2.0 64bit installed on Windows 10 OS ==> I see the green icon in status bar, indicating all services are running.
Step 2. In NetBeans IDE I created a new php project (File > New Project; chosen in the Categories list, PHP). Then next as follow:
NetBeans IDE 8.2
and in NetBeans IDE 11.3:
Step 3. I left the configuration settings by their default values as the following picture:
NetBeans IDE 8.2
and in NetBeans IDE 11.3:
Finally, when I run the application I get the following output on my browser: Not Found! for both the versions.
Does anybody know how this error can be handled?
your sources Folder is c:/wamp64/www/Netbeans/php
so your Project URL had to look like this http://localhost/Netbeans/php
Have you create the index.php file?
There is a simple test,
type in your browser: http://localhost
when there is a folder named Netbeans open it
next click on the php folder and in this folder there should be the index.php file when you created it
I found a way that can solve this problem to set up a local web site configuration as follows:
Click right on the project name and choose properties.
From categories click on Run Configuration
In right panel, from the Run As dropdown list, choose Local Web Site.
In the Project URL field, check the automatically generated URL address. Then specify the port number explicitly, in the format localhost:<port number>.
As shown in the screen shot below:
Click OK and run the project again to see the output on the browser.
In the picture above, in the Project URL field after the port number, you can add any arbitrary name optionally, like the project name if you are going to have more projects running on the same port.

xdebug ignores xdebug.remote_host=localhost:8080 using NetBeans

I am running on Windows 10 with NetBeans 8.2 and XDEBUG 2.5.
When I click Debug/File Chrome opens with
http://localhost/d8mod/modules/custom_modules/emailreminder/emailreminder.module?XDEBUG_SESSION_START=netbeans-xdebug with "Site can't be reached".
php.ini contains xdebug.remote_host=localhost:8080
the :8080 part is ignored. It does not matter whether it's in quotes on not.
What am I doing wrong?
I think, you'll have to update your project settings in Netbeans, because it calls the wrong URL.
The URL Netbeans calls after pushing the debug button is configured in project settings / "Run Configuration".
The field "Run As" should be "Local Web Site (Running on local web server)" as you're using localhost and the Project URL should be http://localhost:8080/[Project PATH], where [Project PATH] is the path to your project.
I hope, this helps.

Aptana 3 Are Spaces Allowed In PHP Project Names Using WAMP As Preview Server?

Using Aptana Studio 3, build: 3.4.2.201308081805 I have followed this guide and set up a few projects (using PHP) I am working on with WAMP. I am previewing the php files in the projects with WAMP as preview server and that works just fine.
Though whenever I have a space in the project name I cannot seem to set the preview server to WAMP and Aptana automatically chooses to use the built-in server rendering the preview of PHP files useless.
It is possible at all to still have space in the project names when working with PHP files, WAMP and Aptana?
If so how would I be able to insert such spaces for the Base URL, Document Root and Project name in Aptana please?
Does this have to do with WAMP not liking spaces in paths, though is there a way to make it accept spaces perhaps? Are all PHP project names without spaces always?
Thankful for any help or info given about this.
I had to change the Document Root for the Apache server to be my Aptana Workspace. This allowed me to keep the old project names (and the old workspace location) with spaces as well as seeing all projects under http://localhost/(project name) including spaces in the project name in the URL, in Aptana preview as well as in any browser.
Find http.conf, for WAMP default install this is C:\wamp\bin\apache\apache2.4.9\conf
Edit line DocumentRoot "c:/wamp/www/" to DocumentRoot "d:/web work/anything/aptana workspace/" or where ever your Aptana Workspace is.
Edit line <Directory "c:/wamp/www/"> to <Directory "d:/web work/anything/aptana workspace/"> or where ever your Aptana Workspace is. Should be the same as Document Root.
Restart WAMP server. Click green icon and select Restart All Services.
In Aptana go to Window -> Preferences -> type "server" in the blue marked search box saying "type filter text" and select Web Server.
In Web Server add and New server with following settings: Name: WAMP (or whatever you like), Base URL: http://localhost/ and Document Root: d:\web work\anything\aptana workspace\ or where ever your Aptana workspace is.
Done. Like this I have the workspace separate from the server root, I can preview PHP files and projects with spaces in the project name from inside Aptana as well as local browsers and there is no fear of having files or projects deleted when changing WAMP server settings.
edit: This answer helped me finding the solution.

xdebug with Netbeans and PHP works with project custom domain only if project root is selected

When I debug a PHP project in Netbeans with xdebug, I have to select the project root first, and then click on the debug button. That way it works ok, firing the browser with the project's local domain (not localhost, but one I defined).
But if the project root is not selected, suppose some inner folder or file was last clicked on, then if I hit the debug button, instead of using the project's domain, it uses localhost, which on my machine is not the project I'm trying to debug.
Is there a way that the project domain is always used for debugging, instead of localhost?
try this (on netbeans v6.9.1)
Project Properties >> Run Configurations >> Advanced >> Debug URL ::
CHECK "Ask Every Time"
#Your last project URL is automatically saved in history
NetBeans should still debug with the URL you set in Project Properties > Run Configuration > Project URL, at least that's how it works on my install.

Categories