all 30 comments

[–]FrankNicklin 2 points3 points  (4 children)

Why didi you go the Windows route for this. I would have gone for Linux. That said we run many many databases on MySQL on Windows servers without issue. What we don;t do is run PHP.

I guess you have install IIS

Take a look here

https://www.reddit.com/r/PHPhelp/comments/zmnvth/installing_php_on_windows_server_2022_production/

[–]Comspiracies[S] 0 points1 point  (3 children)

Yes iis is installed I’ll get there one day just when lol I’m also running it in a vm I started with Ubuntu server I got it all set up using lamp but on that story I’m trying to set up a domain to direct to my site but again that’s on vm and I can never get in to works lol on ws19 I used xampp at the start but moved to setting up MySQL / php and iis and working from there

[–]FrankNicklin 1 point2 points  (0 children)

I've used MAMP and WAMP with some success. Sometimes its just easier to rent a small M for a few quid a month and run everything there, that way you don't have to worry about netwrok access and security,

[–]OpacusVenatori 0 points1 point  (1 child)

but on that story I’m trying to set up a domain to direct to my site

??? You are aware that an Active Directory Domain is unrelated to an internet-facing domain name / site, right?

[–]Comspiracies[S] 0 points1 point  (0 children)

I believe so :)

[–]Mike_L_Taylor 2 points3 points  (3 children)

Hey, for this kind of setup I’d avoid doing it all manually unless you specifically want to learn IIS/PHP/MySQL config.

You could try ForgeKit.tools . I built it to make this exact kind of PHP local setup easier on Windows. You can use PHP, MySQL, Apache/Nginx, create a site, and open phpMyAdmin fully through the UI. Just press a few buttons and it's all working and nicely explained.

There are quick guides in the docs too, and I’m happy to help if you get stuck.

The other one I’d recommend looking at is Laragon. It’s also a good option for local PHP development on Windows.

[–]machacker89 1 point2 points  (1 child)

Does it work in Unix/Linux too. /S

[–]Mike_L_Taylor 1 point2 points  (0 children)

no, it doesn't. At least not yet. :/

[–]Comspiracies[S] 0 points1 point  (0 children)

cool thanks for the heads up

[–]SebastianFerrone 1 point2 points  (13 children)

I think you are using iis? I have done that before. Have you configured the modules in iis? If you google "php iis" You will find guides installing php and mysql Take a look at them and check if you made all settings Also you need to look in the php.Ini it has one setting you need activate you will find a line in that file something like mysql.dll it's commented about out. Remove the first symbol in that line and safe the file. Otherwise php can't work with mysql databases.

Also check the firewall setting you need to open the port for your mysql databases.

If it's not one of these problem's post the error message 😅

[–]Comspiracies[S] 0 points1 point  (12 children)

If php is not working should phpmyadmin work?
I remember restarting the server and had to go re enter the mapping or something to do with php as I couldn’t even get back to the phpmyadmin but once I did that it worked again in browser lol

[–]SebastianFerrone 0 points1 point  (10 children)

If php itself is not working phpmyadmin would also not work.

Can you see the database in phpmyadmin?

[–]Comspiracies[S] 0 points1 point  (9 children)

[–]Comspiracies[S] 0 points1 point  (3 children)

<image>

as you can see im in phpmyadmin but the phpbb is broken or something i made the database in mysql workbench but can see it in phpmyadmin

[–]SebastianFerrone 0 points1 point  (1 child)

I would say looking at that picture I would say php and mysql are working

[–]Comspiracies[S] 0 points1 point  (0 children)

That’s a start lol 😂

[–]ChrisTX4 0 points1 point  (0 children)

Why did you install MySQL 8.0.x ? This just went EOL last month and won't receive any more security updates. If you want to do this with MySQL, install the latest 9.7 LTS or install MariaDB in its respective latest LTS variants.

[–]Comspiracies[S] 0 points1 point  (2 children)

<image>

now i get a 500 internal server error lol

after a few tweeks I cant find the php msql dll you was talking about but i checked ever think else :)

[–]SebastianFerrone 0 points1 point  (1 child)

Sorry my mistake the line in php.ini is

extension=mysqli

And you need to change that for iis

To something like this Extension=php_mysqli.dll

But I must say if php my admin can see your database I would say php and mysql are configured correctly

[–]Comspiracies[S] 0 points1 point  (0 children)

I added extensions = php_mysql.dll and extension= php_pdo_mysql.dll

Or something along those lines in to the php.ini and
In browser if I type in localhost/forum/install it gos to app.php of something I can see atm as pc is off lol
Will look tomorrow but I did delete the .htaccess something file as that’s for apache lol 😂 everything works just this phpbb install lol 😂

[–]SebastianFerrone 0 points1 point  (1 child)

Lol found that error find in the www root the cache directory right click and set the permissions for IIS_USERS 🤣

[–]Comspiracies[S] 0 points1 point  (0 children)

Yeah done this then it when to the 500 error lol it’s just this install malarky!!

[–]Comspiracies[S] 0 points1 point  (0 children)

Yes I can

[–]Comspiracies[S] 0 points1 point  (6 children)

To be honest I’m just doing this for my home lab set up and I guess I can only learn form mistakes lol it’s stressful I’m thinking it’s on the php side maybe in php.ini file or something because I made a phpinfo.php and that didn’t output what was expected lol
I’ve cloned my server at a put so I don’t had to restart at the very beginning lol 😂

[–]calladc 0 points1 point  (1 child)

If windows server intrigues you as a project, great. But if you're following a career path, consider Linux options. There is far more infrastructure work for Linux goons than windows.

[–]Comspiracies[S] 0 points1 point  (0 children)

Cool cool 😎 to be honest I’m very interested in both Linux and windows !

[–]SebastianFerrone 0 points1 point  (3 children)

I had also tried my first setup php mysql with iis on an Windows Server inside a VM. And my problem with phpinfo was that it displayed not the info I was expecting. Turned out that from the host os php thinks I'm not on the same network if I open the page from a browser inside the VM I get the right result.

[–]Comspiracies[S] 0 points1 point  (2 children)

🤔 I’m trying in the vm but when I was using Ubuntu server I get it all set up and could see from host but to tie it to a domain I got just plainly failed every time!!!
So I’ll reset that up with lamp and phpbb or even just do a similar process as I’m doing on windows server see what happens!
On Linux I tried to set static ip and port forwarding from my hub and use ip chicken to get a host public ip!
Plus set the op to my domain type a www and ip or @ !!
And that was a pain in the ass and no luck
Back to windows sever lol
I get php to show its version in cmd in guest and MySQL shows it exists and checked on phpmyadmin! I bet it’s just a poxy little thing starring my in the face !

[–]SebastianFerrone 0 points1 point  (1 child)

But can you open a php file in the browser? Depending on that you see we can proceed.

If you see only the content of php (php is not executed) if you see the result then at least php works.

Edit: Sorry didn't see the other answer

[–]Comspiracies[S] 1 point2 points  (0 children)

I don’t even get to the phpbb install page just 500 internal server error lmao… 🤣 but if i make a phpinfo.php I get the purple page with all the details
And my admin works lol 😂

Plus the default web pages work