[PHP] Warning: exec(): Unable to fork
Hi, I curretly running: PHP 4.3.4 on a windows XP with IIS, This is the first time developed using a windows platform (normally I use apache on linux), but I'm trying to run ImageMagick in the background to resize an image, as a test I'm trying to run the cmd shell, using exec (I've tried system, exec, passthru), yet they all give this error: Warning: exec(): Unable to fork [C:\WINNT\SYSTEM32\CMD.EXE /?] in index.php on line 45 From googleing this would seem a windows specfic problem, but as of yet I have not found an answer, it seems pretty common on windows. Has anyone else managed to get around this yet? or can advise on what the error could be due to? Thanks Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Forcing Mac's to show download box, rather than inline
Hi, I'm trying to server an image(s) up from a php script, this script, checks for the image and then outputs the required header types, I'm trying to get the browsers to download the requested image (when they click the link), rather than display inline. I've got it working on both Mozilla and IE, perfectly, but on the mac's on both Safari and IE it displays the image inline. I'm pretty sure it has to do with the: Content-Disposition: or Content-type: I'm currenntly using: header(Pragma: public); header(Expires: 0); header(Cache-Control: must-revalidate, post-check=0, pre-check=0 header('Content-type: application/octet-stream'); header( Content-Disposition: attachment; filename=somefile.jpg ); header(Content-Length: .filesize(somefile.jpg)); Coulod anyone advise me on what I would need to add/edit to get the mac to do this, I have no problem, outputting different header details, for differnt OS or brower from the user agent string.. This as mentioned works ok for Mozilla and IE (not yet tested in in konqueror or Opera) Thanks in advance -- Ever mind The Rule of Three Three times what thou givest returns to thee. This lesson well, thou must learn, Thee only gets what thou dost earn! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forcing Mac's to show download box, rather than inline
Once upon a time Mark C was quoted as saying: Hi, I'm trying to server an image(s) up from a php script, this script, checks for the image and then outputs the required header types, I'm trying to get the browsers to download the requested image (when they click the link), rather than display inline. I've got it working on both Mozilla and IE, perfectly, but on the mac's on both Safari and IE it displays the image inline. ok, a little update, using the headers below, it opens a download as for all the browsers on both Mac/Linux/win header(Pragma: public); header(Expires: 0); header(Cache-Control: must-revalidate, post-check=0, pre-check=0); header('Content-type: image/jpg'); header(Content-Type: application/octet-stream); header(Content-Type: application/force-download); header(Content-Disposition: attachment; filename=.$imageName); header(Content-Length: .filesize($imageName)); readfile($imageName); except (there had to be one), as usuall IE fails to do what it is told, on the Mac only using the code it tries to download an unkown filefile, of extension application/force-download. I've tried moving the headers around, removing the application/force-download, but these headers are the only ones that will for IE on both win and Mac to download rather than display it inline. Also on IE in Mac, it's ignoring the filename being sent and saves it as the script name (again all other browsers do as required). The file once downloaded can be renamed, and works fine. whilst this is fine for me, the avaerage person who will be using the site once finished, probally will not even know how to rename files, so it has to save it correctly. Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] tiff to pdf conversion
Once upon a time Jason Wong was quoted as saying: On Friday 02 April 2004 16:39, Brent Clark wrote: anyone know of a quick way to convert a tiff file to a pdf format file. I was thinking of a shell script. you could give ImageMagick a try, i.e convert somefile.tif somefile.pdf http://www.imagemagick.org/ Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] writing a newsletter program in php?
Hi, I'm new to php (ok new, try 3 days ;), althought, I'm finding it fun, I 'm trying to think of a project to do, to get me more into it. And after having a discussion with a friend and also setting up several Mailman mailing lists for people that want to compose HTML mails and post them as newsletters, it got me thinking, would I be able to create a similar program to mailman in php? So admins just login to the list. copy and past the html into a text box and php then renders it for a preview, then if they like it, they click send, this send queries the database and sends it to all the people list to receive mail on that list. I would assume that the sending could be handed off somehow to sendmail/postfix? The list front end would also hold list preferances as well, for subscribers and admins, basically I want to mimik Mailman, but in php and be able to render previews of mails first, basically it will be a newsletter program, rather than a mailing list one, which is where Mailman falls over. Cheers Mark -- To steal ideas from one person is plagiarism; to steal from many is research. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php