Jump to content
Larry Ullman's Book Forums

Edward

Members
  • Posts

    1115
  • Joined

  • Last visited

  • Days Won

    27

Posts posted by Edward

  1. Well if you check php.net http://php.net/manual/en/mysqli.prepare.php

     

    mysqli_prepare() returns a statement object or FALSE if an error occurred.

     

    So mysqli_prepare that you have is returning FALSE which is boolean to $stmt which will cause all the functions/methods using it to fail. So its a problem with your database connection, you simply need to check the required file is being received.

     

    require ('../mysqli_connect(ch19).php');

    • Upvote 2
  2. Hi

     

    Just wondered about this. Obviously you can view an inidividual record in Yii using the actionView() method. So for an example

     

    www.example.com/item/1
    Would return that record. For SEO purposes it would be nice to load in the url

     

    www.example.com/item/1/items-name
    A couple of things for this. 1) Should I store a slug hyphenating the individual items name?

     

    Secondly is it just a case of using something like this in your routes

     

    '<controller:\w+>/<id:\d+>/<title:\^[a-zA-Z-]+>'=>'<controller>/view',
    
    I'm not sure if that is a Regex problem or not. I did check it out in a regex tester and it seems to work, but I get "The system is unable to find the requested action "1". when i try to load the page with a title.

     

     

    On the other hand

    '<controller:\w+>/<id:\d+>/<title:\w+>'=>'<controller>/view',
    
    allows me to find

     

    www.example.com/item/1/itemsname
    Which is half way there. I'm just not 100% sure what my problem is currently.

     

    I should also mention that the title "items-name" isn't important to me within a query. I'd be happy to just use the id to find a record. The title was purely for SEO/aesthetics.

     

    Thanks

     

    Jonathon

     

     

    I wonder how this works for Google analyzing your website.

     

    What happens when Google analyzes

     

    item/1/gun44

    item/2/gun44

    item/2-gun 44

     

    instead of

     

    item/gun44-1

    item/gun44-2

    item/gun44-3

     

     

    I used the 2nd method but the problem is you have to show list all the routes for other item controller actions in the config main.php so they can work.

     

    But if you done users you wouldn't want to go

     

    user/1

     

    because you would be giving away there ID. And to solve the problem of listing extra routes in the main config file to have other user controller actions run. You could just do this

     

    user/member/edward

     

    instead of

     

    user/edward

     

    What eBay and their rival eBid did:

     

    http://www.ebay.com/itm/Star-Wars-Vintage-Collection-2010-DACK-RALTER-REBEL-PILOT-VC07-MOC/261422612497   (Looks like you may be onto something Jonathon)

     

    http://us.ebid.net/for-sale/star-wars-vintage-collection-79-darth-sidious-124699732.htm

  3. One thing i am noticing when testing MG is it can make it through to Gmail but not Outlook. In the logs MG reports mail was accepted and delivered for both. I will try testing it on another few email hosts and see what happens.

     

    Ive made my first email template also the problem is when i send it to Gmail it doesn't interpret the HTML just leaving the raw HTML on the page? So how does that work do you have to be friends with Gmail before they interpret your HTML or am i doing something wrong?

     

    Edward slipped on a Banana again, i got it working rending the HTML, just the problem with Outlook.com receiving nothing. I think ill contact MG and see what they have to say about it.

     

    Things are starting to get unbelievable here, Ive now got 17 browser tabs open at one time with all this coding related stuff. Its crazy sometimes i don't know where i am at and have to think for a minute. Then there is Dreamweaver with up to 10 scripts at a time, talk about multi-tasking.

  4. Hi Jonathon. I wanted to ask you some what extensions did you have success with for uploading images and image manipulation in Yii? Ive noticed Image and EasyImage at Yii but wondering what you had to say...

     

    I have used SWFUpload the Flash plugin successfully and i liked it.

     

    You see what i am logging for is an image manipulation tool that can save images of different sizes holding perspective where i would be able to choose between letterbox or focused. I have a class to do this already but it would be neater i think if i was able to get a good extension to do this work which was an interface on a reliable php library for this.

     

    I need to work on my item creation page again so i thought it would be the time to ask this question now before i start. I would appreciate your help...

     

    Edward

     

    PS You may be interested in this javascript file, its great for monetary values http://josscrowcroft.github.com/accounting.js/ and also this open exhange rates website https://openexchangerates.org/

  5. I have just gotten mailgun configured now, finally after 2 days, well it was worth it, its really good. The Yii extension that was made is also great works like clockwork. Well i am very happy now. I did send you an email by the way, did you get it?

     

    I feel much more confident now just having stuff on the server, i have gone back and fixed all my layouts and stuff to Bootstrap 3, it works really well when you mix and match things about. And the buttons look great on mobile devices, it took me a while but now i love them more than those on BS2.

     

    Thanks for your support.

  6. Its whichever server is hosting the DNS according to MG. I hate this stuff its so boring making it hard to absorb, coding is 1000's times easier for me.

     

    Well its done now server company added the records for me so that's where they were supposed to go.

  7. Larry like i said i have my domain with NetworkSolutions(NS) but where exactly should we add these TXT, CNAME and MX records given to us by MailGun?

     

    I got the MailGun settings to work when my IP was with NS but when i pointed the A Records to my other server where the domain should be pointing to, the setting failed.

     

    The problem is though with my VPS I can only find MX records and no TXT or CNAME places to update.

     

    I am just wondering what you did, i seem to be in some kind of loop right now where the wheels on the bus go round and round.

     

    Update ive spent the whole day on this got no where with it. I will wait for your advice.

  8. I think i may have a vision into the future, just before i opened up this forum i just thought exactly as you wrote. Yes only those who have server access would be able to operate on the forum. So that means if we are on a dedicated server or a lower cost Virtual Private Server (VPS) we would be suffice. Suffice it not really a word i like to use(it sounds a bit weird to me) but i saw you and some others using it here so i thought id give it a shot this time. :D

     

    Thanks for your help...Larry

     

    I think im going to just leave this at 777 because me and my server team are getting problems with it.

     

    Talking of a vision into the future i may be slightly wrong on that, it may be that we are all connected to a spiritual grid and its possible that one could connect to another person on the grid telepathically. Like i connected directly to your memory Larry. However there is one problem i need to wait for you to write the post before i can connect to it, haha. Seriously though i am not kidding with you here, something strange happened before i opened this post.

  9. I am actually have real problem with 766. Now i am not getting errors with 766 but now the current javascript on the pages doesn't work. Also when i deleted a folder in assets like d99df and cleared all folders out, for some reason the server couldn't write back to that folder with the assets required for Yii.

     

    When i changed the folder settings back to 777 it worked again, this mystery doesn't seem to unravel easily like what i thought it would. But i agree with what Larry is saying if we can get it to 766 i would go with that as we don't really need executes on those files and limiting actions would be best by simple common sense.

     

    I am now a little concerned for the security of my website.

  10. I know of the two folder assets and runtime that need write permissions, i set those at what Larry said at 766 but my server company said there may be problem on other scripts with what they done to achieve this, so i can't confirm this will be stable yet. All my other folders on the server are set as 755 and php files are at 644.

     

    So what do you have and what is the third writeable folder we need to be concerned with?

  11. Well i just need to send out some development figures, 10,000,000 emails a month was what i was hoping for after 10 - 15 years of my site being up. Any back to reality i want to ask something if we use MailGun do we still need to implement Swith Mailer, or just use MailGun alone?

  12. Thanks for all the useful information. Its very interesting because when i was hosting with RackSpace we got to use SendGrid and now RackSpace have their own MailGun.

     

    So i calculated that if you Larry spend $19/month with MailGun you send out 48,000 emails a months, OMG.

     

    MailGun Vs SendGrid

     

    MailGun - 700,000emails - $316.50

    SendGrid - 700,000emails - $399.95 (A nice round figure :) )

     

    Summary: MailGun is the winner that works out 21% cheaper.

     

    Now if i was sending out 10,000,000 emails a month with MailGun i need to pay $1699, another nice round figure...

  13. I have a question i am about to start using Swift Mailer, i decided to leave my email stuff until later on however what is the recommended mail transport system I should use for my eCommerce website?

     

    I will probably have to contact my server company to get anything done other than using the standard php mail() function which i have read seems to suck.

  14. My server company are struggling with this, the query is now on hold till someone more technical comes in to handle this. Are you sure its 766? They asked me to confirm where i got this information from. I saw some other people on the Yii forums saying 777 but if you put 777 as opposed to 766, then the files are executable by both Group and the World.

     

    File Permissions

    • Read - 4
    • Write - 2
    • Execute - 1
    • User - The owner of the file.
    • Group - Other files which are in the same folder or group.
    • World - Everyone else.

    I think it may be 776 im just guessing though. Nope just tried it doesn't work either. Arrgghhh its going to be one of these days!

     

    Update: Got this fixed for now but server company are not sure if errors could come up again.

  15. 766 is not workin arrggghhh!

     

    PHP warning

    mkdir() [<a href='function.mkdir'>function.mkdir</a>]: Permission denied

    /home/user/framework/utils/CFileHelper.php(307)

    295      * @param array $options newDirMode element used, must contain access bitmask296      * @param boolean $recursive whether to create directory structure recursive if parent dirs do not exist297      * @return boolean result of mkdir298      * @see mkdir299      */300     private static function mkdir($dst,array $options,$recursive)301     {302         $prevDir=dirname($dst);303         if($recursive && !is_dir($dst) && !is_dir($prevDir))304             self::mkdir(dirname($dst),$options,true);305 306         $mode=isset($options['newDirMode']) ? $options['newDirMode'] : 0777;307         $res=mkdir($dst, $mode);308         @chmod($dst,$mode);309         return $res;310     }311 }

    Is this about the user not having authority to make directories on the server?

  16. Yeah there were a few things not installed for my apache like the PDO drivers so they were missing from the php.ini file configuration. Well i guess at the end of the day once its all done and working its all fun. That's why i love coding more than servers because we have total control over what we are doing and don't have to wait to get things fixed.

×
×
  • Create New...