Newbie questons

Login or register to post comments
3 replies [Last post]
Offline
Joined: 07/11/2010

I have just built my first forms in qcubed, and really like it so far. But I have many questions. If they are covered in the documentation, or elsewhere, please point me in the right direction. I have looked, but have not found the answers.

1) I found the code on this forum for solving the magic_quotes_gpc on problem, but do not know where to put the code.

2) I am sharing development with a person in another country, so we are on a shared host. ZIP is not enabled in PHP. Is there an alternative way to install plugins? Can I install them on MAMP locally, then just copy them up?

3) I don't understand what to do to move something to "production". I see where you make multiple connections in the configuration. If I just duplicate the draft folder to say "prod" then what else needs to be done? How to hook it to the other connection? I know I need to write a menuing system for "prod", but not sure where to put it. I assume you need a login form and logic, and to remove the call to CheckRemoteAdmin?

Thank you.

alex94040's picture
Offline
Joined: 11/06/2008

First of all, ecat, welcome to the community! We're thrilled to have you here, and would be happy to help.

To answer your questions:

1) If you're using QCubed 1.1.0 or above, the code for solving the magic quotes problem is already integrated into the QCubed core. You don't need to do anything to make it work, it's already working.

2) I would recommend the following setup for shared development: have a source control system (SVN is great) where you check all of your QCubed code in. Set up each developer to have a local installation of XAMPP / MAMP / whatever where you have full rights and can do whatever they want on the box.

Set up a "beta server" that continuously checks the latest version out of the source control system and deploys the bits to the web server. Use that as a test server - make sure it's web accessible, and you can give the URL to your clients. Do not make any modifications to the bits when they are on the server - only check stuff in through the SVN repository.

3) I'm not sure what exactly you're trying to do. After you read my comments in #2, let me know if you still have questions.

Good luck!
-Alex

Offline
Joined: 07/11/2010

I agree, your suggestion of local development is a good one. What needs to be moved to the remote server? Just the DEBUG folder, perhaps renamed?

Regarding the last question, I am running 1.1.2. Here is my confusion. I got my forms generated using define('ALLOW_REMOTE_ADMIN', true). Then I duplicated the folder and named it 'test' instead of 'debug'. One of my tables is named books. When I try to run with ALLOW_REMOTE_ADMIN set to false, I get a message (Remote access to "/qcubed/test/books_list.php" has been disabled.
To allow remote access to this script, set the ALLOW_REMOTE_ADMIN constant to TRUE in "configuration.inc.php".)

Do I just take out the call to CheckRemoteAdmin() for the test folder? Will this cause any security problems?

Also, will building on MAMP mean that I don't need zip installed on the php on the remote server?

alex94040's picture
Offline
Joined: 11/06/2008

Here's how you can deal with production vs local configuration.

In your source control, have the server instance defined as "production" in configuration.inc.php:

define('SERVER_INSTANCE', 'prod');

On your local boxes, just override the setting to be set to 'local'. Make sure that the ALLOW_REMOTE_ADMIN is set to false on all production/test servers - but to true on all development servers (so that it's easy to actually develop :))

As a rule, I recommend against taking out any CheckRemoteAdmin() calls. Instead, tweak the configuration files till you get the desired effect.