siamon123 / warehouse-inventory-system

Open source inventory management system with php and mysql
http://www.oswapp.com
MIT License
388 stars 233 forks source link

Parse error: #6

Closed ryanvanks closed 7 years ago

ryanvanks commented 8 years ago

Hello

I'm using a local Wamp server. After installing I had a blank screen. When i activated the PHP Error display option this is what I got.

Parse error: syntax error, unexpected '.', expecting ',' or ';' in C:\wamp\www\inventorysystem\includes\upload.php on line 10

I can not pass this stage.

siamon123 commented 8 years ago

Hey

Try this


 'SITE_ROOT',DS.'..'.DS.'uploads/users';

if it's doesn't solve your problem then replace it with this

 public $userPath = 'uploads/users';
 public $productPath = 'uploads/products';

Thank you.

ryanvanks commented 8 years ago

Hello Siamon123 Thanks for the quick reply but it did not help.

When I use this code: public $userPath ='SITE_ROOT',DS.'..'.DS.'uploads/users'; public $productPath = 'SITE_ROOT',DS.'..'.DS.'uploads/products';

I do not get the login page but I get this error:

Parse error: syntax error, unexpected 'DS' (T_STRING), expecting variable (T_VARIABLE) in C:\wamp\www\inventorysystem\includes\upload.php on line 10


When I use this code:

public $userPath = 'uploads/users'; public $productPath = 'uploads/products';

I get to the login page. I'm then redirected to the page http://localhost/inventorysystem/home.php

Error on this Query :

SHOW TABLES FROM inventoryproj-db LIKE "users"

"inventoryproj-db" being the name I gave the database on my system.

Thanks

siamon123 commented 8 years ago

NO problem,

just logout and login back.

ryanvanks commented 8 years ago

still does not work. I used http://localhost/inventorysystem/index.php to logout. When I log back in I'm then redirected to the page http://localhost/inventorysystem/home.php

Error on this Query :

SHOW TABLES FROM inventoryproj-db LIKE "users"

siamon123 commented 8 years ago

index.php doesn't has logout function, it's should be

 http://localhost/inventorysystem/logout.php

And you getting that error from this function, either DB_NAME or table not exit.you can find this function in sql.php

tableExists($table)
ryanvanks commented 8 years ago

Hello Siamon,

The problem was the database name. I changed it from "inventoryproj-db" to "inventoryprojdb" and everything works fine now. Thanks for the tips. Ryan