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.
Related
After setting up XDebug I succeeded in debugging php files with PHPStorm that are directly accessible.
But recently I started working with CodeIgniter and I worked through this tutorial. Now I was wondering if it was possible to debug specific MVC files, controller.php for example. Because after setting a breakpoint and starting to debug the controller file with PHPStorm it of course stated 'No direct script access allowed' since I directly accessed the script.
And when accessing the file manually e.g. http://localhost:63342/01_codeigniter_tutorial/public_html/index.php/controller it just shows a 404 page instead of the usual output shown when not opening it with PHPStorm.
So I'm wondering is there a specific documentation to read through for debugging CodeIgniter or am I just handling it wrong?
Thanks to LazyOne, who enlightened me in the comments I was able to find my mistakes and the solution.
The very first reason why a 404 page was shown when browsing the site with PhpStorm, was that I was using PhpStorm's built in web server and not my Apache. And said server doesn't handle mod_rewrite rules (which simplifies URLs) so for sites using CodeIgniter it won't work. And since the scripts aren't directly accesible it's not possible by simply clicking run in PhpStorm. So we have to initiate the debug request from the outside/web browser.
Now 2 things have to be done:
PhpStorm (or your prefered IDE) has to know that a debugging process is about to happen
Using PhpStorm you have to toggle the “Start Listening for PHP Debug Connections” button.
See more in their documentation
When browsing your site as you normally would (in my case localhost/01_codeigniter_tutorial/public_html/index.php/controller) you have to set a XDebug cookie since xdebug will not automatically start a debugging session when you open a script.
The easiest way is to install a Browser add on since you only have to click a button (I used The easiest XDebug for FF)
Read this for more information
After everything has been set up, you only need to refresh your page and the IDE should receive your debugging request.
I have previously installed several different Joomla installation at the same hosting company without any major faults that couldn't be corrected quickly. Though I must say that I now find myself lost and don't know where to turn.. So here I am.
I have mulitple issues that I believe is all connected somehow.
Can't upload Images using the Media Uploader (Image size too large) though everything is set up correctly (max_file_size etc.) in PHP configurations and Joomla config.
Can't upload any other files in the Extension Manager either, since it says my PHP temp folder is not set. Though it is set, and writeble, have permissions etc. Also more than triplechecked the path, by FTP upload PHP-files to write out and verify the absolute path.
When I save something in the Global Configuration, it says my "Configuration.php" file is not writable. Permission is set to 777 even! If I go back and check, my settings is saved though it just said it couldn't save to the file?
Even tried to change to FTP-upload to see if I could bypass the fault somehow, tried both by setting it in Global Settings and by downloading the config file, change it manually and then re-upload it via FTP. No luck there either, seemed to just ignore my settings..
Updating Joomla seems to go just fine though, just updated to 3.4.1 to see if it made any difference but no. Running on PHP 5.6 right now though my hostingcompany just said they will downgrade to 5.4 to see if can make something change.
Otherwise, the website is fully functional! You can browse as usual, and write blogs etc. Though, not upload anything. Saving other settings work fine though. Should also mention that the website worked locally 100% before uploaded to the current server.
Any ideas where to start looking? Been Googling for the last 8 hours!
My webhost downgraded my PHP service to 5.4 instead, which solved all problems. Weird.
I am using phpstorm 7.0 for development and was used to upload files via right-mouse button and then choose {upload}.
My newest project runs on Symfony and Doctrine so I had to configure some things in phpstorm for that.
But now, the manual upload function is gone and I am unable to find a way to get it back. This was very handy for minor changes that had to be uploaded fast for testing.
I have searched Google and went through every setting-option in phpstorm but I cannot find the way to restore the manual upload setting.
I hope I made my problem clear..
Do you have mappings defined (Settings/Deployment/Mappings)? You won't be able to download/upload anything if mappings are not set or set incorrectly.
Certain actions in Tools | Deployment may also be disabled when no tabs with mapped files were open, so there are no files to upload
I noticed a strange sync problem. I have my project setup as a remote project and everything works fine. I have it set to upload on save. However, if someone on my server is working on a file and saves it. I don't see this change in netbeans and I end up opening a older version of the file and overwriting my colleague's changes when I press save.
Is there a way to have netbeans check the remote server for the latest file before saving?
thanks
No, NetBeans can not check the remote file automatically. It's just not set up to do that. Even if it were, you would still run into problems where you would clobber your colleague's changes, or he would clobber yours.
What you have is a basic version control problem, which is best solved by implementing one of the several version control systems out there (e.g., CVS, Subversion, Git, Mercurial, etc.) and then "building" your website out to the server from version control. Short of that, an imperfect solution would be to partition the files such that you are forbidden to edit files assigned to your colleague, and vice-versa.
NetBeans can download the file for you, but only when you tell it to by right-clicking on the file and choosing the Download command. This downloads the file whether it has been updated by someone else or not.
Bit of an obscure one this. My setup is all running on my local Windows machine; I've got NetBeans IDE installed, a local XAMPP server with XDebug running, and an installation of Moodle with some custom addons in the mod directory.
I can happily create breakpoints in PHP pages (including the main Moodle ones), but any breakpoints I place on php files in the mod directory never fire (on my mods, or any of the inbuilt ones). I thought Moodle might be doing some "magic" to display files in the mod directory, but my browser shows the url as http://localhost/moodle/mod/view.php - and that's the file I've set my breakpoint in.
Has anyone got any experience with debugging Moodle addins, or could possible point me in the direction of how to troubleshoot the breakpoint not firing? I've tried the Moodle site, but can't find anything relevent.
Actually, I think I've figured it out. If I tell it to debug that particular file it will 404 (it doesn't put the directories in, guess it's a bug), but if I then manually go to http://localhost/moodle/mod/view.php?XDEBUG_SESSION_START=netbeans-xdebug (which errors, no parameters are being passed in), and THEN manually navigate to Moodle then my mod breakpoints fire correctly.
All very bizarre, but it seems to be a usable workaround. I'm guessing the mods are running under some kind of different PHP session.
I'll keep this answer here in case anyone else has this bizarre problem.