I'm trying to update the CSS and JS file but I can not see this change on the site. Even, when I go to the CSS file with the address bar. I see an old version of the file.
I see the file updated when I access the file via FTP.
What have I done?
Added version to files, for example:
https://example.com/style.css?v=2 => Didn't work
I restarted the services
[root#server ~]# systemctl restart nginx.service && systemctl restart php-fpm.service
I deleted the Opcache's cache
php-fpm-cli -r 'var_dump(opcache_get_status());' -connect /var/run/php-fpm.sock
With private windows of browser. Didn't work.
I accessed the file from a different computer. Didn't work.
and, finally I restarted the server: I'm still seeing not updated CSS and JS files!
What could be the problem?
Server;
PHP 7.1, Nginx & PHP-FPM
Related
I tried installing LEMP in Debian 11 using Nginx, MySQL and PHP7.4.
I have the following services running
systemctl start php7.4-fpm
systemctl start nginx
I created a file info.php with <?php phpinfo(); ?> inside /var/www/html and has the appropriate ownership rights set with 755 and user:www-data.
When I load the http://localhost I get the default nginx welcome page.
But when I try to load http://localhost/info.php the server tries to download the info.php file instead of loading the page. How can I resolve this situation. Earlier I had issues when running apache2 localhost loading blank page ie why I moved to nginx.
Please help.
I'm testing file upload between client and server.
But file upload not working because below error.
Unable to move '/tmp/phpxQHW5q' to '/var/www/html/mri_image/test.jpg' in /var/www/html/server_form.php on line 49, referer: http://192.168.1.12/client_form.php
I have searched this problem at stackoverflow.
Most solution is permision problem.
So, tmp and mri_image folder own by apache and changed mod 755.
Then, not working i want to your help
For reference, my os is CentOS 7, php version is 7.3
I had an issue recently with Apache and PHP trying to write to /tmp, but stating that the script failed with an error "No such file or directory"
Centos 7 uses systemd, which has an awesome feature (PrivateTmp) that breaks Apache/PHP access to /tmp folders (particularly in cases where the files need to be shared to other processes/seen by others. This feature works by creating a sort of "virtual" /tmp directory for each process, so a file seen by Apache wouldn't be seen by PHP, etc.
First, copy the httpd.service and php-fpm.service files from /usr/lib/systemd/system/ to /etc/systemd/system using the commands below.
cp /usr/lib/systemd/system/httpd.service /etc/systemd/system/. && cp /usr/lib/systemd/system/php-fpm.service /etc/systemd/system/.
After copying those into place, edit each copy of the files in the new location and change the line with PrivateTmp=true to PrivateTmp=false using vi, or your preferred text editor.
vi /etc/systemd/system/httpd.service
vi /etc/systemd/system/php-fpm.service
After those changes, you need to restart systemd, as well as php-fpm and apache.
Restart systemd:
sudo systemctl daemon-reload
Restart apache:
sudo systemctl restart httpd
Restart php-fpm:
sudo systemctl restart php-fpm
Problem:
I can't access localhost/phpmyadmin/
before I can access localhost/phpmyadmin/ but today when I'm trying to access this page I got weird page
also I can access localhost/xampp/ without any problem
Question:
How can I solve this problem ?
what you need to do is to add phpmyadmin to the apache configuration:
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
then restart apache:
sudo service apache2 restart
On windows, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
A cleaner way is to create the new configuration file:
/etc/apache2/conf-available/phpmyadmin.conf
and write the following in it:
Include /etc/phpmyadmin/apache.conf
then, soft link the file to the directory /etc/apache2/conf-enabled:
sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled
You should use localhost:portnumber/phpmyadmin
Here the Portnumber is the number which you set for your web server or if you have not set it until now it is by Default - 80.
Make sure that both apache webserver and MySQL server are running. I had the same failure because I forgot to start my webserver.
when you run Xampp, check the apache port no. ex: if it is displaying port 80, then type
http://localhost:80/phpmyadmin/
After that it will display automatically
http://localhost/phpmyadmin/
I am using Linux Mint :
After installing LAMP along with PhpMyAdmin, I linked both the configuration files of Apache and PhpMyAdmin. It did the trick. Following are the commands.
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
sudo apt-get -y --reinstall install phpmyadmin;
sudo service apache2 restart;
Hope this helps.
It generally occurs when your default port for localhost is being used by another application (like apache tomcat). Easy fix is to stop the application and simply go to localhost/phpmyadmin.
In my case it worked after stopping apache tomcat.
Sometimes it's case sensitive. Have you tried going to http://localhost/phpMyAdmin?
Based on your output, one of your plugins is messing up with the phpmyadmin. Try disabling all plugins to see if that works.
If it does, enable them one by one and check again, to find the problematic one.
Resolving same problem on Ubuntu 14.04, I use code:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
it is because since Ubuntu 13, Apache loads configuration files from the /etc/apache2/conf-enabled directory.
Ubuntu Documentation
You need reload the server.
If you use apache server
systemctl reload apache2
If you use nginx server
systemctl reload nginx
Judging by the output of the image which you linked in one of your comments:
http://imageshack.us/photo/my-images/638/erroruh.png/
... maybe you accidentally downloaded some form of the website from where you thought you were downloading phpMyAdmin. The text contains references to "Dropbox" which makes me think that the information displaying is in no way related to phpmyadmin.
Try re-installing and see if that helps...
http://www.phpmyadmin.net
Or it could be that Skype is running on the same port (it does by default).
Disable Skype or configure Skype to use another port
I also faced the same issue.
i worked on it and found out ,this is simply because i have mistakenly moved my "phpmyadmin" folder in to a some folder inside Xampp. Go through all the other folders which are inside the main "XAMPP" folder.
Then if you find the "phpmyadmin" inside another folder other than "xampp" move it back to the main "XAmpp" folder and refresh the page.
:)
A cleaner way to include the phpmyadmin config into apache2 is to create a new config file by:
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
and write in it:
Include /etc/phpmyadmin/apache.conf
Run the Apache server, note down the port number(eg:8081)
Open your browser and type localhost:8081(or apache's port number)
Just change -
$cfg['Servers'][$i]['host'] = 'localhost';
in config.inc.ph. i.e. from existing to localhost if you installed it locally
Restarting the xampp services helped me
Make sure you still have phpMyAdmin maybe you deleted it in your htdocs folder?
Get the latest version: http://www.phpmyadmin.net/home_page/downloads.php
Unzip then place the phpMyAdmin (rename the folder if it has version numbers) in your htdocs folder.
Make sure Skype is disabled as it will some times run on the same port as your XAMPP install... I'm not sure why but apache installed via xampp on some windows 7 machines ive seen apache not run if skype is on after 10years of IT work.
So make sure apache is running, mysql is running and hit:
localhost/phpMyAdmin
You should get some kind of install prompt. Step through this you will learn lots along the way. But basically its one config file that needs some settings.
I had the same problem. Couldn't access http://localhost/joomla neither.
and I did not quite understand the other answers.
The simple solution for me:
stop all actions in xampp (I had apache and mysql running. apache on port 80 and 7000something)
quit firefox
restart the actions (apache and mysql)
restart firefox.
open http://localhost/phpmyadmin (or http://localhost/joomla - whatever it be)
voila!
Now apache runs on port 80 and 443 and mysql on 3306.
What you need to do is to add phpmyadmin to the apache configuration:⠀⠀⠀⠀⠀⠀⠀
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
Then restart apache:
sudo service apache2 restart
On ubuntu 18.0.1, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
http://127.0.0.1/phpmyadmin/
I want to run my php applications using php bundled with MAC os. I have done some changes and after that i have started my apache server using
sudo apachectl
restart and running localhost now shows pages available at
/Library/WebServer/Documents/index.html.en
where should i keep my custom php application so that it can be viewable by browser on localhost.
Use a Symlink to have a more easily accessible path:
ln -s /Users/NewBee/Desktop/mycustomappinanaccessibleplace /Library/WebServer/Documents/my_app
You may run into permissions problems, make sure you account for that by ensuring the apache user can access the files and symlink.
Your other option is to change the DocumentRoot in your httpd.conf file.
Problem:
I can't access localhost/phpmyadmin/
before I can access localhost/phpmyadmin/ but today when I'm trying to access this page I got weird page
also I can access localhost/xampp/ without any problem
Question:
How can I solve this problem ?
what you need to do is to add phpmyadmin to the apache configuration:
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
then restart apache:
sudo service apache2 restart
On windows, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
A cleaner way is to create the new configuration file:
/etc/apache2/conf-available/phpmyadmin.conf
and write the following in it:
Include /etc/phpmyadmin/apache.conf
then, soft link the file to the directory /etc/apache2/conf-enabled:
sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled
You should use localhost:portnumber/phpmyadmin
Here the Portnumber is the number which you set for your web server or if you have not set it until now it is by Default - 80.
Make sure that both apache webserver and MySQL server are running. I had the same failure because I forgot to start my webserver.
when you run Xampp, check the apache port no. ex: if it is displaying port 80, then type
http://localhost:80/phpmyadmin/
After that it will display automatically
http://localhost/phpmyadmin/
I am using Linux Mint :
After installing LAMP along with PhpMyAdmin, I linked both the configuration files of Apache and PhpMyAdmin. It did the trick. Following are the commands.
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
sudo apt-get -y --reinstall install phpmyadmin;
sudo service apache2 restart;
Hope this helps.
It generally occurs when your default port for localhost is being used by another application (like apache tomcat). Easy fix is to stop the application and simply go to localhost/phpmyadmin.
In my case it worked after stopping apache tomcat.
Sometimes it's case sensitive. Have you tried going to http://localhost/phpMyAdmin?
Based on your output, one of your plugins is messing up with the phpmyadmin. Try disabling all plugins to see if that works.
If it does, enable them one by one and check again, to find the problematic one.
Resolving same problem on Ubuntu 14.04, I use code:
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo /etc/init.d/apache2 reload
it is because since Ubuntu 13, Apache loads configuration files from the /etc/apache2/conf-enabled directory.
Ubuntu Documentation
You need reload the server.
If you use apache server
systemctl reload apache2
If you use nginx server
systemctl reload nginx
Judging by the output of the image which you linked in one of your comments:
http://imageshack.us/photo/my-images/638/erroruh.png/
... maybe you accidentally downloaded some form of the website from where you thought you were downloading phpMyAdmin. The text contains references to "Dropbox" which makes me think that the information displaying is in no way related to phpmyadmin.
Try re-installing and see if that helps...
http://www.phpmyadmin.net
Or it could be that Skype is running on the same port (it does by default).
Disable Skype or configure Skype to use another port
I also faced the same issue.
i worked on it and found out ,this is simply because i have mistakenly moved my "phpmyadmin" folder in to a some folder inside Xampp. Go through all the other folders which are inside the main "XAMPP" folder.
Then if you find the "phpmyadmin" inside another folder other than "xampp" move it back to the main "XAmpp" folder and refresh the page.
:)
A cleaner way to include the phpmyadmin config into apache2 is to create a new config file by:
sudo nano /etc/apache2/conf-enabled/phpmyadmin.conf
and write in it:
Include /etc/phpmyadmin/apache.conf
Run the Apache server, note down the port number(eg:8081)
Open your browser and type localhost:8081(or apache's port number)
Just change -
$cfg['Servers'][$i]['host'] = 'localhost';
in config.inc.ph. i.e. from existing to localhost if you installed it locally
Restarting the xampp services helped me
Make sure you still have phpMyAdmin maybe you deleted it in your htdocs folder?
Get the latest version: http://www.phpmyadmin.net/home_page/downloads.php
Unzip then place the phpMyAdmin (rename the folder if it has version numbers) in your htdocs folder.
Make sure Skype is disabled as it will some times run on the same port as your XAMPP install... I'm not sure why but apache installed via xampp on some windows 7 machines ive seen apache not run if skype is on after 10years of IT work.
So make sure apache is running, mysql is running and hit:
localhost/phpMyAdmin
You should get some kind of install prompt. Step through this you will learn lots along the way. But basically its one config file that needs some settings.
I had the same problem. Couldn't access http://localhost/joomla neither.
and I did not quite understand the other answers.
The simple solution for me:
stop all actions in xampp (I had apache and mysql running. apache on port 80 and 7000something)
quit firefox
restart the actions (apache and mysql)
restart firefox.
open http://localhost/phpmyadmin (or http://localhost/joomla - whatever it be)
voila!
Now apache runs on port 80 and 443 and mysql on 3306.
What you need to do is to add phpmyadmin to the apache configuration:⠀⠀⠀⠀⠀⠀⠀
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file:
Include /etc/phpmyadmin/apache.conf
Then restart apache:
sudo service apache2 restart
On ubuntu 18.0.1, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache
http://127.0.0.1/phpmyadmin/