Drush 7 does not work with 'localhost' - mamp-pro

I'm not able to use 'drush status' when 'localhost' is in my settings. If I switch to '127.0.0.1', Drush status works, but it isn't connected properly; ading a port hangs it. I'm using MAMP Pro 3, and it prefers 'localhost' and port 8889. If I use the IP version, MAMP throws a PDO exception (or times out, depending on whether I add a port).
How do I configure MAMP 3 to work with Drush?
Except for the MAMP version, my problem is similar to Drush enable error and Drush install on local server error (Command pm-enable needs a higher bootstrap level). I have created the symbolic link recommended there, but I'm not sure whether MAMP uses the /var path.
My error is:
<h1>Additional uncaught exception thrown while handling exception.</h1>
<h2>Original</h2><p>PDOException: SQLSTATE[HY000] [2002] No such file or directory in drupal_is_denied()
(line 1921 of /Users/mypath/includes/bootstrap.inc).</p><h2>Additional</h2><p>PDOException: SQLSTATE[HY000] [2002]
No such file or directory in _registry_check_code() (line 3194 of /Users/mypath/includes/bootstrap.inc).</p>
<hr />Drush command terminated abnormally due to an unrecoverable error.
[error]

Found my own answer. This error is related to MAMP using a different version of PHP. When I changed my $PATH to point to the correct version, Drush started working correctly.
Steps:
Check MAMP's phpinfo to find the path to the PHP version it is using.
Edit .bash_profile with something like (making sure to use the correct PHP version):
export PATH="/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php5.6.10/bin:$PATH"

Related

\[INS-30014] Unable to check whether the location specified is on CFS

On migrating my local Oracle DB on Windows, from 11g to 19c, while running the setup.exe, I got a:
[INS-30014] Unable to check whether the location specified is on CFS
In my case, I needed to open my hosts file (C:\Windows\System32\drivers\etc\hosts) and comment out the following:
# 192.168.0.111 host.docker.internal
# 192.168.0.111 gateway.docker.internal
# 127.0.0.1 kubernetes.docker.internal
These seemed to be remnants of my old docker installation which has since been removed.
In my case this was a permissions issue on the Oracle Home directory. If your Windows PC name is >= 16 characters in length, the name of the administrators group is affected, because only the first 15 characters are included. The mismatch between that first part of the name and the full name is what was causing the issue. DESKTOP-ASUS-ROG vs. DESKTOP-ASUS-RO in my case (notice the missing G). I renamed the PC to DESKTOPASUS, restarted the machine, and it worked without issue. The name discrepancy was apparent when looking at the security configuration of the folder when my system name was over max.
You can get your PC name by running hostname from the command line. If it's >= 16 characters, rename the PC to be <= 15 characters, and restart.
The underlying issue is indirectly discussed here in a different context:
https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/naming-conventions-for-computer-domain-site-ou
Maximum name length: 15 characters.
I tried other solutions from Stackoverflow, but none worked in my case.
Here is the fix:
Go to Control Panel > Network and Internet > Network Connections
Disable
vEthernet (Docker)
vEthernet (Default switch)
resume the install
re-enable both disabled vEthernet.
By installing the software first and then running dbca to create the db I got it to work,
Execute hostname in command prompt
Add the hostname returned by hostname command next to IP address in windows hosts file. Also add the hostname with domain name next to it
9.115.154.54 LP1-AP-WIN73 LP1-AP-WIN73.yourdomain.com
Save hosts file and resume install
INS-30014: Unable to check whether the location specified is on CFS
Cause: The location specified might not have the required permissions.
Action: Provide a location which has the appropriate required permissions.
During installation of oracle 21c enterprise,
I got:
INS-30014: Unable to check whether the location specified is on CFS
In may case, in environment variable, I remove all unwanted path of oracle, which are not useful. And its work fine for me.
I faced this issue when I tried installing Oracle 19c on my Windows 10, I just disconnected from the internet(WiFi), and then the issue got disappeared.
While installing oracle 19 c I was faced with the INS-30014: Unable to check whether the location specified is on CFS
On windows 11 I was able to solve the error by connecting to the internet

Installing php5-openssl on Amazon SUSE SE 11 SP3

I have a SUSE ES 11 SP3 Amazon EC2 instance and I need to install the php5-openssl package, but I'm getting in trouble when using "zypper install". I should have upgraded the insance infrastructure update (more details here), but I missed the deadline and I am now with a useless instance, because I can not install anything .
Whenever I use zypper install I got:
Refreshing service 'susecloud'.
Problem retrieving the repository index file for service 'susecloud':
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/repoindex.xml?cookies=0':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Check if the URI is valid and accessible.
Error building the cache:
[|] Valid metadata not found at specified URL(s)
Warning: Disabling repository 'php' because of the above error.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Abort, retry, ignore? [a/r/i/? shows all options] (a): a
Problem retrieving files from 'SLE11-SDK-SP3-Pool'.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Please see the above error message for a hint.
Warning: Disabling repository 'SLE11-SDK-SP3-Pool' because of the above error.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Updates/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
If I try updating the update infrascructure I got:
Adding repository 'tmp_instance_infrastructure_upgrade' [done]
Repository 'tmp_instance_infrastructure_upgrade' successfully added
Enabled: Yes
Autorefresh: No
GPG check: Yes
URI: dir:///usr/share/instance_infrastructure_upgrade/repo
Repository 'tmp_instance_infrastructure_upgrade' priority has been set to 1.
Retrieving repository 'tmp_instance_infrastructure_upgrade' metadata [done]
Building repository 'tmp_instance_infrastructure_upgrade' cache [done]
Specified repositories have been refreshed.
Refreshing service 'susecloud'.
Problem retrieving the repository index file for service 'susecloud':
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/repoindex.xml?cookies=0':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
Check if the URI is valid and accessible.
Error building the cache:
[|] Valid metadata not found at specified URL(s)
Warning: Disabling repository 'php' because of the above error.
Download (curl) error for 'http://sa-east-1-ec2-update.susecloud.net/repo/update/SLE11-SDK-SP3-Pool/sle-11-x86_64/repodata/repomd.xml':
Error code: Connection failed
Error message: Couldn't resolve host 'sa-east-1-ec2-update.susecloud.net'
...
--> Updating packages failed
I tried to install each php5-openssl dependency, downloading each RPM and installing with rpm -i, but every time I resolve one dependency another appears. I also tried the suse forum (post here) but with no success until now.
So my questions are:
Is there some way to fix zypper repositories manually? Even if only to install the php5-openssl package.
Is there some way to use RPM to manage the dependencies for php5-openssl?
Is there another alternative to install php5-openssl in my suse instance?
in short:
you cannot fix these repositories; since they don't exist anymore (try browsing to http://sa-east-1-ec2-update.susecloud.net/).
rpm cannot look for dependencies because rpm does not use repositories (that's where zypper comes in). You can look for rpms on the internet, and then install the manually using rpm; but rpm won't locate the missing rpms.
Yes; as said in point 2; you can look for the rpms; download them and install them manually; or else you can even look for repositories that contain the rpms you want, and add that repository. However be careful with that; since those repositories probably aren't made for Amazon EC2. If you do this; try to find a repository as close as possible to suse 11 EC2...

wso2 ​WSO2 Microservices Framework for Java petstore sample cannot run on ubuntu

I try to follow https://docs.wso2.com/display/MSS100/Running+as+an+MSA+Application to run petstore sample on ubuntu which is hosted on AWS.
I met several issues:
document is incorrect, it requires to download WSO2 Identity Server.
Unpack the .zip file and place the directory in the <MSS_HOME>/samples/petstore/deployment/packs directory. In fact, the
petstore.sh requires DAS 3.0. Just put wso2das-3.0.0.zip into<MSS_HOME>/samples/petstore/deployment/packs. The script will unzip
it.
kubectl. This script is not put into path, and cause it cannot be
executed when script changes to another folder.
cannot create docker, seems Creating Kube-System Namespace, Kube-DNS, Kube-UI
error: couldn't read version from server: Get http://localhost:8080/api: EOF
error: couldn't read version from server: Get http://localhost:8080/api: EOF
error: couldn't read version from server: Get http://localhost:8080/api: EOF
error: couldn't read version from server: Get http://localhost:8080/api: EOF
error: couldn't read version from server: Get http://localhost:8080/api: EOF
Hope you have done following
export KUBERNETES_MASTER=http://172.17.8.101:8080
Sometimes, if you previously tried out k8s, it will keep previous kubectl configuration under ~/.kube folder. Try removing that folder.
If you have installed some version of kubectl, remove it, otherwise kubectl client and server will not match. run.sh will download compatible kubectl version and install into /usr/local/bin/kubectl
Thanks for pointing out the documentation bug. We will fix it. Also please check out the instruction in https://github.com/wso2/msf4j/tree/v1.0.0/samples/petstore/deployment and ensure that all the prerequisites are met.
The docs are at https://docs.wso2.com/display/MSF4J100/Running+as+an+MSA+Application

redis.so module is not loaded

I have an EC2 instance on Amazon Web Services and, in the same VPC there's also an instance of ElastiCache (Redis).
My EC2 instance have installed Amazon Linux AMI 2015.09. I have also configured it to work with mpm_worker_module and not prefork. The configuration is correctly working and I can access pages from my browser.
I have then installed redis client, and the redis-cli command is perfectly working from ssh.
I have then installed phpredis (https://github.com/nicolasff/phpredis/zipball/master -O phpredis.zip) and I have created a simple PHP script to check if it's working properly (a simple index.php).
If I launch this script from ssh console (i.e. php index.php) it works great. If I launch the same script trying to open the page from my browser I get this error:
Fatal error: Class 'Redis' not found
My php.conf file inside apache is the following:
<IfModule prefork.c>
LoadModule php5_module modules/libphp-5.6.so
</IfModule>
<IfModule !prefork.c>
LoadModule php5_module modules/libphp-zts-5.6.so
</IfModule>
In folder /etc/php-zts-5.6.d I have added the file "redis.ini" with inside
extension = redis.so
I have also noticed that redis installation adds redis.so only to this folder
/usr/lib64/php/5.6/modules/
And not to /usr/lib64/php-zts/5.6/modules/ folder, so I copied it from one folder to the other. But it's still not working, with same error:
Fatal error: Class 'Redis' not found
Instead, if I use Predis, with "include" of autoload.php, it works fine. But I'd like to have installed phpredis, cause our system will make thousands of calls each second to Redis Server, and phpredis will be much faster since it's compiled.
What am I doing wrong?
Edit
In my redis error log I get this message
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.6/modules/redis.so' - /usr/lib64/php/5.6/modules/redis.so: undefined symbol: compiler_globals in Unknown on line 0
Plus, if I use the prefork module, it works great. If I use the worker, I got the above error.
The solution was doing the following steps to install phpredis:
download and unzip phpredis
command zts-phpize
command ./configure --with-php-config=/usr/bin/zts-php-config
command make && make install
I was doing phpize and not zts-phpize and I was not adding the --with-php-config option: this was the problem
Of course then you have to add redis.ini into /etc/php-zts-5.6.d/ folder with, inside the file:
extension=redis.so
Restart apache and it should work
Hope that will help someone
P.S. If you want it to work from command line (i.e. "php script.php"), you have to install it also with phpize and simple ./configure command.

Flyway Database Migrations on Bluehost Shared Hosting

Folks,
I'm trying to use Flyway on a shared Bluehost server and I'm getting a very cryptic error. Not sure how to troubleshoot.. I'm confident that the basic connection / credentials are working, since changing flyway config settings to a wrong password produces a different error.
Note that I'm able to connect to the database from the command line from the server box using 'mysql -u blah -p' just fine.
Any hints on how to troubleshoot the below? Output from flyway -X init is below.
Flyway config file: http://pastebin.com/8dsWE3W2
Output from ./flyway -X init
/usr/bin/tput
Flyway (Command-line Tool) v.3.0
DEBUG: Adding location to classpath: /home1/philost2/checkout/cocktailbuilder-master/server/_devtools/flyway/bin/../jars/mysql-connector-java-5.1.30-bin.jar
DEBUG: Adding location to classpath: /home1/philost2/checkout/cocktailbuilder-master/server/_devtools/flyway/bin/../jars/h2-1.3.170.jar
ERROR: Unexpected error
org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource (jdbc:mysql://localhost/philost2_cocktailbuilder_prod?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false) for user '<redacted>'
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:266)
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnection(DriverDataSource.java:226)
at org.flywaydb.core.internal.util.jdbc.JdbcUtils.openConnection(JdbcUtils.java:50)
at org.flywaydb.core.Flyway.execute(Flyway.java:1144)
at org.flywaydb.core.Flyway.init(Flyway.java:970)
at org.flywaydb.commandline.Main.executeOperation(Main.java:118)
at org.flywaydb.commandline.Main.main(Main.java:88)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '??????????????' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1049)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2615)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2776)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2832)
at com.mysql.jdbc.ConnectionImpl.configureClientCharacterSet(ConnectionImpl.java:1937)
at com.mysql.jdbc.ConnectionImpl.initializePropsFromServer(ConnectionImpl.java:3720)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2554)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:413)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
at org.flywaydb.core.internal.util.jdbc.DriverDataSource.getConnectionFromDriver(DriverDataSource.java:264)