I installed apache2, mysql-server and also phpmyadmin in lamp on my Ubuntu OS.
I used the codebase from a project I did on windows using Xampp that has been working very well. Now, i tried to use those same codes on the lamp server. I've sent the file to my /var/www/ folders.
Initially, it was downloading the file and showing me the codes when I ran it, instead of running normally on my browser. I've tried using Google with many options but nothing seems to be working.
When the webserver send you the PHP code means that you didn't configure the apache to parse it by mod_php.
Please follows a guide to configure PHP with apache here the one from DO .
Start your reading from Step3
Related
XAMPP has some error about ports I uninstall it but did not back up any information and now my project does not run on local host is there any way for me to restore my old project or I have to do it again on new XAMPP? another problem is after reinstalling XAMPP windows do not know PHP what should I do?
by the way I am a very beginner in this :)))
So, I will try to explain this:
Websites (i.e. with PHP) need a webserver. For example when you go to stackoverflow.com, you automatically call a webserver who then compiles the PHP scripts on the server to HTML code.
This principe does also apply to your local installation.
When you call localhost, you basically call yourself as the webserver. XAMPP is a tool that can "simulate" a webserver on your PC, thats why PHP sites do not work without it, because your browser doesn't know what to do with PHP code, it only understands HTML.
If you install XAMPP again you should be able to get it running.
If you have any questions/problems with the XAMPP installation, feel free to ask again.
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.
I recently downloaded WAMP server to get started developing a website locally on my Windows 7 32 bit computer. It was working fine.
Not long after, I downloaded a few different OSGeo4W packages mainly to use QGIS and develop plugins. This is when I began having issues accessing the phpmyadmin local host (page not found error).
I tried uninstalling WAMP in order to re-install it, and now it seems to be taking a very long time to extract files, blocking on the apache 2.4.9 files. Does anyone have any idea if this may be because OSGeo4 installed another version of Apache on my computer? How can I solve this issue?
This is because apache is already running via OSGeo4W application. You can turn it off by launching OSGeo4W-Apache-Monitor and stopping the services. (start/all programs/Apache/OSGEO4W-Apache-Monitor.
Then restart wamp and it should work fine.
I have a iis development server set up and i have just successfully downloaded and installed symfony2 which is placed in the web root of this server and im trying to create a bundle within my project and i seem to be getting this error message in the dos box:
the program cant start because of php5.dll is misisng from your computer. Try reinstalling the program to fix this problem
even though the dll is in the directory of the php folder on the C: drive on my computer.
and yes i entered php app/console generate:bundle into the cmd box.
Any suggestions would be very much appreciated
It seems the PHP was not installed successfully or IIS was not configured correctly for the available PHP.
I would recommend to unistall the previous PHP on IIS and install Microsoft Web Platform Installer first; then search for PHP 5.4> and PHP Manager for IIS in the productions list and add/install them.
This is much safe and reliable than installing php manually, specially that it will do IIS configuration for PHP automatically
This is probably embarrassing short-sighted or just completely wrong, but I've made a header.php and a footer.php file and then an index.php file that calls them. Is there a way to view that index.php file from my desktop?
Use local webserver stack like XAMPP
This will allow you to view PHP Pages without having to upload them to your Server
Use an Apache Server:
XAMPP - http://www.apachefriends.org/en/xampp.html
This will install MySQL, PHPMYADMIN, Apache, PHP on your computer, so you can just upload files to
C:\xampp\htdocs\
and browse to :
127.0.0.1 OR localhost
via a browser with Apache Service running.
^ Assumes you are on Windows.
Another assumption if you was on a linux box (Ubuntu For example)
http://www.howtoforge.com/ubuntu_lamp_for_newbies
Install a webserver with support for PHP on your desktop.
Apache is a good choice. There are bundles of Apache + PHP available for most operating systems.
You would need to install a web server/PHP stack on your desktop. You could looks at something like WAMP (for windows) or MAMP (for Mac) to do this. Or if you happen to be using Linux just install Apache and PHP directly on your machine.
If you are on windows use WAMP If you are on mac use MAMP. For linux use XAMPP Plus read this How Web Servers Work