Jump to content
Larry Ullman's Book Forums

Necuima

Members
  • Posts

    359
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Necuima

  1. Hi, On page 49 instructions are given for the setting up of the BASE_URI constant for both a development environment and a production environment. In my production site, I have access to a folder named httpdocs within which is the opening index.php script. To get to this httpdocs folder I use the site IP address or to start the website I use the www.... site URL. Can you please advise exactly what I need to put in the production BASE_URI constant? Many thanks in anticipation.
  2. Thanks for the update - much appreciated. You make interesting comments to which I can relate. All my career I struggled with the work-life balance and also the tension within me between my managerial role and my technical passion. Luckily I worked for an American multi-national corporation and a couple of times they made career adjustments for me and they were very supportive when I became seriously ill at one stage. So good luck with getting the balance right! Great to hear that Stripe is coming to Oz! Best wishes, Eric.
  3. I don't know the exact cause of your symptom but I see that you have back-slashes in the URI definition and a forward slash in the URL definition. Also, you have a comma in the MYSQL definition between MySQL and inc - that should be a period. Hope it helps.
  4. Hi, re books, I have found the "Missing Manual" series of books very good to get coverage of areas which Larry has not (maybe yet) covered though most of my learning has come from Larry's books and working through all the code examples and then developing applications that I wanted to try. From my perspective as a retiree having worked in IT for over 40 years, yes, try to do what you enjoy doing most and persist, persist, persist. And keep learning. And yes, you can always change course if your initial choice(s) don't turn out as you expected. A huge asset in any career is a competent mentor - you may find that one comes along as you traverse your career path. Also try and develop a network of associates - in my experience you can often achieve an objective through your network that maybe you can't do through other means. Good luck in your endeavours.
  5. Hi Larry, Thanks for the feedback. I must admit that being able to eventually find out what the issue was is most gratifying - one can still learn stuff as a septuagenarian:-) It seemed that I was close as the application ran perfectly within the FlashBuilder 'run' framework so it had to be something to do with the export build process (and it was). I was considering giving up as my head was getting sore from those brick walls but I thought that I'd give it one more try and that try led to the solution. FYI your 2nd edition E-Commerce book arrived in the mail yesterday and I'm keen to read about Stripe payments! I trust that things are going well for you with them. Best wishes from Oz.
  6. Eureka!!! Got it. Found the answer on another forum. You have to export-build the app as a 'signed native installer', not a 'signed AIR package'. Halleluiah!!
  7. I am about to give up on this one! It's a bit like bashing your head against a brick wall - it's nice when you stop!! Bottom line: the SDK, either within FlashBuilder or in stand-alone mode (per Larry's FLEX book page 31)just won't let you package the application into an air file with an 'extendedDesktop' (only) supported profile, though this profile works perfectly within FlashBuilder's 'run' facility. And if you use the 'desktop' supported profile it packages OK but then the application just hangs upon execution! (And it does not run within the FlashBuilder 'run' facility). It's a bit like being between a rock and a hard place! But for anyone who looked at this and thought about it - Thanks! Cheers from Oz.
  8. You know me - I keep trying to unravel this mystery!! I am beginning to think that this is nothing to do with event listeners but with configuration. The Adobe website which discusses native process says that, inter alia, you need to have the 'supported profiles' value in the -app.xml file set as 'extendedDesktop' - see an earlier post above. If you do this, the program runs perfectly within FlashBuilder using the CTRL+F11 'run' facility. Now here's the BUT: if you try and export build with that supported profile, you get an error message listing the profiles it supports but 'extendedDesktop' is not one of them - 'desktop' is. I had the supported profile set as both 'extendDedsktop' and 'desktop' and this export-builds OK and will convert to an executable OK with AIR 3.1 and 3.9. (FlashBuilder 4.6 says that it needs 3.1 so I downloaded that but that gave the same 'hanging' run condition). A check of the Windows event logs does not reveal anything to do with the execution of the .exe file, and as mentioned before, it is not using any CPU so does not appear to be in a loop. I have scoured the web and came across what appeared to be a similar issue and the author used the native adt packaging from the AIR sdk. I tried this too but still get the support profiles error. (I just packaged up the mxml, -app.xml and the swf files from FlashBuilder - maybe that's not the way to do it). I tried both the current 3.9 and the 3.1 AIR sdks but get the same error with both sdks. Again, if anyone has any suggestions, I will welcome them, and thanks in anticipation. Cheers from Oz.
  9. Hi Larry, Have made a little progress but still not there yet! Our daughter has FlashBuilder 4.6 so I tried that. In 4.6 I don't need to 'meddle' with the 4.6 SDK and I can now both run a native process with FB's CTRL+F11 and also build it OK for regular execution. But (there's still those buts!!) even though the app runs perfectly within FB using the CTRL+F11 approach, the app just 'hangs' when I try to execute it from its AIR-installed exe. The execution starts just fine but once the Image Magick native process is started the app just hangs. It does not appear to be in a loop as the process is not using any CPU so it looks like some other factor is making it 'hang'. I have event listeners for all the events that appear to be supported by the native process functionality. Do you have any advice on how to debug this? Any thoughts will be most appreciated. Cheers from Oz.
  10. Thanks, Larry, I will check it out. Cheers from Oz.
  11. Hi, I am going over a few of the exercises in the AIR book, this time within Dreamweaver CS5. When I try script 13.2 which references a file in the old dmcinsights URL, I get a whole lot of text. Is the ch13data.txt file available elsewhere now? Thanks, and Cheers from Oz.
  12. But there's often a BUT!! It runs happily within FlashBuilder using CTRL+F11 BUT it won't let you create an air file!! The creation process starts normally but then seems to go into a loop! I also got an Image Magick native process to work but only within FlashBuilder using CTRL+F11. I have spent a lot of time on this and have pretty much achieved my objective which was to see if I could get a NativeProcess to work within Flex/ActionScript3, which it sort of does:-) Comments will be appreciated and thanks in anticipation, Cheers from Oz.
  13. Hi Larry, Firstly thanks for getting back to me - we hope and trust that you and your family had a 'Merry Christmas' and we extend our best wishes to you all for 2014. Re the NativeProcess test - after following up your lead, Googling a lot, and quite a bit of trial and error, I found that the following does not give errors and does indeed enable the test to be run. The test needs the Flex 4.6 (or presumably greater) SDK. Then, I downloaded the AIR 2.x SDK. In that I found the file Adobe AIR.dll (size 20504Kb). I replaced the dll in the 4.6 SDK with the dll from the AIR SDK above. Then I added the following to the xx-app.xml file: <supportedProfiles>extendedDesktop</supportedProfiles> <versionNumber>1</versionNumber> And then the test ran!! The version number requirement taught me to read error messages very carefully!! As at first I thought there was something wrong with the application version designator but after reading the complier error message a few more times I added the versionNumber code and voila that was the last missing piece in the jigsaw. Posted here in case someone else is mad enough to want to try this! Now I will try and get a NativeProcess to actually run!! I'll let you know in due course. Cheers from Oz.
  14. Hi, I'm trying to test if NativeProcess is supported in my installation. My environment is: . Windows 7 Home Premium 64 bit . Internet Explorer 10 . Firefox 22.0 . Dreamweaver CS5 as the text editor . Flex 4 via FlashBuilder 4 . XAMPP for Windows 1.8.3 which comprises: .. Apache 2.4.4 .. PHP 5.5.3 .. MySQL 5.6.11 .. phpMyAdmin 4.0.4 FlashBuilder gives me the following error: 'Access of undefined property NativeProcess' <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="" xmlns:mx="" width="850" height="500" creationComplete = "onCreationComplete()"> <fx:Script> <![CDATA[ import flash.events.Event; import flash.desktop.NativeProcess; import flash.desktop.NativeProcessStartupInfo; import flash.events.NativeProcessExitEvent; import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; private function onCreationComplete():void { processingStatus.text = 'Awaiting start of the test'; } private function doTest(): void { if (NativeProcess.isSupported) { processingStatus.text = 'Native Process Is Supported'; } else { processingStatus.text = 'Native Process Is Not Supported'; } } // end doTest function ]]> </fx:Script> <mx:Form x="42" y="48"> <s:Label color="blue" fontSize="20" fontWeight="bold" text=" NATIVE PROCESS TEST"/> <s:Label width="5" height="5" text=""/> <!-- just to put a space between the two displays --> <s:Button id="resizerButton" label="Click to Start The Test" click="doTest()"/> <s:Label width="5" height="5" text=""/> <!-- just to put a space between the two displays --> <mx:FormItem label="Processing status is:" fontWeight="bold"> <s:Label id="processingStatus" fontSize="12" fontWeight="bold" color="red"/> </mx:FormItem> </mx:Form> </s:WindowedApplication> If anyone can give me some insights as to why this error is occurring and, if possible, how to overcome it, this will be most appreciated. And many thanks in anticipation, Cheers from Oz.
  15. It looks like I don't have to do anything with the XAMPP/Apache control files. It seems that all I need to do is to create a new directory named sub.sitename within the htdocs directory on the server. I have tried this and it seems to be quite accessible via http://localhost/sub.sitename which has its own index.php file within it. If anyone has any further thoughts on this I'd welcome them. Thanks, and Cheers from Oz, Necuima.
  16. Hi, As discussed in the book, I have XAMPP running on my development PC (full configuration is below). In the xampp/htdocs directory on the server I have quite a few different websites which I can run using http://localhost/sitename/ where index.php is within the sitename directory structure in each case. I want to set up a sub-domain within one of these applications so I'm trying to achieve http://localhost/sub.sitename, again, that sub-domain would have its own index.php script. All the examples that I have been able to find on the 'net give directions for setting up http://sub.localhost not http://localhost/sub.sitename. Can anyone please give me guidance on exactly what to put in the httpd-vhosts.conf file to achieve what I'm trying to achieve? And also exactly what to put in the windows hosts file? And is this the way to achieve what I'm trying to? Any guidance will be most appreciated, and thank you in anticipation. My environment is: . Windows 7 Home Premium 64 bit . Internet Explorer 10 . Firefox 22.0 . Dreamweaver CS5 as the text editor . XAMPP for Windows 1.8.3 which comprises: .. Apache 2.4.4 .. PHP 5.5.3 .. MySQL 5.6.11 .. phpMyAdmin 4.0.4
  17. Hi, I found that the problem was totally unrelated to the issue described above - somehow my css file was empty! Sorry to have bothered you. Cheers from Oz.
  18. Hi HartleySan, Within the highest level directory for the site I have: blog css both directories. Within the blog directory I have a script index.php. Here's its code: <?php // this is the blog page require_once ('../get_dbc.php'); // establish the connection to the database $page_title = "Screen Title"; require ('./blog_header.htm'); // this includes the opening <head> and closing </head> statements require ('./blog_header_data.htm'); // common header data - this includes the opening <body> tag ?> As mentioned above, ./blog_header.htm gets included OK (I can see that from debug). Then ./blog_header.htm tries to include some css from the css directory as follows: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- saved from url=(0014)about:internet --> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title><?php echo $page_title; ?></title> <link rel="stylesheet" type="text/css" href="../css/filename.css" media="screen" /> <link rel="stylesheet" type="text/css" href="./blog.css" media="screen" /> etc... You can see that the include for the css file has the ../ start so I was assuming that it would go up one directory level then go to the css directory to include the filename.css css. But when I look at it with (IE10) debug, the css file is not included and the code shows only one period - i.e. ./css/filename.css - somehow the two period control gets ignored. Again, any guidance will be most appreciated. Thanks from Oz, Necuima.
  19. Hi, On page 90 of the book, guidance is given on relative file referencing. I am currently trying to work out why a file reference that I am trying to use does not work. Here's the scenario: The highest level directory contains a sub-directory named css and also one called blog. In the blog directory I have several scripts. Let's start with the index.php script (within the blog directory). It includes a file './blog_header.htm' which gets included OK. But './blog_header.htm' then tries to include a css file which is in the highest level directory via '../css/filename.css'. But when I use debug I can see that the css file is not included and the link (via debug) shows only one period, not the two in the include statement. Any help will be most appreciated. With thanks, Necuima.
  20. OK, found what I was doing wrong. I probably didn't read Larry's notes closely enough. In a nutshell, I interpreted the 'session_start()' literally (Figure 3.4 - the 'some other script'). What I needed to do was to include the db_sessions.inc.php file which starts the session anyway. Posted here in case it may help someone else! Cheers from Oz, Necuima.
  21. Hi, I am having problems understanding just how to use this. On page 84 there is a diagram showing the procedural flow. I can successfully create the session and load some data into it. A check of the database table shows that the data is correctly loaded. The problem that I am having is retrieving that data in a separate PHP script. The comment on the bottom of the diagram says that every time that a session is started the 'open' and 'read' functions are called. How do I 'see' what is in the session in the second script, i.e., one that gets invoked after the session is initially created? If I do a if (empty($_SESSION)) (after the 'session_start()') it tests as empty? If I do a get_defined_vars(), again after the 'session_start()', it shows that the session is empty? My environment is: . Windows 7 Home Premium 64 bit . Internet Explorer 10 . Firefox 22.0 . Dreamweaver CS5 as the text editor . XAMPP for Windows 1.8.3 which comprises: .. Apache 2.4.4 .. PHP 5.5.3 .. MySQL 5.6.11 .. phpMyAdmin 4.0. Any help will be most appreciated. Thanks, Necuima
  22. Hi HartleySan, I changed it to: if (file_exists($newname) === FALSE) and now it works correctly:-) Subtle changes between PHP versions! Thanks for your interest. Cheers from Oz.
  23. Hi, As noted elsewhere, I have just upgraded to PHP 5.5.3. A script that previously ran perfectly now does not - specifically the file_exists function does not return the correct result. Here's my code: ... $newname = "../works_of_art/large/" . $savename; clearstatcache(); if (!file_exists($newname)) { // an image file with that name does not exist - OK ... The $newname variable has the correct file name in it. The function return indicates that the file exists when it does not! Here's my environment: . Windows 7 Home Premium 64 bit . Internet Explorer 10 . Firefox 22.0 . Dreamweaver CS5 as the text editor . XAMPP for Windows 1.8.3 which comprises: .. Apache 2.4.4 .. PHP 5.5.3 .. MySQL 5.6.11 .. phpMyAdmin 4.0.4 Any guidance will be much appreciated. Thanks, Necuima
  24. Hi Larry, By way of closure on this topic, and of possible interest to other forum users, in the end I chose XAMPP. XAMPPlite did have an uninstall procedure which I used after backing up all my data and databases. The XAMPP 1.8.3 installation went fairly well though I did have an initial problem with port conflicts with Skype. So now my configuration is: . Windows 7 Home Premium 64 bit . Internet Explorer 10 . Firefox 22.0 . Dreamweaver CS5 as the text editor . XAMPP for Windows 1.8.3 which comprises: .. Apache 2.4.4 .. PHP 5.5.3 .. MySQL 5.6.11 .. phpMyAdmin 4.0.4 .. and others For MySQL administration I use a free utility called HeidiSQL. It has a database export and import capability and that is what I used. I also used it set the MySQL GRANTs, though Apache provided the facility to set the initial root password. Apache and MySQL both run as Windows services, so the uninstall procedure for the 'lite' involved first stopping both Apache and MySQL and then de-selecting them as services. The reverse was then required with XAMPP. All in all not too painful though it took me a little while to figure out how to run the new phpinfo. Regarding php.ini, I changed the timezone to my local values but do I also need to change the latitude and longitude values? Now I can turn to the new book :-) Thanks again for the advice. Best wishes, Necuima.
  25. Hi Larry, Thanks for the guidance - I will follow it. Rest assured that I do comprehensive backups of my whole system regularly! For my critical databases, I have implemented your database backup and restore routines as per your PHP 5 ADVANCED book Chapter 10. I am leaning towards the full XAMPP to replace my current XAMPPLite. This will give me the latest versions of PHP, MySQL, etc. so will set me up for the exercises in the new book. Cheers from Oz.
×
×
  • Create New...