Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. Same as kicken and daviddennis, I usually only find myself using it on array elements.
  2. Yeah, your worst decision ever was to host your site on GoDaddy. The company wasn't meant to be a web host provider, it was made to be a registrar, which, IMO, they do just as good a job as any other registrar does. It's not like you can make a domain faster, all you do is set your nameservers and forget about GoDaddy until it's bill time, or you switched hosts.
  3. This SymmetricDS is driving me up the wall, I really want to use it, but I can't get the sufficient information to do what I want. I've posted two questions on their forums and it doesn't seem to be a very active place; but they have a billion and one different user guides and tutorials with hardly any examples. I downloaded a trial version of SQL Examiner, which is GUI-based, and it seems to do a somewhat decent job, I mean it actually makes the full database comparison and updates the MySQL database successfully on the remote server just fine, but I have to initialize the replication manually. I experimented with scp and like it very much, but again, replication would have to be manual unless I come up with a script to automate it, and not only that, I would need to create a listener script on the remote server. And it's not like I need to synchronize the entire database, but rather, only a few tables, from some of which I would only need a few columns. SQL Server comes with something called Linked Accounts where I can actually query my remote mysal database as if it were local, and eventually I ended up researching triggers for all updates, inserts, and deletes..., but again, I find myself realizing that I suck as a database administrator. My last resort to this problem would be to schedule an sql dump to run on the in-house server periodically throughout the day, send it to the VPS overwriting an SQL import file, then create a crontab on that VPS that will import that dump periodically... Why does something that seems so damned simple have to be so damned complicated?
  4. SymetricDS seems like a great solution. according to it's documentation, I can run it as a service on my Windows machine (the in-house root node), and have it push data. What I have yet to find in the documentation, is how to set it up to replicate to the client... runhavning MySQL. It has to be possible, I would need to actually try it out before I have any decent concrete questions. One of my greatest goals here is to avoid getting a static IP. If I can get this SymetricDS to do nothing but send data to the VPS, then this will work perfectly; I just need to tinker with it a bit, probably more than that. So, the Centos VPS "client" node should only receive, while the in-house Windows machine "root" needs only to send. Great find. Thanks kicken!
  5. Amazingly good news. Apparently, this RFMS software does not come with a Sybase SQL Anywhere database like I was told, like I read from the documentation. Instead, I had to install Microsoft SQL Server Express 2012. I'm not sure if the Express version has a different approach as far as connecting, but I am assuming I do not need to install a Sybase PHP module now.
  6. That's exactly what I'm going for, transparent updates. So apparently the mysqldump method is out of the question. I must use the MASTER/SLAVE option. --- but I would still need to forward ports and such to open an SSH tunnel? I was thinking about opening a SSH tunnel from the in-house server, would I still need to open ports for that? Or would I have to create a tunnel from mywebstore.com. I still have more reading to do, and not to mention.... the practice.
  7. I get the feeling that you misunderstood my idea, but I like the idea of replicating a MySQL database to the VPS from the in-house server instead like you've seemed to understand it. . The idea I originally understood from you was outlined like so I rather like the idea of a custom PHP script for Sybase --> MySQL and then replication to the VPS's MySQL. Anyway, I seem to be getting closer and closer to decent plan. Now I just have to figure out how to implement it. I read this tutorial over; I'm sure there's a wealth of better information out there, but the mysqldump method seems the easiest to me. http://www.howtoforge.com/mysql_database_replication Ccreating a mysqldump from the converted Sybase DB and sending it to the VPS. From the VPS though, I would need a way to listen... a way for mywebstore.com to be notified that it's time to overwrite the database with the sent mysqldump. That tutorial mentions a MASTER / SLAVE method. I would definitely need more documentation to learn that method, I'll have to search for more information, but if you have a better idea, please let me know. As far as sending the mysqldump, I like this approach the best, but I'm not sure if I need to go full SSH, I would imagine that I could just send it through FTP. It wouldn't need to be secure since it's only inventory information. I am trying to avoid having the in-house server, or the in-house network rather, serving anything outbound. I would rather leave it inclusive to the store. I would rather just send everything to the VPS and receive nothing back, other than the ftp status messages. I feel like I'm in way over my head, but at the same time challenged to complete the project. I will definitely learn plenty of new things in the process.
  8. After thinking about it, and reading about it, I don't think I want to, or should, connect to the embedded database directly from the Linode. You mentioned that Sybase is designed to be replicated, so it seems that would be the best option, right? Replicate it to the Linode. Furthermore, I get the feeling that Sybase isn't that efficient for a webserver's data source. So I will not only have to replicate it, but rather I will also have to convert it. So, - replicate to VPS from in-house server - constantly overwrite a mysql database with the converted sybase data. The only way I can think to convert the Sybase to MySQL is with a PHP script that runs on cron every half hour or so. Either that, or there exists a Linux script out there that will do this conversion for me that I don't know about. ... sounds simple enough... Please tell me if I am heading down the wrong track.
  9. I want to do that so much, I'm definitely going to try. I have never had to change the --configure variables for PHP before. Basically, I installed Centos on the Linode, then I installed ZPanel to take care of what I don't know about Linux, although I have been learning more and more, here and there. I think it would make my life a lot easier if i did it that way too. (installing Sybase client onto the VPS). And I'm going to attempt that method first, I do need to learn how to do this stuff I was able to use yum replace to upgrade to PHP 5.5, I should be able to figure this out, right? -------------------- Ok, so my game plan now is to finish setting up the development Linode and somehow manage to install Sybase client onto it successfully.
  10. Or better yet, I could install both the RFMS Server and the PHP/MySQL/Apache Server on the same machine, but then I wouldn't use the DMZ at all and would have to do some kind of witchery to get only that DB Backup / Server available to the Linode. Luckily there's not much of a rush on this, I am limited to my own capabilities
  11. Since I'm having the hardest time trying to figure out how to even get Sybase installed so I can actually connect to any SQL Anywhere DB whatsoever, I think that feeding from a Database Backup / MySQL DB Server would be the best option. I'll put Centos 6 on a spare in-house computer, install php, apache, mysql, etcetera... and have that system connect to the in-house server, and populate a MySQL database for backup. Though, I suppose that may present problems when I actually use a backup, perhaps I could just save a database dump on the side? I can then put the backup in the DMZ and use that as the source for the Linode. Does this sound like a bad idea? Should I go the extra step and stumble around with NAT settings and ports and much more networking jargon? My linode is running php 5.5, and it seems the Sybase libraries only support up to 5.4.x And since I don't want to run 5.4 on my Linode, I chose to put 5.4 on the in-houe db backup server. Please let me know if I'm headed in the wrong direction. I really wish this store had decided to go with cloud hosting instead, it would have been so much easier, at least I think it would. The store's owner has trust issues with technology and definitely doesn't want her data up in "outer space".
  12. Giz, you seemed to hit the nail on the head with your assumption. I have an in-house server running Win7 Pro x64. The program, called RFMS, includes a SQL Anywhere Server in it's installation. At least I am pretty sure from the documentation I have read. I won't actually get this software until sometime tomorrow and then I have to wait for the high-dollar desktop computer to come in. I'm simply trying to plan ahead using what I know now. Putting it in the DMZ is what scares me, so it seems, fortunately, I won't need to do that. I'm not too network infrastructure savvy, but I know enough to recognize acronyms and google for which I really have a concrete question. There is also PHPF Not only will I need to solve my network challenges, but also configuring my web server to support this http://php.net/manual/en/ref.sybase.php But basically, yeah, I need the Linode and only that Linode to communicate with this yet to be bought, in-house server; for which I will also need to setup a static IP, unless there is an easier alternative for making your site "publicly accessible"... and by publicly accessible, gizmola, I mean, that it is connectable through an external IP. I would love to just buy a short domain name and keep a dynamic IP because it's cheaper and less of a pain in the ass, but .... I gotta learn sometime. Basically yeah. I haven't decided whether to have the Linode feed from the server itself, or feed from a backup database. I had the idea to put a Database Backup Server into the DMZ, simply because there isn't anything that needs to be secure; no credit cards and such are going to be sent. My other idea was to create the DB Backup Server on the Linode, and have it constantly sync with the in-house server; say every 30 minutes or so. I don't want to say that I really wish I had taken more NET+ courses, but damnit... I should have. The WebService route is something I don't want to do. Mainly because I have next to no experience with that, XML/SOAP/cURL aren't my strong points.
  13. This isn't exactly an application design question, but rather a system design one. I am about to install an Inventory Control System inside this store I work in. The store itself also owns a Linode VPS running Centos 6.4 which hosts our website. This new Inventory System will come built in with a Microsoft SQL Server, and supposedly it is a SQL Anywhere database, but I'm not too sure what that means. I need to make this database publicly accessible, but only via the Linode VPS. Surely, setting restrictions is easy enough to address that issue. That isn't my question. My first idea is to put this server into the DMZ, easy. But it doesn't exactly sound safe. So my next idea was to put a middleman server in the DMZ, this way the Linode can send queries to that middleman server and it will send that data to the SQL Server and back. This is very vaguely described I know, but I don't want to get too much into details, but rather, understand how I can create that middleman server, and what could Install onto it that would allow me to securely process queries? My first thought was to install a webservice, that accepts an XML/JSON request and returns an XML/JSON response. Then, I realized directly afterwards that I don't have any experience setting up a webservice like that. What kind of options are there out there? Ultimately, my question is, should I just put the Server in the DMZ or should I create the middleman, and if so, can someone point me in the right direction as to getting a webservice set up?
  14. It must be some AJAX witchery.
  15. Any and all CMSs are made to be able to be used by anyone, if you can't 'use' it then the CMS flat out sucks. If, however, you mean "use" in the context of tweaking the code and creating custom scripts within the CMS, you are posting in the wrong forum. If that's the case, I'll move this to Third Party PHP Scripts. Otherwise, when you say I can't use the CMS, I get the impression that you don't understand the label names, and mainly the overall functionality of the CMS, for which you should refer to the documentation.
  16. POST and GET only contain the values that were sent TO the current script. Those superglobals are not consistent throughout your pages, The $_SESSION variable however, is indeed consistent, as long as you call session_start BEFORE any output to the browser.
  17. Encase your variables with single quotes, especially for those fields whose datatype is of the string family. ALSO, you are missing the end parenthesis for VALUES. $sql = "INSERT INTO db (ID, Name, Address, Contact, Comment) VALUES('$id', '$name', '$address', '$contact', '$coment')";
  18. I would imagine that you could just GROUP BY o_id. SELECT c.CLIENT_ID, c.CLIENT_NAME, o.o_id, o.client_id, o.o_date, o.o_number, o.o_notes, p.o_id, p.qty, p.name FROM clients c, orders o, products p WHERE c.CLIENT_ID = o.client_id AND o.o_id = p.o_id AND o.o_id = $theOrder GROUP BY o.o_id And you definitely need to redesign your database schema and use JOINs, otherwise, you are multiplying the number of rows from each table you have after FROM clients, orders, products
  19. You could set a DATETIME field called last_updated and add it to your UPDATE statement UPDATE yourTable SET someField = 'foobar', last_updated = NOW() WHERE id = xxx
  20. You need to instantiate a new instance.. $store = new StoreInitialization; $store_config_file = $store->loadConfigFile();
  21. To automatically attempt to detect a double account creation would involve very complex algorithms that only a human being can utilize. Pretty much, you'd need one person to an army of persons to check such variables (that noone can seem to identify). The input you do get is pretty much useless, because the most you could do is compare a stored geolocation and/or an IP. But that would only allow you to compare their stored IP, which would only keep the user form using a different IP. The don't call it Dynamic Host Control Protocol for nothing, their IP will change at some point so you would have to capture the network address portion of the IP. But what if the ISP changes their network address? Now, you are at the mercy of how broad a client base this ISP has; the less the better. Though still, this only limits you to that group of clients. What is the population of that city? What percent of the households of this population use the internet? With a population 1,000, and an aforementioned percentage of 70, Compare this percentage with all users when they go to register an account This could signal a flag to alert you. Now you're at the mercy of making decisions, the human way. If the comparison is true, you have to consider the likelihood of this user using a neighbor's computer with the same ISP and network address. Though, seeing as IP's can be spoofed just contradicts that whole portion of security. So what is the likelihood that you user base even knows how to spoof an IP? What are their moral values? Do you trust your user base? That's what your "security" would involve. The Honor System is the only chance you have.
  22. Something else to consider $result = mysqli_query($con,"SELECT * FROM server_status.tbl_servers;")or die("Error: ".mysqli_error($con));; $message .= "" . $row['ssGameType'] . " : "; $message .= "" . $row['ssIP'] . ":" . $row['ssPort'] . " : "; $message .= " Status:" . $this->get_status($row['ssIP'],$row['ssPort']) . " : "; $message .= "Timestamp:" . $row['Timestamp'] . " : "; $message .= "Orderby:" . $row['ssOrder'] . "<br />"; You're selecting all fields and only using 5 of them. Unless you only have five fields in your table, you should make the database do less work.
  23. A quick and dirty way is to double loop <?php foreach($product_options as $key => $quan) ?> <?php foreach($quan as $k=>$value) { $value[$k]['quantity'] = $number; } $product_options[$key]['quantity'] = $number; ?> <?php endforeach; ?>
  24. Because you are returning your function inside the loop. Also, you aren't concatenating $output, you're just overwriting it every time.
  25. Zane

    Changing ISP

    It might also help to do a full database dump... then import it into your new database like you mentioned in your OP.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.