Skip to Content Skip to Menu

[#3017] including a php file during a plan registration ?

  • activha
  • activha
  • ONLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
12 years 11 months ago #183044 by activha
Well I just tested on the live server and it seems that the queries work with REPLACE and do the job. The problem is that I still have the same error even if the queries seems partly executed.
The error appears when applying a plan in the backend.

I was fed up with these mysql problems and switched to a url post to a file including the queries but we ran into similar problems, this time the queries do not seem to be activated.

This is crazy, if you want to have a look you're welcome, I sent credentials by pm (you have extplorer if needed)

We applied the url integration to plans Starter id 1 and Ensemble Gratuit id 6 to test (but it has to be integrated into plans id 1, 2, 3, 4, 5, 6)

Thanks in advance, I am tired of this :-)

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
12 years 11 months ago #183061 by krileon
Please provide exact steps for me to duplicate on your install. I tried applying and saving both plans you provided and didn't see the error in question. I also tried saving a demouser with the plans in question which still did not display the error.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • ONLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
12 years 11 months ago #183069 by activha
As I said in previous post, the error plus the fact that this was not very tweakable made that we decided to removed the mysql integration to go back to a php file url integration in which we have set the mysql queries correctly.

However now, the php file does not seem to be included neither
In plan 1 and 6 we have included the file in url integration, with data to be posted but it does not work.

Can you tell me whether the url should be http://website/insert.php or should we add all the post data to write http://website/insert.php?data1=[data2]&data2=[data1]&data3=[data3]...

in other words, does the url integration automatically add the data if we set the setting to post ??

If you don't mind to have a look at why this integration would not work ? (plan 1 & 6)

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
12 years 11 months ago - 12 years 11 months ago #183107 by krileon
The setup in CBSubs looks correct, but the script is not designed properly. For example the below is not valid.
Code:
SELECT username FROM #__users...

You can't use Joomla/CBs replacement capabilities in an external script. Always keep in mind your script has absolutely no access to Joomla or CB API whatsoever. Meaning #__ needs to be your database prefix (e.g. jos_).

You've also take my suggestions too literaly. For example the below.
Code:
$oDB = mysql_connect('localhost', 'mysql_user', 'mysql_password'); mysql_select_db('mysql_database', $oDB);

You were supposed to replace this information with real information. For example mysql_user should be your actual mysql user as you configured for Joomla during Joomlas install. The entire script will never work because no database connection is established.

Another issue is the below will never be false.
Code:
$isNew = ($_POST['id']==0);

This is because you're not POSTing an "id" to the script so it's always false, which is fine if that's what you intended.

Your absolute easiest approach is to just use MYSQL in the SQL Actions. I've gone ahead and configured it to use SQL Actions for you. Please confirm if working or not. Please also note I did not receive any of the error messages you received. I only configured "Negopack Starter" and "Ensemble (gratuit)"; please copy from either of those if you need it elsewhere.

Checking your extension you'll see demouser1, which is the test user I used and can see the SQL Action worked flawlessly. I've sense deleted the user however so you're welcome to of course delete them from your extension. If you wish to continue using the SQL Actions I've configured please remove the URL configurations otherwise there's not much more I can help with and you should contact a developer to develop your script for you.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 12 years 11 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • ONLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
12 years 11 months ago #183114 by activha

krileon wrote: Your absolute easiest approach is to just use MYSQL in the SQL Actions. I've gone ahead and configured it to use SQL Actions for you. Please confirm if working or not. Please also note I did not receive any of the error messages you received. I only configured "Negopack Starter" and "Ensemble (gratuit)"; please copy from either of those if you need it elsewhere.

Checking your extension you'll see demouser1, which is the test user I used and can see the SQL Action worked flawlessly. I've sense deleted the user however so you're welcome to of course delete them from your extension. If you wish to continue using the SQL Actions I've configured please remove the URL configurations otherwise there's not much more I can help with and you should contact a developer to develop your script for you.


Thanks a lot for the input !

The problem is that we paid enmasse developers to write this script and we are getting rather angry at them.

We will definitely follow your suggestions and go the mysql integration way. I have removed the urls integration and set the mysql queries that you defined in all plans.

It seems to work fine except that we have the error that we talked earlier when applying a plan from the backend.

Go to the demo user and from the backend apply a subscription with the subscriptions tab and you will notice the problem.

Error reporting is deactivated on the liver server but this is the same as I mentioned before.

We need to check from the front end if it blocks the registration through a paying plan or not

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • ONLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
12 years 11 months ago #183127 by activha
Well it seems that we have also a new problem, registering a new user seems ok but even after the users clicks on the link to confirm, it is impossible for him to log in, even if all seems ok in the backend

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum