Jump to content

scrubbicus

Members
  • Posts

    112
  • Joined

  • Last visited

    Never

Everything posted by scrubbicus

  1. Does anyone have a good resource in doing this? The Plesk part might or might not matter. We have a dedicated hosting server on GoDaddy and I'm trying to upgrade the PHP version, I attempted it once but was unable to access any MySQL databases. I think the only problem was that I didn't know how to manually reset the MySQL database password to some new encryption? I think I have to do it through SQL Command Prompt? Any help is appreciated.
  2. PHP Version 5.2.17 Wordpress Version 3.0.2 I'm currently in progress of upgrading my PHP version so I can use the latest Wordpress version but in the mean time I need to get a Wordpress up. If anyone has a good resource to direct me too for upgrading my PHP version that would be appreciated. I uploaded my 3.0.2 version of Wordpress up through FTP to my website and when I go to the URL path it gives me a Internal Server Error. I just tried unzipping this package into my localhost and it works just fine so I assume it has something to do with my server configuration?
  3. I don't remember the exact version but I just recently upgraded a reseller account on a Windows GoDaddy server running with Plesk and now I get. Warning: mysql_connect() [function.mysql-connect]: Premature end of data (mysqlnd_wireprotocol.c:554) in C:\inetpub\vhosts\domain.com\httpdocs\index.php on line 6 Warning: mysql_connect() [function.mysql-connect]: OK packet 1 bytes shorter than expected in C:\inetpub\vhosts\domain.com\httpdocs\index.php on line 6 Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords flag from your my.cnf file in C:\inetpub\vhosts\domain.com\httpdocs\index.php on line 6
  4. I have mailing letters that need to be printed and I have a database of recipients that the letters need to be printed too. How will I go about creating a template that will... I presume be XHTML/CSS page that will be able to print out these mailing letters in the exact dimensions to that I can print them. I understand how to query the database and loop through the recipients I just don't know how to make this consistent template.
  5. I'm trying to use the ZipArchive class and it works on my localhost but when I upload the script and try to use it on my website it can't find the ZipArchive class. How do I install this on my remote host? Also on my localhost it seems like I can only directories of a certain size. When the directory is to big nothing happens. I'm having a problem with using cURL or php ftp to write or create files remotely. Is there a way I can use cURL or php ftp and set the file permissions while it's being uploaded? I'm on a windows server so I can't change the file permissions through ftp_chmod. How else can I get around this so I can write/create files remotely. Thanks!
  6. I'm trying to find a way to back up an entire servers file through PHP. I have a script that can take selected files into a zip file but I'm not sure how to make sure that when I loop through directory and files that I get every single file. I was thinking of just foreach(glob('*') as $file up to 10 times but I'm hoping there's something more definite then that method... Thanks
  7. How can I use PHP to export my database into a .sql file?
  8. I tried searching for help on beginning to learn cron jobs but I couldn't find any helpful tutorials. What file format does a cron job have to be on? Can anyone quickly explain or link me to a tutorial on the very basic cron job of running a PHP script every how many hours. Thanks.
  9. Is there a way to a curl_setopt( $curl , CURLOPT_URL , "ftp://username:password@example.com/directory/url.php?name={$name}&body={$body}" ); and modify permissions to the file or directory temporary so that I can write to a file that shouldn't be written too unless I were doing it?
  10. I'm not sure where I would ask this, I suppose Facebook is a PHP Application? Haha. Well this is PHP and JSON I suppose or just a simple Facebook security setting but I recently found graph.facebook.com and am completely ecstastic about it however I can't get my feed data only my basic information, but I can get some other peoples feed data and some pages as well. Is there some sort of Facebook security setting that needs to be enabled to be able to retrieve this feed data?
  11. So I'm trying to mess around with the HttpRequest class and it can't be found. I looked it up and it said I have to enable the extension in the php.ini file but I couldn't find the php_http.dll extension that the website said I should be able to find and un-semicolon. What exactly is a PHP HttpRequest? It seems like a few languages have this functionality. What is possible with the PHP HttpRequest, do I need other languages to get, send or display data through HttpRequest? Thanks for any help.
  12. I've seen the @ sign before a lot of different syntax. What does it mean? I was reading up on some MySQL references and saw it here SET @str = BINARY 'New York'; but I've seen it in many other places as well and was always curious.
  13. So my database has 9 entries in it, so it goes up to ID 9. Is there a way to make the next entry skip all the way to 101 without adding 92 more entries. If I added a new dummy entry and made the ID 100 would the next one automatically be 101 or would it be 10?
  14. Might anyone know a good tutorial on how I might go about doing this? I found a simple calendar script that works perfectly but now I'm trying make it so I can save an event that has a start and end date that are different then each other for reoccurring to a database then have it display correctly on the calendar when I query the database. I have no clue if I'm even going about this the right way. I haven't even started diving in to if the event was to reoccur once a week or once a month, I'm just trying to get it so it displays on the start date then displays every day until the end date. Right now I take the current day, month, year that the calendar is looping on and check it against the event day, month, year. If the current calendar day is on or after the event start date then it returns true and if the current calendar day is on or before the event end date it returns true.... so then if it returns true on both then I give it the go ahead to display on that day. What I have is: if($current_date['year'] > $event_date['year']) { $result = ($return == 'boolean') ? true : 'trail'; } else if($current_date['year'] == $event_date['year']) { if($current_date['month'] > $event_date['month']) { $result = ($return == 'boolean') ? true : 'trail'; } else if($current_date['month'] == $event_date['month']) { if($current_date['day'] > $event_date['day']) { $result = ($return == 'boolean') ? true : 'trail'; } else if($current_date['day'] == $event_date['day']) { $result = ($return == 'boolean') ? true : 'today'; } else if($current_date['day'] < $event_date['day']) { $result = false; } } else if($current_date['month'] < $event_date['month']) { $result = false; } } else if($current_date['year'] < $event_date['year']) { $result = false; } break; case 'end': if($current_date['year'] < $event_date['year']) { $result = ($return == 'boolean') ? true : 'trail'; } else if($current_date['year'] == $event_date['year']) { if($current_date['month'] < $event_date['month']) { $result = ($return == 'boolean') ? true : 'trail'; } else if($current_date['month'] == $event_date['month']) { if($current_date['day'] < $event_date['day']) { $result = ($return == 'boolean') ? true : 'trail'; } else if($current_date['day'] == $event_date['day']) { $result = ($return == 'boolean') ? true : 'today'; } else if($current_date['day'] > $event_date['day']) { $result = false; } } else if($current_date['month'] > $event_date['month']) { $result = false; } } else if($current_date['year'] > $event_date['year']) { $result = false; }
  15. So I have an array of IDs that I would only like to select from a database table instead of everything in the table. How might I go about doing that?
  16. So I have a PHP application that requires personal letters to be printed to each person that needs one that day. Currently I have a list of all need to be printed letters but the user would have to go through each one individually and print it. Is there a way I can run through each page with a timed redirect and print it without a user prompt? I looked up and don't think that's possible so I was thinking of other ideas. 1) Can I export all letters into microsoft word document or PDF document and have them be separated by page? 2) Does each browser (and cross browsers) format a page differently (even if I specifically specific all HTML/CSS to each element) the same so could I use HTML to space out the pages perfectly so that if a user were to print the entire sheet it would just be pages of letters. I don't want one of the letters accidentally running on the bottom of the last one. Thanks for any help.
  17. How would I go about using PHP to export all the data in my SQL database to a .sql file? Also how can I then import that .sql file back into the database? Thanks!
  18. I can't seem to get it working. I was following the tutorial and I got into the http.conf and was able to #LoadModule rewrite_module modules/mod_rewrite.so remove the # but I couldn't find the #AddModule, but I tried restarting my apache anyway and went on with the tutorial but not working so I figured that was majorly important.
  19. Well when I try to write this shorthand on files outside the Code Igniter framework but still in my localhost I can't get it to work, so I'm presuming I don't have that enabled in the php.ini file but it's still working within that framework?
  20. So I've seen some short hand PHP syntax before and I've tried using it on my scripts and it wouldn't work, syntax such as <?=$message?> I just started taking a look at Code igniter today and I realized you have to enabled it in this framework, does anyone have a tutorial on how to write a script, or if it's a system setting, do that so I can use this shorthand in my work outside of frameworks?
  21. $selected = ( $select_value ) ? ( ($row['id'] == $select_value) ? 'selected' : ' ' ) : ' '; I suppose it is since I'm not getting an error but I don't believe it's doing what I think it should do. I want to set $selected depending on if $select_value is TRUE or FALSE, if it is TRUE I want to then check if it's the same as the row id we're currently in with the SQL loop, if it is, set it to 'selected' if not then nothing.
  22. I just reformatted and I remember I've setup up a password before my MySQL and PHP MyAdmin but I can't remember where I can do that. I searched for some MySQL commands to set my root password but they aren't working.
  23. So I have this application that has some classes already setup for MySQL database entry, for INSERT and UPDATE $_POST information. All these pages that have this editable content have the same basic format with 1 item per row and then having many columns for all the information. For my settings page however I have certain settings grouped and each setting is a different ID with columns ID NAME and VALUE. Is there a way to get into one SQL statement, preferably an UPDATE SQL command, to UPDATE groups of IDs at the same time?
  24. So I've finished up the basic framework and all the functionality of this application here and now I'm thinking the next step is going through the code and refining it because it was very neat at the beginning but gradually got less neat. All my other side project applications haven't really gotten to this step so I'm kind of at a loss. I don't quite know what I'm looking for, just some direction I suppose. I don't know if my overview will even help or if it makes any sense but any help is appreciated. Thanks! I'm trying to get myself acquainted to building object oriented application and I think I have the idea of how OOP is suppose to work. Anyway what I have is the main application class that handles the core of the application. Extra Classes I have other side classes like an encryption object, an object that handles POST data and SQL updates/insert queries and a class that handles sessions and the login/register/forgot password templates. All these classes are require() in through the main class constructor and initialized as a protected variable. Should I be initializing them like this? Template Views I've come to like the idea of using HTML/PHP template views for all my pages and then including them in through a function. I have a whole folder of the page templates I use and the way I use them is calling something like $application->get('template' , 'login'), that function include() the template then prints $html. Each template has PHP and HTML and is all combined into the $html variable, I find it easier to do whatever I need to do with that view if it's encompassed in a single variable. Main View I have an admin.php and public.php that just has the basic template of the website, these are just the index.php files for each of those modes. These are include() through the main class constructor. Actions I'm not sure if this is what it would be generally called but my main class constructor handles all these when they are isset(), then it goes through with calling functions to get the data put wherever it needs to be put. These are basically just any $_GET or $_POST information that the application needs to move forward. Installation The main class constructor redirects to setup if certain things aren't met. I have another class entirely for this that goes through the process and template views that are included through it.
×
×
  • 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.