How to run a PHP "website" in Firefox locally?

Scorpion Ghost

Elite Member
Executive VIP
Jr. VIP
Joined
Mar 22, 2013
Messages
9,148
Reaction score
10,491
So I downloaded this "website" - http://www.coolphptools.com/color_extract#demo

It's just 2 php files and 1 images folder. I uploaded it on a domain I have and it works fine.

But I would like to run this locally sometimes. Like, just open it in my browser from my computer. Because having it on a domain, there's bound to be downtime. But when I open it locally there will never be a second of downtime or slowness.

Of course I tried dragging and dropping "index.php" directly into my Firefox browser, and the script loads. It looks weird, but it loads. But then the function that it performs doesn't work, probably because the "colors.inc.php" is required.

So how can I do this?
 
So I downloaded this "website" - http://www.coolphptools.com/color_extract#demo

It's just 2 php files and 1 images folder. I uploaded it on a domain I have and it works fine.

But I would like to run this locally sometimes. Like, just open it in my browser from my computer. Because having it on a domain, there's bound to be downtime. But when I open it locally there will never be a second of downtime or slowness.

Of course I tried dragging and dropping "index.php" directly into my Firefox browser, and the script loads. It looks weird, but it loads. But then the function that it performs doesn't work, probably because the "colors.inc.php" is required.

So how can I do this?
you need to install xampp locally to run those files
 
you need to install xampp locally to run those files

Hm.. I feared there would be dicking around involved :D

Okay I'll give it a shot.
 
you need to install xampp locally to run those files

So I installed xampp and added the folder with my 2 php files in C:\xampp\htdocs.

When I visit "http://localhost/colorextract_1_3/" the script appears, sort of. It doesn't look good, the images are missing, and there's a big error right there on the page.

Fatal error: Uncaught Error: Call to undefined function imagecreatetruecolor() in C:\xampp\htdocs\colorextract_1_3\colors.inc.php:62 Stack trace: #0 C:\xampp\htdocs\colorextract_1_3\index.php(80): GetMostCommonColors->Get_Color('images/test.jpg', 20, 1, 1, 24) #1 {main} thrown in C:\xampp\htdocs\colorextract_1_3\colors.inc.php on line 62

I'll go google it, but if you wanna tell me what I'm missing, please.
 
Xampp can go fuck itself.

It's like, sometimes newer is not always better. Xampp was like 161MB to download. I had to install it and that took a while. Then my lap top restarted when the installation was finishing. Good thing I was here with the mouse in my hand and I quickly cancelled the restart, otherwise I would have lost some important work.

Then I get xampp going, I start the processes, I do the test to make sure it works. Then I put my colorextract files in the right folder, I open localhost/colorextract, and I get errors! Goddamnit. So now I'm googling for a solution...

In doing that I land on stackoverflow where some dude recommends PHP Desktop Application. So I find a tutorial. I download the program, only 66MB. I launch it (no installation required). I add my files to a folder, I restart the program, poof, my colorextract opens up. I test it, and it works.

Suck it Xampp, you pain in the ass :D

Hm.. I feared there would be dicking around involved :D

Okay I'll give it a shot.

See I told you guys it was gonna be a pain in the ass. I always know :D

Of course somebody is gonna say that oh Xampp is better because because because, and I'm just a noob... Well whatever, I am a noob, and I'll remain a noob forever and ever haha :D

Xampp can bow down to PHP Desktop Application today, you fucks!

https://github.com/cztomczak/phpdesktop
There's 3 main issues with Blackhatworld.

1) The HAF dudes overcharge
2) You guys always wanna spend tons of money for every little thing, never take the frugal route
3) You always come with complicated solutions to simple problems

lol

 
if you dont like xampp you can try wamp... i am using xampp locally for over 10 years... even used the portable versions all working fine... sometimes you may get some issues like port is bussy - got that from mysql server a few times (some other program using the same port) as fo your erros "Call to undefined function imagecreatetruecolor() " - is that function defined in the files you using? you sure there is no need for more files ?
 
if you dont like xampp you can try wamp... i am using xampp locally for over 10 years... even used the portable versions all working fine... sometimes you may get some issues like port is bussy - got that from mysql server a few times (some other program using the same port) as fo your erros "Call to undefined function imagecreatetruecolor() " - is that function defined in the files you using? you sure there is no need for more files ?

No need, I already found the best solution to my problem in the whole wide world :D

https://github.com/cztomczak/phpdesktop
It can run what I need as like a program, or I can open it inside a browser like a website.

It's wonderful. But most importantly, it didn't torture me to get it working. I adore things that are not a pain in the ass and have almost no learning curve :)

Xampp sucks, let somebody else waste their time figuring the crap out. I'll take a wild guess and assume wamp is a family member of xampp, and the apple doesn't fall far from the tree, so they can both kiss my ass lol :D

Oh and lastly when I tried closing Xampp, my entire lap top got slow and whatnot. So xampp told me to go fuck myself and tortured me just a little more in the end. Fair enough, it was a pain in the ass from the beginning. We end as we began :p
 
so you becoming spokesperson for xampp is not gonna happen?!

Money talks and bullshit takes the bus. I'll be a spokesperson... For $100 million dollars! :D
 
Dude, use Mamp if your on windows, its much simplier.
 
Now you're just fucking with me right? :D
I'm not, i have no idea how to install xampp, but then I found Mamp, and its basically just a window that you click start server with. Try it, you don't even need the pro version. I stopped using it once I began using an IDE, but I was using that method before.
 
I'm not, i have no idea how to install xampp, but then I found Mamp, and its basically just a window that you click start server with. Try it, you don't even need the pro version. I stopped using it once I began using an IDE, but I was using that method before.

Oh never mind, I already found a solutions. Thanks anyway :)
 
Back
Top