Awstats permission denied with Apache on Windows - apache

I am trying to run awstats on windows 7 with apache from xammp tools. but i get this error, when i click on "update" from the website:
Error: Couldn't open server log file "C:\Users\ekc\Documents\Projekte\16 Lasttests\Access Logs\s96ess5a1" : Permission denied
Setup ('C:/xampp/cgi-bin/awstats.www.testmywebsite.com.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
But if i set my LogFile= in awstats.www.testmywebsite.com.conf direkt to log file self instead of to the folder of log, it works! I mean, if i use ..\Access Logs\s96ess5a1\2015-02-01 instead of ..\Access Logs\s96ess5a1
I have set all of the permissions with right click on this folder for my user, to write and to change the folder.
What is the reason of that?

Related

getting access denied to user on my laravel project hosted on cpanel

so i have been trying to get a laravel project of mine working on cpanel web host and i keep getting access denied to the user, i have cross checked my database name and user on the .env file no luck
APP_NAME=#####
APP_ENV=local
APP_KEY=base64:IGN5qlcuICOZ3LAeIMPh+DXtTPA/51P2tCIRW1DmDY4=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=####
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=dbname
DB_USERNAME=dbuser
DB_PASSWORD=pass
I get a laravel error, access denied to dbuser can not (select * from projects)
Can you see your environment file?
Did you already enable viewing of hidden files?
If your answer to question 2 is no and you are seeing the file, then your environment file is most likely saved as "env" not ".env", check it and change it accordingly.
To enable viewing of hidden files,
In the file manager in cpanel, click on the settings at the top-right corner then you would see "show hidden files", tick the checkbox.
Also ensure your php version on the server matches the version in your developement environment.
To do this, on your local environment type "php -v" to see the version.
On the server, type "php" on your cpanel home search and click on "php select version". Set it to the exact version you have on your local development environment.

After uploading MVC website to the folder httpdocs from FIlezilla and browsing it the showing Internal Server error

I am getting 500 Internal server.I have uploaded files to the server using Filezila .and when i am browsing it.Its showing internal server error.
Whats is the permission of your files and directory's which you have uploaded in your account. Also check your .htaccess file code.
There may be several reasons , let me list few which i think might be the reason.
1) Check the folder and file permissions on the hosting . Folder permission should be 755 and the file permission should be 644 by default to work on
2) If there is any .htaccess file try to remove that file and check again reloading (Note : if you are using cPanel try selecting show hidden files in file manager to view the .htaccess file )
3) whether your db is been properly configured in the configuration file of your MVC site ( however if it is the reason the page will will throw some db connectivity error . just in case if it is i am asking you to check )
If that helps, update me . If not, Kindly post the error log which can be taken in cPanel or if you are using different solution ask your hosting provider on how to view error log.
The best and universal approach if you have root access on the server would be to look for more information in the web server log:
/usr/local/apache/logs/error_log
If you do not have root access, you can check the Error log in cPanel -> Errors, it will provide you with more details on what the problem is.

KLogger Permission denied trying to create log file

I have KLogger installed in my web app and everything worked fine on my XAMPP dev server but once I uploaded all my files to my host I get:
<b>Warning</b>: fopen(/var/log/log_2013-08-15.txt) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied in <b>/home/user/public_html/site.net/include/KLogger.php</b> on line <b>177</b><br />
So far I have tried setting the permissions to 777 on both the var and log folders but this doesn't help.
Please help me trouble shoot this.
My hosting provider provides CPanel.
As requested I'm answering my own question.
This was my error all the way. In all of my other files I have a couple of defines for the file paths and I didn't add them to my klogger initialization so it was trying to create a text file on the root var/log directory instead of my home directory.

Install Symfony on remote server

I'm trying to evaluate Symfony 2 (2.1.7). I'm installing it following the download instructions on an EC2 instance that is already running PHP 5.3.20 on Apache.
I'm stuck on the second step of the README.md: "Access the config.php script from a browser". The readme assumes a local installation and provides a sample URL to the localhost: http://localhost/path/to/symfony/app/web/config.php.
Since I'm on a remote server, I try to access the config.php file using the relevant URL: http://mysite.com/Symfony/app/check.php, which returns this message:
Forbidden
You don't have permission to access /Symfony/app/check.php on this server.
I tried to apply the answer from How do I access to symfony config.php remotely? by adding what PHP reports back as my REMOTE_ADDR, but that doesn't change the message.
What do I do now?
In symfony, the web folder is supposed to be your webroot. So, if you want to access \project\web\config.php, you should point your browser to http://www.example.com/config.php.
If that doesnt work, apache is probably configured incorrectly. make sure it it is pointed at your web directory, not your project directory.
edit As you mention in your question, you will also need to edit the config.php file to allow remote access. You can comment those lines out, or add your IP to the whitelist.
edit2 Many webhosts don't allow you to specify your webroot. In that situation, you can put the Symfony files in a different directory and create a symlink between the Symfony web directory and your webroot.

how to access php.ini file of server?

My application was working fine, I dont know what happened suddenly image upload function stoped functioning.It gives this error-
URL file-access is disabled in the server configuration in D:\Hosting\6448289\html\upload.php on line 112
for any file access allow_url_fopen must be ON but this is OFF now.
if you open this link - www.shizin.com/phpinfo.php
you can see that allow_url_fopen is OFF. My hosting compny is GoDaddy.com.
How and Where I can access php.ini file of my project so that I can set it ON or is there any php commands that can be run to set this permission ON.Please suggest.
You will probably have a custom php.ini or php5.ini file somewhere in your account. Launch your FTP client and find it.
Found via Google:
http://community.godaddy.com/godaddy/tips-for-protecting-your-php-based-website/
http://community.godaddy.com/help/article/5647