-
Posts
4,362 -
Joined
-
Last visited
-
Days Won
11
Everything posted by Zane
-
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
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 -
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
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". -
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane replied to Zane's topic in Application Design
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. -
SQL Server to MySQL (in-house server to remote Linode VPS)
Zane posted a topic in Application Design
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? -
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.
-
Transferring additional data through $_POST and $_GET
Zane replied to skyrifle's topic in PHP Coding Help
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. -
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')";
-
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
-
A field that updates with server time on any row update - mysql
Zane replied to Drewser33's topic in MySQL Help
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 -
You need to instantiate a new instance.. $store = new StoreInitialization; $store_config_file = $store->loadConfigFile();
-
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.
-
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.
-
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; ?>
-
Need help outputting shopping cart form a foreach loop
Zane replied to eldan88's topic in PHP Coding Help
Because you are returning your function inside the loop. Also, you aren't concatenating $output, you're just overwriting it every time. -
It might also help to do a full database dump... then import it into your new database like you mentioned in your OP.
- 6 replies
-
- change isp
- move database
- (and 3 more)
-
Just in case you are using them... Short tags are no longer enabled by default, you have to enable the manually in the php.ini file. <?="Hello World" ?> <? echo "Hellow World"; ?>
-
It's as simple as adding an exclamation mark. You didn't supply your code but I imagine it looks like this if( preg_match_all ("/^([a-z0-9-_\.]+@[a-z0-9-_]+\.[a-z]{2,3})$/", $line) ) add the ! exclamation point before preg_match* if( ! preg_match_all ("/^([a-z0-9-_\.]+@[a-z0-9-_]+\.[a-z]{2,3})$/", $line) ) Or, if you have something against exclamation marks, you can check if it is false if( preg_match_all ("/^([a-z0-9-_\.]+@[a-z0-9-_]+\.[a-z]{2,3})$/", $line) === FALSE) if( preg_match_all ("/^([a-z0-9-_\.]+@[a-z0-9-_]+\.[a-z]{2,3})$/", $line) !== TRUE)
-
Why Oauth(User Credentials)? Isn't PHP Session enought?
Zane replied to PhpRootUser's topic in Application Design
Because that token is your key to their information, their profile, their demographics; everything you need to keep up with your incoming traffic without the hassle of storing it yourself. Storing a session is easy. Getting users to create an account on your site; not so much. User friendless is key to a successful website, otherwise it's like one of those extremely complicated adding machines from the 20's, with liquid based atticuses and hand-carved wooden levers and gears. There's is no substitute for a $_SESSION, it has one purpose in life, and that is to remain accessible until the site and browser sessions are terminated. -
So you were how old when you made your first website? 7? 6?
-
Make sure $diary_entry is free of any and all apostrophes and backslashes.
-
Are the files on the same server as your script? If so, there is no reason to use FTP at all. You can use glob() to get an array of files.
-
This is one of the many reasons you shouldn't store multiple values as everyone is suggesting. There are too many things that can go wrong with a setup like this. To answer you question though, No. Not in the way that you are trying. The only way to get Item 2, is to receive all of the info and use PHP to explode by the comma and then it's as simple as reading $thedata[1] Ideally, you want to do any and all filtering on the MySQL side first, which is why you asked this question to begin with. So do yourself a favor and read a tutorial on normalization, table joins, foreign and primary keys, etcetera. Start by reading this thread here, http://stackoverflow.com/questions/2800104/sql-query-with-multiple-values-in-one-column
-
No, you do not have to download PHP if your service provider AKA host has it installed for you already, nor should you have to download mysql. Hosting companies sell their hosting space with common new technologies for a reason, to make it simpler for an individual to make a website. I suppose you could call a hosting package a kit. Any kind of kit that you buy, whether it's a model airplane building kit or a camping kit, the word 'kit' indicates that the minimum tools required are included.