I installed LAMP on my linux laptop one month ago and it was still working fine. But then recently I can't access phpmyadmin. It always pops up this error:
Error during session start; please check your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.
I tried clearing the cache and cookies of my Mozilla browser but it still won't work. By the way, I'm new to Linux so I'm having a hard time configuring what might went wrong.
Try giving Read Write permission to the folder
sudo chmod 777 /var/lib/php/session/
Related
I have been using xampp for a while and suddenly it brings error for apache and mysql:
"Apache or mysql shutdown unexpectedly This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. Press the Logs button to view error logs and check the Windows Event Viewer for more clues. If you need more help, copy and post this entire log window on the forums". A second attempt to retry will bring "apache/mysql not found".
I check both apache and mysql bin folder and i notice it removes httpd.exe and mysqld.exe this files automatically for some reason. I have tried several troubleshooting like un-installing and re-installing completely but its all been futile.
I manage to tweak it by creating a cmd file that copies this files (httpd.exe and mysqld.exe) where they are needed in xampp folder before i run xampp which seems to be working fine but i believe it shouldnt be so and i need to find out the reasons this files get removed on my pc. Any help and suggestions is highly welcomed.
check any third party antivirus software?
Kaspersky Enterprise v10 killed my WAMP installation on win10 a few months back...
Bit more complicated but ...
if that does not fix it, you can run disk mon.. a Microsoft tool, wait for it to happen again an find the process ID in the disk mon log, that matches your file and look for the process in task manager to see what program did the delete...
https://learn.microsoft.com/en-us/sysinternals/downloads/diskmon
Bit stuck here, I have looked on here, for similar, but cant find what I need.
Have looked at how to start PHPmyAdmin via putty on here.
I have a server, which is on a network. I log into the network via Putty.
The database usual access is for example 10.32.187.100/m . This is how I used to access it before the server reboot.
I have had to restart the server. But I cannot log into the database as I believe I have to turn it on.
As it is not on a local machine I do not know how. It is a linux server, and the location of ‘m’ is /var/www/html
In ‘m’ are the files for phpmyAdmin.
Nothing has been over written. The server had to restart. Hence why I need to start up PHPmyAdmin.
Can I ask how do I turn on PHPmyAdmin via putty I the method I need to use?
try this
sudo service mysql start
sudo service apache2 start
I've been using an Ubuntu server for about 10 months now so there is no problem with the way I set everything up. I guess I had some bad code similar to a while loop with no increasing variable to notify the while loop when to stop. And after I executed the code it did what it normally would do and freeze up until I could refresh it. But this time is different because after, it seems any .php file of mine does not show up correctly on my web browser. I can not log into my website via pulling from my phpmyadmin. I'm also not able to log into phpmyadmin. When I try to log into phpmyadmin it just refreshes the page with no error.
My question is, how can I maybe restart php in my Ubuntu server with out losing all my data in my database?
After searching things up I found another possibility for this to be happening. I believe that my hard drive on my server is full not allowing me to do anything.
How can I delete things from my server if I cannot access my database?
I found a solution to getting access to my database again.
The problem was that I used up pretty much all of the memory space on my virtual machine which was blocking any session at all with php. I now have access back to phpmyadmin
Step 1 -
I cleaned up space on my virtual machine hardrive by typing all these commands:
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get autoclean
Step 2 -
Restart virtual machine
On my CentOS machine I have installed PHP. When I log onto that machine from another machine(fedora) through ssh and run a PHP script for writing to a file, it works perfectly.
But when I open a browser from my fedora machine and open the same PHP script, it fails to open that file for writing. The browser works for read and other echo commands.
I don't get the reason why is it happening. What would be a quick solution to my problem?
When you use CLI, you execute script as user that you logged in as through SSH. On the other hand, when you execute a script through a web browser and your have PHP installed as Apache module, it is running as apache user on CentOS (source).
These two users may have different permissions, so one has permissions to write to the file and other does not.
Long story short: change file permissions so apache user can write to it.
I have RHEL server on which PHP websites are hosted using Apache web server. In one website I'm using PHP Curl library to connect to some services. These services make use of SSL (https).
When I browse any PHP page which makes SSL calls using Curl, I get below error:
Problem with the SSL CA cert (path? access rights?)
If I run the same PHP script from command-line on my server, it works fine. Only when I browse it I get above error.
I have already tried the solution given in http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/ but it does not work.
If there is anything else I need to do, please let me know.
As mentioned earlier, I tried the solution given at http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/
However, the Apache server was not taking the php.ini changes even after restarting it. When I restarted my Linux machine, it worked. Looks like Apache might be caching php.ini somewhere and it got cleared only by restarting machine.
Hypothesis:
Could be that the user that's running Apache is so restricted that it can't get at the curl CA store. Try logging in as the web user, e.g. www-data and cd'ing to the directory with curl's files. At some time you might get an access-denied error. Finally try cat to display the file (still as Apache user). You could get an access-denied error there too.
Wherever the error occurs, either open up the permissions to allow the Apache user to access the file, or run Apache as another user.