Brackets live preview with php file - php

I discovered the editor "brackets" yesterday and tried to get it working. Now I have some trouble with the live preview, which does not seem to cooperate with php files.
I opened my folder, selected the index.php and when I clicked on live preview it requested for a base url (I am running brackets version 1.7 on windows 8.1 if this is of any relevance). I have also read some instructions about this problem here, but it all leads to the consequence that it isn't possible to actually use live preview but only local servers with php files. Does anyone perhaps have a solution for this?
Most of the instructions I read are already a little bit old so perhaps it is somehow possible now (preferably without needing a local server). I have heard so many positive things about the editor, I am actually really eager to use it.

Going with a local solution for now

Related

PHPStorm Live Edit for php or an alternative (for firefox)

PHPStorm has a nice little plugin called "Live Edit", however it works only for javascript, html, etc. Exept for php...
My question would be simple - is there any way to make it work for php on firefox? I already have local MySQL and Apache server running. Documentation say no, but who knows?
Just as I posted my question, I found an answer myself (happens constantly). Instead of using Live Edit I found quite a nice alternative (and on firefox too!).
What you need is "Auto Reload", a firefox plugin, which detects file changes and reloads page.
Here's a little guide (assuming that you have PHPStorm and XAMMP configured):
Open plugin's settings.
Create new rule.
For Url type: http://localhost/<MyPage>/*
For files, add file or select directory: C:\xampp\htdocs\<MyPage>
Make sure autosych is enabled between PHPStorm and local server.
Click Open in Browser '*.php' on XAMMP Apache
Edit code and see results.

phpinfo() returns blank page in Firefox and asks whether to open or save in IE

I'm trying to update a site that's using php. I built the site and tested it on this machine. But today, the Php won't run on my local machine.
To test, I went back to the most basic php page I have:
<?php
phpinfo();
?>
When I navigate to this file, in Firefox (28), the result is a blank page. (The page source shows just my code.) In IE 11, I'm asking whether I want to open or save the file.
Searching for my original problem (which was that my php code was showing up rather than running), it was suggested that php wasn't installed. I don't know how it would have gotten uninstalled, but I went ahead and installed it again (from http://www.microsoft.com/web/platform/phponwindows.aspx) and still no joy.
Windows 7 SP1
Updates in response to suggestions:
Pardon the beginning stuff, but I'm not primarily a web developer. (I do databases.) This is stuff I'm doing for an organization I'm involved in. I don't actually remember having installed/configured a web server in the first place, nor do I remember having installed php before yesterday (though maybe my son did that for me).
After seeing the replies here, I followed the instructions on this page: http://webmasterjuice.com/how-to-activate-built-in-web-server-windows, but I'm still seeing the same thing.
Update:
I've confirmed that IIS is running and the php was installed. I've followed instructions I found online for getting php working in Windows 7 with IIS. However, it still doesn't make sense to me to have to do this. I'm sure I didn't do any of this when I started working with php. I'm not trying to use my computer as a web server. No interest in working through localhost.
I'm creating the file in a simple web-oriented editor (Crimson Editor). Until recently, I could use the editor's preview function on a file, whether HTML or PHP, and it would run correctly. I'm baffled as to why this stopped working.
A few things to look for:
It's php running besides been installed? (obvious, but maybe it got killed by some reason)
Have you included the phpinfo() call inside a html document?
Obviously you named the file with a .php extension and saved it within the document root of the server..?

Kint and Codeigniter MAMP vs LAMP

I'm currently developing a site on my mac using MAMP. I recently included the kint library and everything seems to be working fine.
The other day I copied the files over to my linux machine and the site is working fine, however, I get the message Unable to load the requested class: kint whenever I get to a page where kint has been loaded - this does not happen with on my mac and I haven't changed any other files.
So far I've tried loading'Kint/kint' (as one thred suggested) and I've also tried autoloading the file, but neither work, meanwhile everything is still fine on my mac???
If anyone could shed some light on this, thank you!
Thank you to #IsuthanBala.
The answer was to use the format 'Directory/Class' but making sure that the capitalisation was accurate as well (something I had not initially checked).
e.g.
$this->load->library('Kint/kint');

TimThumb not able to load images on Rackspace

So, we are using Linux, Apache, PHP 5.4.
I'm using Wordpress 3.5, which is where our problems started. I'm also using a theme from ThemeFuse.
I had to revert back to a really old version of TimThumb because the latest version doesnt seem to pleased with the PHP 5.4 or Wordpress 3.5.
Does anyone have any suggestion for getting v2.8.10 or v.2.8.11 to work under Wordpress 3.5 using PHP 5.4. I have it running and working on our development site, but when i moved the website to the live domain, it broke so there is one section on my site where the images won't load.
I am just wondering if there is a known issue with either Wordpress 3.5 or PHP 5.4.
When i go to the page that uses TimThumb I see broken images on the page. Right clicking and open the image in a new window gives me further details.
The error message says that TimThumb can't find the image eventhough when i take a the url from ?src parameter and open that url up in a browser, the image loads fine.
As a temporary solution, I've reverted back to a really, really old version of timthumb. This is not the best solution because I know this version is vulnerable. So i need to work out a final solution in the meantime.
Thanks in advance for any thoughts.
Old question but I'm going to post an answer here as I've just had issues with this. This might not answer everyone's TimThumb issues but it solved mine. I followed the trouble shooting guide at Binary Moon and had no joy. Managed to find this thread here on Themeforest;
http://themeforest.net/forums/thread/tim-thumb-problem/32860
The comment by Olegnax is the key. It's possibly a security config on the server which the hosts will have set (but the operative you deal with at the support desk might very well not know about). If you receive a 500 Internal Server Error message on images resized by TimThumb, try the following:
Set the file permission on timthumb.php to 700 (read, write, and execute for owner only).
Check the cache directory (folder) permissions. Setting it to 777 will give you a 500 – Internal Server Error. Set it to 711.

does wordpress image cropping rely on some php library?

quick question:
i'm developing a wordpress theme for a client and have a heavy use of the_post_thumbnail function.
now, on my local dev site (running under MAMP) everything works like a charm and all the images get hard cropped to the correct size.
on the live dev site the cropping is completly ignored by wordpress. the output of the image is
.../wp-content/uploads/2010/06/07.jpg
but it should be
...wp-content/uploads/2010/06/07-160x230.jpg
after i changed my settings on the live/local dev site i used the ajax-thumbnail-rebuild plugin to rebuild all the images.. it just wont work on the live site.
now i read somewhere that the wordpress hard crop function relies on some php library calld php_hd2. can anyone confirm this?
//UPDATE
Thanks to Fredleys link it seems to be the GD library i meant. Which is installed on my server. sadly in the comments on the link people still have the problem despite GD being installed (which i can confirm for my server tomorrow).
But there is one interesting comment in there on the end of fredleys link:
wp_get_attachment_metadata() returns a hash without 'sizes' key. And that hash is returned by a call to apply_filters()
which sounds like my problem. i have all options in the backend available, nothing greyed out, and the images are available on the server.. they just won't get called on the frontend.
// UPDATE 2 & SOLVED
Ok. Found the Problem. The Server is running on Debian which has the gd_lib installed - BUT not the bundled Version. So there are things missing in this package. If you need to install the right version of gd_lib on Debian you'll find a nice solution here.
I think you mean gd2 and yes, you need to have it installed.

Categories