Jump to content

njdubois

Members
  • Posts

    200
  • Joined

  • Last visited

Everything posted by njdubois

  1. I've been having an issue with files I upload via a webpage and php. Everything works, but I can't get the permissions to be setup right. I know my code is working. I have used the same exact code for 2 other clients with godaddy. The default permisson for files uploaded with godaddy is: The folder itself: rwx---r-x (0705) A file in the folder: rw-r--r-- (0644) And everything works fine. On this clients host www.networksolutions.com: The folder itself: rwxrwsr-x (2775) A file in the folder: rw-r----- (0640) These are all defaults, I have never changed anything with the the clients on godaddy. I've read all over, the same issues. Broken Image Link on site, you can manually download the file from an ftp client and everything is ok. Most of these sites say changing the permissions on the folder itself should solve the problem. It doesn't matter what I change it to, the uploaded files still have the same permissions? The support specialist...if that's what you want to call him... says that the server is configured properly, and that I have to use a script that "uses ch-mod to change permissions of uploaded file." I'm sure I can figure this out no problem. I don't see why I have to. Isn't there a setting somewhere I can change? I contacted them, networksolutions, first because they are a smaller host, and I figured there wasn't much anyone here would be able to do for me. I remember reading somewhere that there is config files stored in the root folder of the server that I may be able to setup default permissions and thus have what I have already done and working everywhere else do just that, work. I understand that as a web developer I am going to have to learn the ch-mod stuff sooner than later. I read somewhere that you can use that to send out mass emails on hosts with over shared email servers. (can only send so many at a time) So whats the plan? Should I start working on that now, or is there something I can do to make what I know works, work? Thanks for your time friend, Nick
  2. If you go to www.leadfootgearjammers.com, you can see the page I'm talking about. On a big screen everything looks great, on a small screen, it smashes everything together, but yet there is still inches of margin. Whats the easiest way to reduce the margin by an inch? Thanks so much! Nick Its all html, but here is the css: html { background: url(background.png) no-repeat center center fixed; -webkit-background-size: 55%; -moz-background-size: 55%; -o-background-size: 55%; background-size: 55%; background-color:black; } body { height: 100%; margin: 0; font-size: 12px; line-height: 1.5; color: #878484; font-family: "Droid Serif", sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; } #wrapper { min-height: 100%; } .header { background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.),to(rgba(25,25,25,0.)); min-height: 60px; min-width: 100%; } .header_menu { padding-top:1px; padding-bottom:1px; margin-left: 21%; margin-right: 21%; } img.middle {vertical-align:middle;} img.thumbnail { margin:5px; height:100px; } menu_item { color: white; } a:link { font: normal 0.9em/1 "Kreon", serif; text-transform: uppercase; color: white; text-decoration: none; margin:14px; } a:visited { font: normal 0.9em/1 "Kreon", serif; text-transform: uppercase; color: white; text-decoration: none; margin:14px; } a:hover { font: normal 0.9em/1 "Kreon", serif; text-transform: uppercase; color: red; text-decoration: none; margin:14px; } a:active { font: normal 0.9em/1 "Kreon", serif; text-transform: uppercase; color: red; text-decoration: none; margin:14px; } .container { overflow:auto; margin-left: 21%; margin-right: 21%; } #left { width: 65%; } #right { width: 31%; } #left { float:left; } #right { float:right; } .body_item_header { margin-top:25px; font-size:20px; color: white; text-shadow:0px 1px 15px #000000; } .body_item { border:solid 1px #333333; -moz-border-radius-topleft: 2px; -moz-border-radius-topright:2px; -moz-border-radius-bottomleft:2px; -moz-border-radius-bottomright:2px; -webkit-border-top-left-radius:2px; -webkit-border-top-right-radius:2px; -webkit-border-bottom-left-radius:2px; -webkit-border-bottom-right-radius:2px; border-top-left-radius:2px; border-top-right-radius:2px; border-bottom-left-radius:2px; border-bottom-right-radius:2px; background-color: rgba(0, 0, 0, 0.; padding:10px; } .youtube_thumb { border:solid 1px #333333; -moz-border-radius-topleft: 2px; -moz-border-radius-topright:2px; -moz-border-radius-bottomleft:2px; -moz-border-radius-bottomright:2px; -webkit-border-top-left-radius:2px; -webkit-border-top-right-radius:2px; -webkit-border-bottom-left-radius:2px; -webkit-border-bottom-right-radius:2px; border-top-left-radius:2px; border-top-right-radius:2px; border-bottom-left-radius:2px; border-bottom-right-radius:2px; background-color: rgba(0, 0, 0, 0.; padding:10px; align;center; } audio { width: 200px; } This is my first attempt at using CSS, so if there is some blatant problem please be gentle =P
  3. IS NULL is exactly what I needed! Thank you so very much!!! Nick
  4. Using phpMyadmin, the mysql tool godaddy provides: I have a table named users with these fields: id, name, password, contact_id there is a bunch of rows where the contact_id=NULL I only want to view those: SELECT * FROM users WHERE contact_id=NULL but it returns 0 results? SELECT * FROM users WHERE contact_id="NULL" SELECT * FROM users WHERE contact_id="" return the same, nothing. What can I post to better help you diagnose my problem? Thanks for your time! Nick
  5. Hello all! I've posted about this a few times in the past, and we still don't have a process that simplifies this issue. My client listens to and grades sales phone calls. His customers have a contract with one of a handful of companies that record these phone calls. My client logs into these websites, downloads the audio file for the call. Enters some stuff into a database, uploads the call and the salesperson can log in to our site see his grade sheet and listen to his call. These companies have sites that are just garbage. They tried to stuff so many features in that just simple user interface is a hassle. But that isn't the problem. One of these companies provides audio files in the AU format. The entire world is loving mp3's, and these guys have to be difficult. Did I say that these AU files are almost 3 times as large as the final converted mp3? My clients customers have contracts with these companies. We're stuck with AU files. So I wrote an audio conversion program using visual basic and SOX and everything was ok. Then we moved to web apps, everything is a webpage now. I can't run the exe from a website. My client has to do this whole hassle to convert these files and get them on the server and linked to a record in a mysql database. As far as known options. I know that we can upgrade our godaddy host from a shared to a dedicated server and gain the ability to upload libraries that convert audio files server side. Unfortunately the money isn't in the company to do this. I have also been searching out online audio conversion sites, and emailing them with my issue and asking if there is anyway we can come to an agreement. And that's where I am. I have been bashing my head against this problem for over half a year. So I'm asking for any wisdom, comments, ideas, thoughts. ANYTHING! Give me a magic string of words I can give to Google that will get me heading in a better direction that I am heading now! Please please please help! And thanks so much for even taking the time to read all of this. Nick DuBois
  6. This may end up closing this post. We have tried it on enough other macs at this point where we are sure its his system. We don't know about youtube or flash, he never answered the questions. Thank you all for your help, and please let me know if you think of anything else! Nick DuBois
  7. I wish! He is a few states over. We can't get him on the phone so remote desktop wont be an option. Thanks for the reply!
  8. Thanks for getting back to me! You and one friend on facebook tested the link for me. My friend on facebook said it did not work, but didn't go into details. Here is an update. I have downloaded Safari for windows and everything works no problem. I am waiting to test the page in a VM on actual os x but have to wait for a copy of os x. The customer in question is next to impossible to get a hold of. My client tells me he may be "insulted" due to ego because the way our company was recommended to him from one of his superiors. My client has called and left 2 messages and I have called and left a message. He normally responds to emails 2 days later. Which is why this reply is so late. This time he said "Test page does not work." Detailed no? We absolutely need to insure that our product works in OS X whether we work with this customer or not. I've had no problems in FF, Chrome, IE, The Generic Android Browser and Dolphin on Android. Safari on IOS, and now Safari in windows. I have researched this issue. The most common solution is to make sure you have type="audio/mpeg", which i do. What are the odds this guy is just being disgruntled and having nothing to do with us? My Facebook friend did say he had problems as well? Is there anyone else that can look at the code I attached in the first post and confirm that for some reason or another it isn't working? Thanks for taking the time to read this, and thanks for helping me find the path to a solution! Nick
  9. We have a customer using a MAC that can't hear audio files. The HTML5 page states that mp3's are playable in html5 on Safari. I'm currently waiting to hear back from him if the following works, but I'd rather not wait to hear back from him. First off, can someone with a MAC tell if if this page is working? http://www.marcomtechnologies.com/audiotest.php You should hear a beatles song? If the page doesn't work with a MAC, This is the code: <?php $filename='LoveMeDo.mp3'; $flash_audio_html.=' <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="165" height="45" id="niftyPlayer1" align=""> <param name="movie" value="niftyplayer.swf?file=audio_upload/' . $filename . '" /> <param name="quality" value="high" /> <param name="bgcolor" value="#FFFFFF" /> <embed src="niftyplayer.swf?file=audio_upload/' . $filename . '" quality=high bgcolor=#FFFFFF width="165" height="45" name="niftyPlayer1" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"> </embed> </object> '; if ($filename!=''){ $audio_html.= ' <audio controls="controls"> <source src="audio_upload/' . $filename . '" type="audio/mpeg" /> '.$flash_audio_html.' </audio> '; } else { $audio_html.='<p style="font-size:large;">No Audio Found!</p>'; } echo $audio_html; ?> What do I need to do to get MAC support? Please keep in mind that I know absolutely nothing about MAC's! Thanks for your time! Nick
  10. Should I try to get the end users to update their systems?
  11. I have an email form on a website I created. Add attachment, send the message to gmail, or hotmail. no problems. Send it to outlook, and we get the .dat file problem. I sent the same message to my roommate at work, who is a computer admin, outlook 2010, fully updated and so on and everything works like it should. I could bet my life's worth of paychecks that the people having this issue are using an old, outdated version of outlook. As a matter of fact I get all sorts of grief from my clients, clients. Its not working Its not working and its ALWAYS something being outdated ... I swear the tech's they have working for them.... UGH Anyways.... I did some research and I found that the problem has something to do with sending emails as Rich Text, and that i should change it to HTML. The problem is that I already am sending out as HTML, and that the email attachments are working just fine in a newer versions of outlook. So here is my code: //create 2 boundary strings. They must be unique $boundary1 = rand(0,9)."-".rand(10000000000,9999999999)."-".rand(10000000000,9999999999)."=:".rand(10000,99999); $boundary2 = rand(0,9)."-".rand(10000000000,9999999999)."-".rand(10000000000,9999999999)."=:".rand(10000,99999); $fileContent = chunk_split(base64_encode(file_get_contents($path))); $html_message = $email_message; $headers =<<<AKAM From: $from MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="$boundary1" AKAM; $attachment = <<<ATTA --$boundary1 Content-Type: application/octet-stream; name=$path Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=$path_name $fileContent ATTA; $body = <<<AKAM This is a multi-part message in MIME format. --$boundary1 Content-Type: multipart/alternative; boundary="$boundary2" --$boundary2 Content-Type: text/html; charset=ISO-8859-1; Content-Transfer-Encoding: 7bit $html_message --$boundary2-- $attachment --$boundary1-- AKAM; //send the email $mail_sent = @mail($to, $email_subject, $body, $headers); Sorry if the code is all over the place, it took me a while to find a working example and to modify the script to send emails with attachments. Everytime I would try to format the code things would stop working and I finally said "Fine, if this chunk of code is going to look like ____ than so be it!" But as you can see, it already is set as HTML. So my question is, how do I get the above chunk of code to send an email with attachments that will work in all clients? Including older versions of outlook? Thanks, as always I appreciate the assistance! Nick
  12. This may belong on the phpexcel discussion board, but that site annoys me, so I am hoping someone here can help me out! I've created an excel spreadsheet with 3 col's. Each row has an Appointments Set, Appointment Process used count, and then a percentage Below all the rows, I have a row for totals. Something like : A B C 1 1 | 0 | 0.00% (=B1/A1) 2 1 | 1 | 100.00% (=B2/A2) 3 0 | 0 | 0 (=B3/A3) 4 4 | 2 | 50.00% (=B4/A4) 5 ------------------- 6 6 | 3 | 50.00% (=B5/A5) A6 = SUM(A1:A4) B6 = SUM(B1:B4) Columns A and B are normal numbers, A6 and B6 are sum functions, and C is as shown above. Each C cell's number format is set to a 2 decimal percentage. Inside MS excel, once I open the generated document, C3 should say #DIV/0! but not until I delete row 1(or delete any row) does C3(which is now C2) changes from 0 to the #DIV/0! error. I have the actual cell formatted as a 2 decimal percentage! ($objPHPexcel->getActiveSheet()->getStyle($key.$cur_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_PERCENTAGE_00) What I believe is going on is this: phpexcel knows you can't do a divide by 0, so it just outputs a 0 and that's how it handles that error. MS Excel knows you can't do a divide by 0, but needs a refresh before it will say #DIV/0! I do not want to see the #DIV/0 error, and I don't want to see just a 0. I need all cells to have matching ###.##% format. Even if its 0.00% from a divide by zero. Because I am doing all the math inside excel with functions, I can't, using php, just set the cell to "0/00%" excel has to want to set that cell for me. How do I do this? Its killing me!!!!! Any help is as always appreciated! phpfreaks hasn't done me wrong yet! Thanks Nick
  13. And those little green triangles it puts in the corner of cells with strings.... Thanks for the help ladies and gents! Nick
  14. Thanks for the uber fast reply!!! Guess I should have included this. These are the 2 functions I have tried : $current_score=number_format((float)$current_score, 2, '.', ''); $current_score=round($current_score, 2); Your saying that excel is formatting the numbers and that I will have to turn $current_score into a string to stop excel from stripping my numbers? I will take a look. Thanks Nick
  15. I am creating an excel report that displays a username and their score. These are a few examples of what I am going for : 3.50 4.00 1.45 In the excel report these numbers show as 3.5 4 1.45 or so on... I want the 2 points always shown but everything I find online strips them. I'm not using any features of excel. Just saying put this number here. I'm about to just pad the variable with zeros but am hoping there is a built in function? Thanks for taking a look! Your help is always very appreciated! Nick
  16. Hey, wanted to let you all know that the debug tools in chrome helped me to solve my problem. I didn't have an id set for one of my checkboxes and it was giving a "cant test checked for null" error. Again, many thanks! Nick
  17. Didn't even know something like that was available. I will take a look at it tomorrow morning when I'm back at work. Thanks for the direction! Nick
  18. if I understood what you meant by name!=id correctly, you meant that I need to have both name and Id in the input element. like this : <input type="checkbox" name="p4_No_Intro" id="p4_No_Intro" value="True" '.$p4_No_Intro_Check.' onclick="total_points()" /> That doesn't work either? So I'm pretty sure I didn't understand you? function total_points() { cur_point_total=3; if (document.getElementById("p4_No_Intro").checked==true) { cur_point_total--; } document.getElementById("current_points").value=cur_point_total; } This chunk of code worked fine in the web browser control in my vb.net app. But when I try to load the page in a normal webbrowser, nothing happens when I check an input. The textbox "current_points" never gets set to cur point total. If I take the whole if statement out the current points textbox gets set to what ever i have cur point total set to. To me, it appears as if the if statement has some flaw or error in it that I am not seeing, but why would it work in a simple watered down webbrowser that is the control in vb.net, but not a full blown web browser??? What ever it is I'm missing has to be the simplest thing, and I'm gonna have one of those palm to forehead moments. Thanks for reading this, and thanks for the reply! Nick
  19. Sorry! I'm new to javascript and I was hoping there was a blaring syntax error in the if statement that I wasn't catching. I have a form with inputs that look like this : <input type="checkbox" name="p4_No_Intro" value="True" onclick="total_points()" /> When they check or uncheck the checkbox, it should call total_points. The code shown that works sets a textbox to the point total. The code shown that doesn't work does nothing. Its as if its not even being called. Thanks for the fast reply, I hope this helps you help me! Nick
  20. This works: function total_points() { cur_point_total=3; document.getElementById("current_points").value=cur_point_total; } And this doesn't (but it does work in a vb.net webbrowser control): function total_points() { cur_point_total=3; if (document.getElementById("p4_No_Intro").checked==true) { cur_point_total--; } document.getElementById("current_points").value=cur_point_total; } What am I missing? Thanks Nick
  21. Can't locate the edit link? Guess I should have included this information. My current solution involves giving the user options, month week or day. Month is easy, I use LIKE $month .'/%%/'.$year But for week, I do a for loop for each day and build a long sql statement using or select * from table where name = 'nick' AND date='5/5/2012' OR name='nick' AND date='5/6/2012' but this seems like to much work? The problems start when they want more days than a week worth of data pulled, or maybe only a handful of days with in a week. what if its 2 dates that span months? Thanks for taking the time to read this! Nick
  22. My dates are in the format of month/day/year. ##/##/####, with no leading zeros, so 7 is 7, not 07. I will be provided to name, a start date, and an end date. so, Nick, 5/5/2012, 5/15/2012 I need to pull all records from a table from the start date, to the end date, where name = nick. What would my sql statement look like? I've looked all over the internet, but everything says to use a different date format, but I've already got a massive database, with many different applications using and writing to said database. Many thanks for the assistance! Nick
  23. From the replies here I came up with : <?php if(isset($_POST['ok'])) { $in_str = $_POST['text_in']; $to_data = addslashes($in_str); $to_data = stripcslashes(ereg_replace("(\r\n|\n|\r)", "<br />", $to_data)); $display_output = stripcslashes(ereg_replace("(\r\n|\n|\r)", "<br />", $to_data)); $edit_output = stripcslashes(ereg_replace("(<br />)", "\r\n", $to_data)); echo 'Formated For Database : <br />'; echo '<textarea cols="100" rows="5">'.$to_data.'</textarea>'; echo '<br /><br />'; echo 'Displayed from Database : <br />' . $display_output; echo '<br /><br />'; } echo 'New, or for Edit from database : <br />'; echo '<form name="text_input" method="post" action="text_stuff.php">'; echo '<textarea id="text_in" name="text_in" cols="100" rows="10">'.$edit_output.'</textarea>'; echo '<input type="submit" id="ok" name="ok" value="Ok" />'; echo '</form>'; ?> Does the job perfectly. Many Thanks Nick
×
×
  • 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.