Jump to content

kostakondras

Members
  • Posts

    20
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

kostakondras's Achievements

Member

Member (2/5)

0

Reputation

  1. Aight - thanks. I'll try and do the import again - this has helped a lot.
  2. Hi, I am creating an import using WP All Import in Wordpress and I've been told by their support that I have to write some custom code to create a nested serialised PHP array. The serialised array has to end up looking like this: s:287:"a:8:{s:5:"price";a:2:{s:5:"value";s:5:"38000";s:8:"original";s:0:"";}s:17:"custom_tax_inside";s:0:"";s:15:"custom_tax_page";s:0:"";s:8:"city_mpg";a:1:{s:5:"value";s:0:"";}s:11:"highway_mpg";a:1:{s:5:"value";s:0:"";}s:12:"custom_badge";s:0:"";s:5:"video";s:0:"";s:10:"short_desc";s:0:"";}"; Can you give me any advice on how I can: a) See what this nested serialised array actually looks like b) How I can code a nested serialised array like this Once I can do this I plan to put it into a hook for when WP All Import is importing and this will allow me to import certain values (like price) into my car database. Any input from anyone in the community would be much appreciated. Bonus Point: I have another field that containst he following serialised array: a:7:{i:0;s:38:"Multi-function Control Screen - Colour";i:1;s:17:"11 Speaker Stereo";i:2;s:15:"Online Services";i:3;s:19:"18inch Alloy Wheels";i:4;s:21:"Power - Tailgate/Boot";i:5;s:45:"Power Door Mirrors - Auto Dipping (Reversing)";i:6;s:13:"Driving Lamps";} When I put this into 'http://www.unserialize.com/' I get the following: 'Array ( [0] => Multi-function Control Screen - Colour [1] => 11 Speaker Stereo [2] => Online Services [3] => 18inch Alloy Wheels [4] => Power - Tailgate/Boot [5] => Power Door Mirrors - Auto Dipping (Reversing) [6] => Driving Lamps )' However when I type in the following: s:287:"a:8:{s:5:"price";a:2:{s:5:"value";s:5:"38000";s:8:"original";s:0:"";}s:17:"custom_tax_inside";s:0:"";s:15:"custom_tax_page";s:0:"";s:8:"city_mpg";a:1:{s:5:"value";s:0:"";}s:11:"highway_mpg";a:1:{s:5:"value";s:0:"";}s:12:"custom_badge";s:0:"";s:5:"video";s:0:"";s:10:"short_desc";s:0:"";}"; I get the following: s:287:"a:8:{s:5:"price";a:2:{s:5:"value";s:5:"38000";s:8:"original";s:0:"";}s:17:"custom_tax_inside";s:0:"";s:15:"custom_tax_page";s:0:"";s:8:"city_mpg";a:1:{s:5:"value";s:0:"";}s:11:"highway_mpg";a:1:{s:5:"value";s:0:"";}s:12:"custom_badge";s:0:"";s:5:"video";s:0:"";s:10:"short_desc";s:0:"";}"; I just get a string with no array values - what am I doing wrong? Is there something wrong with the serialised array above?
  3. I recently exported a database from phpMyAdmin, now I'm not sure but I assume I missed out on some options, basically the whole import/export thing has got me confused. I think I exported the database however the .sql file that was created doesn't include th SQL commands to create the databse itself, so I assume it just expects a table skeleton to put its data in, now that I can solve by creating a skeleton. However I have another database which I exported in .sql format from another version of phpMyAdmin which is hosted by my server. Anyway once I try to import it back it tells me that I do not have the permission to create a new database (so this database I must have exported with the option to create a new database of the same name when it is re-imported, where is this option?). The problem I am having is that when I import this .sql file (which includes the CREATE DATABSAE command) it tells me that I do not have permissions to create a new database. Then when I create the database myself it then tells me it can't import because the database all ready exists! See the conondrum I'm in? Any suggestions would be appreciated. Thanks guys
  4. Hi guys, I'm using the API for Remember the Milk through a PHP class that I found online called PHP-RTM. Anyway after so much headaches (the authentication for the Remember the Milk API is one of the hardest I've ever come across) I've finally connected everything and gotten to the stage that I have some raw data inside an array. The next step is to work with that data. Basically I want to access the names of the task in a complex multi demensional array and I have no idea how to do this. I have done a var_dump of the array I am working with to show you the complexity. Just remember that in the complex var_dump below there are only 4 tasks: array(2) { ["stat"]=> string(2) "ok" ["tasks"]=> array(2) { ["rev"]=> string(31) "nxeir6vy9pcgcggoss4wwwooc8cwo8w" ["list"]=> array(3) { [/tt] => array(2) { ["id"]=> string( "13927305" ["taskseries"]=> array(2) { [tt]=> array(11) { ["id"]=> string(9) "104056511" ["created"]=> string(20) "2011-02-02T12:48:48Z" ["modified"]=> string(20) "2011-02-02T12:48:48Z" ["name"]=> string(42) "Send confirmation email to luxury car hire" ["source"]=> string(13) "iphone-native" ["url"]=> string(0) "" ["location_id"]=> string(0) "" ["tags"]=> array(0) { } ["participants"]=> array(0) { } ["notes"]=> array(0) { } ["task"]=> array(9) { ["id"]=> string(9) "156815180" ["due"]=> string(20) "2011-02-02T13:00:00Z" ["has_due_time"]=> string(1) "0" ["added"]=> string(20) "2011-02-02T12:48:48Z" ["completed"]=> string(0) "" ["deleted"]=> string(0) "" ["priority"]=> string(1) "N" ["postponed"]=> string(1) "0" ["estimate"]=> string(0) "" } } [1]=> array(11) { ["id"]=> string(9) "104148150" ["created"]=> string(20) "2011-02-03T01:25:57Z" ["modified"]=> string(20) "2011-02-03T01:26:17Z" ["name"]=> string(40) "Confirm that post has been sent with DVD" ["source"]=> string(2) "js" ["url"]=> string(0) "" ["location_id"]=> string(0) "" ["tags"]=> array(0) { } ["participants"]=> array(0) { } ["notes"]=> array(0) { } ["task"]=> array(9) { ["id"]=> string(9) "156951316" ["due"]=> string(20) "2011-02-02T13:00:00Z" ["has_due_time"]=> string(1) "0" ["added"]=> string(20) "2011-02-03T01:25:57Z" ["completed"]=> string(0) "" ["deleted"]=> string(0) "" ["priority"]=> string(1) "N" ["postponed"]=> string(1) "0" ["estimate"]=> string(0) "" } } } } [1]=> array(2) { ["id"]=> string( "13925842" ["taskseries"]=> array(12) { ["id"]=> string( "98105089" ["created"]=> string(20) "2010-12-19T11:25:25Z" ["modified"]=> string(20) "2011-02-02T13:01:42Z" ["name"]=> string(25) "Read for one hour per day" ["source"]=> string(13) "iphone-native" ["url"]=> string(0) "" ["location_id"]=> string(0) "" ["rrule"]=> array(2) { ["every"]=> string(1) "1" ["$t"]=> string(21) "INTERVAL=1;FREQ=DAILY" } ["tags"]=> array(0) { } ["participants"]=> array(0) { } ["notes"]=> array(0) { } ["task"]=> array(9) { ["id"]=> string(9) "156576423" ["due"]=> string(20) "2011-02-02T13:00:00Z" ["has_due_time"]=> string(1) "0" ["added"]=> string(20) "2011-02-01T13:01:45Z" ["completed"]=> string(0) "" ["deleted"]=> string(0) "" ["priority"]=> string(1) "N" ["postponed"]=> string(1) "0" ["estimate"]=> string(0) "" } } } [2]=> array(2) { ["id"]=> string( "17007566" ["taskseries"]=> array(11) { ["id"]=> string(9) "104017503" ["created"]=> string(20) "2011-02-02T05:45:04Z" ["modified"]=> string(20) "2011-02-03T02:29:55Z" ["name"]=> string(96) "Hook up watermark for both videos (check email) and send to Rachelle and Steve at compare quotes" ["source"]=> string(2) "js" ["url"]=> string(0) "" ["location_id"]=> string(0) "" ["tags"]=> array(0) { } ["participants"]=> array(1) { ["contact"]=> array(3) { ["id"]=> string(7) "2150286" ["fullname"]=> string(10) "Samuel Nam" ["username"]=> string(10) "samuel.nam" } } ["notes"]=> array(0) { } ["task"]=> array(9) { ["id"]=> string(9) "156754354" ["due"]=> string(20) "2011-02-02T13:00:00Z" ["has_due_time"]=> string(1) "0" ["added"]=> string(20) "2011-02-02T05:45:04Z" ["completed"]=> string(20) "2011-02-03T02:32:00Z" ["deleted"]=> string(0) "" ["priority"]=> string(1) "N" ["postponed"]=> string(1) "0" ["estimate"]=> string(0) "" } } } } } } Anyone know the code i can use to simply get the "name" keys from the complex array below. I've created a movie to show what I'm trying to achieve, please click below to view: http://screenr.com/XIY MOD EDIT: formatted text to get rid of errant smilies . . .
  5. And if not, is there a way to display the map along with the Directions?
  6. Will this display the graphical map itself or simply the directional steps?
  7. I am attempting to create a Map on my web page that will have the directions (which will be dynamically pulled from a database) however I have been unable to find a good tutorial on how to achieve this, also there doesn't seem to be any PHP classes available out there (for free anyway) to create this easily. Any suggestions?
  8. Hi Requinix, Thanks for the info. I did not know that. However I have been able to solve this problem, it seems that the include_path does not work if there are multiple include_paths in the php.ini file (WAMP was using the right .ini file). So what I did was put all my include paths into one include_path directive seperated by a semicolon (. I can see the blue screen that says "Welcome to the Zend Framework" so I've taken the next step . So for now I have the problem fixed until I get stuck again. Regards
  9. I am having difficulties with my include_path directives in the php.ini file. Please click the link below to see a screencast of the problem: http://screenr.com/vhY I am very confused as sometimes the include_path does work and sometimes it doesn't work. Also am I allowed to have multiple include_path directives or do I need to include every path in a single include_path directive.
  10. Thanks thehippy. I've recently upgraded my PHP on WAMP and it's now running at PHP 5.3.0. I've noticed the shortcut to edit the PHP.ini file from the Desktop is not the php.ini file that resides inside c:\wamp\bin\php\php5.3.0. But even after changing the include_path in this folder, still, the includes are not registering. What would the reason be. I'm restarting the server every time I do it. Here is the code (I've put an echo statement into one of the Zend files and included it with require_once. include_path = ".;c:\php\includes;C:\wamp\zend\library\Zend" I restart the server and I have a statement in a test php file that states the following: require_once("View.php"); //as you know this is some file inside the zend/library/Zend folder Why doesn't it work? And why are there multiple PHP.ini files.
  11. I'm currently going through the process of installing the Zend framework and I have created a new project. However when viewing the public folder I am greeted with an Internal Server Error. Any idea on what could be causing this problem? I have looked through the FAQ on ZendFramework website and Google to no avail. Also I have included a screencast in the link below to give you an idea of where I'm currently at if it helps at all. http://screenr.com/N2Y Thank you for any help.
  12. That's why I marked this as solved so no one would bother with it.
  13. Am watching this now, however I should note that this whole post is wrong and I have made another however I do not know how to delete this one.
  14. I am attempting to install PEAR however am very confused and I believe I have stuffed up something from which it will be very complicated to come back from. Firstly, for some reason I have the C:\wamp\bin\php\php5.3.0\go-pear.bat installation file, but I also have the C:\PHP\go-pear.bat installation file. Which one do I choose? And is the C:\PHP direcotry left over from an old installation. I have no idea. Further to that, I ran the go-pear.bat installation from the C:\PHP directory, I have a feeling this was the wrong decision. After installing everything it stated that it had updated my php.ini file, however this file was in the wrong directory and so I took the updated lines from the php.ini which put in a a new include_path and pasted them into the php.ini file in the C:\wamp... directory. Now when I go to the command prompt and type in pear here is the message I get: PHP_PEAR_PHP_BIN is not set correctly. Please fix it using your environment variable or modify the default value in pear.bat The current value is: .\php.exe I have followed a remedy to this which is included here: http://www.pear-forum.org/topic2413.html However still to no avail. I am further confused why I have a C:\PHP folder and why it is seperate from my WAMP folder. Further to that, when I try to install PEAR from my WAMP folder and click on C:\wamp\bin\php\php5.3.0\go-pear.bat I get the following error message: phar "C:\wamp\bin\php\php5.3.0\PEAR\go-pear.phar" does not have a signaturePHP warning require_once(phar://go-pear.phar/index.php>: failed to open stream: phar error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C:\wamp\bin\php\php5.3.0\PEAR\go-pear.phar n line 1236 (and another message that looks very similar) ----- Note: the installation instructions I am following are located here > http://trac.symfony-project.org/wiki/HowToInstallPearOnWindowsWithWamp ------ So basically I am stuck. Why is it so difficult to install PEAR and how do I simply get it working?
  15. Figured out what the problem was; there was no password set at all, so all I had to do was press Enter.
×
×
  • 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.