Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Necuima last won the day on June 13 2017

Necuima had the most liked content!

Community Reputation

15 Good

About Necuima

  • Rank
    Advanced Member

Recent Profile Visitors

1004 profile views
  1. It's OK - I tried \Stripe\Charge:: etc and that did not give the error. But now I have another error which seems to be associated with an SSL certificate. As mentioned I am trying to test this on localhost which, in my case, does not have an SSL certificate. I understood from a previous query on Stripe that I could test this from localhost without my XAMPP/Apache having an SSL certificate. Have I mis-understood this? The beginning of the error is: "An error occurred in script 'C:\xampp\htdocs\DMChat\modules\process_payment.php' on line 213: Stripe\Error\ApiConnection Object ( [message:protected] => Unexpected error communicating with Stripe. If this problem persists, let us know at support@stripe.com. (Network error [errno 77]: error setting certificate verify ..............." This was from the catch block: catch (Exception $e) { // Try block failed somewhere else. trigger_error(print_r($e, 1)); } Again, your advice will be most appreciated, Necuima P.S., you can probably figure out that I am using your model/view/controller approach from the advanced book :-)
  2. Hi Larry, I am trying to use Stripe from my localhost and have established a test account with Stripe Australia. I am getting error "Class 'Stripe\Stripe_Charge' not found in .....on line 182 - I am on page 508 in the book. I have Stack-Overflowed and tried their solutions but none work. I am not able to use composer as I'm using PHP 5.5.3 on Windows 7 so I did the manual download and as far as I can tell all that is OK. Again, any advice will be most appreciated. Cheers, Necuima
  3. It's OK, I've found the issue. As my design does not follow yours exactly I need to add the additional data to the $_POST/form via hidden elements. Sorry to have bothered you. Necuima
  4. Hi Larry, I am trying to use STRIPE for the first time. I have set up a test account and that seems to be OK. I am adapting your form in billing.html but in a PHP script. The validation of my data via the ajax call to Stripe is OK as I am able to submit the form but when I check what data are received by my adaptation of your billing.php I can see the posted token but no form data. My form is attached. Can you see what I am doing wrong please? Thanks, Necuima
  5. I checked with the PHP manual and from PHP 7.2 the return from session_write_close() is a Boolean rather than a void. Might this require an update to the session code in the book? I tried just adding $rc = session_write_close() but I'm still getting the error. Thanks, Necuima
  6. Hi Larry, I have been using your database session handler for quite some time now in my Windows 7 environment but have run into a problem when I try to use it in a new PC set up with Windows 10 and Apache/PHP 7.3.7 (64 bit). I keep getting an error: "An error occurred in script 'C:\xampp\htdocs\....php' on line 53: session_write_close(): Session callback expects true/false return value" and I am getting this error everywhere that I have used 'session_write_close()' as per page 95 of the book (that's in dozens of places). Is it perhaps not needed in Win 10 with a fairly current Apache/PHP install? Or do I need to code it differently? Any advice will be most appreciated and thanks in anticipation.
  7. The backup and restore functionality is in Larry's book "PHP 5 Advanced", Chapter 10.
  8. I had the same problem and I found that I had the BASE_URL set incorrectly in module config.inc.php Once I fixed that the activation script ran OK.
  9. In case you need to have both C++/Magick++ and Imagick on your PC (localhost), after much trial and error I found, with thanks to those who posted the guidances and data following, how to install it correctly. My environment is Windows 10 with the latest 64bit XAMPP from: https://www.apachefriends.org/download.html I installed XAMPP/PHP version 7.3.7. My development environment in this case is Visual Studio 2019 and Dreamweaver CS6. The primary guidance is from: https://herbmiller.me/installing-imagick-php-7/ with many thanks to this gentleman. But if you follow this exactly you will not have C++/Magick++ available. Regarding compatible Imagick dlls and ImageMagick versions, see also: https://mlocati.github.io/articles/php-windows-imagick.html with thanks to Michele. But again, the ImageMagick zips will not give you the C++/Magick++ headers or sub-directories. For that you need to do the ImageMagick install from an exe and you can get this from: https://ftp.icm.edu.pl/packages/ImageMagick/binaries/ with many thanks to that institution. You need to select the C and C++ headers option as well as the legacy option during the installation. You need to be extremely careful to install the correct/compatible versions in all cases as advised in Herb Miller's post. By following this guidance exactly I managed to get one installation of ImageMagick with the PHP/Imagick and Magick++ functionality available. Cheers
  10. The MFC form does not use .NET whereas the VS2015/19 standard form constructs use .NET and that was what was preventing the cpprestsdk (Casablanca) communication with the back-end server on localhost. At least that is how I understand it. Again, just FYI. Cheers
  11. Hi Larry, back in April I was looking for a way for a C++ front-end to 'communicate' with a PHP back-end with all functionality being on one PC? I.e., the implementation of PHP in my case would be via XAMPP. On April 21st I reported that I had tried to use cpprestsdk (Casablanca) with a Windows Form via Visual Studio but that did not work. But today I managed to get the functionality to work perfectly by developing the form with Microsoft Foundation Classes (MFC) which I had never used before :-) That took over 2 months - just as well that I am retired and have the time (and perseverance :-) The IDE was VS2015/19 Community Editions. Just FYI, Cheers
  12. Hi Larry, Thanks as always for your interest and advice. As an aside I had not used FLEX/WindowedApplication for a few years so I was a bit rusty but all OK again now. Referred to your FLEX and AIR books both of which I have. I now have the application working just fine on both Win7/PHP 5.6 and on a separate computer with Win 10 and PHP 7.1 Cheers from Oz, Necuima
  13. P.S., The Flash program is a windowed FLEX application and as mentioned, this works perfectly with the called PHP scripts on XAMPP.
  14. Hi Larry, I am missing something. I select a file or a directory on my PC in a PHP script which includes an HTML form and within the form I use upload. Then on the redux pass I can move that file to a server location and do some stuff with it. No problem. But what I want to do is do some stuff to the file on the PC which I can do if I know the full path of the selected file. And in a slightly different PHP script I want to select a directory on my PC and get its full path so that I can then iterate over the files therein and do stuff to them. What am I missing? And thank you as always. Cheers P.S., using a C++ front end or a Flash front-end program I can get the full path names of files and directories on my PC. Then, at least the Flash case, I can pass those data to a PHP back-end which nicely does what I want it to do for those selected files on my PC. I do not want this functionality for files on an external web-server.
  15. Hi Larry, FYI I installed cpprestsdk and associated it with Visual Studio 2019 and yes, a test C++ program successfully called and received a response from an external website. BUT (isn't there often a BUT) when I tried to integrate the code that uses cpprestsdk into a Windows form application, I found out that they are incompatible! Well, it was an interesting learning exercise :-) As an aside, I found it quite tricky to install cpprestsdk but carefully following guidance courtesy Dr Google I eventually managed to get it installed and working with VS2019 (but not VS2017) in a Windows 10 PC. Thanks for your interest.
  • Create New...