Unable to make external HTTP connection from Google App Engine PHP 7.2 environment - wordpress

I'm trying to use the WordPress Importer plugin to migrate my site to Google's App Engine, PHP 7.2 run time. This fails with the error:
Remote server did not respond'
How can I troubleshoot this further?
The WordPress Importer plugin is able to download media (images) through http(s) and add those to the local media files. This fails. When enabling the debug-mode on the Importer plugin, the error message becomes Remote server did not respond.
When I'm looking into the logs of my server, I don't see any tries to access the files at all, so somehow the instance running on AppEngine is not able to fetch the URL's.
One example URL is https://goingontheroad.nl/data/uploads//2009/09/oude_keuken_2.JPG - which works fine for me.

You need to enable curl:
https://cloud.google.com/appengine/docs/standard/php/issue-requests
In most cases, you can use CURLite to avoid charges.
For this:
Put php.ini in root dir (same as app.yaml), if not already
In php.ini add:
google_app_engine.enable_curl_lite = 1
deploy app.
If this now working, try replace on
extension = "curl.so"
But this need billing enabled

Related

problem on moving Wordpress website from Localhost to Server

I ve created my wordpress website on local, then I hosted it using ovh and filezilla
I followed these steps
upload source files under www fileZilla
import my database on ovh
update wp-config
The problem is when i launch my site it still get css files from localhost nd showing this error
Failed to load resource: net::ERR_CONNECTION_REFUSED
You cannot import a WordPress database and have it just work because there are plenty of hard links (including hostname, in your case localhost) in it.
There are several ways to change the URL in the database. My favorite way is to use wp-cli ( https://wp-cli.org/ ) on the command line. Once installed and having the wp command inside your PATH, you can change (cd) to your WP installation's root directory (where the wp-config.php file is located) and run the following command:
wp search-replace 'http://localhost' 'https://your-new-domain.com' --export=my_wp_export.sql
Replace your-new-domain.com by whatever you're using on your ovh host. Be careful when selecting http or https depending on whether you have a valid SSL certificate in place and your hosting is correctly set up for HTTPS, or not.
You now have an SQL file where each localhost URL is replaced by your-new-domain.com. Next, upload and import the my_wp_export.sql file - everything should work.

How to successfully upload local Wordpress configuration to Azure remote using All-In-One migration plugin

I am learning wordpress and i decided to play with Azure as well. I got a Wordpress app-service along a database up and running. I have also set up a local development environment using Local by Flywheel.
However, I am unable to upload my configuration to the Azure. After I have set up the local development environment, I have exported the remote config using this, only replacing the remote URL with the local URL used in development.
Once I have successfully imported it on my machine, I added some plugins and themes. When I was ready I exported the configuration again, this time by replacing the local URL with the remote URL. I went on the remote to import it, but after the proggress bar reaches 100%, in the console appears a javascript error.
VM364:1 POST https://<my-website>/wp-admin/admin-ajax.php?action=ai1wm_import 404 (Not Found)
(anonymous) # VM364:1
send # load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.2.4:4
ajax # load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.2.4:4
FileUploader.upload # import.min.js?v=7.9&ver=5.2.4:1358
(anonymous) # import.min.js?v=7.9&ver=5.2.4:1246
dispatch # load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.2.4:3
r.handle # load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.2.4:3
import.min.js?v=7.9&ver=5.2.4:1384 Uncaught Error: error
at Object.error (import.min.js?v=7.9&ver=5.2.4:1384)
at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.2.4:2)
at Object.fireWith [as rejectWith] (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.2.4:2)
at x (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.2.4:4)
at XMLHttpRequest.c (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils&ver=5.2.4:4)
P.S. The upload limit is set to 512 Mb and the file has only 83Mbs. The timeout is set to 300 and it takes about 10 seconds for the bar to reach 100%.
It turned out that it was a server-side issues as IIS was not allowing plugins to do large-scale updates, as well as as a dev issues, as the local development environment was using ngnix. I fixed this by simply creating a new Wordpress instace hosted on a linux machine using nginx. The upload worked flawlessly after that.

How to setup nginx.conf on IBM bluemix cloud foundry for single page application routing and how to set url rewrite to support spa routes?

I am using React single page app for my application. I have hosted solution on IBM Bluemix using cloud foundry. I want 2 help.
How to override existing nginx configuration with new one to support URL rewrite for my react routes?
What are the url rewrites configuration for nginx server? (I am using nginx for the firs time)
Here is my manifest.yml which I have used to host on cloud foundry. I am using staticfile-buildpack for node.js.
applications:
- buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git
name: xyz
memory: 128M
stack: cflinuxfs2
path: build/
routes:
- route: xyz.eu-gb.mybluemix.net/
- route: xyz.eu-gb.mybluemix.net/store
- route: xyz.eu-gb.mybluemix.net/checkout
Here xyz is my app domain. I am able to load my app and pass through click action to other routes but when I hard refresh or change url from browser address bar it shows me 404 error.
Can someone please guide me here to resolve above issue.
Thanks.
How to override existing nginx configuration with new one to support URL rewrite for my react routes?
You can override the nginx.conf, but it's not recommended with the staticfile buildpack. Instead, try to use the configuration options provided by the buildpack to achieve your goal. The buildpack has a lot of common options, so you don't need to drop down to the level of configuring Nginx yourself.
https://docs.cloudfoundry.org/buildpacks/staticfile/index.html#config-options
Here xyz is my app domain. I am able to load my app and pass through click action to other routes but when I hard refresh or change url from browser address bar it shows me 404 error.
It sounds like you need to enable pushstate support. Adding pushstate: enabled to your Staticfile I think that should fix your issue.
What are the url rewrites configuration for nginx server? (I am using nginx for the firs time)
You can look at the Nginx configuration that's generated for your app. Once your push your app and it starts, run cf ssh <app-name> -c "cat app/nginx/conf/nginx.conf". That should dump the nginx config to your screen.
buildpack: https://github.com/cloudfoundry/staticfile-buildpack.git
Don't point to the master branch of any buildpack. It's a moving target. Commit to commit can change or even break.
You should generally use the buildpack that's provided by your operator. If you run cf buildpacks you can see the list there. If that's not new enough or your provider doesn't include a buildpack you need, you can use the git repo syntax to link to a repo online, however make sure you include the #<branch|tag> in your URL.
Ex: https://github.com/cloudfoundry/staticfile-buildpack.git#v1.4.29
This locks in the buildpack to a tagged release which prevents it from changing out from under you.

Drupal update.php white screening

Tried everything..
Permissions, error logs, re-cloning, etc.
Works fine on another workstation so can't be the application code.
Any ideas?
Upload some small script containing only phpinfo(); call, find out what php.ini file is used and edit it. Turn on error display. If web server is working it can't return empty screen - there must by some error message if errors are enabled.
Just to further expand on this.
Local setup of Drupal
All the front-end pages work
Can login as a user or admin successfully at the URL '/user'
Colleague has followed the exact same process and works fine for him
Cannot access any page that has URL '/admin/...'
Tried everything...
.htaccess file from fresh Drupal install
.htaccess file from working local copy on colleagues machine
.htaccess file from working other local Drupal build that works
Increased php.ini memory limit to 256m
WAMP server apache rewrite_module is turned on
etc...
Whats really strange is that I have other Drupal builds locally that work fine.

Creating a MAMP Local Copy of a Drupal 6 Website

We're currently rebranding a client of ours and it's come the time to take the new brand to their website.
I've not much experience with Drupal other than the theming (I've themed a Drupal website in the past but not very familiar with the software's inner workings).
As this website is live, it's obviously not feasible for me to make any changes to the live environment, so I have downloaded the source files of the website to a local webserver (MAMP).
I also have a MySQL dump of the database.
I'm not sure what files need to be changed inside Drupal to allow access to the MAMP webserver. Could somebody point me in the right direction here?
How would I connect the database to the website, which files need modification?
I think the client is running Drupal 6.
Update:
I've installed the database and linked it up using the below line:
$db_url = 'mysql://root#localhost/databasename';
I've hidden databasename for anonymity.
As it's MAMP, the database has no password. When I load up the website I get an error that install.php is not found. It's not there because the website is already 'installed'.
I've also updated the $base_url to read:
$base_url = 'http://localhost:8888/foldername';
You only need to modify one file, 'sites/default/settings.php'; you'll just need to change the database connection string in there to match your new database settings. There may be a couple of other settings in there you need to tweak depending on the set up of the site (for example the $base_url or $cookie_domain).
Other than that everything in your installation should be relatively path-ed so there shouldn't be any need to make more changes.
i was facing same problem after couple of hours try i got solution : we have to check the DB (tick on list of databases in local host) [ observe this after DB list : Enabling the database statistics here might cause heavy traffic between the web server and the MySQL server. so enable only the db you want to use] this will redirect to http://localhost:8888/foldername/install.php successfully :D :D

Resources