Multithreading For Standalone Php
I'm trying to write a mutlithreading server with standalone PHP.
Concurrent requests is possible. Normally it is done by handling each
socket spawn by serversocket in separate threads. But it seems that
there is no thread support in PHP at all.
Would anyone give me some suggestions?
BTW, is the community considering add thread support to PHP in the
future? What is the major difficulty to import an existing thread
library (such as pthread library) into PHP
View Complete Forum Thread with Replies
Related Forum Messages:
PHP Multithreading
I've made a metasearch and I'm trying to make it so it will request multiple search engines at the same time. Is there a simple way PHP can request 2+ pages/downloads at the same time? A function?
View Replies !
Multithreading/Parallel Processing With PHP
I have googled this topic and I know this has been asked before, but there seems to be no good answer except "PHP doesn't support multi-threading" I am new to PHP so I might be using the wrong terminology. I have inherited support of php scripts that backup network gear via SNMP. They currently work fine, and outside of the lack of good overall program structure and flow, the scripts perform quite well. The script is back-ended by postgres, and when it executes, it grabs a list of device names from the database, gets the count of devices, then performs a while loop to back up every device - unelegant but effective. However, the amount of network gear that is being backed up is increasing, and I would like to "multithread" the script to backup more than one device at a time so that it doesn't take 45 + minutes to back up all of the switch gear. Is this possible with PHP? Personally I don't think so since PHP seems to be a "top-down" language, but maybe the gurus in this group could lend some insight. I have looked at the "tick" functions, but those don't seem to be a good fit.
View Replies !
Background Process/multithreading In PHP?
I use PHP for a user login application and it works fine. The problem is that another process should start up as soon as the user logs in and should keep on displaying different popup messages every 5 minutes. Is there a way I can implement this using PHP? Basically the idea is to get a background process running, thats it.
View Replies !
Emulating Multithreading To Send Mail To Different Servers At The Same Time
I'm trying to find a solution in order to be able to use more than one SMTP server at once with my newsletter application (written in PHP of course). The scenario is that we have 3 SMTP servers that we're using to send emails from. All of the emails are personalized (with name, surname, etc..). There's a command line script that cycles through the newsletters that have to be sent, looks up the individual email addresses and other data and then starts sending them out. At the moment it's just cycling through the three servers and using the phpmailer class to send the mail. What happens is that with every send, the script has to wait for the communication with the SMTP server to be done. This means that the other 2 servers in the meanwhile are just sitting there and waiting. I would like to use all three at the same time and sort of check which one is free and use it. That way, if one of the servers is already overwhelmed and is answering slowly, I can be sure that I am still using the other 2 efficiently.
View Replies !
Standalone Problem
I've set up PHP 4 with Apache on an intel/Redhat 6.2 linux box with no network interface. Using URL PHP code with the .php extension works fine, but php code in html documents does nothing. In fact, view source shows the php code on the browser.
View Replies !
Standalone Program
I'm going to be doing a program for an elderly couple who owns a horse ranch, and wants some software to keep track of all their horses, owners, doctors, etc. I'm going to be writing the program in PHP using a MySQL database. I set up one like this for my work and it runs off of Apache on our server. I need this program to be a stand-alone install, without installing MySQL, PHP, and Apache seperately. How could I go about integrating it all into one package?
View Replies !
Standalone PHP Installation
I have never installed PHP before. It's always been set up for me. I have a client whose site is hosted as a virtual server. I'm trying to set up ecom for him, but the mhash library is not installed. So I use fopen to open a script on my website that hashes the variables. Obviously, this is not ideal because if my site goes down his ecom will too. I asked the tech people at his hosting company to set that up, but they said they don't do custom compilations. "As per compiling PHP with --with-mhash=[DIR] this is how that works: any custom compilations, custom applications, etc. are up to the user to compile and install. Use gcc/etc. to compile PHP with the options that you like. The php.ini in /etc is available for your customization as well. If you compile your own binary of PHP, you can place it where you like (or leave it at the default) and get the paths updated to use it, or you can obviously use it directly if necessary." I was planning on compiling a new, minimalist version of PHP (with just mhash) in a different directory, but I'm hesitant to do it in case I get unexpected results (I don't want to take the rest of his site down). Can anyone tell me if this sounds feasible? What kind of pitfalls can I expect? And can anyone recommend a tutorial? Most of the tutorials I've found assume you have root access and/or are compiling PHP/Apache together. I was also wondering if it would be possible to just compile the mhash library and add it to php.ini? That seems to be the simplest thing, though I don't know if it would work...
View Replies !
Php Install Standalone
I need to install php like standalone. can somebody say me that way to install it like standalone on linux, with support for mysql, apache and oci8?
View Replies !
Standalone Sig Generator
I currently have my sig generator running, the problme Im facing is that it outputs like this http://mysite.com/image.php?sigimage.png I need to have it out put like this -> http://mysite.com/image.png?sigimage.png or something like it because a lot of sites do not allow image.php. Code:
View Replies !
Standalone Apps And Php
I have a project in mind for a library management system which I would like to try building with php/mysql. Are there any Delphi-like IDE apps out there that would do the job? Can the code be compiled into an executable?
View Replies !
Standalone Solution
I was asked to write a database solution for a friend.. it was supposed to do the normal add/retrieve/modify/search functions of a databse. i started with vb6 then decided to use php/sql. I might sound really dumb and ignorant but the question is... if i want to "package" this to him... how can i do this without having to personally go and install a webserver and php and sql and the rest so he can use it just through his web browser? can i use an installer that will allow it to be packaged so after the install he would just have to open the databsae through his browser?
View Replies !
PHP Standalone: Charset Setting
I'm simply using PHP as a programming language, and I just want to print some text information to stdout, but instruction print "é" (é) does not print my "e" with an accent in the shell window: wrong charset. How to set the correct charset?
View Replies !
Standalone DB (like Access) For PHP/Apache
I am in the process of translating an WIndows/ASP/MsSQL Content Managment System (CMS) to Linux/PHP/???. Is there a popular database I can use that will allow standalone files like Access did (which used .MDB files)? In order for the CMS to work, there needs to be a standalone database file that is self-contained, just like Access .mdb files are under Windows. I guess I am asking for an Access equivalent for Linux/Apache.
View Replies !
Standalone Executable File
I downloaded the tarball and while was able to compile within PHP with no problems, I am having memory timeout issues involving image manipulation with extremely large images (800K - 2mb). Requirements are to create thumbnails for even these banner-sized images, but PHP + GD + [huge image] = too much memory. I'm trying to prove that it is undoable, though the suggestion was to do a command-line GD call to the image instead of using the PHP functions to do so to save some memory; if it still times out, then it's undoable altogether. However, I cannot find the standalone executable file that will ensure I can run GD from the command line.
View Replies !
Submit Standalone Programs With Php
I'm building an application which submits scheduled php jobs. The way I would like it to work is to have one php program to submit the other php programs on a scheduled basis. This control program shouldn't have to wait until one job finishes before it can start the next one; instead, it should be able to submit all the jobs in one go, but it also needs to be able to be informed of the return codes of the submitted programs so dependent programs can be submitted too. I've looked at the exec() and system() commands, but they either don't seem to allow return codes to be returned from a submitted program to the submitter program or they unconditionally print anything the submitted programs produce.
View Replies !
Where Can I Find The GD Library Standalone Executable File?
I downloaded the tarball and while was able to compile within PHP with no problems, I am having memory timeout issues involving image manipulation with extremely large images (800K - 2mb). Requirements are to create thumbnails for even these banner-sized images, but PHP + GD + [huge image] = too much memory. I'm trying to prove that it is undoable, though the suggestion was to do a command-line GD call to the image instead of using the PHP functions to do so to save some memory; if it still times out, then it's undoable altogether. However, I cannot find the standalone executable file that will ensure I can run GD from the command line.
View Replies !
|