31
redheadedrod
Re: new login problem

I would check whatever computers you are accessing your site with for viruses with a different program than the one installed assuming one is installed.

Assuming you have no viruses on your computer that are monitoring your keystrokes it sounds like someone somehow got access to your host password and are messing with your site if you haven't done anything.

Also do you have any additional accounts or other people "helping" you? They could be messing with stuff on your site as well... Sounds like someone with access to your host account is making changes and not just someone with your xoops admin password.

Unless you know of another potential breach once you have identified your computers don't have a virus then change your host passwords... And Xoops Admin passwords...

Rodney




32
redheadedrod
Re: #GPL/#GNU Licence Key’s should assign on Install (Finally at your home! Big Plus+++)

This message is not very clear... Is English your first language Simon or maybe you should make sure you are totally sober when you post these messages...

Sounds like maybe you think xoops should post a registration key when installing but not really clear what you mean...






33
redheadedrod
Re: Have a stupid question: does Xoops make diference between 32bit and 64 bit

Mamba is correct it does not make any difference.

As long as you have a compatible version of PHP and of a compatible database it should work fine. Doesn't matter if you are running winCE on an old phone with little power, 64 bit Windows Server, 32/64 bit Linux, MacOS, etc... If it runs a compatible version of PHP and has a compatible database you are set. The bit depth of the supporting operating system is handled by the PHP language as is the same for the database so doesn't matter.

In general however if you can run 64bit OS it should be faster. While windows 7 and older may have issues between 32 and 64 bit hardware drivers I have not as of yet heard of issues between 32/64 bit versions of Linux or Win 8. (I believe MacOS and windows server since 2012 are 64bit only)

Rodney



34
redheadedrod
Re: Xoops 2.6 Service Manager

Another great example of the power of this new system is a project I have been working on. I am finishing up another project that was started during the school year and then I will be getting back to this but I have been moving the phpmailer to a service manager module.

Once completed you will access the service manager to setup an email to send out. This new mailer module will support all conventional email components including attachments with very simple calls to the service manager.

The importance of this project will become obvious once I am complete with this mailer because I will be building a new service using Swift mailer to do the same thing. The idea here is that you can use whatever mailer you feel comfortable with and the settings will be done in the related provider module instead of the system preferences.

So if someone has a cloud based mailer or anything else it should be simple to make a provider that can just be plugged in and turned on. No additional work would need to be done in a module to use this or any other mail provider.

At the moment I am close to being able to provide the module for initial testing and when finished I will post instructions here how to try it out.

Note that Avatar and Gravatar are already setup to use this system.

Rodney
Attending College working towards Bachelors in Software Engineering and Network Security.



35
redheadedrod
Xoops 2.6 Service Manager

Thought I would start a thread to discuss this news announcement:

https://xoops.org/modules/news/article.php?storyid=6631

For module programmers this is a great new feature.

For those that do not understand the importance of this feature this new Service Manager allows a module to provide a service that can be used anywhere in the system.

This feature makes the idea I have made known more than once about module Libraries pretty much a moot point.

As an example, XoopsPoll can be rewritten to serve a poll service that needs very little code to access. This then allows you to EASILY include poll's into a new forum, event module or anything you want to add it to. This also then allows one to easily upgrade the original poll module while leaving the service mostly untouched and be used by the secondary modules without having to update them. You could also then replace the xoopspoll module as long as the new module completes the original poll modules contract. It can include MORE items but it has to fulfill the original contract. If you have a new module that will perform all of the functions of the original and new ones then it makes sense to provide not only the original contract but a secondary one as well. Because a contract is an interface it is very easy to add.

In practical use we can use the example of how CBB adds polling support. Currently the code base duplicates large portions of xoops poll to allow the support but if the code in CBB doesn't match the code with Xoopspoll then CBB will be very buggy to provide the polls. If xoopspoll was a service provider then CBB can be rewritten to use this service and have no actual xoopspoll code within the module. This then makes it much easier to upgrade xoopspoll in the future or outright replace it with a similar module.

(Note, if I have time this summer I will try to move Xoopspoll to a service providing system but with other cool stuff I hope to get involved in I may not have the time.)

Attending College working towards Bachelors in Software Engineering and Network Security.



36
redheadedrod
Re: Inserting multiple rows in database table

Cool. Great that it worked for you. I wasn't sure if you could pass an array like that to setVars or not.

Hope my input helped you progress.

Only wish I could have been more help.

Rodney



37
redheadedrod
Re: Site Transfer Questions

Download the latest 2.5.6 and follow the upgrade instructions and you should be OK.

Hopefully 2.5.7 should be in final form soon and suggest moving to that but you should be OK for now with 2.5.6 until that happens.

Also you need to change the settings in the secure.php file that resides in I believe it is the xoops_data directory. (If not its xoops_lib. I am at work so can't look to be sure.)

The mainfile.php has the file paths in it. The secure.php has the database information in it and you have to change both files.

Rodney



38
redheadedrod
Re: Inserting multiple rows in database table

Ok, About variables...

Get/Post are sent within the page. With a GET being installed in the URL and being limited to length and POST being displayed in the HTML text.

Cookies are kept within the browser and can be stored for just the current session or for longer depending on how it is setup.

These methods require the information to be stored on the client computer and can be modified or created by a user with or without malicious intent.

A global variable that is accessed through a GET or POST has to be sent every time a page is refreshed and a cookie can be disallowed if the users browser is set to do so.

REQUEST is a lazy way of accessing variables. It will grab the variable from GET, POST or COOKIE and if there are more than one place the variable is located it will prioritize which one to use. This is considered an INSECURE variable and should not be used in a production site. A malicious user could over write an intended value by setting a value in a higher priority location which would over write the valid data.

All of the above mentioned methods should always be checked for malicious content since they can be spoofed by a malicious user.

SESSION data is server side and the user never has direct access to this information. It stays with a specific session and you have to insure you use the session_start() function to access the data when your page starts. The information stored within the SESSION data will remain through out the session so you have to insure you remove it after you are done with it. From what I know session data should be considered to be secure since it is stored on the server and the client has no access to it.

So yes, for a variety of reasons using session data would be a good idea. I was converting the install pages to using session data when I was working on it and it was also much faster. I have not run across any reason NOT to use session data but have for the reasons mentioned above for the other global data types. They each have their place.

Rodney



39
redheadedrod
Re: Inserting multiple rows in database table

Be aware that the coding error I pointed out is still in place and you need to address the use of $datas[]...

Should just need to remove the []'s.

Otherwise when you get to the foreach loop you will go through every instance of $datas that is currently in memory. So the first time you will iterate through just one value of $datas but the second time you will have the same value as you had the first time as well as the new second value and the third time through will have the first two and an additional. Plus when you send your array to setVars you will have the whole array you just setup sent to it instead of each item.

Removing the []'s should get the foreach loop to work as intended.

Should step through the contents of $datas and send each entry to setVars.

Rodney



40
redheadedrod
Re: Inserting multiple rows in database table

A little help here.. Your code is a little wrong...

A quick primer...
$data = array('one' => '1''two'  => '2');


If you do a variable dump should look something like this...

$data {
one = 1
two = 2
}


$data[] = array('one' => '1''two'  => '2');
$data[] = array('three' => '3''four' => '4');


If you do a variable dump should look something like this...

$data {
array() {
one = 1
two = 2
}
array(){
three = 3
four = 4
}
}

if we took this one step further and did this:
$data = array('one' => '1''two'  => '2');
$data = array('three' => '3''four' => '4');


The second $data replaces the first and you get a variable dump that looks like this:
$data {
three = 3
four = 4
}

Note the difference..

In this most recent variation of your code every time you go to the foreach loop you will step through each element of the $datas variable that has been loaded and you will send a large array of all of your key/value pairs to the setvars.

The fix SHOULD be simple... Just remove the $[] from the $datas[] line.

I had thought to suggest the $datas[] suggestion until I realized how the code was running.

By adding the [] you are creating a 3 dimension array...
Without it you are doing a 2 dimension array.

I BELIEVE then you will step through each key/value pair and send this to setvars and SHOULD work. Assuming that setVars can accept an array.


In brief I think it is getting made more complicated than it needs to be. The original post should have worked just by moving the foreach loop within the for loop.

But again, this type of bug can be figured out by doing a series of variable dumps at different stages and looking at the value. This is a coding issue and not a database issue.

I do not have time to run this code at this time but I should be reasonably accurate.

Rodney




TopTop
« 1 2 3 (4) 5 6 7 ... 116 »



Login

Username:
Password:

Lost Password? Register now!

Who's Online

63 user(s) are online (45 user(s) are browsing Support Forums)


Members: 0


Guests: 63


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits