Skip to content

Commit

Permalink
Support for mysql (v4.0.0.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
kendarorg committed Jan 12, 2017
1 parent df35a6c commit 7f50cd4
Show file tree
Hide file tree
Showing 40 changed files with 952 additions and 654 deletions.
6 changes: 3 additions & 3 deletions NugetTesterApplication/NugetTesterApplication/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
<add name="phpnuget" connectionString="Server=127.0.0.1;Database=phpnuget;Uid=phpnuget;Pwd=password;"/>
</connectionStrings>
<appSettings>
<add key="NugetUrl" value="http://127.0.0.1:8020/pnm" />
<add key="ApplicationPath" value="pnm" />
<add key="NugetUrl" value="http://127.0.0.1:8020/phpnuget" />
<add key="ApplicationPath" value="phpnuget" />
<!-- "C:\Projects\Kendar.Framework\Github\endaroza\PhpNuget\NugetTesterApplication" that contains
nuget.exe
samples-->
<add key="NugetExeDir" value=""/>
<!-- txt or mysql-->
<add key="DbType" value="mysql" />
<add key="DbType" value="txt" />
</appSettings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void Cleanup()
[TestMethod]
public void OrderByShouldBeConsistent()
{

var xml = this.GetRequest("api/v2/Search()?includePrerelease=true").ToXml();
var founded = xml.FindXmlNodes("feed", "entry").ToArray();

Expand Down Expand Up @@ -102,7 +102,7 @@ public void SpecialTest()
}

[TestMethod]
public void FindPackageByIdShouldShowOnlyList()
public void FindPackageByIdShouldShowListAllItemsButTheNotListed()
{
try
{
Expand All @@ -114,9 +114,9 @@ public void FindPackageByIdShouldShowOnlyList()
var xml = this.GetRequest("api/v2/FindPackagesById?Id=APack").ToXml();
var founded = xml.FindXmlNodes("feed", "entry").ToArray();

Assert(founded.Count() == 1, "Wrong items count");
Assert(founded.Count() == 3, "Wrong items count");
Assert(founded[0].FindXmlNodes("title").First().InnerText == "APack", "Wrong package 2");
Assert(founded[0].FindXmlNodes("m:properties", "d:Version").First().InnerText == "1.0.0.2", "Wrong package id 2");
Assert(founded[0].FindXmlNodes("m:properties", "d:Version").First().InnerText == "1.0.0.13", "Wrong package id 2");
}
finally
{
Expand Down
58 changes: 33 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# PhpNuget V. 4.0.0.0-beta
# PhpNuget V. 3.0.12.11

### NOTES

## Purpose

Expand All @@ -13,18 +15,14 @@ Verified on:
* PHP 5.6-IIS 8
* PHP 5.4.2-Apache 2.0 (OpenSuse 13.1)
* PHP 5.3.3-Apache 2.2 (CentOS 6.5)
* PHP 7.0.14-Apache 2.4 (Windows 10 Home)

## Installation

### Update from previous version

To update from previous versions it will suffice to
### Notes for everybody

* Save a copy of the settings.php (for reference)
* Upload the new version
* Open the setup.php page and fill with the previous settings
* All the data will be backupped before the update, even when the database is old
* When moving to mysql version all data will be ported if the relative function is enabled
* When installing the MySql version the db must be present with the user configured!
* The module php_curl must be present and configured inside the php.ini

### Notes for Apache With Red Hat Linux

Expand Down Expand Up @@ -64,7 +62,17 @@ And then restart Apache

This should be enough to let everything works.

### Prerequisities For IIS
### Notes for Apache on Windows

If php is unable to load curl-related functions copy the following files from the php directory to "C:\Windows\System".
You can verify this by downloading a file from the official nuget repository via the manage packages page.

* libeay32.dll
* libsasl.dll
* ssleay32.dll
* libssh2

### Prerequisites For IIS

These steps are NOT needed if your hosting already configured PHP

Expand All @@ -83,7 +91,6 @@ These steps are NOT needed if your hosting already configured PHP
* Web.Config
* .htaccess
* Verify to have write permissions on the "db" directory.
* If you use mysql you should create a database with a user with full rights.
* Open the setup page at http://myhost/mynuget/setup.php and follow the wizard. The value will be prefilled
* Admin UserId: the user that will be created (or updated) as admin
* Admin Password: the password (on update will be overwritten)
Expand All @@ -96,20 +103,16 @@ These steps are NOT needed if your hosting already configured PHP
* php-cgi.exe: To allow the configuration of php under IIS.
* Allow package update via Upload: Default disabled, if enabled it is possible to overwrite the packages BUT THIS IS NOT A STANDARD BEHAVIOUR.
* Allow package delete: Default disabled. LEAVING IT ENABLED IS NOT A STANDARD BEHAVIOUR
* Use mysql: If you will use the mysql version this will be checked and will enable further settings:
* Import from txt db: checked if should import from txt db
* MySql UserId: MySQL user id
* MySql Password: MySQL password
* MySql Server: The address of the server
* MySql Db: The db on which should store data
* When using the mysql installation
* Check the "Use mysql" and fill the configuration data
* NOTE: Import from txt db does not yet work!!!
* If under IIS set the path of 'php-cgi.exe' (leave blank if your hosting already configured PHP)
* Change the password, email and login of the administration without worries.
* Rename the setup.php to setup.bak
* Remove write access on
* settings.php
* Web.Config
* .htaccess
* ManagedFusion.Rewriter.txt
* Now open http://myhost/mynuget and see the gallery
* Happy Nugetting!

Expand Down Expand Up @@ -261,22 +264,27 @@ now IIS is serving PHP now in next tutorial i will show you how to set up MySQL
### Should

* Add robots.txt
* The gallery should be visible without javscript (for search engines)
* Import v3.0.0.0 txt database on MySQL

### Would

* Export database
* Add Email token to reset users passwords
* Upload multiple nupkg
* Align the Settings::ResultsPerPage in all the views

## Updates

* 4.0.0.0
* Support for MySql database
* Updated database to version 4.0.0.0
* Added Version1-3 and VersionBeta fields to allow the group by version in MySQL
* Added automatic import of data when going to mysql version

* Added MySQL as storage engine

* 3.0.12.11
* Added "count" value on all packages requests for nuget 3.5
* Verified compatibility with Nuget.exe 2.8, 3.4, 3.5
* Compatibility with PHP7

* 3.0.12.10
* Added wait dialogs for long operations (update, upload from external nuget and refresh packages)

* 3.0.12.9
* Added support for .net 4.5.2
* Internal refactoring for net framework selection
Expand Down
Loading

0 comments on commit 7f50cd4

Please sign in to comment.