I have a question: can I mix jsp, php, asp.net and python in one site?
For example:
www.mysite.com/customer.html <-- this page is written by jsp
www.mysite.com/mycart.html <-- this page is written by php
www.mysite.com/login.html <-- this page is written by asp.net
www.mysite.com/admin.html <-- this page is written by python
I use ".html" as I don't want other know what technology I am using.
I am facing some problems:
What web server can hold all these technologies?
How can they share session?
Or just simply tell me this is impossible...
Thanks
You cannot share a session unless there is one module (for apache or something) that encompasses all of these technologies properly.
If this doesn't bother you, then, just configure your webserver to handle all of the file endings and such.
Speaking from my experience, I suppose all web servers supports these languages. You just have to install their parsers/modules and configure your web server to use them. You'd have to give your pages different suffixes though, so that your web server will know what to do with the files.
www.mysite.com/customer.jsp
www.mysite.com/mycart.php
www.mysite.com/login.aspx
www.mysite.com/admin.py
You can always generate a random key like a234feg321de32 for the session, store it into your db for each user, and send it in the GET or POST variables, then check it with a select query. This would work even if you pushed your test further and switched from one server to another.
I like your idea. With nginx you can easily redirect requests to the different applications in whatever way you prefer. When it comes to session sharing (and all kinds of data sharing) the easiest and safest way would be to communicate via a database. Problem is, you would have to implement your own session management solution in all different systems.
Related
Let's say I have a web app server coded in PHP, would it be possible to develop the app's server further using a different language (say, Python)?
If so, how would I go about doing this?
Yes it's possible (and pretty common), but as for a "how do I do this?" that's far too broad to answer.
For an example, I built a game using PHP for the front end (using Laravel), and then behind the scenes it processes games using python (on top of pyramid) and a few other bits and pieces.
Most low-cost web hosts will only provide one language that youw an work with (most commonly PHP), but if you run your own server you can run whatever you want to on there.
I've been learning node.js and socket.io, but I can't see how to use it without transferring everything over to node, which I'm not keen on doing. So my question is, is it at all possible to use node.js alongside PHP?
For example, say I wanted 99.9% of my site to be done in PHP, but I want to use node to display the current number of users online at the top of the page. Is this at all possible, how would I do it?
I had a similar task for certain extent. Running multiple Node applications with other stuff, no matter static, PHP, Python or something else, on one domain. I consider the best approach is to use Nginx as a web server with appropriate configuration. Here are some details and my configuration example: http://skovalyov.blogspot.com/2012/07/deploy-multiple-node-applications-on.html
Is it possible to create a sign up possibility without PHP?
i made an application with jQuery, and i want the users to be able to sign up and
save there input. Is this possible without PHP?
Thanks in advance
Web applications consists of two sides. server and client, server is stored in some host in remote computer while we are the client who request them from our desktop.
php is a server side programming language (that runs on server) while javascript is client side language(runs on our computer). so if you want to create alert message with php then then you cannot. similarly you cannot store data on sever with javascript because it runs on your computer.
data are sent from server as request and they are manipulated on browser with css and javascript. (you are are able to see browse page with extention .php even though you don't have php installed on your computer. beasuse server has php compiler)
now if you want to create a sign up then, you need to store data in server (because data has to be available), and javascript does on run on server. so you will need a server side language. there are lots of languages for server side scripting and that they are really good and you can choose any of them as mentioned above. But most important thing is you need one ...!
You can use any server-side language, so strictly speaking yes, you can solve it without PHP. I assume you want this without any programming on the server side - that's not possible as far as I know.
You can store input in their browser's localStorage, or in a cookie if it's really small. That way users can save their stuff, but don't even have to sign up.
Otherwise, "signing up" usually implies creating some sort of account, which must be handled server side.
Not really. You still need a language on the server-side that is able to interpret your input (login and password) and compare it with your users data.
The only way to achieve this is throug a programming language on the server side. If your hosting environment is using Apache and PHP, then PHP is probably the easiest way to do it.
I have a simple php driven website running and I'm trying to figure out how it treats php pages. Some of my php documents are routing logic and some just includes for individual pages. How do i go about making this work offline?
What I though was that I'd have to re-create the routing logic in javascript. Is that my only option? In that case, is it even possible to have the site be driven by php while online and switch to JS offline? I can't make sense of it.
If your site is fairly static, HTML5's cache manifest may get you most of the way there. Have PHP output a cache.manifest file in the correct format with all your routing system's URLs and those URLs will be stored locally in a compliant browser. Attempting to access them will pull them out of the cache if possible.
If you're looking for something more dynamic, though, you're going to have to do more legwork.
Here's some good info on offline caching.
It is important to remember that PHP is processed on the server. The result of your PHP code is all that is sent to your browser. Your browser has absolutely no knowledge that PHP was even used to make the page!
If you have some dynamic code that must run offline, then you must use Javascript. If this is just for testing on your own machine, put a web server running PHP on your dev machine and acccess it via http://localhost.
HTML5 offline caching does not work to make your pages interact; it works only to make a particular page available offline. Basically, it works on a URL-by-URL basis. If you absolutely need offline functionality, you will be forced to make it work in JS.
Also, make sure your manifest includes all resources used by all pages.
Hope this helps!
It seems obvious not to use any server side scripting language file while caching it in your browser. PHP/JSP/ASP etc all are server side language we cant fulfill the request forwarded by client that need to be generated dynamically and most importantly there is no server running on client side. SO , i think we should go for JS whenever we want to do such things.
i have a database that is written in access. the access mdb file connects via ODBC to a local mysql database. i have a bunch of sql and vba code in the access file. i dont expect the database to surpass 100mb. currently it is around 10mb. i will need to have multiple user access. (no more than 10 users at a time)
i need to convert this database from being a local one to a web server, and i need to make a web interface for it.
how do i get the current local instance of mysql database to run off a webserver? i am currently running it off wampserver 2.0. i dont have experience putting a database on a webserver.
i have an OK vb.net background. i have never done any web applications. here's a picture of the access form that i may need to replicate to work off a website:
alt text http://img42.imageshack.us/img42/1025/83882488.jpg
which platform should i use as the front end to this thing?
would it be possible to just run this access file off a webserver instead of programming a new front end for it? is that not a smart idea?
thank you for your help!
If your webserver has TCP connectivity to your existing database server, and its hosted in a suitable place (eg, don't have your webserver in a datacenter connecting to a database server on your office DSL connection), then no move is required.
If you do need to move it, it's as easy as creating a backup/dump, and restoring it elsewhere.
As far as the frontend, there are MANY technologies that will do what you need (ASP.NET, PHP, Python, Ruby, Perl, Java being the most popular ones, not necessarily in that order).
Use something you are comfortable with, or that you are interested in learning (provided you have the time to do so)
Use something that runs properly on your target webserver. Really, ASP.NET is the only one that has any major issue here, as it's limited to Windows.
Access itself has no direct web-accessible version. A Google search finds some apps that claim to convert Access forms to web-based, but I will not link to any because I don't know how well they work. I'm certainly leary of anything like that, because web apps are a different breed from Windows apps. If you are going to go that route, be sure they actually generate HTML output; make sane, clean source; and offer a free trial so you can verify it actually works.
Really though, a form like that is reasonably easy to reproduce with some basic knowledge of server-side programming and some HTML.
I don't have any experience migrating access to a web-based interface, although I have heard of people going straight from access to a web page. MySql is exceptionally easy to migrate. MySQL.com has a program called mysqldump that comes with the standard install of MySQL that allows you to export your database straight to a text file that can be used then with mysqldump to import it on another server. I don't believe the WAMP server comes with the command line tools although they can be downloaded from mysql.com. However, if it has phpMyAdmin, then there is also an export feature with that as well that will generate a .sql file that can be imported to the webserver using phpMyAdmin. One thing to keep in mind though is that I have had very little success mixing and matching these methods: ie, I've never been able to get a mysqldump-created file to work with phpMyAdmin and vice versa.
Good luck!
The link will help you to export and import mySQL database
May be on Windows web server there is an opportunity to run Access files, you can check, but any way if you have some programming skills, I would say that it is not difficult to crate a php script which will query your database info and will edit.
Migrating an Access application to the web is quite difficult, because you can't translate an Access form 1:1 into a web page. Web apps are stateless, whereas Access is built around the concept of bound controls and bound datasets.
Secondly, it is impossible to easily replicate an Access subform.
Third, you lose tons of events that Access forms and controls are built around.
In general, a web page that performs the same task as an Access form will bear little or no resemblance to the Access form, simply because the methods for accomplishing the same tasks and the UI widgets available to you are so completely different.
One thing to consider is whether your users need a web application or if they just need to use your existing Access application over the Internet. If the latter is the case, Windows Terminal Server/Citrix can do the job for a lot less money, since there's no conversion needed. You do need to provision a Windows Terminal Server, set up a VPN and purchase CALs for the users, but the costs of those are going to be much less than the cost of rebuilding the app for web deployment.
It may not be an appropriate solution, but it's one that you should consider, I think.