Flex remoting with amfphp fails when deployed - php

So i have created this flex application that uses amfphp remoting to acess data.
channelSet is created at runtime and i think there is no problem with that.
The app works fine when i try to run it locally(from my computer) and i can acess it eitheir by typing localhost/app_name.html or by computerName/app_name.html.
when i try to run it from other another computer using path computerName/app_name.html remoting fails, I think the problem isn't in xampp configuration because i can use those same methods from that other computer via amfphp service browser.
so i don't know what to do how to fix it or debug it, no idea where the problem might be so if anyone has any idea or can point me in some direction please help.
this is the fault i recieve
[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Security.Error error Error #2048 url: 'http://vfistri1-pc/oracle/moje/Amfphp/'"]

Related

connect webpack devserver (HMR) with PHP project running with virtual host

Currently, I developing a WordPress plugin with React frontend.
I tried to connect my backend (PHP) running on a virtual host with webpack devserver with hot module replacement (HMR).
Is there any config how to do it.
note: I tried with devserver proxy but cant figure it out.
Thanks in advance.
Getting HMR is always complicated for custom setup like these. Theoretically, this is pretty simple. You simply need to run the webpack-dev-server with the HMR module. On your PHP file, make sure it uses the JS file generated from webpack-dev-server. The code to refresh is bundled in the JS file so it should work.
However, the devil is in the details. You'll need to make sure the communication between your page and webpack-dev-server works without issue. Monitor your websocket network request and make sure they communicate as expected.
An issue you'll probably encounter is security since the websocket connection is expecting a different host. In this case, you can use config from the following answer: I am getting an "Invalid Host header" message when connecting to webpack-dev-server remotely
Another issue could be that the JS file tries to connect to the wrong location. Eg: It thinks that your host is where the websocket connection is. If this is the case, you can use the public setting. See here for documentation: https://webpack.js.org/configuration/dev-server/#devserverpublic
To me this is akin to running with a reverse proxy. You can see this discussion to understand the problem: https://github.com/webpack/webpack-dev-server/issues/804
There might be other problems. You just need to check the websocket connection and make sure they communicate without problems
How you refer to the generated js file is a separate problem. A simple example would be setting the port to 8081 and bundling the js file into bundle.js. Then in your php code, refer to it as http://localhost:8081/bundle.js

CodeIgniter server tests give 404?

A client askmed me to write RESTful API using CodeIgniter. Maybe codeigniter-restserver can make my task easier. So I downloaded the package, extract it, and upload it to both servers: my development server (123.100.77.10/ci-server), and the production server (99.40.143.100/ci-server). The only difference is the $config['base_url'] value (in application/config/config.php)
I had no problem running the tests on my development server. All test cases passed succesfully. But on the production server, each of them gives 404.
Anyone ever encountered this issue? How to solve this?

Deploying Laravel Application on Cloudways error

I'm trying to deploy my local host laravel project to a live Cloudways Digitalocean server. I have done a SSH transfer from bitbucket to deploy the app but am getting the following error when I try to view the live app. Stripe is not causing any issues on the local host.
"Class 'Laravel\Cashier\CashierServiceProvider' not found"
I've also created a seperate .env file and uploaded it to the server using the server database variables. Can anyone advise if this is the correct procedure?
I've found it really difficult to find any tutorials on how to deploy a Laravel app to a live environment. If anyone has encountered this issue or could point me in the right direction to fix this error it would be much appreciated.

Http request refused on Windows environment but not on OSX (mac)

I am working on a React web app with npm for the first time. I'm done with the development and now putting the built package on the web server (bluehost).
All is working well on my Mac: the web app allows getting data from mySQL via php, and posting back to the database.
But when I try the same app (on the same URL, same server, script, same everything...) on my Windows machine, I get an error on the first http request used for authentication.
OPTION http://example.com/script.php net::ERR_CONNECTION_REFUSED
First I thought this was a browser issue.
But I don't get the error on Chrome on my mac but do on Chrome on my Windows, as well as FireFox.
Again, I do not get this error when I test the app on my mac.
Could anybody please give me some direction to solve this?
Thank you!

Whitelisted for PHP in GAE

I'm completely new to GAE. I'm aiming to build a webapp on Google Cloud SQL and GAE, using PHP to write to/from the database. I've got it working locally through the GoogleAppEngineLauncher localhost server, both succeeding at HelloWorld and reading from the Google Cloud SQL through PHP. When I upload to GAE, not even the HelloWorld will work.
One guess would be that PHP is not enabled on my GAE. I clicked the opt-in, and it said I've been whitelisted, but how can I verify it is turned on?
Cheers,
Ben
There is no whitelisting anymore, anybody can use the runtime.
Suggest you go to the admin console and look at the logs for your application to try and debug what might be going wrong.

Categories