I am trying to setup a mysql authorization function in my XAMPP php5.6 developer server. However, I can't get the server to start up. I have tried numerous variations to the code, including commenting out the lines beginning with DB. #ing them out makes the server start up, but gives a HTTP500 error when I try to view the pages requiring authentication, because it doesn't know what database to look in.
Apache/2.4.26 (Win32) OpenSSL/1.0.2l PHP/5.6.31
httpd.conf:
...
DBDriver mysql
DBDParams host=localhost,dbname=aDatabase,user=aUser,pass=ThisIsNotReallyMyPassword
<Directory "E:\xampp\htdocs\shouldnotbesecure\shouldbesecure">
Options -Indexes
AuthType Basic
AuthName "Please Login"
AuthBasicProvider dbd
# mod_authz_core configuration
Require valid-user
AuthDBDUserPWQuery "SELECT password FROM users WHERE username = %s"
</Directory>
loaded in httpd.config (coming from phpinfo() command):
Loaded Modules
core mod_win32 mpm_winnt http_core mod_so mod_access_compat mod_actions mod_alias mod_allowmethods mod_asis mod_auth_basic mod_authn_core mod_authn_dbd mod_authn_dbm mod_authn_file mod_authn_socache mod_authnz_fcgi mod_authz_core mod_authz_dbd mod_authz_dbm mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dav_lock mod_dbd mod_dir mod_env mod_headers mod_include mod_info mod_isapi mod_logio mod_log_config mod_log_debug mod_log_forensic mod_cache_disk mod_mime mod_negotiation mod_proxy mod_proxy_ajp mod_rewrite mod_session_dbd mod_setenvif mod_socache_dbm mod_socache_shmcb mod_ssl mod_status mod_php5
Nothing shows up in the error log when I try to start things with these configs, displayed in the system output is the following generic message:
5:38:11 PM [Apache] Checking default ports...
5:38:11 PM [Apache] Attempting to start Apache app...
5:38:11 PM [Apache] Executing "e:\xampp5.6\apache\bin\httpd.exe"
5:38:11 PM [Apache] Return code: 0
5:38:12 PM [Apache] Status change detected: running
5:38:12 PM [Apache] Status change detected: stopped
5:38:12 PM [Apache] Error: Apache shutdown unexpectedly.
5:38:12 PM [Apache] This may be due to a blocked port, missing dependencies,
5:38:12 PM [Apache] improper privileges, a crash, or a shutdown by another method.
5:38:12 PM [Apache] Press the Logs button to view error logs and check
5:38:12 PM [Apache] the Windows Event Viewer for more clues
5:38:12 PM [Apache] If you need more help, copy and post this
5:38:12 PM [Apache] entire log window on the forums
Related
This code times out in a CakePHP 4.3.3 template with a
503 - Service Temporarily Unavailable.
In a none-CakePHP script it works [it shows after 6 minutes DONE].
ini_set("max_execution_time", "0");
sleep(360);
die("DONE");
The template is called like this:
$this->render("/General/index", "Study");
I didn't find anything regarding a max execution time for rendering but as I can clearly reduce it to the above MCVE, it must be something CakePHP relevant because in CakePHP it stops after 60 seconds, in a PHP file timeout.php, placed directly in the webroot directory, it works.
What am I doing wrong, what I haven't set up properly?
I think, I should present the log entry:
[proxy_fcgi:error] [pid 1813:tid 140621247407872] (70007)The timeout
specified has expired: [client XXXX:56968] AH01075: Error dispatching
request to :
The server is running under Apache/nginx.
I don't understand why a stand-alone script on the same server and same domain works, but under CakePHP it ran into the timeout - with the exactly identical 3 lines of code.
The solution was - after investigating the log error - the Apache2 Timeout.
Additionally, I had to set the nginx timeout settings:
proxy_connect_timeout 3600s;
proxy_send_timeout 3600s;
proxy_read_timeout 3600s;
fastcgi_send_timeout 3600s;
fastcgi_read_timeout 3600s;
After applying the above settings for Apache and nginx it works also under CakePHP.
My application was using the Watson Conversation API (21st Apr 2017 version) imported as a maven dependency:
<dependency>
<groupId>com.ibm.watson.developer_cloud</groupId>
<artifactId>conversation</artifactId>
<version>3.9.1</version>
</dependency>
I've checked the credentials (username and password) for correctness. However, it is still giving me the following error (I've replaced the actual conversation workspace id with the placeholder ACTUAL_WORKSPACE_ID in URLs):
Feb 12, 2020 6:14:40 PM okhttp3.internal.platform.Platform log
INFO: <-- 401 Unauthorized https://gateway.watsonplatform.net/conversation/api/v1/workspaces/ACTUAL_WORKSPACE_ID/message?version=2017-04-21 (342ms, 37-byte body)
Feb 12, 2020 6:14:40 PM com.ibm.watson.developer_cloud.service.WatsonService processServiceCall
SEVERE: POST https://gateway.watsonplatform.net/conversation/api/v1/workspaces/ACTUAL_WORKSPACE_ID/message?version=2017-04-21, status: 401, error: Unauthorized
Exception in thread "main" com.ibm.watson.developer_cloud.service.exception.UnauthorizedException: Unauthorized: Access is denied due to invalid credentials. Tip: Did you set the Endpoint?
at com.ibm.watson.developer_cloud.service.WatsonService.processServiceCall(WatsonService.java:410)
I observed that the newer version of APIs is available and the IAM & Resource groups have been introduced in the IBM Cloud. Is this issue a result of these changes?
Can we not use the older API any more?
IBM Cloud is switching off any services that have not been migrated to a resource group. The Watson services were part of the first batch affected. You will need to migrate your instance to IAM, then use the generated IAM key for authentication.
I am having an issue where I'm getting a 500 internal error when connecting to my Laravel API.
I had my site originally on GoDaddy using example.com as the main site and api.example.com as the api, but then decided to move it to Google Cloud Platform. I went ahead and set up an instance in the Google Compute Engine using Debian 8. I am using ISPConfig 3 to do all my server stuff. I have my site and my api in two separate repos on Github. I went my server directory to /var/www/example.com/web and cloned my main site into it. Since this create a folder within the root directory of my site, I also went into the vhost and set the default directory to point to the new cloned directory.
I then created another site with ISPConfig for my api and went into the DNS and created a A record and pointed it to the same IP as my main site. I then went into /var/www/api.example.com/web and cloned my api's repo into it, just like my main site. I went into the vhost for my api and pointed the default directory to my new cloned directory.
I can go to example.com just fine, but when I try to log in (this is the first point an api call is made), I get a 500 internal error.
I'm not using CORS and I never have because I use my own JSON web tokens, therefore my CORS is turned off.
Any ideas on how to fix the 500 error?
EDIT
Formatting
Edit 2
These are the last two lines in the error log for apache:
[Sat Sep 24 21:17:17.095798 2016] [core:crit] [pid 17588] (13)Permission denied: AH00529: /var/www/api.example.com/web/api/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
[Sat Sep 24 21:17:17.095875 2016] [authz_core:error] [pid 17588] AH01630: client denied by server configuration: /var/www/api.example.com/web/error/403.html, referer: http://example.com/login
I'm not sure why it's throwing this .htaccess error. It's the .htaccess that Laravel automatically created.
Errors says what is your problem: Permission denied: AH00529: /var/www/api.example.com/web/api/public/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
Make htaccess readable using chmod command:
chmod 644 /var/www/api.example.com/web/api/public/.htaccess
Also check this answers if this not help
while deplying app in google app engine i always got following errors...
2014-08-10 03:30:58 Running command: "['C:\\Python27\\python.exe', '-u', u'C:\\Program Files (x86)\\Google\\google_appengine\\appcfg.py', '--no_cookies', u'--email=rjt.rjtshrm94#gmail.com', '--passin', 'update', u'C:\\Users\\Rjt\\Desktop\\New folder (3)']"
03:31 AM Application: my-app-chat; version: 1
03:31 AM Host: appengine.google.com
03:31 AM
Starting update of app: my-app-chat, version: 1
03:31 AM Getting current resource limits.
Password for rjt.rjtshrm94#gmail.com: Invalid username or password.
2014-08-10 03:31:08,612 ERROR appcfg.py:2415 An error occurred processing file '': HTTP Error 401: Unauthorized. Aborting.
Error 401: --- begin server output ---
Must authenticate first.
--- end server output ---
2014-08-10 03:31:08 (Process exited with code 1)
but my emailid and password are correct....
You can close this window now.
I had the same problem and it was driving me mad. I wasn't typing the password wrong.
For me, changing a security setting, not in the app but in my Google account solved it. Go here: https://www.google.com/settings/security/lesssecureapps and "Enable" less secure devices and apps to access your data. For me, that fixed it.
Otherwise I've come accross time settings being the problem (mentioned above).
But more importantly, double-check that the name of your app, that you registered on GoogleDev, is the name that you put in the app.yaml. If it is, then hitting the dashboard in the Launcher should take you to the dashboard of your app.
See my question and answer for more information, if none of this works.
I deploy my go application via appcfg.py --oauth2 --noauth_local_webserver update .
Everything was working fine last week, but over the past 3 days and 20+ attempts I keep getting this error:
09:11 PM Application: my-app; version: 0-1-0
09:11 PM Host: appengine.google.com
09:11 PM
Starting update of app: my-app, version: 0-1-0
09:11 PM Getting current resource limits.
09:11 PM Scanning files on local disk.
09:11 PM Cloning 381 application files.
09:11 PM Compilation starting.
09:11 PM Compilation: 315 files left.
09:14 PM Error 500: --- begin server output ---
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>500 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered an error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>
--- end server output ---
09:14 PM Rolling back the update.
Error 500: --- begin server output ---
--- end server output ---
I don't see any errors in the log. I'm well below my quota. I have billing enabled with more than enough money to spare. My project runs locally just fine. I tried pushing an older version of my code and that didn't work either.
I have other App Engine projects that are deploying just fine, just not this one.
Please help! I'm out of ideas :(
I had too many files I was trying to deploy. By removing one of my larger third-party libraries, I was able to deploy just fine
Try
appcfg.py rollback <app-directory>
As described here
Then redeploy