Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 58
  1. willsurg's Avatar
    Posts
    65 Posts
    Global Posts
    66 Global Posts
    #21  
    I get as far as trying to get wordpress up. I cant change the password. keeps saying I dont have permmsion, I have tried sudo, I have made sure that mysql is running, but I cant seem to get past step 3 (/opt/bin/mysqladmin -u root password 'new-password')


    i also get this:



    Broadcast message from root (Sat Aug 29 08:22:55 2009):

    powerd: System woke up.

    sudo mount -o remount,rw /
    Password:
    wiliam@castle:~$ /opt/bin/mysql -u root
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    william@castle:~$ sudo cd /opt ; /opt/bin/mysqld_safe &
    sudo: cd: command not found
    william@castle:~$ Starting mysqld daemon with databases from /opt/var/lib/mysql
    /opt/bin/mysqld_safe: line 360: cannot create /opt/var/lib/mysql/castle.err: Permission denied
    /opt/bin/mysqld_safe: eval: line 1: cannot create /opt/var/lib/mysql/castle.err: Permission denied
    STOPPING server from pid file /opt/var/lib/mysql/castle.pid
    tee: /opt/var/lib/mysql/castle.err: Permission denied
    tee: /opt/var/lib/mysql/castle.err: Permission denied
    tee: /opt/var/lib/mysql/castle.err: Permission de


    thanks in advance.
    I have even tried to re-install the package but cant figure out how to do that as it says it already installed when I repeat the command. since I am just learning I did not want to try to delete the files manually and screw something up
    Last edited by willsurg; 08/29/2009 at 07:28 AM. Reason: adding more error
  2. s00pcan's Avatar
    Posts
    32 Posts
    Global Posts
    33 Global Posts
    #22  
    I just use sudo -i and never have problems with permissions. It basically logs you in as root.

    edit: oh that was for mysql. I'm getting that now too.
    Last edited by s00pcan; 08/29/2009 at 10:24 AM.
  3. #23  
    Quote Originally Posted by willsurg View Post
    I get as far as trying to get wordpress up. I cant change the password. keeps saying I dont have permmsion, I have tried sudo, I have made sure that mysql is running, but I cant seem to get past step 3 (/opt/bin/mysqladmin -u root password 'new-password')
    Are you typing literally
    /opt/bin/mysqladmin -u root password
    then typing in the new password? You should be. The word "password" there is a command.
    Also either su as root (type the command "su root") before issuing the above comman, or use
    sudo /opt/bin/mysqladmin -u root password 'new-password'

    Most of the other things are not going to work until you get the above fixed.
  4. s00pcan's Avatar
    Posts
    32 Posts
    Global Posts
    33 Global Posts
    #24  
    Ok so I disabled the init.d/opware-lighttpd script, boot my phone, then enabled it and ran it. Then I was able to use lighttpd and not have my phone be incredibly slow. But it does this every time I start it with that script enabled.. I have to have it off and manually start lighttpd to get it to work. Also, the gps tracking isn't working at all. I have a fix, but the map always shows the same location. Another thing, I remember seeing mysql as being loaded on phpinfo, but then it wasn't, then I did ipkg-opt install php-mysql and it installed the extension and made the necessary changes to php.ini, but now I get a 500 server error. Bah, might just start over.

    ok I started over..
    phpMyAdmin - Error
    You should upgrade to MySQL 5.0.15 or later.
    :\ need a new compile of it I guess.. how do I get it? ipkg-opt installled 4.1.22-3, which is pretty old.

    Tracking page still isn't chaging at all
    Last edited by s00pcan; 08/29/2009 at 11:42 AM.
  5. willsurg's Avatar
    Posts
    65 Posts
    Global Posts
    66 Global Posts
    #25  
    lol
    well I must admit that I was typing exactly sudo /opt/bin/mysqladmin -u root password 'new password"

    however even now when I eliminate the 'new password' I still get the same errors of not having permission. it says:

    root@castle:/# sudo /opt/bin/mysqladmin -u root password
    /opt/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    root@castle:/#

    any help is appreciated
    thanks!
  6. zedomax's Avatar
    Posts
    19 Posts
    Global Posts
    32 Global Posts
    #26  
    Quote Originally Posted by s00pcan View Post
    This is awesome, but after installing it and making the webserver run on startup it made my pre take 5 minutes to start and would be extremely slow after that. Any ideas on how to fix this?
    That's weird, it shouldn't really take longer, the script only runs Lighttpd, which doesn't take longer than 1 second to start. If anything, I think it may be something else.
    Check out http://PalmPre-Hacks.com where I document every hack I do on my Palm Pre.
  7. #27  
    I have completed all the steps necessary, but I'm unable to get the host to update the coordinates. The Google Maps windows opens but it just centers in the United States. No points or anything.


    If I helped you or you have downloaded one of my files,
    then least you could do is click the "Thanks" button.
  8. #28  
    I think that I am getting a result that no one else has mentioned above. I am using the last method on the GPS Tracking page on web-os internals - the one that emails the coordinates in a google maps friendly form. I am getting a text almost every time it sends me the email with my coordinates (btw- I removed the acc and dir variables, as I was also getting truncated links). The text is from 9230 and it states "Your MSG could not be DELIVERED because SmtpNoToAddressSupplied". This is odd, because I did supply a to address and I do get the email - most of the time.

    update: it is now sending the email twice, with different results.

    Any ideas?
    Last edited by johsua; 08/30/2009 at 01:56 AM. Reason: new info
  9. #29  
    Quote Originally Posted by johsua View Post
    I think that I am getting a result that no one else has mentioned above. I am using the last method on the GPS Tracking page on web-os internals - the one that emails the coordinates in a google maps friendly form. I am getting a text almost every time it sends me the email with my coordinates (btw- I removed the acc and dir variables, as I was also getting truncated links). The text is from 9230 and it states "Your MSG could not be DELIVERED because SmtpNoToAddressSupplied". This is odd, because I did supply a to address and I do get the email - most of the time.

    update: it is now sending the email twice, with different results.

    Any ideas?
    I had this problem intermittently, but never figured out a way to make the error repeatable. It was always completely random whether or not the message would go through. Never figured out a way to fix it, and I edned up liking this php solution better anyway.

    -----------------------------------------

    I mentioned wanting this above, and with a little syntax fiddling, my php page is displaying the accuracy of the GPS fix successfully. It can also display any of the other possible GPS parameters that the pre's GPS will give you.

    Still haven't gotten the battery percent to show on the page, not sure what the deal is there, but I'm sure I'll get it eventually. I have to fiddle around with syntax, since I have zero experience with php before this, I just have to mess with it a little at the time until it works.
  10. s00pcan's Avatar
    Posts
    32 Posts
    Global Posts
    33 Global Posts
    #30  
    The command sent by the php script isn't getting any value back for the gps is my problem.

    edit: got it working. When I pasted the php script in, it put the "$gps =..." line on multiple lines, causing it not to work but not generating any errors.
    Last edited by s00pcan; 08/30/2009 at 10:30 AM.
  11. #31  
    Ditto on the password issue for the mysql setup:

    josh@castle:~$ sudo /opt/bin/mysqld_safe &
    josh@castle:~$ A mysqld process already exists

    [1] + Done(1) sudo /opt/bin/mysqld_safe
    josh@castle:~$ sudo /opt/bin/mysqladmin -u root password apassword
    /opt/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    UPDATE: This seems to have alleviated the password problem. Originally I set a password, which seemed to work. I was getting this error:

    root@castle:/opt# /opt/bin/mysql -u root
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    Then I used the following command - pure guess-work!

    root@castle:/opt# /opt/bin/mysql -u root -p

    and got:

    Enter password:
    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 5 to server version: 4.1.22

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

    I used the password I originally set up.
    Last edited by johsua; 08/30/2009 at 11:42 AM. Reason: found a fix - kind of
  12. s00pcan's Avatar
    Posts
    32 Posts
    Global Posts
    33 Global Posts
    #32  
    I suck at regex but:
    Code:
    <?php
    echo "<pre>";
    print_r(getLocation());
    echo "</pre>";
    function getLocation(){
    	$location = `luna-send -n 1 palm://com.palm.location/getCurrentPosition {} 2>&1`;
    	$location = preg_replace('/"/', "", $location);
    	$location = preg_replace('/\}/', "", $location);
    	$location = preg_replace('/{/', "", $location);
    
    	echo $location;
    	$gps = explode(",",$location);
    	foreach ($gps as $item){
    		$arr = explode(":", $item);
    		$arr[0] = trim($arr[0]);
    		$values[$arr[0]] = $arr[1];
    	}
    	unset($values['** Message']);
    	return $values;
    }
    ?>
    makes an array of the values so you can do whatever.
    Code:
    (
        [errorCode] => 0
        [timestamp] => 1.251644228046E12
        [latitude] => 50.157597
        [longitude] => -70.413577
        [horizAccuracy] => 150
        [heading] => 0
        [velocity] => 0
        [altitude] => 0
        [vertAccuracy] => 0
    )
    Last edited by s00pcan; 08/30/2009 at 12:34 PM.
  13. #33  
    ^There's an easier way! Well, at least a way that requires fewer lines and seems a little easier to understand to a php-noob like me.

    Code:
    $gps = `luna-send -n 1 palm://com.palm.location/getCurrentPosition {} 2>&1 | cut -d, -f4,5,6,7,8,9,10 | sed -r 's/[^-\.0-9,]//g'`;
    
    list($lat, $lon, $hacc, $head, $vel, $alt, $vacc) = explode(",", $gps)
    This code gives each of those variables their values.

    Now I'm just trying to get something like this to work with to give the battery percentage, but I'm just slow at new stuff like this. This following code is the code from the e-mail version on webosinternals, and I'm just trying to switch this over to something that'll work in the php file.

    Code:
    $bat = `grep BATTERY: /var/log/messages | tail -1 | awk '{print $8}' | sed 's/%,//')`;
  14. willsurg's Avatar
    Posts
    65 Posts
    Global Posts
    66 Global Posts
    #34  
    OMG thankyou!!!
    This step has been driving me crazy for three days, now I can move on!
  15. s00pcan's Avatar
    Posts
    32 Posts
    Global Posts
    33 Global Posts
    #35  
    getCurrentPosition {accuracy:1}
    makes it much more accurate
  16. s00pcan's Avatar
    Posts
    32 Posts
    Global Posts
    33 Global Posts
    #36  
    yeah I did it my way because I don't know much about linux commands like those you used. But your way is much better, here's my revised function:
    Code:
    function getLocation(){
            $gps = `luna-send -n 1 palm://com.palm.location/getCurrentPosition {accuracy:1} 2>&1 | cut -d, -f4,5,6,7,8,9,10 | sed -r 's/[^-\.0-9,]//g'`;
            list($lat, $lon, $hacc, $head, $vel, $alt, $vacc) = explode(",", $gps);
    
            $values['lat'] = $lat;
            $values['lon'] = $lon;
            $values['hacc'] = $hacc;
            $values['head'] = $head;
            $values['vel'] = $vel;
            $values['alt'] = $alt;
            $values['vacc'] = $vacc;
    
            return $values;
    }
    You pretty much had it with the battery...
    Code:
    function getBattery(){
            return `grep BATTERY: /var/log/messages | tail -1 | awk '{print $8}' | sed 's/%,//'`;
    }
    Last edited by s00pcan; 08/30/2009 at 05:20 PM.
  17. #37  
    Quote Originally Posted by s00pcan View Post
    You pretty much had it with the battery...
    Code:
    function getBattery(){
            return `grep BATTERY: /var/log/messages | tail -1 | awk '{print $8}' | sed 's/%,//'`;
    }
    Alright, I'm some kind of ***** with this php stuff. Can you post your full file that is showing the battery % in the webpage? I still can't get that one thing to come up, it's got to be some kind of little syntax error somewhere, but I can't find it for the life of me.
  18. #38  
    fyi...these scripts/web pages that display you GPS coords will only work if you have location services turned ON.

    (look for the "location Services" icon, make sure "auto locate" is ON)

    F
  19. #39  
    Quote Originally Posted by johsua View Post
    ...(btw- I removed the acc and dir variables, as I was also getting truncated links)...
    It looks like the message being sent is a text message and not an email. It looks like it's limited to 136 characters.

    I sent the following string:
    012345678+112345678+212345678+312345678+412345678+512345678+612345678+712345678+812345678+912345678+ 012345678+112345678+212345678+312345678+412345678+512345678

    and only this showed up:
    012345678+112345678+212345678+312345678+412345678+512345678+612345678+712345678+812345678+912345678+ 012345678+112345678+212345678+3123456

    I am modifying the script now so it sends a string less than 136 chars.
    Last edited by wilderf; 09/01/2009 at 03:56 PM.
  20. #40  
    Quote Originally Posted by wilderf View Post
    fyi...these scripts/web pages that display you GPS coords will only work if you have location services turned ON.

    (look for the "location Services" icon, make sure "auto locate" is ON)

    F
    Courtesy of Ikyo: http://forums.precentral.net/web-os-...ml#post1826065

    Quote Originally Posted by Ikyo View Post
    luna-send -n 1 palm://com.palm.location/setUseGps {\”useGps\”:\”true\”} >/dev/null 2>&1
    luna-send -n 1 palm://com.palm.location/setUseGps {\”useGps\”:\”false\”} >/dev/null 2>&1
Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions