简体   繁体   中英

How to setup a PHP server?

I'm trying to set up a PHP server. We have an old server that runs a bunch of in house forms over an intranet that is coded in ASP, and I'm trying to rebuild that into a better system using PHP.

I'm starting fresh, as have been given a Win 2012 r2 server.

I first tried installing IIS 8. I installed downloaded the files for php (version 7). I was successful in being able to access index.html and any other files placed in the c/inetpub/wwwroot folder from a different PC via a browser ( http://servername/file.php ). However, I installed MariaDB and phpmyadmin. phpmyadmin gave the the message the mysqli extension is missing.

I ultimately uninstalled IIS, and PHP, and the MariaDB. I wanted to start from scratch, and tried with Apache

I was able to get Apache and PHP to work together, but I could not access files in the htdocs folder from a different PC (going to http://<servername>/file.php ). I could only access it via localhost.

I had the same problems with phpmyadmin and mysqli.

I also noticed there was no php.ini file... rather I saw a php-ini-production and php-ini-development files.

How to I fix the phpmyadmin problem? Any advice for configuring apache so that I can access files place in the htdocs folder from a device other than the server itself (non-localhost)?

I recommend using XAMPP, then you'll have MySQL, and may be you could configure to use MariaDB as well.

If you use XAMPP, phpmyadmin is not available other than localhost, but that is configurable. If you want i can help you find a good video for that.

take the php-ini-production file and rename it to php.ini and find the line

;extension=php_mysqli.dll

and just remove the leading semicolon (;), save and restart apache.

Also you need to open the firewall on your machine to allow port 80 to accept all connections.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM