I have a php exec command that calls curl at the prompt in an eternal php file... works great. Inside of modx - the exec call doesn't seem to be executing... ideas?
-
- 4 Posts
I just went in to change my copyright to 2014 in my address "chunk" at bottom of every page on our site and the type went black (supposed to reverse white). Can anybody help me out? (Yes, I rarely make modifications in modx). Thanks!
Sounds like an html/css issue not a modx issue.
-
- 24,544 Posts
-
- 24,544 Posts
BTW, why are you using exec() rather than just calling cURL directly from PHP?
http://php.net/manual/en/book.curl.php
MODX should have nothing to do with the behavior of an exec() call, and $modx->exec() is not the same thing at all—that is a proxy for the PDO->exec() method, not the global exec() function in PHP.
ok - my dilemma is that exec() works in an external php file - but not from within modx. The snippet is being called uncached as well. The reason for this is we are calling curl at the local command prompt instead of php - to achieve some level of multithreading. Its just a local network analytics call. The issue with opening it in php is its adding a 500ms overhead to the page rendering time. Still fast - but not fast enough for my client. The issue is that php waits to make the connection with curl at the very least. I have it ignoring and not waiting for output - but its still a performance hit. Versus - if I call curl at the command prompt - it just issues the command to the system and the page keeps loading. There is no performance hit.
What if you make it an AJAX call? No page load time at all...
-
- 24,544 Posts
Quote from: opengeek at Aug 22, 2014, 01:03 PM$modx->exec() is not the same thing at all—that is a proxy for the PDO->exec() method, not the global exec() function in PHP.
Duh. Sorry, asleep at the switch.