WAMP Failed to initialize storage module: memcache (path: c:/wamp/tmp) - memcached

i am trying to make wamp to save sessions on memcache however, after all installations and troubleshooting i still get below errors:
1) when i have php.ini with this (session.save_handler = memcache) i got below error:
Failed to initialize storage module: memcache (path: c:/wamp/tmp)
2) when i have php.ini with this (session.save_handler = memcached) i got below error:
Cannot find save handler 'memcached'

Related

CRXDE doesn't allow me to upload/download bundles

Version AEM 6.3, this is my local instance.
Everytime I go into AEM to install a bundle on my local it says exec.json is missing, I found a manual override for the issue, but it's doubled my time to integrate bundles.
Error
Creating Package
Failed to load resource: the server responded with a status of 404 (Not Found)
service/exec.json?cmd=create:1 Failed to load resource: the server responded with a status of 404 (Not Found)
Dialog.js:191 Uncaught TypeError: Cannot read property 'msg' of undefined
at constructor.CRX.ide.Dialog.DEFAULT_ERROR_HANDLER (Dialog.js:191)
at Object.callback (ext-base-debug.js:1443)
at Ext.form.BasicForm.afterAction (ext-all-debug.js:56465)
at Ext.form.Action.Submit.failure (ext-all-debug.js:58865)
at Ext.data.Connection.handleFailure (ext-all-debug.js:8564)
at handleTransactionResponse (ext-base-debug.js:2517)
at ext-base-debug.js:2552
Installing Package
ext-all-debug.js:8665 POST http://localhost:4502/crx/packmgr/service/exec.json?cmd=upload&jsonInTextarea=true 404 (Not Found)
doFormUpload # ext-all-debug.js:8665
request # ext-all-debug.js:8853
(anonymous) # ext-base-debug.js:751
run # ext-all-debug.js:59008
(anonymous) # ext-base-debug.js:831
setTimeout (async)
defer # ext-base-debug.js:864
doAction # ext-all-debug.js:56328
submit # ext-all-debug.js:56384
doSubmit # UploadPackageDialog.js:56
submit # Dialog.js:128
onClick # ext-all-debug.js:41008
h # ext-all-debug.js:2463
VM420:2 Uncaught SyntaxError: Unexpected token <
at doDecode (ext-all-debug.js:11527)
at Object.decode (ext-all-debug.js:11649)
at Ext.form.Action.Submit.handleResponse (ext-all-debug.js:59055)
at Ext.form.Action.Submit.processResponse (ext-all-debug.js:58876)
at Ext.form.Action.Submit.success (ext-all-debug.js:59024)
at runCallback (ext-all-debug.js:8652)
at Ext.data.Connection.cb (ext-all-debug.js:8656)
at HTMLIFrameElement.h (ext-all-debug.js:2463)
I solved this issue, by finding an old blog: https://aemgeeks.wordpress.com/2017/08/25/install-crx-packages-bundles-automatically-on-server-startup/
Steps
Create an install folder at the root of crx-quickstart folder.
Place package you're trying to install in the install folder.
Restart AEM local.
Upvote my answer.
Can you try installing it from console/bundles?

FTPD Server Issue

So I am trying to use my xampp server and for the life of me can't understand why my ProFTPD will not turn on. It only became cause for concern when I saw the word "bogon" in the application log. Can anyone translate to me what the application log means and maybe how I go about troubleshooting the problem ?
Stopping all servers...
Stopping Apache Web Server...
/Applications/XAMPP/xamppfiles/apache2/scripts/ctl.sh : httpd stopped
Stopping MySQL Database...
/Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh : mysql stopped
Starting ProFTPD...
Exit code: 8
Stdout:
Checking syntax of configuration file
proftpd config test fails, aborting
Stderr:
bogon proftpd[3948]: warning: unable to determine IP address of 'bogon'
bogon proftpd[3948]: error: no valid servers configured
bogon proftpd[3948]: Fatal: error processing configuration file '/Applications/XAMPP/xamppfiles/etc/proftpd.conf'

Why I get 500 Error while on XAMPP while loading CodeIgniter 3 database library?

I have gone through number of threads on stackoverflow and on other forums to find the answer but could not find relevant answer. People have applied different approaches but none has worked for me thus far.
I am using CI 3 on XAMPP and whenever I load database library in the model, I run into 500 Error.
Here is my CI database config info:
'hostname' => 'localhost',
'username' => 'my_user',
'password' => 'my_pass',
'database' => 'prod_db',
'dbdriver' => 'mysqli',
'dbprefix' => '',
'pconnect' => FALSE,
PHP ini db libraries are as below:
extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
; The MIBS data available in the PHP distribution must be installed.
; See http://www.php.net/manual/en/snmp.installation.php
;extension=php_snmp.dll
My model code is as below:
class loginmodel extends CI_Model {
public function validate_login($username, $password) {
$this->load->database();
$var = 0;
return $var;
}
}
Whenever I remove $this->load->database(); from the model, my code runs and i am able to redirect to a "Login Failed" page. BUT, whenever I load my database library in autoload.php or load it in above model, code fails.
Autoload.php
$autoload['libraries'] = array('database');
Apache error logs showed below errors but I could not figure as why this was happening.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_mysqli.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0
Please advise.
EDIT:
I verified all config to be OK and as stated in the comments, I added environment variables to windows and verified through PHPInfo that mysqli and mysqlnd were loaded.
Despite getting all the config right, error still persisted and I did a clean install of CI to reproduce library load failure. This time CI returned an error that db access was denied.
I then realized that after migration, database user was not created in the new environment. So once I created the desired user and assigned it required privileges, I was able to run the code just fine.
Therefore, if anyone encounters such issue in future, below steps might help:
First and foremost, verify if your desired user can access the
database.
Modify your .htaccess to use your desired URL schemes only after
verifying that database connection is working
Then verify that absolute path is available in PHP.ini on XAMPP.
Plus, verify that PHP is added in the environment variables. My
Values on Windows 10 are as follows: Variable Name: PHP , Variable
Value: C:\xampp\php\ext
In CI, mysqli is selected as database driver
In PHP.ini mysqli extension is enabled. i.e. php_mysqli.dll
Echo PHPInfo to verify that mysqli and mysqlnd are available in your
installation.
If nothing works, do a clean install of CI on a separate directory and load database library after setting up your database configuration and before setting up .htaccess until you can reproduce the error.
Hope that error will be eliminated!

PhpStorm FTP 425 Unable to build data connection: Cannot assign requested address

PhpStorm FTP upload failed.
[17-1-16 下午5:17] Failed to transfer file '/a': cant open output connection for file "ftp://192.168.1.229:21/a". Reason: "425 Unable to build data connection: Cannot assign requested address".
[17-1-16 下午5:17] Upload to server completed in less than a minute: 108 files transferred, 3 items failed (541.1 Kb/s)
My PhpStorm running on deepin system (Linux)
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_timestamps=1
net.ipv4.tcp_tw_recycle=1
net.ipv4.ip_local_port_range = 10000 65000
I tried to change the number of ports, but still failed to upload.
Who can help me ?
I got the same problem in IntelliJ IDEA.
Changing the connection type from FTP to SFTP helped. I hope it's also possible for you.

Error using SoapClient() in PHP

I'm trying to access WSDL(Web Service Definition Language) file using SoapClient() of PHP. I found that WSDL file is authenticated. I tried with passing credentials on an array by another parameter and active SSL on my server, still I'm getting an error.
Here is the code I'm using:
$client = new
SoapClient("https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl",array("trace"
=> "1","Username" => "username","Password" => "password"));
Here is the error I'm getting:
Warning:
SoapClient::SoapClient(https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl)
[soapclient.soapclient]: failed to open stream: Connection timed out
in PATH_TO_FILE on line 80
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning
: failed to load external entity
"https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl"
in PATH_TO_FILE on line 80
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn't load from
'https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl'
: failed to load external entity
"https://webservices.chargepointportal.net:8081/coulomb_api_1.1.wsdl"
in PATH_TO_FILE:80 Stack trace: #0
/home2/wingstec/public_html/widget/API/index.php(80):
SoapClient->SoapClient('https://webserv...', Array) #1 {main} thrown
in PATH_TO_FILE on line 80
It seems that error says file not exist at the path we given but when we run that path directly on browser then we're getting that file
Can anyone help me to figure out what the exactly problem is?
First make sure you have the right to access website from your hosting account or server - check first if you can access a http webservice (without the s). If not, check if allow_url_fopen is set to true in php.ini.
Then, if you are trying to establish a https connection, you need a local certificate.
See if you can add one and instantiate your Soap object using something like
new SoapClient($wsdl, array('local_cert' => $pathToLocalCert));