PHP - Moved: How Do I Add Mcrypt To My Vps Package?
This topic has been moved to PHP Installation & Configuration.
http://www.phpfreaks.com/forums/index.php?topic=355087.0 Similar TutorialsI need a simple two-way encryption algorithm that does not require mcrypt. What did PHP use for 2ways prior to mcrypt? The reason for this is installing mcrypt on our production server requires a recompile of PHP and I'm not keen on doing that on a production server. Security and bit-length of the algo is not that important. Please advise. I just updated a site as follows: cd /var/www/concrete5 composer update Among other changes, the following were made (more on this later): - Updating concrete5/core (8.5.2 => 8.5.4): Downloading (100%) - Updating doctrine/collections (1.6.4 => 1.6.5): Downloading (100%) - Updating doctrine/lexer (1.2.0 => 1.2.1): Downloading (100%) - Updating doctrine/inflector (1.3.1 => 1.4.3): Downloading (100%) - Updating doctrine/cache (1.10.0 => 1.10.1): Downloading (100%) - Updating doctrine/annotations (1.10.2 => 1.10.3): Downloading (100%) - Updating doctrine/common (2.12.0 => 2.13.3): Downloading (100%) - Updating doctrine/instantiator (1.3.0 => 1.3.1): Downloading (100%) - Updating doctrine/orm (v2.7.2 => v2.7.3): Downloading (100%)
errno: 150 "Foreign key constraint is incorrectly formed I expected I should have first used concrete5's update script, but too late for that. So, then I changed composer.json require concrete5/core from ^8.5 to 8.5.2 hoping to return to the previous state. Concreete5 was downgraded as desired, but now I get the following error: Class 'Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain' not found On another concrete5 site which still works, I have the following two files, however, on the broken one I only have the second: vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php:13: class MappingDriverChain extends \Doctrine\Persistence\Mapping\Driver\MappingDriverChain vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/Driver/MappingDriverChain.php:17:class MappingDriverChain implements MappingDriverSo, now I will attempt to downgrade doctrine from 2.7.3 to 2.7.2. The base composer.json file has no reference to Doctrine, but there are two other related composer files: vendor/concrete5/doctrine-xml/composer.json { "name": "concrete5/doctrine-xml", "description": "Define database structure via XML using Doctrine data types", "keywords": [ "doctrine", "xml", "structure", "database", "schema" ], "homepage": "https://github.com/concrete5/doctrine-xml", "license": "MIT", "autoload": { "psr-4": { "DoctrineXml\\": "src/" } }, "require": { "php": ">=5.3" }, "require-dev": { "doctrine/dbal": "2.5.*" } } vendor/concrete5/dependency-patches/composer.json { "type":"library", "license":"MIT", "name":"concrete5/dependency-patches", "description":"Patches required for concrete5 dependencies", "homepage":"https://github.com/concrete5/dependency-patches", "authors":[ { "name":"Michele Locati", "email":"michele@locati.it", "role":"author", "homepage":"https://mlocati.github.io" } ], "require":{ "mlocati/composer-patcher": "^1.0.0" }, "extra":{ "patches": { "doctrine/annotations:1.2.7": { "Fix access array offset on value of type null": "doctrine/annotations/access-array-offset-on-null.patch" }, "doctrine/orm:2.5.14": { "Fix UnitOfWork::createEntity()": "doctrine/orm/UnitOfWork-createEntity-continue.patch" }, "zendframework/zend-stdlib:2.7.7": { "Fix ArrayObject::unserialize()": "zendframework/zend-stdlib/ArrayObject-unserialize-continue.patch" }, "sunra/php-simple-html-dom-parser:1.5.2": { "Fix minus in regular expressions": "sunra/php-simple-html-dom-parser/minus-in-regular-expressions.patch" }, "phpunit/phpunit:4.8.36": { "Avoid each() in Getopt": "phpunit/phpunit/Getopt-each.patch" }, "tedivm/jshrink:1.1.0": { "Fix continue switch in Minifier": "tedivm/jshrink/fix-minifier-loop.patch", "Update to upstream version 1.3.2": "tedivm/jshrink/update-upstream-1.3.2.patch" }, "zendframework/zend-code:2.6.3": { "Fix continue switch in FileGenerator and MethodReflection": "zendframework/zend-code/switch-continue.patch" }, "zendframework/zend-http:2.6.0": { "Remove support for the X-Original-Url and X-Rewrite-Url headers": "zendframework/zend-http/no-x-original-url-x-rewrite.patch" }, "zendframework/zend-mail:2.7.3": { "Fix idn_to_ascii deprecation warning": "zendframework/zend-mail/fix-idn_to_ascii-deprecation-warning.patch" }, "zendframework/zend-validator:2.8.2": { "Fix idn_to_ascii/idn_to_utf8 deprecation warning": "zendframework/zend-validator/fix-idn_to_-deprecation-warning.patch" } } } } Neither seem to be applicable, but the doctrine version has to be specified somewhere. How does composer determine which version and how can I downgrade the dependency package? Thanks
PS. As a hack solution, I replaced the entire vendor/doctrine directory from one from another site, and have things working. Still, want to know how to do this right. Edited June 12, 2020 by NotionCommotionOkay so I am using PEAR's Validate package to validate a few values in my form, it validates the username just fine, but is for some reason returning false on the password field, even if the credentials are correct. Here is the link to the package (http://pear.php.net/package/Validate/) Here is the code: Code: [Select] <?php require("Validate.php");?> <?php require("styles/top.php");?> <?php $validate = new Validate(); ?> <div id="head_reg"> <div id="head_cen_reg"> <div id="head_sup_reg" class="head_height_reg"> <?php require("scripts/newsfeed.php"); ?> <?php require("scripts/links.php"); ?> </div> </div> </div> <div id="content"> <br /> <?php if(isset($_POST['reg-btn'])){ $username = strip_tags ($_POST['username']); $email = strip_tags($_POST['email']); $password = strip_tags($_POST['pass']); $repassword = strip_tags($_POST['repass']); if ($username && $password && $repassword && $email){ if($validate->string($username,$options = array( 'format' => VALIDATE_ALPHA, 'min_length' => 6, 'max_length' => 50))){ if($validate->string($password,$options = array( 'format' => VALIDATE_ALPHA, 'min_length' => 6, 'max_length' => 32))){ if ($password == $repassword){ if ($validate->email($email,$options = array( 'check_domain' => 'true', 'fullTLDValidation' => 'true', 'use_rfc822' => 'true', 'VALIDATE_GTLD_EMAILS' => 'true', 'VALIDATE_CCTLD_EMAILS' => 'true', 'VALIDATE_ITLD_EMAILS' => 'true', ))){ $query = mysql_query("SELECT * FROM users WHERE username='$username'"); $numrows = mysql_num_rows($query); if ($numrows == 0){ $query = mysql_query("SELECT * FROM users WHERE email='$email'"); $numrows = mysql_num_rows($query); if ($numrows == 0){ $pass = md5(md5($password)); $ip = $_SERVER['REMOTE_ADDR']; $date = date("F, d, Y g:i:s A"); mysql_query("INSERT INTO users VALUES ('', '$username', '$pass', '$email','Member', '$date','','0','$ip', '0')"); echo"<center>Thanks, $username! You have completed the registration process and may now login <a href=\"login.php\"><b>here!</b></center>"; } else echo"<center><font color=\"#FF0000\">That email is already in use!</font></center>"; } else echo"<center><font color=\"#FF0000\">That username is already taken!</font></center>"; } else echo"<center><font color=\"#FF0000\">That email is invalid!</font></center>"; } else echo"<center><font color=\"#FF0000\">Those passwords do not match!</font></center>"; } else echo"<center><font color=\"#FF0000\">Your password must be betweed 6 and 25 characters long!</font></center>"; } else echo"<center><font color=\"#FF0000\">Your username must be between 6 and 50 characters long!</font></center>"; } else echo"<center><font color=\"#FF0000\">You did not fill out the entire form!</font></center>"; } ?> <div id="register_form"> <form action="register.php" method="post" enctype="multipart/form-data"> <center> <table> <tr> <td>Desired Username </td> <td><input type="text" name="username" class="textbox" value="<?php $_POST['username'];?>"/></td> </tr> <tr> <td>E-Mail </td> <td><input type="text" name="email" class="textbox" value="<?php $_POST['email'];?>" /></td> </tr> <tr> <td>Password </td> <td><input type="password" name="pass" class="textbox" /></td> </tr> <tr> <td>Confirm Password </td> <td><input type="password" name="repass" class="textbox" /></td> </tr> <tr> <td><p class="register"> <input name="reg-btn" type="submit" class="btn" value="REGISTER" /> </p></td> </tr> </table> </center> </form> </div> <center><a href="#" id="showreg">Why register? Click here</a></center> <div id="content_cen"> <div id="content_sup"> <div id="welcom_pan"> <h3><span>Why</span> Register?</h3> <p>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nulla vitae diam magna, eget fringilla tellus. Curabitur est velit, suscipit eu faucibus eget, aliquam ac enim. per inceptos himenaeos. Nulla vitae diam magna, eget fringilla tellus.</p> </div> </div> </div> </div> <div id="foot_reg"> <div id="foot_cen_reg"> <ul> </ul> <p></p> </div> </div> </body> </html> Job offer: PHP Developer (Rotterdam) This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=343318.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=353027.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=333865.0 This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=313579.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=325953.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318277.0 This topic has been moved to PHP Installation & Configuration. http://www.phpfreaks.com/forums/index.php?topic=319595.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=346829.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=318465.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=345722.0 This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=356314.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=328845.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=309960.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=328917.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=356760.0 |