Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17984

Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception?

From Arno Welzel <usenet@arnowelzel.de>
Newsgroups comp.lang.php
Subject Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception?
Date 2019-06-12 17:12 +0200
Message-ID <gmcj37F2i7rU1@mid.individual.net> (permalink)
References <1o3z8vwk6x9am$.54ia46ki18ga$.dlg@40tude.net> <gmblsaFqtr4U1@mid.individual.net> <1gazo807tr0ns.11mjjbvt58nuo$.dlg@40tude.net> <10oewlg9578xy$.s8pgkwjte4bv.dlg@40tude.net>

Show all headers | View raw


On 12.06.19 16:51, JJ wrote:

[...]
> So, because the command line and Apache module versions behave differently,
> I could only suspect that the Apache module version is either not configured
> properly, or it has a bug in its implementation.

Yes, this would not be unusual. It would never recommend using PHP as an
Apache module anyway. You may gain speed since PHP as an external CGI
handler has to be started with every request - but even in Windows it is
possible to use PPH-FPM if performance is an issue:

<https://www.orbitale.io/2017/11/11/apache-and-php-fpm-in-windows.html>

But first I would configure PHP as CGI - just to avoid the issues with
the Apache module. For example if PHP is in c:\php the minimum required
options in Apache would be to enable "mod_alias" and then use this:

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

Also see <https://httpd.apache.org/docs/2.4/mod/mod_alias.html#scriptalias>

If this works, you can try to set up PHP as FPM as a next step. This
should increase performance significantly, since PHP will run as a
service besides Apache and does not have to start as a CGI process with
every single request.

> FYI, this is the Apache's `httpd.conf` file.
[...]
> https://pastebin.com/R7TgnkEf
[...]
> https://pastebin.com/d3Hdmut9

If you want to remove the PHP module and use PHP as CGI as described
above, comment out these lines:

LoadFile "/xampp/php/php7ts.dll"
LoadFile "/xampp/php/libpq.dll"
LoadModule php7_module "/xampp/php/php7apache2_4.dll"


<FilesMatch "\.php$">
    SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
    SetHandler application/x-httpd-php-source
</FilesMatch>



-- 
Arno Welzel
https://arnowelzel.de

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-05 10:45 +0700
  Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? "J.O. Aho" <user@example.net> - 2019-06-05 06:54 +0200
    Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-06 18:55 +0700
      Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-06 18:52 +0200
        Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-07 19:10 +0700
          Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-07 15:26 +0200
            Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-08 13:15 +0700
              Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-08 13:35 +0700
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Jerry Stuckle <jstucklex@attglobal.net> - 2019-06-08 11:58 -0400
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-09 08:46 +0700
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Jerry Stuckle <jstucklex@attglobal.net> - 2019-06-09 22:10 -0400
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Jerry Stuckle <jstucklex@attglobal.net> - 2019-06-09 22:13 -0400
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-10 20:42 +0700
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Jerry Stuckle <jstucklex@attglobal.net> - 2019-06-11 13:15 -0400
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-12 05:51 +0700
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Jerry Stuckle <jstucklex@attglobal.net> - 2019-06-12 10:37 -0400
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-12 22:11 +0700
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-11 18:24 +0200
              Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-08 13:20 +0200
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-09 09:08 +0700
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Jerry Stuckle <jstucklex@attglobal.net> - 2019-06-09 22:12 -0400
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-11 18:05 +0200
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Luuk <luuk@invalid.lan> - 2019-06-11 20:19 +0200
            Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-08 13:19 +0700
              Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-08 13:37 +0700
              Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Luuk <luuk@invalid.lan> - 2019-06-09 09:41 +0200
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-10 20:32 +0700
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Luuk <luuk@invalid.lan> - 2019-06-10 16:34 +0200
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Luuk <luuk@invalid.lan> - 2019-06-10 16:38 +0200
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Luuk <luuk@invalid.lan> - 2019-06-10 16:57 +0200
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-11 12:42 +0700
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Luuk <luuk@invalid.lan> - 2019-06-11 08:18 +0200
                Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-12 05:51 +0700
  Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-05 21:35 +0200
  Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Arno Welzel <usenet@arnowelzel.de> - 2019-06-12 08:54 +0200
    Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-12 18:07 +0700
      Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-12 21:51 +0700
        Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Arno Welzel <usenet@arnowelzel.de> - 2019-06-12 17:12 +0200
          Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? JJ <jj4public@vfemail.net> - 2019-06-13 00:12 +0700
      Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Arno Welzel <usenet@arnowelzel.de> - 2019-06-12 16:59 +0200
    Re: How to handle curl_exec() so that it won't terminat my script abruptly without any exception? Luuk <luuk@invalid.lan> - 2019-06-12 22:25 +0200

csiph-web