I am a web developer and I've just switched from windows 10 to ubuntu 18.04. I've tried unstalling and reinstalling it again and alomst all the solutions that's been provided by fellow developers on ask.ubuntu, ubuntu forums, stackoverflow etc.
i don't understand what seems to be the problem. I've installed php, openssh.server and apache. I made phpinfo.php in /var/www/html and when i'm trying to run it on localhost it says "unable to connect". I've shared the output for sudo service apache2 start
Related
I created a droplet in DigitalOcean (LAMP on Ubuntu 20.04)
Installed WP PHP files using WinSCP
Run it on PUTTY
Checked site on web browser
I received a message saying "PDO Driver for SQLite is missing"
Found solutions online and here's what I've tried:
Find php.ini & uncomment (remove ;) on extension=pdo_mysql & extension=pdo_sqlite
Restarted apache on PuTTY by using this command sudo service apache2 restart
But didn't work
Any tips please?
I downloaded the installer version of Xampp version 8.1.6-0 for Mac and went to the manager-osx widget to start the Apache and MySQL servers but neither would start.
I then tried using the command sudo apachectl start and then created an index.php file and put it in htdocs, and then tried to open it using http://localhost/index.php as well as http://localhost:8080/index.php and both times it said the server could not be reached.
I've actually downloaded Xamp in the past and was able to reach the server but wasn't able to get php scripts to run, but now for some reason I can't even get the server to run.
I made sure to download the installer and not the virtual machine version. I'm running Monterey version 12.4.
I tried the solutions here but they didn't seem to work. I checked my activity monitor and nothing is running on port 80.
I also installed MAMP from here and tried to start Apache but it displayed the error:
"Apache couldn't be started. Please check your MAMP installation and
configuration."
Any help would be appreciated as I just want to run PHP.
I've recentlly got a problem with my local virtual hosts after installing php 5.6 next to php 7.0. I'm using Ubuntu 16.04 with Apache, MySQL etc. configured for Laravel projects and everything was working perfectly fine with php 7.0 until I had to work with another project. This non-laravel project required php 5.6 to work, so I installed it next to php 7.0 together with some modules for phpmyadmin (as it didn't work after I switched server to php 5.6). So what I did after installing php 5.6 was:
sudo a2dismod php7.0
sudo a2enmod php5.6
sudo service apache2 restart
Added a new host for my php 5.6 project in /etc/hosts as 127.0.0.1 www.myhost.local.
Added a new config in sites-available, enabled it, restarted the server.
Installed few required by phpmyadmin modules to configure database for the new project.
Worked with my php 5.6 project.
When I wanted to switch back to my Laravel projects I made:
sudo a2dismod php5.6
sudo a2enmod php7.0
sudo service apache2 restart
And none of the laravel hosts worked. The error I get from Google Chrome is:
This site can’t be reached
www.myhost.local’s server IP address could not be found.
ERR_NAME_NOT_RESOLVED
And I DIDN'T CHANGE configs of Laravel projects! I didn't edit neither sites-availavle configs, nor etc/hotst except for adding the line with my php 5.6 project. I've tryed:
Checking /etc/apache2/mods-enabled where are php7.0.load and php7.0.conf enabled.
Checking service apache2 status and got Apache active (running).
Checking http://localhost/ and got the default apache page.
Checking http://localhost/php.info which showed me that server is running with php 7.0
Deleting php 5.6 host from etc/hosts and disabling same config in sites-available.
Adding < VirtualHost 127.0.0.1:80 > instead of < VirtualHost *:80 > in the beginning of my Laravel host config. Which made some inner pages work if loaded without www and home page still didn't and www was added to url every time I tryed to load it. However some inner pages began later to generate www too and nothing helped :(
Checking apache logs and got warnings only.
Some other minor things I can't remember now...
Can anyone help please? Or is it easier to reinstall php completely?
Thanks everyone! That was browser cache (although I've checked other browsers I never opened my projects in). So it finally worked in incognito window and after I cleared Chrome's and FF's cache.
Hello!
I have been trying to get PHP scripts running for 5 days on Ubuntu 14.04. I installed PHP 5.3, apache2 and xampp for these versions. I used Netbeans to create a simple script with phpinfo(), but I get a blank page when I run it in Netbeans. And I get "The requested URL was not found on this server" when I run project which includes more than only index.php project. When I run localhost in browser Xampp page for Ubuntu is loaded.
I used this answer for apache2 configuration.
I reinstalled it and tried to configure for the 3d time, so I`m desperate. So I would be grateful for any help and tips!
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04
Follow this tutorial. ON Linux google for LAMP not XAMPP
I have a project that it is deploy and running on Debian (apache 2.2.9, php5.2, mysql 5.0)
Now i trying to run it in ubuntu 11.10(apache 2.2 php 5.3 mysql 5.1) but only the homepage is working.
If i click on any of the links I get the Not Found page:
Not Found
The requested URL /patients was not found on this server.
Does anybody have an idea why it is doing this?
I basically check everything, I can't figure out why.
I have a feeling it has to do with cakephp.
You need to enable mod_rewrite in Apache.
Run this command in terminal: sudo a2enmod rewrite, another I had to do for a fresh install was sudo a2enmod headers. Afterwards, you'll need to restart Apache, the terminal will tell you what command you have to run to do that.