Since recently I use PhpStorm 2016.3.1 for my php projects. XAMPP works in the background and is connected to the IDE. It's a great IDE but I'm searching for a solution to run a single file in the browser.
The index file of Laravel loads over the run command perfectly. But an individual file makes a problem.
Everytime I want to open the file the browser gets me an error back that the directory to the file is wrong or the classes not found.
How can I setup that for a better workflow?
Related
first of all I explain the reason why I try to do it.
I tried many editors/IDEs which could provide convenient syntax and variables check. Eclipse did the best.
But it works correctly only if I work with its project, otherwise there are a lot of glitches and no correct support of syntax suggestion/auto-complete.
I set my FTP client to download files into project's folder, but Eclipse does not recognize them as a part of this project so I still don't have it's full support. If I create PHP files with Eclipse in the same folder it works just fine. Is there a way to make read all PHP files in project folder as parts of a project?
Or, if you can suggest IDE which performs syntax check/auto-complete tasks as Eclipse does please do, I check if I tried it. I can't include all CMS into project, because it is Bitrix, it can kill any IDE which can try to chew it, so I just need a reliable tool which could work as code validation of currently edited script. The perfect tool could just be set for PHP 5.6/7.1 for example and perform validation based on language rules.
If you are trying to get Eclipse php support for randomly downloaded files you can set your FTP client to download that files in project's folder. Then you open Project Explorer in Eclipse, press refresh button to get actual folders/files list, find you file in there and open it by that project explorer. That makes Eclipse to consider that file as a part of your project so auto-complete and validation works fine. Other ways of opening it does not count.
I am working on a moodle based project, which I inherited from someone else. Having copied the files into htdocs folder and started MAMP, the files still don't show in the browser. Instead, the browser automatically initiates a download. I might be required to change the config file, however, since I do not have much experience with php and SQL I am not sure what exactly. My part of the project is to develop html and css, but need to be able to run it locally first.
What do I need to do to get the files run locally? The route I use is localhost:8888/whatever/whatever/index.php
In case someone else runs into the same problem - Apache downloads php files instead of reading them - here is what helped me.
.htaccess file may need changes if the application has changed servers.
Delete (at least rename if you don't want to remove it) config.php and run the application through the browser. It should initiate install automatically.
To run php and SQL I used MAMP.
I been using gulp for front-end development lately and I find it very helpful.
I use XAMPP in windows for making PHP website some of which sometime include database operations.
Now, I have used gulp-livereload and gulp-connect for starting a server for front-end but then it won't process the PHP files.
All I want to do is, PHP livereload with database access. Like livereloading but via XAMPP's server(since it can process PHP).
yes, I have found a temporary solution for now.
See, it's just temporary but as long as you write PHP correct, you will get the work done. Let me tell you how I do it.
Though right off the start I want to tell you that this is not a proper way to approach this, you should use some MVC framework.
Anyway,
I have XAMPP installed under Windows 8.1 and XAMPP's htdocs is in my "C" Drive.
I then create a folder inside "htdocs" in which I put all my frontend + backend code.Basically, gulpfile.js is at the root, then there is a components folder in which all front-end sources reside. There is another folder at root called "www" inside which I put my index.php.
Then I load gulp-livereload instead of gulp-connect and I add the livereload.listen(); method and Tags in all the php files I want to reload.
Works very fine except when PHP throws an error, untill you correct that error, you have keep reloading the page manually.
I'm trying to add a SWFUpload instance to my website where multiple files will be uploaded in a queue. Currently, I'm working in a local LAMP environment running Netbeans and XDebug for my server side work.
I've followed the directions at the site and used this blog post to fill in the blanks.
My issue is that the test uploads execute according to the debug output of SWFUpload, but nothing shows in the upload path. In debug mode, none of the breakpoints in my server side script get touched.
I've triple-checked the file paths.
File permissions are all set to 755
This also occurs when I copied two of the demos to my server instance. In both circumstances, the upload_url php file breakpoints never got touched.
How can I debug this?
EDIT
I'm switching to a HTML5 method instead. however, it would be nice to identify some possible solutions to this issue for others who may run into the same problem.
I am running PHP files in my NetBeans with a shell script command. So far so good. I can run individual files without any problem. Sometimes, however, I would like to run all the files in a directory (and it's subdirectories). I tried selecting the directory and hitting the shortcut for "Run" but nothing happens. If I select multiple files and hit "Run" only the last one selected will be run.
I am using the latest NetBeans 7.0.1 on MacOS 10.6. Thanks.
Never heard of such a feature. What I'd do with NetBeans is create a php application and in the main file write some code calling each php file... it will look ugly but I think it's the only way