BizLab
Members-
Posts
141 -
Joined
-
Last visited
Never
Contact Methods
-
Website URL
http://bizlab.us
Profile Information
-
Gender
Male
-
Location
Myrtle Beach, SC
BizLab's Achievements
Member (2/5)
0
Reputation
-
I’m trying to create a configurable product collection containing multiple associated products as in this Wiki article. http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-configurable-product The problem is that the initial attempt was successful, and i was able to create a configurable product by combining 3 simple products. When i try to create another, the product selection table at the bottom of Product > Associated Products (tab) > Super product attributes configuration i am only able to select one item and the rest are disabled / un-checkable. This seems like a bug, but i’m not sure. Creating a new collection has the same (fail) result. Magento Version 1.6.2 MediaTemple DV 4.0 64bit CentOS 5.x Any help is appreciated.
-
Installing SOAP on VPS 64bit, legacy common file problem
BizLab replied to BizLab's topic in Apache HTTP Server
I just glanced at my phpinfo() page before taking a break and soap.ini is in there and showing as an active module, I'll test this a little later -
Installing SOAP on VPS 64bit, legacy common file problem
BizLab replied to BizLab's topic in Apache HTTP Server
When running yum install php-soap Again to see if it was indeed installed, i see this (as expected) So why doesn't SOAP show up in the Pear list..? -
Installing SOAP on VPS 64bit, legacy common file problem
BizLab replied to BizLab's topic in Apache HTTP Server
After following these instructions : http://wiki.mediatemple.net/w/(dv)_4.0:Install_SOAP_using_Yum and restarting apache, SOAP still doesn't show up in the "$pear list". There were no dependency issues or errors during the upgrade process. Any ideas? -
Installing SOAP on VPS 64bit, legacy common file problem
BizLab posted a topic in Apache HTTP Server
I'm trying to install SOAP on a MediaTemple DV 4.0 (64bit CentOS 5, PHP ver 5.3.5) VPS server. When i ran yum install php-soap I get this I found and downloaded "php-soap-5.1.6-32.el5.x86_64". When trying to install, i am greeted with this message Basically, the existing php-common file is more recent. What else can i do to install SOAP on this server ? -
You would generally want to move your MySQL database connection login info somewhere more secure, and use a php include. There are newer MySQL connection functions available that are recommended as well..look into the mysqli_connect() and it's associated functions I don't recommend storing both the username and password in the $_SESSION array, again for security reasons. Instead: 1. Check for valid credentials 2. If good, move them to a page that only logged in users can access 3. if not good, take them back to the login form limit access to the logged in pages with a conditional check for the username session variable set when logging in like so: $_SESSION['username'] = $username_from_database AND, don't forget start_session(); on every page
-
linking single menu bar to multiple pages?
BizLab replied to UrbanDweller's topic in PHP Coding Help
Try using links for the include (and the navigation) based on the document root require_once('/header.php'); instead of require_once('../../header.php'); // and so on that should work just fine -
Humm... first, I would probably move my constants to a file outside the class and include them in the script in order to keep all constants in one location. You have a high-level of restriction set on the sample code.. final classes are the end of the line, and can't be overridden or extended. Maybe not the best choice, but it all depends on your implementation The use of OOP is to create widely reusable code that is usable in various projects.. declaring a filepath inside a class is not well-advised. i suggest : class myClass{ // properties protected $_directory; // construct (used to pass attributes to the class) public function __construct($directory){ $this->_directory = $directory } } This way, the directory used by this class can be called at runtime using // instantiate the object $object = new myClass(MY_DIR_CONSTANT); And then you can work on that. I'd recommend grabbing an OOP book if none of this makes any sense. Let me know if you have any problems
-
Jushiro, I think you would be best helped by picking up a book on PHP/Mysql... You don't actually store the PDF file IN the database, there is merely a reference to the file name in there (and sometimes even the complete file path, if your aren't worried about bit size in the DB). 1. You are missing the primary key column for the database.. if you don't know what this is, i highly recommend reading up on the basics of MySQL 2. Use a standard upload form as BorderLine suggested to upload the PDF (or any other file) 3. Retrieve the file (as thorpe said) by using a standard anchor <a> "link" tag. the $_FILES array is used when uploading files from a webform to the server and has nothing to do with the database processes 4. use the primary key as the connection between your select menu and the appropriate file eg: <select name="teachers-docs"> <option value="primary_key_goes_here">Document for math homework</option> <option value="primary_key_goes_here">Document for science homework</option> <option value="primary_key_goes_here">Document for history homework</option> </select> when the student selects an option, a query can be submitted to the database calling for the file_name column for primary_key # x which will give you the appropriate file name. I recommend using $_GET to submit your form, as it will make testing and implementation slightly easier. Also, provide a link to the file and allow the student to download the PDF (to make things easier) good luck
-
Ok, trying your code, the deny worked after i escaped the "." (as in the apache docs) but the allow statement continues to fail. SetEnvIf Referer dev\.bizlab\.us internal <FilesMatch "\.mp3$"> Order Deny,allow Deny from all allow from env=internal </FilesMatch> // provides the same output as <Files ~ "\.mp3$"> Order Deny,allow Deny from all allow from env=internal </Files> this is a direct link to a sample MP3 file, which should be blocked (and it is when the .htaccess is in place) http://dev.bizlab.us/bocmusic/artists/nilogy/music/albums/shattered/your-grace.mp3 however, the MP3 file should now be available in the music player here http://dev.bizlab.us/bocmusic/artists/nilogy/index.php but isn't. Notice I dropped the "or" statement from the condition. The strange part was that when we had (swf|mp3) as the file type, the SWF file was made available to the local system, and the MP3 files were still denied..
-
In trying to block the un-authorized download of MP3 files on the development version of a new client site. I successfully blocked external access to the files with the following code, placed directly in the directory containing the MP3s - and it worked. The MP3s played in the flash player and were denied access via direct cURL. GREAT! Order Deny,Allow Deny from all Allow from dev.bizlab.us Now, since there will be multiple artists on the site, i wanted to localize the deny directive to the main htaccess file. i decided to change the directive to deny all MP3 files by type using the FilesMatch regex (the syntax is correct - see below). This statement was placed in the htaccess in the document root to allow control over all directories. #block downloads of MP3 files <FilesMatch "\.(swf|mp3)$"> Order Deny,Allow Deny from all Allow from dev.bizlab.us </FilesMatch> When i ran this directive, all the MP3s were blocked from inside and outside the site. Now the kicker... i reverted back to the original directive in the directory holding the MP3 files and the they where still blocked... everywhere.. the only way to return the MP3 files (to functioning) was to remove all htaccess deny directives. 1. this is not a cache issue. The browser history and cache was cleared and closed on each attempt 2. i have no idea.. but this development version of the site is on my server's sub domain (problem here?) 3. this is a basic network solutions shared server running apache 2x Link to site (i will be messing with this today, so it may or may not work when you arrive. i will mark this as "solved" if it is indeed fixed http://dev.bizlab.us/bocmusic/artists/nilogy/index.php
-
I'm looking for some specifics on how to show more months in the drop-down menu for AWStats on a Media Temple DV (3.5) server. I'd like to see 1 rolling (continuous) year on the stats - which i know is possible, because some Network Solutions Shared systems i have worked with have it. Thanks!
-
I totally agree with GuiltyGear, look up "salt generation" or "password salt" which will allow you to attach a random generated string (with sha1() or md5()) and append those random chars to the existing users password. Then encrypt the whole package. This will make each password in your DB completely unique and virtually impossible to crack... BUT all the other aspects of your system are still open to attack - lets say for instance someone gets a hold of your entire DB, they really don't need to know these passwords anyway, or they could then change them from INSIDE the system, comlpetely bypassing your login checks. Original pass : MyDogBob (common type with users) Salt : 6aeff31faee28599998ef91a9c42b1ceb2e8f5ea // this string should be totally random mod Pass = MyDogBob6aeff31 new pass = sha1('MyDogBob6aeff31') something like this secures your users passwords to a very acceptable level, even for more sensitive systems. Just some things to think about. Back to the original question, i don't know why you would need to exclude certain characters from password generation.. but the non-exclusion type that i use is this: function keyGen($limit=8, $opt=false){ $i=0; $pc = array('abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1234567890','~!@#%^*_+'); while($i<$limit){ $arrkey = array_rand($pc, 1); // RETURNS THE ARRAY KEY (selects either a char or int list to use, randomly) $str = $pc[$arrkey]; $key .= $str[rand(0, strlen($str))]; // selects a random char from the array $i = strlen($key); // protects from the rand char generation bug. Without it, you will experience the NULL result loop bug } $string = sha1($key); // if the function call requested both the encrypted pass and the standard string, create an array if($opt){ $result[0] = $key; $result[1] = $string; return $result; } else{ return $string; } // if the function call doesn't need the encrypted string - send the un-encrypted string only. (THE PASSWORD) } remove the characters you don't want from the list - this checks the string and will always print the designated number of chars (say 8 in this example). the reason i use this method is because the string generated is more random with uppercase, lower, numerics, and spec chars due to the random array index selected. maybe you can use that
-
One more thing just to clarify the question of how my regex was behaving initially - it turns out that i was escaping the string before running this regex, so that once the string hit the regex for evaluation, the string didn't match, and was RE-converted Thanks again CV
-
DUDE, seriously??? How did you find that? THAT WAS IT! The last unsecured item!! Thanks!