Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi,

I'm trying to use SC in my CWP solution, with no luck. It's error from the beginning.

This is the code


include "supercontainer.php";



$sc = new SuperContainer('http://www.myserver.com/SC/Files/','Username','Password');

if ($sc->getError()) die('Could not connect to SuperContainer server: ' . $sc->getError());



The error I get is "Could not connect to SuperContainer server: The requested URL returned error: 401"

If I open a browser and type in http://www.myserver.com/SC/Files/ and submitting the same name and password I get the question about an applet and I'm lucky.

I'm using SC 4.71 on Mac 10.5.8

Help?

Unless you have done something funny on your server, http://www.myserver.com/SC/Files/ is invalid. You must fully spell out .../SuperContainer/Files with capital S, C, and F.

  • Author

I'm perfectly aware of that.

I have change the default SuperContainer path so in my case SC is corrects. I sad, if I take the url and put it in a browser everything works, that's what confusing me.

A 401 error (in general) is a security problem, indicating that the username and password used to access a particular page is invalid, or no username and password was provided where one is required. In this case, I suspect that you may have specified your username and password parameters incorrectly, partiuclarly if it includes funny characters such as symbols, spaces, or anything other than plain text. All non-plain characters should be URL encoded.

  • Author

Lets take this from the top.

I have created a Super Container with the name SC and the username Username and password Password. If I use a webbrowser and type in the address to my supercontainer i get a question about name and pass. I type in Username and Password and get access. If I user the PHP code in my first post I get a 401 error. I do know that 401 means access denied.

Is there any thing I missed? Is my PHP correct? Are there any security settings on the server that my differ/need to be set? Could there be a license issue?

Any hint about the problem is welcome…. I'm lost :/

Yes, it's possible that there is another security setting which you will need to adjust. You have made changes to your SuperContainer deployment beyond regular supported configuration, so I'm not sure how your folder permissions and server is set up, making it difficult to diagnose other problems. The one thing I can think of from the information that you have provided is that your username and password information is incorrect in your new SuperContainer() call, you have not properly escaped your characters, or that the other changes you have made to your deployment beyond what is supported by SuperContainer is preventing this from working. Changing your URL from SuperContainer/Files to SC may be causing the problem, I'm really not sure.

Your PHP looks correct, but you have take out all of the values in your php, so I can't test it myself or see if you have any typos in your code.

  • Author

Ok, to make everyone happy I have installed SuperContainer to a new server (still osx 10.5.8) default installation, doubleclick on the jar file. Provided a username and password (no fussy charters just a test/test username and password. The problem is I get the same result? I have a 3rd server installing from scratch that I will try on as soon as it's done later on to night...

sorry if I sound a bit irritated, but this problem annoys me right now... I do like SC in general, but my client (my customer) does not allow java witch forces me to make a lot of strange solutions and in this case use CWP for a problem I normally would use the Companion plugin to solve....

  • Author

Some update...

There seem to be some kind of bug in supercontainer.php. As soon as I use a password, any password, there is an error. I have solved my problem by using this code (obvious the path, server and password are not for real....)




$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'http://localhost/SuperContainer/Files/Projekt/51/63');

curl_setopt($ch, CURLOPT_USERPWD, 'test:test');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);

curl_setopt($ch, CURLOPT_USERAGENT, "ME");

curl_setopt($ch, CURLOPT_FAILONERROR, true);

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);

curl_setopt($ch, CURLOPT_NOBODY, true); 

curl_setopt($ch, CURLOPT_HEADER, true);

$buffer=curl_exec($ch);

curl_close($ch);

echo $buffer;



You said you "double-clicked" the jar. Do you mean SuperContainerServer.jar? If so, this operates on port 8020, not on port 80. This is a separate deployment of SuperContainer from running the installer.jar and installing it with FileMaker Server, and runs and is configured separately. I do not recommend running two deployments on the same machine to avoid permission issues and confusion like what may be happening right now.

If you are running SuperContainerServer.jar and have the window popped up on your system and have configured your username and password on there you will need to specify port 8020 (http://yourserver.com:8020/SuperContainer/Files) in your server URL to connect to the stand-alone deployment rather than your filemaker server deployment.

If you are runnign standalone mode i recommend uninstalling the filemaker server deployment by re-running the installer.jar file and clicking "remove" to make sure that you don't end up getting conflicts.

  • Author

I have solved my problem and everything works without the supercontainer.php file.

There is no problem with my SuperContainer installation. Everything works from Filemaker and from the Webbrowser.

It's a bit strange that you don't seem to read my words. I do know English isn't my first language but I hope that you do understanding me. If you are interested I'm willing to set up a test environment for you to see the problem your self, just send me a PM. If you're not interested, well is your product and your customers...

If you would like to contact me by phone or skype we can do screensharing and I can take a look at your deployment.

  • Newbies

I ran into the same problem. I replaced the following line of code in the supercontainer.php file:

curl_setopt($ch, CURLOPT_USERPWD, $this->baseUrl['user'] . ':' . $this->baseUrl['password']);

with:

curl_setopt($ch, CURLOPT_USERPWD, $this->urlParts['user'] . ':' . $this->urlParts['password']);

(Replaced baseUrl with urlParts).

  • 1 month later...
  • Author

@peteB: Thanks, this works for me as well.

@Smef: No need for screen sharing, problem solved

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.