I updated my joomla site to 2.5 from joomla 1.7 I faced below errors:
1- I cannot open global configuration page from the admin area and receive "500 internal server error"
2- When I press the add new article button from the admin area I receive the same error.
3- When I press the add new category button from the admin area I receive the same error.
appreciate if you can help to solve this.
I had the same issue and was about to go crazy (even considered switching to another CMS) ... the problem appears to be related to the fact that Joomla 2.5 is throwing several errors and the PHP engine was trying to write to the php_errors.log file in a directory where it didn't have write permissions, thus the 500 error (misleading I know).
Incidentally, this happened to me on a Windows box running IIS 7.5, not Apache. The solution, intiailly was to edit my PHP.INI file and change the "error_log" setting to point to a folder which had write permissions for all websites. I just created a new folder and gave the 'users' group modify permissions - not the best way to do it but for development purposes, it was ok.
You then have to restart IIS.
It is important that you actually restart IIS, not just restart the application pool, as this didnt seem to force PHP to re-read the config.
Once I got this far, I started noticing errors (which I will continue to post here among other places until I can find a solution). So far, the first error I see is when I go to add a New Menu Item, i get this:
Warning: is_file(): open_basedir restriction in effect. File(\metadata.xml) is not within the allowed path(s): (C:\Inetpub\vhosts\myWebsite.com\httpdocs\) in C:\Inetpub\vhosts\myWebsite.com\httpdocs\libraries\joomla\filesystem\file.php on line 523
It appears that Joomla is trying to verify if the \metadata.xml file exists, however I'm not sure where that file is or what it does. At this point, i suspect it's still ultimately a permissions problem, but I'm still digging...
The most common cause of 500 error that I've seen on Joomla! websites is related to the permissions of the files on the website. eg. yesterday we had to fix a website for a company that had upgraded and in the process somehow set the Group write permission on their /administrator directory.
You can check this quickly through the file manager of your hosting service, if using CPanel you should make sure your directories are set to 755 (User has read/write/execute permissions, Group and World have read permission) and files set to 644 (User has read & write permissions, Group and World have read permission).
These sound like the same issue.
See this rundown of potential upgrade problems by Brian Teeman:
http://brian.teeman.net/joomla-1.7/upgrading-to-joomla-2.5-some-warnings.html
The problem you are having could be related to the database issue he mentions.
Related
I used windows 10 as the operating system and I installed xampp it's been a long time and it chews well, until yesterday after an error in mysql.
So I looked for solutions on the internet and I finally solved the error by copying the files from C:\xampp\mysql\backup to C:\xampp\mysql\data.
then the service mysql is well marketed even as Apache.
PhpMyadmin chews well without a problem. phpmyadmin page shows, but my code, will not show.
The problem is: my old projects exist in htdocs only display "This page does not work" and "localhost" in the title head, and nothing loads from my project files.
Note: I used codeigniter as a framework.
Note: I can navigate to a new project but for existing projects beyond that it no longer works.
Thank you P.al
Use Directly like-
http://localhost/projects/form.html
Here your files should be inside C:\XAMPP\htdocs\Projects\yourfile.html
The error in your picture appear an php script error
Edit php.ini for display error and notice in browser
display_errors = on
save the php.ini restart apache and reload page.
I have my Wordpress on Shared IIS hosting using Plesk. Today, just by itself, some of my uploaded files started to give this error:
HTTP Error 500.50 - URL Rewrite Module Error. The page cannot be
displayed because an internal server error has occurred.
Most likely causes: IIS received the request; however, an internal
error occurred during the processing of the request. The root cause of
this error depends on which module handles the request and what was
happening in the worker process when this error occurred. IIS was not
able to access the web.config file for the Web site or application.
This can occur if the NTFS permissions are set incorrectly. IIS was
not able to process configuration for the Web site or application. The
authenticated user does not have permission to use this DLL. The
request is mapped to a managed handler but the .NET Extensibility
Feature is not installed.
Things you can try: Ensure that the NTFS permissions for the
web.config file are correct and allow access to the Web server's
machine account. Check the event logs to see if any additional
information was logged. Verify the permissions for the DLL. Install
the .NET Extensibility feature if the request is mapped to a managed
handler. Create a tracing rule to track failed requests for this HTTP
status code. For more information about creating a tracing rule for
failed requests, click here.
The interesting thing is that, when a file is uploaded, it's other dimension versions are created, and I have no problem accessing those. But when I try to access the original file, I'm getting that error. When I try to inspect file permissions on my Plesk control panel, the wp-content and the uploads folder does have the write permission to my user, but when I check the problematic file, Plesk can't access it from the control panel too:
Unable to get the object (C:\Inetpub\vhosts\PATH-TO-MY-IMAGE) security
info: (5) Access is denied. at execute "C:\Program Files
(x86)\Parallels\Plesk\admin\bin\filemng.exe" MY_USER_NAME
--permissions --list-common "--file=C:\Inetpub\vhosts\PATH-TO-MY-IMAGE"
"--accounts=tmpB575.tmp"(RunTime::RunAsUser::run line 260) (Error code
1)
---------------------- Debug Info -------------------------------
I can't even read the permissions on that file. Trying to delete the file using FileZilla results in an error too. This happened to SOME files today, and NOT to others, regardless of upload order, file name or type.
I've checked out many pages regarding this, but they all point to one thing: editing PHP.ini file to change the upload folder. After some search I've created a new PHP.ini like this:
upload_tmp_dir = "C:\Inetpub\vhosts\PATH_TO_A_FOLDER_THAT_I_CAN_WRITE_TO_IN_MY_HTTPDOCS_FOLDER"
Uploaded it to my httpdocs folder, restarted my app pool from Plesk, but no avail. I try uploading new files and I still get the same error. What I haven't understood is that why this started happening today and why is this happening completely randomly (I haven't changed any setting, I haven't entered into any settings pages for weeks). Is this something related to my configuration or should I contact my hosting provider?
It turned out to be a problem with my hosting company at their side. There was nothing I could do.
I was having permission issues with IIS 8.0 on my Windows Server 2012 box, so I decided to remove & re-add the role in an attempt to fix it.
This seems to have fixed my permission problems, but now my PHP wont work!
I get this error when trying to access a .php file
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration.
If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
Obviously what I need to do here is add a handler to one of the files in my php install folder (which I installed using the web app manager thing) but I don't know where I add a handler from? I know where to add MIME maps from but obviously that isn't going to solve this.
UPDATE: So I followed one of the answers which linked me to the PHP site, followed what it said and that seems to have fixed the PHP no running problem, but now thats opened a whole new can of worms. I'm getting the same Access is denied. error as before! even when i change file extensions to .html, it appears my site isnt directing to the default document, as when i go to www.mysite.co.uk, i get the error, but if i go to www.mysite.co.uk/index.php, it works fine! i have a index.php entry in my default documents, and a index.html, and neither seem to be working after the PHP install
permission on the root directory are full control to, Administrator, My user account, 'NETWORK SERVICE' and 'SYSTEM', just to note, i couldnt get the site to work at all without setting the 'connect as' option to my user account and password, so thats what its using to access the files.
I think this may help you;
http://php.net/manual/en/install.windows.iis7.php
It says for iis7 and above, let me know if doesn't work and I'll dig deeper.
The process is;
1 - Configure CGI- and FastCGI settings in your php.ini such as
Fastcgi.impersonate = 1
fastcgi.logging = 0
cgi.fix_pathinfo = 1
cgi.force_redirect = 0
2 - Then in Windows type inetmgr into run under the start menu.
3 - Select the server node in the window that opens which is in the connections tree.
4 - In the central pane, known as the features view, openthe Handler Mappings feature.
5 - In the actions pane click **Add Module Mapping..."
6 - Use these details to fill in the blanks;
Request path: *.php
Module: FastCgiModule
Executable: C:\[path to php install]\php-cgi.exe
Name: PHP_via_FastCGI
7 - Click request restrictions and then configure the mapping to invoke handler only if request is mapped to a file or folder.
8 - Click okay on all dialogues to save the config.
The link at the top provides further information on configuration examples and how to do this from the command line. You should restart IIS once you're done.
I'm having a problem with a PHP website running on IIS 7 on Windows Server 2008.
There is one line of code calling mkdir which is erroring and the error log reads:
"... permission denied ..."
I have ruled out anything to do with folder permissions (I have tried multiple groups: Everyone, Users, IUSR, Network Service etc. with no luck).
I need to know how mkdir works, does it check the read-only attribute of the parent folder?
If so, then this could be the root of the problem as all folders in Windows Server 2008 are marked as "Read Only" and the checkbox is greyed-out - Microsoft say it is "by design" but I think it is really "bad design".
Please help.
P.S. The line of code which errors can be found here https://github.com/LimeSurvey/LimeSurvey/blob/070d255ba381d7abcd231d7c9e0c7d11f5578c97/admin/templates.php#L1182 it is line 1182.
SOLUTION:
It was a permissions issue after all!
We were applying permissions to the wrong folder (smacks hand to forehead)
There are two "Templates" folders: /Templates and /Uploads/Templates
/Template is for default templates whereas /Uploads/Templates is for user-created ones
We gave the "Users" group r/w/execute/modify permissions to /Uploads/Templates folder
Whereas previously we were applying permissions to /Templates
To debug this I used echo to output the $target value
LESSONS LEARNT:
Always read the error message - it said "permission denied" and I didn't believe it
Don't assume the obvious to be true - /Templates wasn't the right folder
If the code is erroring then debug the code and don't try to guess the problem
Debug the code using simple techniques such as outputting variable values - e.g. echo
Listen to the majority - most people here were right in saying IT IS A PERMISSIONS ISSUE!
Most errors have a simple fix - don't go looking for something complex
Bounty awarded to #BOMEz because of the useful quote from mkdir() documentation which indicated that I should double-think the permissions. #BOMEz also provided a tailored answer and interacted with me via comments which helped.
As a test (preferably in a development environment) give the IIS user full access to the parent folder. If this makes it work, slowly start taking away privileges to see which ones you need.
Try changing:
if(mkdir($target,0777))
to:
if(mkdir($target))
Windows ignores the mode option. Might be some weird bug causing it to fail.
Additionally for your $target variable could you try forcing it to link to the full Windows path? Such as C:\Program Files\ IIS\...
I've ran into situations with windows before where access was denied attempting to use a relative path, but the full path works just fine.
EDIT:
Looking at the comments on the documentation for mkdir() one commenter mentions that you might also need to add execute permissions to the user:
If you're getting a Permission Denied error, but are certain the
permissions and ownership where you are trying to create the directory
are correct, check again:
The location where you are trying to create the directory in must have
the Execute permission for the owner trying to create it, regardless
of if the folder is Readable, or Writable.
This may be obvious to some, but was not to me at first. Hopefully
this will save you the trouble I went through.
Since you didn't mention a control panel of any sort I'm going to assume you have access to the server either physical or remote desktop. I'm also going to assume you checked your php.ini settings.
That being said, there is a work around for some of these permission problems.
You will need to create an administrator account (and add it to the administrators group) for this site to use or simply use your administrator credentials.
Open the IIS manager
Expand Sites
Highlight the site in question
On the right side of the screen click 'Basic Settings', a dialog box should pop up.
Click the button at the bottom that says 'Connect as...'
Select 'Specific user' and then click the 'Set...' button
Type the user name and password of either your account or the account you created.
Hit 'Ok' button 3 times.
This is a bit of a sledge hammer fix since it will grant full unrestricted access to the file system from your scripts.
If you created a new user and you want to maintain some level of script security then you can try pulling the user out of the administrators group and then giving it full permissions on only that site with the following:
Highlight site
Right-Click, Edit Permissions
Security Tab
Click 'Edit' button
Click 'Add' button
Click 'Advanced' then 'Find Now'
Double click on the user you created
Click 'Ok'
Highlight your user, tick the box under allow that is next to full control
click 'Ok' twice
If asked, select that you want to apply to all directories and files.
~
If your still having issues then there is a good chance your php setup is configured incorrectly or corrupt. (Safe mode turned on maybe?)
Following is the explanation of permissions.
Read
On a File: this means reading content of the files
On a Directory: it means viewing the contents of the directory, namely, being able to use ls or dir
Write
On a File: this means being able to edit content of the files
On a Directory: it means being able to create/modify content of the directory, namely making new files or folders in that directory.
Execute
On a File: this means executing the code from the file (for scripts/executables)
On a Directory: it means, entering the directory. You can not cd into that directory without this permission.
--
So, now that makes it clear the answer to your problem (as you guessed correctly), for making new directory or writing new files into the directory you need write permission on that directory. So for making folders into say C:/your_folder/ you need, write and execute permissions on that folder. (Yes you need execute too, as apparently for mkdir you need to go inside the folder first.)
One of the issues that we run into quite often is that files have been moved from any location to the websites location, maintaining the original permissions instead of inheriting the permission needed by the application pool user of the pool that's beeing used by the website.
So one good thing to try would be to right click your document root folder, go to properties and then the security tab. Press the advanced button, check the checkbox a "Replace permission entries on all child objects with entries shown here that apply to child objects". That way you can atleast be sure all your permissions are set on all subfolders and files.
We nerver had any problems with the read only attribute, even though this is checked for all our folders. (grayed out/checked). So i doubt that is your problemen.
Magento isn't displaying anything but a white homepage, in the error_log the error given is:
client denied by server configuration: /var/www/httpdocs/app/etc/local.xml
I can access the admin area fine, does anyone know why this might happen?
The log entry appears to be created by calls magento is making to ensure you have secured your admin properly. Rather than it being an error it is actually something you want to see as it is effectively saying your admin is secure. Clearly this is just noise in your logs.
There is a really elegant solution on how to fix this and speed up your admin page load described here:
http://www.yireo.com/tutorials/magento/magento-administration/1322-client-denied-by-server-configuration-appetclocalxml
Essentially create the file in the location below with the contents shown. Once you have added the file:
app/design/adminhtml/default/default/layout/local.xml
With the contents:
<layout>
<default>
<remove name="notification_security" />
<remove name="notification_survey" />
</default>
</layout>
Remember to flush your caches: System > Cache Management
Okay... few mixed issues on this page, here is my attempt to clear these up...
Client denied by server configuration: /var/www/httpdocs/app/etc/local.xml
Alan: is correct is this unrelated to your issue... Magento as of 1.4 fills your error log with this message, one for each page you access in the Admin area... This is as a result of Magento "testing" your config file to see if it can be seen be the world... Kinda dumb as this is error is showing it is protected...
The solution to which you were looking for when you came accross the page, seems to be to "hack the core": http://www.magentocommerce.com/boards/viewthread/213947/#t306425
APC issue stated as APC not palying nicely with Magento:-
Switching Magentos caching backed from "apc" back to "files"... You must clear your var/cache directory "rm -R var/cache/*" before switching Magento back to use cache method files from APC... otherwise Magento will read old cache and barf... It is also sensible for the same reason to clear APC by restarting Apache prior to switching to use APC...
And Finally... Original question:-
White screen... most likely as a result of a PHP error and your server having display errors turned off... Firstly manually clear cache on command line from within Magento document root "rm -R var/cache/*"... this may solve as broken cache can cause this... if not... check php config that "display_errors" equals 1 or On... To view PHP settings, in Magento document root, on command line $echo "<?php phpinfo() ?>" > phpinfo.php... request phpinfo.php in browser from magento domain and review php settings, change as necessary...
Other: Renaming errors/local.xml.sample to errors/local.xml will result in you being able to see the complete Magento Error Exception...
Hope this helps someone...
The wording on that error
client denied by server configuration: /var/www/httpdocs/app/etc/local.xml
is an Apache error message that's unrelated to your problem. Someone tried to directly access your local.xml file via a web browser but were blocked by the server configuration. This is correct behavior.
Your white screen error is happening for another reason.
Are there other errors in the log?
Configure PHP to log PHP errors separately.
You can access the magento admin, so turn on logging for Magento specific errors
With the above in place, configure your store to only server file to your IP so you can figure out which error in the log(s) (Apache, PHP, or Magento) is related to your direct request.
APC caching apparently doesn't play nicely with Magento, disabling it threw a PHP error that an outdated theme was producing