I have been trying to access a mysql in a jboss eap application from a wordpress application in Openshift environment. I followed this blog post on this subject and prepared a php file on the wordpress server with $dbhost, $dbuser, $password point to the database in my jbosseap app. Unfortunately, it did not work. Each time I got a "no route to host" error. However, if I point the database to that in the wordpress app, i.e. local database, it worked perfectly.
I am wondering if there must be additional step(s) to execute when the php script and the database are in different Openshift applications?
I've ha same problem following this guide https://blog.openshift.com/sharing-database-across-applications/,
the solution is writen even there:
Step 1: Create an application with a database
We will create a scalable PHP application using a MySQL database cartridge. In non-scalable applications, the database will be installed in the same
gear as the application. In this case we want the database to be accessible from other gears. So creating a scalable application ensures that the database runs in its own gear that can be accessed from other gears.
Here
http://www.hfaber.com/post/135256827109/openshift-sharing-database-across-applications
After talking to some people in Redhat, I concluded that it is not possible to share database accesses between different applications in Openshift environment. You may see some technical documents which show how to do it, but that is for Openshift/Redhat internet environments, not for regular customers of Openshift.
At the end, I used webservices to provide sharing of DB accesses between applications.
The investigation was in August 2015. Hope it will or has changed
Related
As you can probably tell, I am new to Magento2 and I am trying to figure out some of the basics. I'm a full-stack developer that is use to developing (frontend and backend) myself then using docker and finally hosting it on an AWS:S3/EC2 or AWS: Elastic Beanstalk. With that said, Magento seems like a completely different beast to conquer.
I have a family member who is wanting me to do some basic frontend stuff for their website (such as changing Navbar design and a potential home page overhaul later on), naturally wanting to help them out I agreed to have a look and see what I can do. I have access to their Magento 2 dashboard area and have been looking around with no sure luck thus far. I have researched online that Magento 2 allows for a "Page Builder" or a "WYSIWYG" type functionality. But I am unable to use these types of tools because my family member had the website built by a Magento 2 developer firm awhile back and everything is coded manually and could cause problems if using one of the above mentioned tools. Due to this I am trying to get access to their site directory so that I can go in and make the necessary changes and upload the files. But I am really struggling on how to access the codebase.
I have read that an admin needs to send me the code??? Or grant me access to the code or something along those lines? I do have the host, port, root, username, password, etc. for the live server but still having trouble.
Any help would be greatly appreciated.
You need to use ssh to access the server
ssh user#host -p port
After you get into the server, you should set up a git repository in the project root and push the code from the server to the repository, then clone the repo to your local environment.
From there on, it's the normal development flow. You can use a clean database with sample data or you can dump the db from the live env and use it on your local env, but this will require some changes in the db after the import.
Detailing all the steps required to do this task would take forever and would cover a lot of different issues/steps.
"I have read that an admin needs to send me the code???"
Not sure what you mean by this, but a Magento admin is just a user on the backend side of the website. He does not have access to any code.
A git repository admin(probably previous dev) could grant you access to the code repository, but this doesn't seem like an option.
Im currently developing a system using PHP and MySQL, what is required of the system is that it should allow the user be able to access the database on a standard GUI online (web browser) and should also be able to access the database offline, now can anyone help me with a method of how to make this possible.
The idea i have right now (me thinking out of the box) is using local host database manager like xampp which will be offline and an online database manager were the system will be hosted but cant figure out how will both databases be synchronized so that they stay the same.
If you want to have two databases maybe you will have to use a mirroring system. This one, wil help you to mantain the database syncronized with the database of the server with the local or not accessible database. You also can have a look at this link for more information Right way to mirror a PHP/MySQL setup
This topic has been raised a few times but even after searching and going through suggestions I haven't found a solution.
I have a PHP based website and an Android app that has to use the same database. The database is for an objective type test. The questions are created on the web using an admin panel.
The Android app needs to work offline so there is a need for one time sync when internet is available.
I have created a table in PHPMyAdmin called "database version". The Android app checks the database version using a web service. If the the version number is different it should be able to download the latest version of the database of the website and store it locally for offline access.
One of the suggestions I've come across is to convert the .sql database into .sqlite and give the download link of .sqlite to the Android app. However, converting .sql database to .sqlite using PHP doesn't seem to be easy. I've come across some shell script method but with no knowledge about that it probably doesn't work for me.
So, I'm looking for way to make sure the Android app can use the same database of the website but only require internet connection for syncing otherwise the app will work offline.
Would appreciate if I could get some directions and advise as to how to accomplish this.
Thanks!
Actually, I'm not sure If I would choose a solution that "replaces" the database when your app gets back online. I think I would build a database on the Android (SQLite), and synced with the Webdatabase (MySQL) row by row, by comparing datastamps.
Thank you for the time reading this.
I am planning on creating an Android app that is communicating with my own SQLite database server\webpage that is located on my private laptop.
I have no previous knowledge/experience with PHP nor hosting a webpage in this case.
My question is what is required to make the most basic online database server so I could easily and very basically request and fetch SQLite queries within the Android app from the database that is on my laptop.
Are there any programs I have to own?
Also my first intentions is for it to work on my local network(My Wifi at home), and then make it global.
Any help is appreciated, Thanks.
What you want to do isn't possible. SQLite is used only as a local storage i.e. a file on the local PC that is being read from. In order to do what you want to do you would need to install a database server on your laptop. MySQL is probably best as this is free for personal use.
I'd suggest getting a VPS for like £6 a month and hosting a database on there. I use Chunkhost and they seem amazing for the price. There are many tutorials for setting up a MySql database on there and administering it.
I would also suggest making it a web application first before trying to integrate it with Android, that way you're learning one thing at a time and not 2 (php/mysql and then android integration).
I have this tricky scenario and want so advice to you. My client have a website built in WordPress and a web application that was built in .Net 3.5 now they want me to integrate this too site by querying some information from the database that .Net is using and display the output on the said website.
Communication between the two site is complete and working fine using some DLL for PHP to integrate to MSSQL now the problem arises here, my don't want to expose he connection string on the website built on WordPress for security reason. Without this, I can't connect to the database and made some query so I propose some bright idea, using a web service to extract connection string from the web config of ASP.Net web application. Consuming of web service to PHP is working fine but the last issue is that the web service is expose in public. what I mean once the site launch online, the said web service is open to public and anyone can see thru the web config that my boss want to keep in secret (hehehe).
I'm already confuse on how to make the web service to be more secure. Below are some specification of the two websites.
WordPress Site
PHP based
Mysql
installed with php_pdo_sqlsrv_53_ts_vc9.dll and php_sqlsrv_53_ts_vc9.dll
nusoap (use to consume ASP.Net webservice)
Mysql for database using by WordPress
.Net Site
web service to extract connection string from web config
web reference added
MSSQL for database
Please let me know if you need more information regarding my problem.
TIA
you don't have to setup a web service for this. Just store the connection string in a php file outside of your web servers root directory (probably public_html) and then include that file within you plugin. You should hard-code the path, so that people with access to the setting can't use that functionality to spy on other files. Also make sure the web server service account has read access to that file.
That is a pretty safe setup as the file can't be directly accessed through the web.