These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
12Next page
 

PHP Documentation

First post
Author
Salgare
Center for Advanced Studies
Gallente Federation
#1 - 2016-07-18 23:27:10 UTC
I'm having a hard time finding documentation on installing php on Tomcat. Actually I'm having a hard time finding current documentation (i.e. installing v7 on Tomcat). I've finding only dated and questionable information.
Salgare
Center for Advanced Studies
Gallente Federation
#2 - 2016-07-19 00:30:48 UTC
Salgare wrote:
I'm having a hard time finding documentation on installing php on Tomcat. Actually I'm having a hard time finding current documentation (i.e. installing v7 on Tomcat). I've finding only dated and questionable information.


dang you poor php people, I found what I need (I think)

http://php-java-bridge.sourceforge.net/pjb/how_it_works.php is needed to get it up on TomCat.

For anyone following what I'm up, briefly reading this, it sounds Like java can directly call php and php can directly call java ....

cool beans. php might not have to mess with rabbitmq, however that can be available as well for apps that want to be async verses pulling/polling driven.
Dragonaire
Here there be Dragons
#3 - 2016-07-19 05:33:31 UTC
Need to think of PHP as Java's overlord and master when it comes to anything having to do with the web and then things start falling in to place Blink

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Salgare
Center for Advanced Studies
Gallente Federation
#4 - 2016-07-19 06:05:41 UTC  |  Edited by: Salgare
Dragonaire wrote:
Need to think of PHP as Java's overlord and master when it comes to anything having to do with the web and then things start falling in to place Blink


love it ... and with that advice ... waaa laaaa I have PHP running on Tomcat ... woot


Had to drop tomcat back down a version however, the master demanded it.
Dragonaire
Here there be Dragons
#5 - 2016-07-19 06:38:30 UTC
Kind of interest trivia through Java and PHP both where just starting in the 94-95 time frame but the Java web site probably was already using PHP to run the web site while it was a while before Java could be call 'Internet' ready with things like Tomcat etc.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Salgare
Center for Advanced Studies
Gallente Federation
#6 - 2016-07-19 07:00:58 UTC
Dragonaire wrote:
Kind of interest trivia through Java and PHP both where just starting in the 94-95 time frame but the Java web site probably was already using PHP to run the web site while it was a while before Java could be call 'Internet' ready with things like Tomcat etc.


I worked at Novell during its hayday years, In 95 I came kicking and screaming from years of procedural C, at the time working on the Novel Directory Services (NDS). I got pulled from the C side and worked closely with Sun as they developed JNDI. I wrote java JNDI wrappers around NDS and LDAP at that time. I've been writing java ever since.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#7 - 2016-07-19 11:56:45 UTC
Uh, php. in tomcat.

Interesting choice.

Most people would use something like apache's httpd, or nginx as the frontend webserver, then hand off to php-fpm or tomcat, depending on what's needed.


That way, you don't need to use a heavyweight server like tomcat, to manage all your connections. And you can make config changes, without the long startup time of Tomcat.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Dragonaire
Here there be Dragons
#8 - 2016-07-19 14:38:06 UTC
But Steve some people like slow overly engineered solutions to their problems Blink

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Salgare
Center for Advanced Studies
Gallente Federation
#9 - 2016-07-19 14:48:54 UTC
Dragonaire wrote:
But Steve some people like slow overly engineered solutions to their problems Blink


ouch
Salgare
Center for Advanced Studies
Gallente Federation
#10 - 2016-07-19 16:46:22 UTC
Steve Ronuken wrote:
Uh, php. in tomcat.
Interesting choice.

Most people would use something like apache's httpd, or nginx as the frontend webserver, then hand off to php-fpm or tomcat, depending on what's needed.

That way, you don't need to use a heavyweight server like tomcat, to manage all your connections. And you can make config changes, without the long startup time of Tomcat.


People do tend to only play in their own sandbox ... look at my naivety in the web-tier sandbox as exposed in this forum time and again since I showed up. I've never been in this neighborhood before!

For the last eight years of my life, I've worked for Panasonic in a very small R&D group of about 15 engineers. The following link might give a feel for the sandbox I live in. There is little to no web-tier. Last year we gave this core to the world, which I'm very proud of.

https://opendof.org/

One thing about the java silo/sandbox is I can bridge over to my neighbors PHP sandbox and **** in it. They can not do the same.



Hel O'Ween
Men On A Mission
#11 - 2016-07-19 17:09:54 UTC
Salgare wrote:

I worked at Novell during its hayday years, In 95 I came kicking and screaming from years of procedural C, at the time working on the Novel Directory Services (NDS). I got pulled from the C side and worked closely with Sun as they developed JNDI. I wrote java JNDI wrappers around NDS and LDAP at that time. I've been writing java ever since.


Novell ... oh, fond memories. Unfortunately our company went the AD route and dropped Novell back in the early 2000s. The Novell serevrs were a hell of a sturdy file/print server combo.

Fun fact: after a > 2 years continous uptime, I switch off our Novell 4 server by accident, when I pressed the power button instead of the eject button for the DAT tape (our backup). Oops. Wonder how long its uptime could have be without that.

EVEWalletAware - an offline wallet manager.

Salgare
Center for Advanced Studies
Gallente Federation
#12 - 2016-07-19 17:23:04 UTC
Serious question, as I try and understand your world. The tomcat/apache2 discussion highlights the question. tomcat is a simple application server which provides a servlet container. I think in posts here I've tried to liken this to a linux daemon, i.e. a background processes/application that is always running.

Perhaps mistakenly I'm viewing web-tier scripting languages to be limited to a streamed pipe environment where they get an inputstream (port 80) that they can apply complex filtering against to produce an output stream. I assume they are limited to a single thread, which they do not own and must do everything serial as they pipe from filter to filter. They are limited, static as it were to responding only to the stream.

With this single threaded filtered pipe stream, verses an open container, I'm wondering how PHP might be able to utilize RabbitMQ.

Side note, if you look way back at the history of Queue's (mailboxes), IBM led the way many moons ago with a queue I cannot remember the name of, which became the core Remote Procedure Call (RPC) mechanism between the WebSphere containers. JBOSS used the java open source java equivalent of Message Beans. Note containers can all live on the same box, or be split over several boxes (i.e. tiers).

Anyway, Queues have long been used for not only "mailboxing" purposes but also used to implement RPC request/reply type api's but also event/async push api's. It is these events that I'm wondering if we can leverage with PHP was well as request/reply api's?

For example, I can determine the crest endpoint is down (I use the Time endpoint as a heartbeat). So within 10 seconds of it going down, I can fire an event saying so. Same for the xml-api endpoint and for the DB (which could be on a different tier).

Can a PHP page, monitor for events and update with no other stream activity tickling the input stream pipe? I assume this might be were you utilize the likes for Cron jobs?



Salgare
Center for Advanced Studies
Gallente Federation
#13 - 2016-07-19 17:32:39 UTC  |  Edited by: Salgare
Hel O'Ween wrote:
Salgare wrote:

I worked at Novell during its hayday years, In 95 I came kicking and screaming from years of procedural C, at the time working on the Novel Directory Services (NDS). I got pulled from the C side and worked closely with Sun as they developed JNDI. I wrote java JNDI wrappers around NDS and LDAP at that time. I've been writing java ever since.


Novell ... oh, fond memories. Unfortunately our company went the AD route and dropped Novell back in the early 2000s. The Novell serevrs were a hell of a sturdy file/print server combo.

Fun fact: after a > 2 years continous uptime, I switch off our Novell 4 server by accident, when I pressed the power button instead of the eject button for the DAT tape (our backup). Oops. Wonder how long its uptime could have be without that.



lost my edit ...too lazy to retype ... the system is super sluggish for me today
Dragonaire
Here there be Dragons
#14 - 2016-07-19 19:56:16 UTC
Yep PHP is just a filterRoll Understand I'm not really into front-end user web design myself so this will probably be missing some things but should cover most of the things it does while being 'just a filter'


  • Browser connect to URL and web server hands over serialize string of headers, data, and other misc stuff as a request to PHP.
  • PHP tries to add a little order and break things up into actual useful information before starts up a front end controller(class) to continue on with processing the request.
  • The front end controller creates a request object(class) that it uses to exam URL to determine which of possible hundreds, but usually only a few dozen other back end controllers(also classes) that have been registered with it should be used to handle the request.
  • It pass off the request object to the back end where the request is usually farther processed to determine what other resources are need and do 'simple' things like connect to a database instance (local or remotely) to get data domain related objects need to 'filter' the request.
  • The back end controller than start assembling a response object(class) which may require on the fly generating things like catcha graphic if the request is for a page with a web form, collect other resources as need to fulfill the request, pass over part or all of the domain data to a templating system(class) to plug the data into a template. After managing the one to possible dozens of part need for the request it pass back the response object to the front end
  • the front end controller may do some additional processing before sending the simple 'filtered' stuff back to the web server having serialize all the headers into a nuch simpler form that the web server can understand.
  • the web server now has the easy job of bit banging back to the browser.


Of course it does all those things and sometimes more usually in the time span of a couple hundred milliseconds or less without the benefit of having been pre-processed before hand for several seconds (or minutes) into immediate code so it try to keep up Blink

BTW that does look like a cool project you were working on and I hope it takes off for you.

Here's a bit dated post I found comparing java vs something else for web apps you might find interesting. The answer by guy that went from Java to Python is really good I think. IMHO he'd been even better served by switching to PHP but it was still an improvement Blink

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Salgare
Center for Advanced Studies
Gallente Federation
#15 - 2016-07-19 21:02:45 UTC  |  Edited by: Salgare
What I was trying to get at with the simple filtered stream i/o pipe was an architectural patterns observation compared to the container pattern (big, heavy, slow, complex). Java's strength has never been and never will be in the view. The members of our lab that are into the web-apps are currently using nodejs (however some have gone with wicket). It's the old saying that if you are a hammer, everything looks like a nail. That's why I'm interesting in interfacing with php, python, nodejs etc. let them eat up the socket wrench, and I'll stay back here with the screwballs, umm I mean drivers.

Here is a project I did about a year ago when we were in a rush to open source what used to be called "emit" (now OpenDOF).

https://interface.opendof.org

OpenDOF uses xml to dynamically define/generate interfaces. Applications hit the above link and autogen the needed code to communicate to another peer. Kind of like old Skeletal/Stub Corba IDL if you are an old fart. Anyway, I did all of the "simple filtering" and everything else except the wicket gui/view on this project. There's a MySQL DB behind this one. Click those XML, Java and HTML views of the model being stored in the db. So yes I understand that the implementation is far from simple.

I'm still real interested, for this project, to know if php can do anything with asynchronous events, like cause a popup window. I assume it would not naturally (blocking serialization filters) care to utilize a subscribe to obtain endpoint data asynchronously, but with all the cool extensions, perhaps I wrong. This question is wondering about just spending the time on an api set for the PHPBridge (pulled blocking request/reply) or, with RabbitMQ support already provided, perhaps php applications can benefit from pushed data.

oh and, come join me, if it goes nowhere, I don't care I've been wanting/needing to learn this side of the fence for a long time, and what better than my favorite game!

See the new instructions in the crestj thread, seriously grab eclipse and come write some of the json/xml marshaling that lies ahead. A Great focused abstraction implementation that you do not need to know anything about the other clockwork to get your feet wet. Or jump on the DataAccessor implementations that lie ahead for getting api interfaces into the 88 or so static tables, or getting the needed application separation of the current persisted model .. try your hand at some jdbc coding.

The offer is open to anyone, I'll help ya learn my side. It's open source, no expectations of pay, so I don't care about ownership, come own some with me. Jump in and write the php queue/bridge side if you have no interest in java.

Let's consider how we might share the costs of a server and utilize existing and new apps with a common backend that handles the crap most don't want to deal with anyway.

It's a potential ... or it's my Wicket application framework for other projects.

I also think the quality/functionality rivals nodejs. I have a new version of that site in qa right now, it has oauth V1.0 authentication into jira (an f'ing nightmare) and cool ajax interfacing for google search for our totally dynamic webpages, there is not a static page in the site.

Wicket and this framework is still a great choice for standalone applications for those with no experience in web technologies.

fun stuff
Dragonaire
Here there be Dragons
#16 - 2016-07-20 15:38:22 UTC
So I'll say I did kind of miss what you were asking but I think I still indirectly answered it in part anyway but I'll try doing a better job here.
Quote:
Perhaps mistakenly I'm viewing web-tier scripting languages to be limited to a streamed pipe environment where they get an inputstream (port 80) that they can apply complex filtering against to produce an output stream.

Kind of. PHP does do much like a lot of Unix/Linux view the outside world as just a bunch of data stream the thing it doesn't just work with the ones it's give it actual spends more time making it own to DBs and other services then dealing with the original input stream. The input is just a request for something usually by way of a simple message of some form. That message take many forms from the URL being requested to form data sent in the POST or GET. Even the fact that it's a POST or a GET can be view as part of the message as well. In most cases this is the easy part figuring out what it is being asked for. How it fulfills the request is by far the most complex thing it does. Outputting the response is likewise usually a very minor part of what it does.

Quote:
I assume they are limited to a single thread, which they do not own and must do everything serial as they pipe from filter to filter. They are limited, static as it were to responding only to the stream.
sometimes. Some web server do use thread per connection and have PHP running within a single thread they start it in, others use a multiple thread per request model or in other ways use it with them that's why PHP has both thread safe and non-thread save versions. There are even some web servers that can switch or use a hybrid model and PHP can be used with them as well. PHP also has CLI version for non-web related stuff and testing and newer versions of PHP can be it's own web server as well for light weight local testing when even a local web server is just to much overhead. PHP even has everything it needs to make a full desktop application for that matter though most of the extensions aren't that well maintained as most people choose to view PHP through the very narrow view as just something you use to do web pages. My own projects Yapeal and Yapeal-ng are very atypical uses of PHP as a server side back end service / whatever you want to call it. Using it like this is becoming more common as site developers are pushing up against the limits of the only able to do stuff while the user is connected to web server. They have to choose between writing something in another language like Python, Java, or something else that has usually been used here or as more and more are doing just use PHP instead and be able to share their code base between both parts of what they are doing.

Personally right from the start I've seen PHP as a great general language that could replace all the nasty Perl and Bash scripting you usually see running around on Linux machines. A lot of people have gone with Python for these things now which is an improvement I agree but I feel that PHP development by focusing so much on the web missing have as much impact as it could have had as a more general cross-platform scripting/ system language. One of the reason I really love PHP is that it's usually installed on any Linux machine by default and on Windows its one short download, unzip, and maybe add a couple things to your path and your done. Installing Bash or Python or even Java for write new code is a lot harder to get setup.

I'll kind try summing up the middle part as this is already getting to be a long post again. Does PHP under stall RPC and all the other stuff? yes Anything that has been done especially in any way remotely web related PHP has built in or an extension you can use. Just taking a quick look at the RabbitMQ web site it looks like there are more tools to work with it in PHP than several of the other listed languages.

Quote:
Can a PHP page, monitor for events and update with no other stream activity tickling the input stream pipe? I assume this might be were you utilize the likes for Cron jobs?
Here I believe you are miss under stand the nature of all web -centric/mobile application development which is what most things are about any more not just for PHP but for most other languages used as well.Maybe you do know it as well but just aren't use to thinking about it since that wasn't part of what you have done. Most of the app is on the client side in their phones, pads or other mobile device as a actual app they download or through their browser where the web pages are designed to make it feel like they installed something. Which in many ways they might have since everything is being done through JS which makes the request back in forth to the server without any page loads. Notice that even though things are designed to make it seem like there's a constant connection between the client and site which has state in actually it's all over a stateless on and off connection where each connection might not even be with the same server each time but through a lot of really interesting 'magic' is made to seem like it is. Now like I said you probably know most of this but the part you are missing is the web server is not in control and really has no way to 'push' anything to the client and in most cases firewalls etc actively try to keep you from doing so. The client has to basically poll for updates and then the site can let it know about anything new but only if the client knows to ask for it. Just by the nature of how it all work there's no not anything really sitting around to receive push info from what you are doing. PHP or anything else can do the same thing the client does and poll your service but push is not something that is really useful since it's only active for a couple seconds at a time at most. Now something like Yapeal-ngcould but its easy just to use pull there as well.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Dragonaire
Here there be Dragons
#17 - 2016-07-20 16:44:56 UTC
Sorry ran out of space.Oops I need to spend more time on tweeter I guess so I can learn to be less long winded Big smile So basically what I was going to say is nothing is really around long enough for anything push related except if you set your push to act more like a client make request to other service.

Software as a service(SaaS) which I believe is what your basically talking about making sounds great but turns out to just not work well because its really trying to shoehorn an application way of doing stuff into the web and it's just not a good fit in most cases. That being said for some people which don't want to and believe they can't use SSO that is required with CREST they might very well find what you are making useful but for most anything web based with access to server side programming it will probably be less useful then a service that they run for themselves local. Now if you made something that is completely open source and PnP locally I can see a lot of people showing more interest in it but I kind of got the impress that was not what you had in mind.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Salgare
Center for Advanced Studies
Gallente Federation
#18 - 2016-07-20 17:58:27 UTC
Dragonaire,

Thank you for all of the information! I can see you are a good man. I don't quite know how to say this without being offensive.

I'm getting old, and I tire of my career but financially have to continue. Most people in other careers do not realize that software engineering is like continually working on a masters degree. The technology changes Soooo rapidly with many of them becoming obsolete about every 5 years. One must constantly be learning the new technologies and keeping up with the brilliant kids coming out of college every year.

As you web browse leading edge sites today, have you noticed that annoying popup ads are not really used anymore, you get streaming video etc constantly updating long after initial page loads instead? Often times some are ill behaved and lock up as they run your machine out of memory and everything starts paging to disk and brings your box to a screaming halt if you leave the page open for a long time.

Have you also noticed that these sites will be pushing out adds to something else you recently googled? It approaches a breach of personal space what google has done with crawlers and a technology called ajax.

check out the summary at the top here: http://www.w3schools.com/ajax/

The computer world has come full circle in several things. Years back the push was to keep the servers freed up and push the work to the client. In leading edge web technologies today everything is moving back to the server. Like the Wicket framework, its all about super dynamic webpages, of which google via ajax can index your dynamic data (images and all). The NodeJs framework, I assume Python frameworks and many others are using these DHTML, ajax etc. for totally server side instantiated content. Static pages are dead (well dying quickly).

The google search for PHP documentation is revealing to those that have done this for a long time, where you have 15 years of undated web hits following several generations of a technology, but the main download org site has basically zero documentation on the current release. To me, this is an indication of a legacy technology with a huge use base in existence. With everyone interested in keeping code releases coming to maintain their legacy implementations, but no interest in maintaining the documentation. Realize like mentioned above, many technologies become legacy every 5 years.

I do realize that PHP has a huge following and has for 20 years. But it's old school now, its not industry standard anymore and its far from leading edge, it's not where new commercial projects are going to go.

Of course this is a don't care for hobbyist programmers that have a real life and certainly is not a requirement for what we are doing here.
Dragonaire
Here there be Dragons
#19 - 2016-07-21 04:39:51 UTC
Everybody likes to say PHP is dead while it continues to run over 80% of all web site including new ones Blink What has really happened is it has become like Win PC nobody talks about it and only notice if you aren't using it like people will notice a Mac or Linux machine but ignore the dozen Win PCs in the same room.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Buliki
Publicly Owned Customs Offices
#20 - 2016-07-21 13:54:23 UTC  |  Edited by: Buliki
Now has somebody found a way to run PHP7 on Windows XP... ?

That would be interesting


Also I immediately tought about Yapeal when I read this: ;)

Dragonaire wrote:
But Steve some people like slow overly engineered solutions to their problems Blink
12Next page