Jump to content

Recommended Posts

Posted

Do you have an SQL dump? If so the command line is:

 

mysql -u username -p password database_name < filename.sql

 

So in this case filename.sql will be printmaster.sql.

 

(Should work!)

Posted

Thanks - couldn't that to work either! Ended up figuring out that in mysql admin you can "restore" an SQL dump file as long as you ignore errors! Still, now getting this problem when browsing to index.php:

 

Context
-------

$_SERVER: Array
(
   [CommonProgramW6432] => C:\Program Files\Common Files
   [php_FCGI_MAX_REQUESTS] => 10000
   [phpRC] => C:\Program Files (x86)\PHP\
   [ALLUSERSPROFILE] => C:\ProgramData
   [APPDATA] => C:\Windows\system32\config\systemprofile\AppData\Roaming
   [APP_POOL_ID] => DefaultAppPool
   [CommonProgramFiles] => C:\Program Files (x86)\Common Files
   [CommonProgramFiles(x86)] => C:\Program Files (x86)\Common Files
...and lots more like this, until..
)

$_POST: Array
(
)

$_GET: Array
(
)

$_FILES: Array
(
)

$_SESSION: {null}

$_COOKIE: Array
(
   [users_resolution] => 1440x900
   [fontSize] => 100
   [ja_purity_tpl] => ja_purity
)

 

Then a bit further down..

 

Uncaught fValidationException
-----------------------------
{doc_root}\consumables\index.php(22): include_once('C:\inetpub\wwwr...')
{doc_root}\consumables\inc\init.php(15): fSession::setPath('C:\inetpub\wwwr...')
{doc_root}\consumables\inc\flourish\fSession.php(450): fDirectory->__construct('C:\inetpub\wwwr...')
{doc_root}\consumables\inc\flourish\fDirectory.php(133)
The directory specified, C:\inetpub\wwwroot\consumables/session, does not exist or is not readable

 

Changes the db in init.php too. Is this php configuration that it isn't happy with?

Posted (edited)

Create a directory called session (in your case, within c:\inetpub\wwwroot\consumables) and make it writeable.

 

Apologies - forgot to add that to the instructions.

Edited by webman
Posted (edited)

nice work webman, started getting this working today (had to go round the whole school making sure I have all the printers on my list in the same locations and also noteing down what cartridges they use)

 

I have had a few errors on this through

When Clicking Printers Notice------

 

{doc_root}\ICTInk\printers.php(73): include('C:\inetpub\wwwr...')

{doc_root}\ICTInk\views\printers\index.php(78)

Undefined variable: nostock

 

Managed to get rid of this error by delete the line where that code is, but is that line needed for something? When Clicking Reports

 

Notice------{doc_root}\ICTInk\reports.php(75): include('C:\inetpub\wwwr...')

{doc_root}\ICTInk\views\reports\index.php(2)

Undefined variable: printer

 

If I delete this line like before, this doesnt work, I just makes my IIS server say it cant find the resourse

 

Any ideas on this, thanks!

 

 

Also if you could, is it possible for you to include, when you add a consumable, can make it so you can enter the price of that perticular ink. And also include it in the reports.

 

This would be extremlly handy because ink is costing a lot and we been told to charge it to the department that is getting the new ink, instead of coming out our ict budget.

 

That way we can print the reports every so often and hand it in to the finince office and make it so the ink is charged to what ever deparment has used it and make whatever the ink cost us oringally goes back into our ict budget.

 

Or if you dont want to include this in it, could you show us how we could add it just in ours?

 

 

Many Thanks!

Edited by pritchardavid
Posted

p-dave: Thanks for reporting those. It's only a notice, which can be suppressed by un-commenting and setting error_reporting to 0 in config.php. But I'm currently working on updating the code so that won't be necessary.

 

I'll also look at adding price info for toners - the reason I didn't implement this from the start is that we've usually found toner prices fluctuate, so it would be only useful as a rough guide. There's also the consideration of: does it log the price at the time of installation, for historical/logging reasons, or always look up the "current" cost when viewing the report?

  • Thanks 1
Posted

No worrys webman

 

Yer I would say that it keeps the old prices on the report in case for example one of the inks we just ordered, the price has changed and we havent charged the department for the inks they have already used, and once we have changed the price it changes that in the report thats not what we want to happen

 

So if possible, if you gonna add this, we need it to keep the price of the ink, when we clicked install ink for whatever the printer

Posted

jamiess: Thanks :)

 

p-dave: The files at GitHub have been updated now to fix those errors, so you can just grab a new copy of the zip file and copy over the files. I agree on your comment about the prices - I believe that to be the best way to do it.

Posted
p-dave: Thanks for reporting those. It's only a notice, which can be suppressed by un-commenting and setting error_reporting to 0 in config.php. But I'm currently working on updating the code so that won't be necessary.

 

I'll also look at adding price info for toners - the reason I didn't implement this from the start is that we've usually found toner prices fluctuate, so it would be only useful as a rough guide. There's also the consideration of: does it log the price at the time of installation, for historical/logging reasons, or always look up the "current" cost when viewing the report?

 

You could get really in depth with this (I haven't actually downloaded your code and tried it yet by the way) and write into it the facility to construct a toner order within it, which can be allocated an order number within the program and saved. Then a 'booking in' section for when the order arrives which you could input the cost for each cartridge ordered and confirm the quantities. That can then be saved to the database and tied to that order number so the system will then be aware of the cost of every cartridge you have in stock.

 

Whenever you change a toner you can be prompted for the order number the toner cartridge came from, and it can automatically produce a charge sheet with the exact cost on which can be handed to the finance department to move the money around. Of course it does complicate the code quite a bit, and relies on you writing the order number on the end of the boxes when they arrive.

 

Just an idea.

 

Mike.

Posted

No, dont think my idea would would actually. Even with the reports showing the prices at the time of the install. For example if I had to set a new price for an ink, that we are checking in, and we still have ink in stock for that particular ink. The older in in stock that we have already, will then have the newer incorrect price (as im gussing for the older ink we have instock already, we would need to charge them the older correct price)

 

 

Sothinking about it

 

The best way of doing this would be problery be:

 

When you checkin new ink you can enter how much each ink cost. Oversially the system will use the same price for the same item if you have more the same one.

 

Each ink could have a id (you dont see it, only the database)

 

for example if I had an ink called 15 that was listed for a printer, then it would have a number after, and the end number keep going up after that.

 

ie 15_1

 

I'll then say (not sure how databases work) your need a date in one section, of when you put the ink into the system and the price of the ink into another section

 

Then everytime you install a ink it will use the oldest id number avabilable, that way the price for that particular ink will be correct.

 

Then i'll gusse once that id is used it will get moved to a reports database?

 

 

Only a gusse what you could do, if you understand, not sure I made that clear or even if that way would work

Posted (edited)

yep sure does, ok think i'll try your classroom bookings tomorrow too, thats problery just has good has this!

 

Wish you would make a eticket support site and also an asset/invertory site too, that would be everything complete that im trying to setup at the momment

 

xd nah only kidding far to much work

 

Just cant seem to find a good opensourse one (Think im gonna have to have a talk with the boss tomorrow, ask him, if we can can pay for one)

 

Edit

 

 

Ok knew I forgot to ask how to we secure the website to stop everyone going on it expect us admins?

Edited by pritchardavid
Posted (edited)

I'd agree about toner costs being included - I always try and log how much a toner/ink costs at the time of purchase so I can track price changes and therefore see if alternate cheaper options need to be considered. As we tend to use mostly compatible toners anyway, the prices of these stay reasonably stable thus changes in pricing isn't too much of a concern.

 

I would like some grouping ability though for the toners and inks. I have got very used to my "printed sheet" layout where I group the toners and inks into categories for ease of finding them as opposed to one big list on this system. Whilst I'll play with this system and see how it feels, I would probably only shift across to actually using it once I can get it as close to my "printed sheet" version as possible. Still, not to undermine a great piece of free software you have contributed here though!

Edited by dgsmith
spelling and grammar..
Posted

p-dave: Security - you need to configure this at the web server. For Apache, look in to htaccess/htpasswd; or for IIS you can configure something using the Authentication tab on the properties of the directory (I think).

 

dgsmith: I'd be interested to see what your printed sheet looks like to find out how you group them together. I think if that was to be implemented, I'd have it so you could define your own groups - give it a name and choose which consumables are part of it. The dashboard list would then be displayed using those groups.

Posted

That's the best approach webman - dashboard listing with definable groups and consumable membership. The list I have is quite literally some tables separating "HP Inks, HP Toners, Brother Drums, Brother Toners, Konica Minolta toners" etc, so split by brand then sub-split by type. Of course, any approach you take would allow for any grouping options, such as maybe by printer type, location, colour/mono etc.

 

This may be a bit overkill, but even automatic toner identifying may be something of benefit. For example, it's taking a while to go through all the colour laser printers and add each toner model in separately (if you're unfortunate enough like us to have no actual consistant type of printer). Being able to make it automatically work out the colour toner models from the black entry would make life easier. For example, most HP colour laser toners use the same format where the black is 0, cyan 1, yellow 2 and magenta 3, so for the HP 2600n, Q6000A would be entered for black then the system would work out the rest, which are Q6001A, Q6002A and Q6003A respectively by incrementing the 2nd to last character. Of course, this should be optional as there are printers where this consistancy isn't applicable.

 

I'm sure there are other things i'd think of too, though I only mention these as I am keen to use your system and any approach which makes it easier for an end-user should always be put high up the priority list imo :)

Posted

I hope i can get a bit of advice. I apologise in advance, because i'm not a regular MYSQL and PHP user, so it's probably something really obvious.

 

The Inventory database all seems to work fine in itself, but i'm getting the massive slew of information when i navigate to it. There are a couple of warnings at the bottom. I have created the session folder, and i believe it has correct permissions (it writes session files in there, so looks ok)

 

Here's the code:

 

Context
-------

$_SERVER: Array
(
   [_FCGI_X_PIPE_] => \\.\pipe\IISFCGI-7b443fb8-a24b-466c-944f-83e584009e86
   [php_FCGI_MAX_REQUESTS] => 10000
   [phpRC] => C:\PHP\
   [ALLUSERSPROFILE] => C:\Documents and Settings\All Users
   [APP_POOL_ID] => DefaultAppPool
   [ClusterLog] => C:\WINDOWS\Cluster\cluster.log
   [CommonProgramFiles] => C:\Program Files\Common Files
   [COMPUTERNAME] => SAM-WEB
   [ComSpec] => C:\WINDOWS\system32\cmd.exe
   [FP_NO_HOST_CHECK] => NO
   [NUMBER_OF_PROCESSORS] => 2
   [OS] => Windows_NT
   [Path] => C:\PHP\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Symantec\pcAnywhere\;c:\netopacs;c:\amlib
   [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
   [PROCESSOR_ARCHITECTURE] => x86
   [PROCESSOR_IDENTIFIER] => x86 Family 15 Model 6 Stepping 4, GenuineIntel
   [PROCESSOR_LEVEL] => 15
   [PROCESSOR_REVISION] => 0604
   [ProgramFiles] => C:\Program Files
   [systemDrive] => C:
   [systemRoot] => C:\WINDOWS
   [TEMP] => C:\WINDOWS\TEMP
   [TMP] => C:\WINDOWS\TEMP
   [uSERPROFILE] => C:\Documents and Settings\Default User
   [windir] => C:\WINDOWS
   [__COMPAT_LAYER] => EnableNXShowUI 
   [FCGI_ROLE] => RESPONDER
   [APPL_MD_PATH] => /LM/W3SVC/1/Root/Senior/content/staff/it/printmaster
   [APPL_PHYSICAL_PATH] => E:\SAM_INTRA\www_root\Senior\content\staff\it\printmaster\
   [AUTH_TYPE] => {empty_string}
   [AUTH_PASSWORD] => {empty_string}
   [AUTH_USER] => {empty_string}
   [CERT_COOKIE] => {empty_string}
   [CERT_FLAGS] => {empty_string}
   [CERT_ISSUER] => {empty_string}
   [CERT_SERIALNUMBER] => {empty_string}
   [CERT_SUBJECT] => {empty_string}
   [CONTENT_LENGTH] => 0
   [CONTENT_TYPE] => {empty_string}
   [GATEWAY_INTERFACE] => CGI/1.1
   [HTTPS] => off
   [HTTPS_KEYSIZE] => {empty_string}
   [HTTPS_SECRETKEYSIZE] => {empty_string}
   [HTTPS_SERVER_ISSUER] => {empty_string}
   [HTTPS_SERVER_SUBJECT] => {empty_string}
   [iNSTANCE_ID] => 1
   [iNSTANCE_META_PATH] => /LM/W3SVC/1
   [LOCAL_ADDR] => 10.189.18.12
   [LOGON_USER] => {empty_string}
   [PATH_TRANSLATED] => E:\SAM_INTRA\www_root\Senior\content\staff\it\printmaster\index.php
   [QUERY_STRING] => {empty_string}
   [REMOTE_ADDR] => 10.189.114.142
   [REMOTE_HOST] => 10.189.114.142
   [REQUEST_METHOD] => GET
   [sCRIPT_NAME] => /Senior/content/staff/it/printmaster/index.php
   [sERVER_NAME] => 10.189.18.12
   [sERVER_PORT] => 80
   [sERVER_PORT_SECURE] => 0
   [sERVER_PROTOCOL] => HTTP/1.1
   [sERVER_SOFTWARE] => Microsoft-IIS/6.0
   [REMOTE_USER] => {empty_string}
   [REMOTE_PORT] => 53918
   [url] => /Senior/content/staff/it/printmaster/index.php
   [REQUEST_URI] => /Senior/content/staff/it/printmaster/
   [DOCUMENT_ROOT] => E:\SAM_INTRA\www_root
   [sCRIPT_FILENAME] => E:\SAM_INTRA\www_root\Senior\content\staff\it\printmaster\index.php
   [HTTP_CONNECTION] => Keep-Alive
   [HTTP_ACCEPT] => image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
   [HTTP_ACCEPT_ENCODING] => gzip, deflate
   [HTTP_ACCEPT_LANGUAGE] => en-AU
   [HTTP_COOKIE] => ASPSESSIONIDCABCSCAD=BDAFCAKAOLBAAIBOPJJJAJPE; ASPSESSIONIDCCDBTDBC=GPLHFPLAKJKLBLGPFHJPFHOO; ASPSESSIONIDCCDCSCBC=DOALICMACBLLPEANMCNAJEPB; ASPSESSIONIDCABDTDAC=JHLLNEDBAFFEDOJKABDBAODI; ASPSESSIONIDAAADTCBD=NDKNNLFBCENANAPGPBJAFEKD; ASPSESSIONIDCCCBTCBD=ILEJLJGBGFCOLCGJLFEBKMAE; ASPSESSIONIDCCADTCAD=IMHHMPNBJIPPHIHKBAJDJCDF; ASPSESSIONIDAADADBAB=DOFNLLOBBKDBIGJMMABCEBMB
   [HTTP_HOST] => 10.189.18.12
   [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)
   [ORIG_PATH_INFO] => /Senior/content/staff/it/printmaster/index.php
   [php_SELF] => /Senior/content/staff/it/printmaster/index.php
   [REQUEST_TIME] => 1285815144
)

$_POST: Array
(
)

$_GET: Array
(
)

$_FILES: Array
(
)

$_SESSION: {null}

$_COOKIE: Array
(
   [ASPSESSIONIDCABCSCAD] => BDAFCAKAOLBAAIBOPJJJAJPE
   [ASPSESSIONIDCCDBTDBC] => GPLHFPLAKJKLBLGPFHJPFHOO
   [ASPSESSIONIDCCDCSCBC] => DOALICMACBLLPEANMCNAJEPB
   [ASPSESSIONIDCABDTDAC] => JHLLNEDBAFFEDOJKABDBAODI
   [ASPSESSIONIDAAADTCBD] => NDKNNLFBCENANAPGPBJAFEKD
   [ASPSESSIONIDCCCBTCBD] => ILEJLJGBGFCOLCGJLFEBKMAE
   [ASPSESSIONIDCCADTCAD] => IMHHMPNBJIPPHIHKBAJDJCDF
   [ASPSESSIONIDAADADBAB] => DOFNLLOBBKDBIGJMMABCEBMB
)
Warning
-------
{doc_root}\Senior\content\staff\it\printmaster\index.php(22): include_once('E:\SAM_INTRA\ww...')
{doc_root}\Senior\content\staff\it\printmaster\inc\init.php(16): fSession::setLength('1 hour')
{doc_root}\Senior\content\staff\it\printmaster\inc\flourish\fSession.php(409): strtotime('1 hour')
[internal function]
strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '9.5/no DST' instead
Warning
-------
{doc_root}\Senior\content\staff\it\printmaster\index.php(22): include_once('E:\SAM_INTRA\ww...')
{doc_root}\Senior\content\staff\it\printmaster\inc\init.php(17): fSession::open()
{doc_root}\Senior\content\staff\it\printmaster\inc\flourish\fSession.php(306): session_start()
[internal function]
session_start(): Cannot send session cookie - headers already sent by (output started at E:\SAM_INTRA\www_root\Senior\content\staff\it\printmaster\inc\flourish\fCore.php:740)
Warning
-------
{doc_root}\Senior\content\staff\it\printmaster\index.php(22): include_once('E:\SAM_INTRA\ww...')
{doc_root}\Senior\content\staff\it\printmaster\inc\init.php(17): fSession::open()
{doc_root}\Senior\content\staff\it\printmaster\inc\flourish\fSession.php(306): session_start()
[internal function]
session_start(): Cannot send session cache limiter - headers already sent (output started at E:\SAM_INTRA\www_root\Senior\content\staff\it\printmaster\inc\flourish\fCore.php:740)

 

Thanks in anticipation. From what i can play with, it looks fantastic!!

Posted

Sorry to double post, but i also noticed that the developer is looking at ways to make the Toner warning customisable. That's a great idea for the obvious reasons. I was thinking that as an alternative to making them manually customisable, perhaps they could reference the number of printers in the database. That way if you have Eight printers of one type, if the toner stock falls below 8 you get a yellow warning, and if it gets to 1 or 2you get red.

 

Just an idea. Great work on it thus far anyway!

Posted

SmaraitanCollege: The error seems to lead to a non-configured timezone in your php.ini file. Edit your php.ini and check the "date.timezone" line. Set it to:

 

date.timezone = "Europe/London"

 

Make sure there isn't a semicolon before it. Your php.ini file could be in one of several places - c:\windows\php.ini or c:\php\php.ini are the most likely places though.

  • Thanks 1
Posted

That's the ticket! Thanks alot for your prompt response!

 

I put my local timezone in rather than London (Australia/Adelaide) and it works a treat. I'm telling you, this is infinitely better than our old system of having a table ruled up on the whiteboard and having to remember to update it when you go out to change a toner!

 

Thanks again.

  • Thanks 1
Posted (edited)

I'm getting the following error, trying to add a manufacturer...

 

"Uncaught fProgrammerException

-----------------------------

{doc_root}\cartman\manufacturers.php(39): include('{doc_root}\cartman\...')

{doc_root}\cartman\views\manufacturers\index.php(30): Manufacturer->countModels()

[internal function]: fActiveRecord->__call('countModels', Array)

{doc_root}\cartman\inc\flourish\fActiveRecord.php(923): fORMRelated::countRecords('Manufacturer', Array, Array, 'Model')

{doc_root}\cartman\inc\flourish\fORMRelated.php(290): fORMSchema::getRouteName(Object(fSchema), 'manufacturers', 'models', NULL, '*-to-many')

{doc_root}\cartman\inc\flourish\fORMSchema.php(179)

The table manufacturers is not in a *-to-many relationship with the table models"

 

Server is Uniform Portable 4.4, Running on Vistargh, Apache 2.2.13, PHP 5.3.0 DAV/2, SQL version 5.0.5 - DEV - 081106..

 

Any ideas?

 

Edit: Hang fire, it looks like Uniform 4.4 doesn't support InnoDB..

 

EDIT: Oh yes it does. Edited My.cnf, enabled InnoDB engine, restarted Apache and MySQL, reran the SQL query, and she runs! YIPPEE!

Edited by Sirbendy
Posted

Got this working, and it's very impressive indeed. So huge thanks for sharing! Going to have a tweak and see if I can incorporate some costing to it, but it's a complicated issue as we've got different suppliers & costs each time. May just have it pop up and ask for the Price & Toner (as we have this written on each toner) when clicking on the toner allocation and add the information into the reports table...

 

But loving it, cheers!!

  • Thanks 1
Posted

Webman: awesome work, how about recording the page count when a consumable is replaced so that next time it's replaced and the page count is updated it could tell you how many pages that consumable printed?

 

Ben

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...