I moved a PHP website from win2003sp2 Standard to win7 Enterprise. Nothing changed. The website works correct in win2003. But in win7 when get service status via win32_query_service_status(), return WIN32_ERROR_ACCESS_DENIED.
I can not figure it out.
As link provided by Dan, I know Win2003 is different from later Windows for remote authenticated users. Is it the root cause that I cannot get the service status via my website page?
Quote: Windows Server 2003 and Windows XP: Remote authenticated users are granted the SC_MANAGER_CONNECT, SC_MANAGER_ENUMERATE_SERVICE, SC_MANAGER_QUERY_LOCK_STATUS, and STANDARD_RIGHTS_READ access rights. These access rights are restricted as described in the previous table as of Windows Server 2003 with SP1
The access right are restricted as of win2003sp1. But the Website works correct on win2003sp2. I think it may be not the root cause.
The user that PHP is running as does not have the correct rights to the SCM database. See here for more information: http://msdn.microsoft.com/en-us/library/windows/desktop/ms685981(v=vs.85).aspx
WIN32_ERROR_ACCESS_DENIED error is "The handle to the SCM database does not have the appropriate access rights" mentioned on php.net.
check current user permission to folder that may be help ..
Finally, change the authentication of the folder where win32_query_service_status() located as below solved my problem.
Anonymous Authentication - Disabled
Windows Authentication - Enabled
Related
Yesterday one of the servers at our datacenter which has cPanel/WHM installed had a network card blow out so we had to migrate to a new server.
Since then users are always getting the:
The security token is missing from your request.
The error which doesn't accrue on WHM the only cPanel. Yet I read online to clear browser cookies but It seems that the issue is server-wide not only myself.
Even when reentering the cPanel password it directs to the cpanel url with a token in, then before anything shows go straight back to the login screen, and does it constantly completely disabling cPanel access.
Does anyone have any ideas on a fix? It has stopped many clients being able to log in.
See the video I have attached too - https://vimeo.com/390572869
NOTE : The below steps will not work on latest cPanel version.
Log into WHM using server ‘root’ password
Search for “Tweak Settings” in WHM search bar
Uncheck “Require security tokens for all interfaces”
save “Tweak Settings”
You can do the same from server backend
Log into server via SSH as ‘root’ user
Edit the file /var/cpanel/cpanel.config using vi editor
vi /var/cpanel/cpanel.config
You will see the line “xsrftokens=1”
Change the line xsrftokens=1 to xsrftokens=0
Save the file and exit
5 Run the below command on the server to update tweak settings
Command : /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings
Now Try accessing cPanel/WHM/webmail in the browser and you won’t see any Security token missing errors.
I'm trying to read a file on a mapped network drive(shared folder on a Windows XP machine) through a PHP code & using IIS 7 (and it is set up on a windows 7 machine). When I run my code I get an Access denied error, "failed to open stream: Permission denied". I'm using below code to access the file:
$handle = fopen('\\\\servername\\sharedfolder\\test.txt', "r");
I checked permissions on the host machine(running XP). Under the sharing tab, it is only showing share this folder on the network check box , and Allow network users to change my files check boxes and both are checked. Windows firewall is off for the time being.
Any help to fix this issue is very much appreciated.
Solved the problem SOLUTION: Created a new user account with password. In IIS Manager, changed IIS Anonymous Authentication from IUSR to the new user account and gave the same password. Windows XP sharing has been set to 'Everyone' with Read permission
I have an existing web application (currently working on Windows 7). I set up a box with Ubuntu Server 12.04 that I wish to host/test my application on. Problem is, when I try to access the app I get an 500 Internal Server Error.
To be sure there is something wrong with the app itself (as opposed to Ubuntu and Apache configurations) I set up a test domain on the Ubuntu Server which I can access from my windows computer without a problem. I then ftp'd the app to this folder.
This app is using Code Igniter. I have changed the config file to reflect any changes that may affect names/paths. I have a database that is set up correctly. Have I forgotten to change anything else that would cause this error when transferring from Windows to Ubuntu?
edit: As suggested by Steve V here is a message I get in my error log when trying to access the site.
[alert] [client xxx.xxx.x.x] THEPATH/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Your rewrite engine isn't enabled.
Go to shell and do the following:
a2enmod rewrite
service apache2 restart
I am trying to set up hMailServer in "Windows Server 2008 Enterprise Edition Service Pack 1".I've setup hMailServer,Apache,PHP and webmail Interface "AfterLogic webMail" successfully.And all work well.But I am stuck in a problem while I tried to install "PHPWebAdmin"。
Error message as follows :
Fatal error: Class 'COM' not found in E:\Server\wwwroot\PHPWebAdmin\initialize.php on line 13
This infomation occurs while visiting "http://192.168.2.66:8088/PHPWebadmin/".
I've configured PHP configuration file php.ini options as follows:
[PHP]
register_globals = Off
display_errors = Off
doc_root = "E:/Server/wwwroot"
extension_dir = "E:/Server/php5_4_5/ext"
[Session]
session.save_path = "E:/Server/php5_4_5/tmp"
[COM]
com.allow_dcom = true
I've also finished these things as hMailServer manual suggests:
DCOM permissions
Overview
By default, IIS6 is not allowed to connect to hMailServer because of the Distributed COM permissions that Windows uses. Also, Apache run as a user account with restricted permissions is not allowed to connect by default.
Steps
Follow these steps to give IIS or Apache the required permissions to connect to hMailServer using DCOM.
1.Start DCOM config by selecting Start, Run, enter dcomcnfg.exe and press OK.
2.In the Component Services program, expand the Component Services folder
3.Expand down to Computers | My Computer | DCOM Config
4.Right-click on hMailServer and select properties
5.Select the Security tab
6.Under "Launch and Activation Permissions", select Customize and click on Edit
7.Under "Group or user names", click Add
8.For IIS6: add the built-in anonymous IIS user account
9.For Apache: add the Apache user account
10.Set the Local Launch and Local Activation permissions for this user to Allow
Actually,I even tried to give permission to EveryOne in the DCOM configuration.
Installing PHPWebAdmin is to give users a place to change their email password.
Enviroment here:Windows Server 2008,Apache2.2,PHP5.4.5.
Why this problem happen? And How to handle it?
Thanks a lot!
The php 5.4.5 build from windows.php.net ships the com/dotnet module as extension dll. If that's the case with your version of php too you can enable the module via
extension=php_com_dotnet.dll
in your php.ini
If you are using windows 8 and apache server and
extension=php_com_dotnet.dll did not work for you then:
copy php_com_dotnet.dll file to c:/windows/system32
and write to php.ini file:
extension = c:/windows/system32/php_com_dotnet.dll
I am using windows8 and apache server for windows.
Worked for me.
I hope this helped to you :))
For additonal clue to fix this issue I've noted that under IIS 10 / Windows Server 2016 I wasn't abble to make this interface working using a 32bits version of PHP 7.2 (FastCGI).
The solution was quite evident for me : running it with the 64 bit version of PHP 7.2 (in my case by creating a new application for the subdirectory "PHPWebadmin" and changing handler mapping as the main application needs to be run using a 32 bits version of php due to some spécific 32 bits developped extension).
Hope it may help,
Regards
I had installed wamp server and joomla on my local machine. It was giving phpmyadmin no access error 1045. I followed some instructions on the net and everything was fixed. I had to delete that installation because on error in joomla installation. Now when I am trying to install wamp again I am getting the same phpmyadmin error. Tried everything but could not get it working.
Sounds like you might be using the wrong username, password, or host to log in. Or have a mismatch between what you think it's set as, and what it really is set as in the database.
Or phpmyadmin's config.inc.php file has the wrong account info, or is using the wrong method to log in.
Try another WAMP package and be careful when changing database account info (know what the account's Host field is for, it should always be localhost or 127.0.0.1).
http://en.wikipedia.org/wiki/Comparison_of_WAMPs
Have you tried entering your root password into the config.inc.php file (found in Wamp's apps > phpmyadmin folder)? (Also, have you seen this thread at Wamp's official site?)