Jump to content

rklockner

Members
  • Posts

    48
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

rklockner's Achievements

Member

Member (2/5)

0

Reputation

  1. A friend of mine was able to clue me in, so I'd like to update with reason cURL wasn't working. SELinux. Once I disabled it, cURL worked fine. I hope this helps someone! EDIT: In the interest of the server being as secure as possible, a little research found that you can leave SELinux on, but run the following command to allow cURL traffic to pass through: setsebool -P httpd_can_network_connect on setsebool -P httpd_can_network_connect on
  2. I just tried running the following in the command line on the new server and received the expected result, so it would seem that the version of curl is working, but there is an error with php? $ curl google.com <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"><TITLE>301 Moved</TITLE></HEAD><BODY><H1>301 Moved</H1>The document has moved<A HREF="http://www.google.com/">here</A>.</BODY></HTML>
  3. Thanks for the quick reply. Doing a little research: Locally (working): 7.53.1 Centos 7 (woking): 7.29.0 Centos 8 (not working): 7.61.1 Since the new server is running a more recent version, I feel like upgrading won't do the trick...
  4. I have an integration with a third party that utilizes a SOAP API. On my current server AND my local environment, this works fine. I recently deployed a new server and it seems that cURL isn't doing anything. *The code is identical on all three installations. The "error" that I am seeing is no response at all (no response and no error, however, I can see that it is a "Resource"). After much trial and error, I tried creating a simple cURL example to test try to rule out other issues as the code itself is quite complex. My simple example, that also fails, is as follows: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "google.com"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); $err = curl_error($ch); print_r($err); echo $output; curl_close($ch); This does the same thing. On local, I get a "301 Moved" notice, on the new server, it is just a white screen. I have confirmed that php has curl installed in via command line (php -m) and using phpinfo(); in my code. It is definitely enabled. What would cause cURL to not have a response AND not have an error? My thought is a server setting, but I can't seem to find what might be causing this.
  5. I'm working on a project where a rate agreement needs to be signed. Right now our system emails the document, the person then prints/signs and faxes back (or scans/emails). I'd like to build a system like docusign, but I'm not sure what all needs to be done to make sure it would stand up in court. NOTE: The likelyhood of this going to court are slim to none, so I'm not overly concerned (the dollar amount of these agreements are quite low). I'm hoping that someone else has built something like this so I could take a short cut . Side note: I'm not sure this is the best place to post this, so please forgive me if it isn't... Thanks!
  6. Good thought, but I was holding back a twist. The 500 users are spread across three sub-domains (the one having the issue has roughly 60 of those users), the format is sub.domain.com. By typing www. to the front of the url actually sends you to an error page. Just for fun, I tried modifying the URL in different ways that are still valid, and it didn't log me out... Another side note, I use ajax to load each page into container div, so the entire page only loads on the initial log in (or when the page is refreshed), I use JS to update the url on a "new page load" like sub.domain.com/#new_page_name
  7. I don't have access to the location, so I can't really troubleshoot their location, however, I have told them that it is something in their office and to look into their firewall and anti-virus. As to JS not being enabled, the site his heavily js reliant. To the point that the homepage won't load unless JS is enabled.
  8. I have 500 users using software I have developed, and 495 do not have a timeout problem. Our default is to timeout after 60 minutes, but one particular office times out randomly and without warning. The normal procedure is, like online banking, a pop up comes up to let them know they will be logged out in 60 seconds, or they can click continue to stay logged in. The timer is based on JS, but on each page load a PHP function checks to see if they are timed out, and if they are, redirect them to the login page. The JS pop up never occurs, so obviously the countdown hasn't happened, but when they click on a link, they are redirected to the login page. Since the issue only occurs in one office, it leads me to believe it is a firewall or anti-virus issue, but I'm not sure... Anyone have any thoughts on this?
  9. I should also note that "foo" may, or may not, have quotes around it.
  10. I'm trying to search a string for all occurences of a pattern, then append text after that pattern. The example is: SUM("foo") as "bar" and have it display as: SUM("foo") over() as "bar" The "SUM" could be any SQL aggregate and be case insensitive. So For bonus points, let's say the valid aggregates are array('SUM', 'MAX', 'MIN', 'AVG'). My plan right now is to figure it out for SUM, then loop it replacing the aggregate. This is what I have so far... and it is not working. $l= 'SUM("foo") as "bar"'; $l=preg_replace('/([^"]+")/','\0 over()',$l); Thanks, Ryan
  11. Here goes my sheepish response... The tiff file I was using for testing had something wrong with it. Once I figured this out, getimagesize() worked which made me decide to give finfo a try again, and it also worked, so I switched it back to that. Thanks for the hints!
  12. I have a scenario where users are downloading files from a legacy system and uploading the files into a new system that I am supporting. Many of the files do not have an extension (most are tiffs). The issue we have is that the new system doesn't know how to open these files (we have them open in a preview window in the new system). I have tried numerous solutions, including finfo_file() and the depreciated mime_content_type() funcitons), but all they seem to return is "application/octet-stream". Thanks.
  13. I'm trying to pull emails off an Exchange server but keep coming up with errors. The imap_open command is below: $imap = imap_open("{edison.myserver.com:995/pop3/ssl/novalidate-cert}INBOX", $imap_user, $imap_pass) or die(print_r(imap_errors()) ); NOTE: I have been successful downloading emails in this manner from a non-Exchange server. NOTE 2: I have tried many combinations of the second half of the host (from the port number on) The errors vary slightly, but... Array ( [0] => Can't connect to edison.myserver.com,143: Timed out (10060) [1] => Can't open mailbox {edison.myserver.com:993/pop3/ssl/novalidate-cert}INBOX: invalid remote specification ) I have searched for the last couple hours but have only found threads with false answers or no answers at all. Does anyone have an answer? Thanks,
  14. I have a site that contains an internal messaging system. I've had users complain that they lost a message they were typing because the navigated away from the page. When this occurs, I'd like to display a custom popup box that I have built (with options, Save, Delete, and Cancel). If save is clicked, it would save a draft then continue to the link the user clicked. If Delete is clicked, it would not save a draft, then continue to the link. If Cancel is clicked, it would go back to the message and allow the user to continue typing. I've played with this option, but it displays the default alert option box. Not desireable. window.onbeforeunload = saveCurrentMessage; My only other thought is to do something like $('a').click(function(){ //cancel the href/onclick from the tag and store in a variable. //display my box. //depending on what the user clicks, Save/Delete would take that action then fire the href and/or onclick, Cancel would just cancel }); NOTE: I don't want to change the a tags on any other page than this, so modifying every link is not an option. Has anyone done this or have any thoughts in this direction? Thanks, Ryan
  15. Here is my theory. It isn't all worked out, but it will give an idea. Each company has a file that contains all custom code (we'll call it customizations.php). In this file, it will be a large case statement that will have the custom code. Each company has a companyId (in config). Like... BEGIN CONFIG: $customerId = 10000; END CONFIG BEGIN test.php: ...some code before... $customCode = 'test.php-'.$customerId.'-1'; include("customizations.php"); ...some code after... END test.php BEGIN customizations.php: switch($customCode) { case 'test.php-10000-1': echo 'Run this code!'; break; default: //Do Nothing break; } END customizations.php The idea is that I want to try and add in some additional checks to see if the custom code is being run from (1) the intended page, (2) the intended company, and (3) a unique identifier in case multiple lines need to be run. Thoughts?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.