Then enable the line and turn off the warning in php.ini like it tells you to :P
Then enable the line and turn off the warning in php.ini like it tells you to :P
sorry but i don't understand what you say!!!
in login/registration page i write a correct ID and PASS and click on Log in button, the web page say Logging in...., but can't load the webshop and return to the login/registration page!
another sorry for my bad english, thanks and help me please![]()
Undo the change i told you to make first. It will give you the same warning before and it is telling you to find your php.ini (if using xampp it's in the xampp\apache\bin usually). Find the settings the warning shows you and change them to what the warning says.
hi
now the problem is after i login i have the screen say hack attempt.![]()
In config.php disable ip validation and enable test mode. This should print info at the top of the page. A hack attempt at login is usually because the cash shop cannot work out who the user is and if that is the case the test info at the top will have parts missing.
Hi Chumpy :) you can creat Top10 Guild? i need it :) and very good... :) thx.
1, I'm hexed my client (-> http://192.168.1.33/cabal/cashshop/webshop.php?v1=)
2, I'm installed php 5.3 for windows and configured it to work with IIS 7.5 (Windows 7)
3, And my webshop is shown
4, I tried to add a UCH using GM-Toolkit.exe
(Btw, is there any ways to set item with unlimited qty?)
5, Then test, oh yeah It worked!
6, After all, I tried to Purchase it... And Boom ! Error 500?
7, Here is my config.php
8, I tried to click "CashShop Admin" with a character has "GM" nation and I got the same error (500).Code:<?php // General options for both reg page and cash shop // Title shown at the top of pages define('PAGE_TITLE','The Divinity Project'); // Link to website or patch define('LINK_WSITE','http://****/'); // Text to display for link define('NAME_WSITE','The Divinty Project'); // Link to forums define('LINK_FORUM','http://****/'); // Text to display for link define('NAME_FORUM','The Divinity Project'); // MSSQL server connection details // Database server define('DB_ADDR','192.168.1.33'); // Database login define('DB_USER','sa'); // Database password define('DB_PASS','****'); // In case you have a different db names define('DB_ACC','ACCOUNT'); define('DB_GAM','GAMEDB'); define('DB_CCA','CABALCASH'); define('DB_CSH','CASHSHOP'); // ServerIdx MUST match the one in WorldSvr_XX_YY.ini or cash items // Will not get delivered correctly. define('SVR_IDX','7'); // Category names for cash shop admin panel $cats=array(1=>'Costumes',2=>'Gear',3=>'Pets',4=>'Consumables',5=>'Items'); // Print debug info at the top of the cash shop pages define('TESTMODE',false); // Maintenance mode, open to GMs only. define('MAINTMODE',false); // Uses LastIp validation as well as UserNum and AuthKey // Can cause problems define('IPVALIDATION',false); // Allow transfer of Alz from warehoue to the bank // Set to false if you don't want to use Alz for cash items define('ALLOW_BANK',true); ?>
9, After all I noticed an error, even I put some Alz in Warehouse but in Webshop Bank Alz = 0, as below image.
10, Thanks for reading!
Last edited by chumpywumpy; 03-01-10 at 07:05 PM.
1)there is something wrong with ur apache;
2.the thing with bank,you have to make a new database ;CashShop and new table as in instructions;and after that in webshop at ur account you can....transfer ur money.from warehouse to ur bank account(note:YOU HAVE TO BE LOGGED OFF);
1, I'm using PHP with IIS 7.5 (I'm not using APACHE or XAMPP)
2, I've created DB "CashShop" and run SQL query to make new table (now in CashShop, there are 2 tables which named "Bank" and "ShopItems"). Then log into the game, deposit some Alz then check "CashShop" by hit "CashShop-button" and ... I got "Bank Alz 0".
i think "1, I'm using PHP with IIS 7.5 (I'm not using APACHE or XAMPP)"<-that is ur problem....use apache
You have to log into the cash shop using a browser to transfer alz from your warehouse to your cash shop account (the 2 are separate). It isn't possible to directly edit the warehouse alz whilst the char is online which is why you can't use warehouse alz.
I have never actually tested the cash shop with IIS but i can't think of any reason it wouldn't work as i do use php under IIS for other things. Have a look in your event logs and see if there is anything listed at the times of the errors as a 500 can mean a lot of things.
I totally have no idea with apache (php too). My PC has IIS 7.5 Installed (for my work with VS 2005) so after installed XAMPP I felt something was wrong, in XAMPP Control Panel, I can't start APACHE. After that, I noticed in CashShop read me
So I tried to let PHP works with IIS 7.5 and I did, PHP worked. (Cashshop shown :D)Code:This is a VERY basic PHP registration page and cash shop for Cabal Online. Tested on WinXP 32 bit, Windows 2003 64 bit, Xampp, MSSQL 2000, MSSQL 2005. You can use the default PHP MSSQL libs or you can use FreeTDS for Windows. I would probably recommend FreeTDS but this is optional. It should be ok on IIS with PHP support, but i have not tested this.
Now I haven't any idea to fix my this problem!
---------- Post added at 01:25 AM ---------- Previous post was at 01:09 AM ----------
After I turned off "Show friendly HTTP error message", I got this error when click "Purchase"
And here is the message when I tried to click "Account" buttonCode:PHP Warning: fopen(hardlog.txt) [function.fopen]: failed to open stream: Permission denied in C:\inetpub\wwwroot\cabal\cashshop\buy.php on line 177
Code:PHP Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(C:\Windows\TEMP\) is not within the allowed path(s): (C:\inetpub\wwwroot\) in C:\inetpub\wwwroot\cabal\cashshop\index.php on line 2 PHP Fatal error: session_start() [function.session-start]: Failed to initialize storage module: files (path: ) in C:\inetpub\wwwroot\cabal\cashshop\index.php on line 2
Set "Full Control" permission for "cashshop" forlder then test, another error:
Code:PHP Warning: date() [function.date]: 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 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\inetpub\wwwroot\cabal\cashshop\buy.php on line 182 PHP Warning: date() [function.date]: 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 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\inetpub\wwwroot\cabal\cashshop\buy.php on line 182
Anyone has solution? Help me please :(
First of all, you waited 17 hours to doublepost, you have to wait at least 24 hours. Please keep that in mind next time.
Now, your problem, although at this moment, I can not specifically fix that exact problem, I can get you started on fixing it.
The problem is a date() function is being used somewhat incorrectly. The date() function, for whatever reason, can not use the default timezone. You need to specify an exact timezone to go with the date() function to fix this problem. If you want more help, tell me the exact file name and I'll take a look at it when I have some free time.
PHP doesn't seem to trust the computer's timezone settings for some reason. Look in php.ini
You need to change yours as it is probably trying to auto-detect it. Supported timezones are here:[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Europe/London"
http://us.php.net/manual/en/timezones.php
Everything is worked now!
---
Tips for others:
If you caught this error :
You need to edit "php.ini" and set :Code:Warning: session_start()
If you use windows :Code:session.save_path = x:/tmp
* You must have permission to write data there *Code:session.save_path = x:\tmp
If you caught this error :
Open "reg.php" and edit :Code:PHP Notice: Undefined variable: _PHP
To :Code:echo '<form method="post" action="'.$_PHP['self'].'">';
* You must change "http://localhost/cabal/cashshop/" to your "reg.php" path *Code:echo '<form method="post" action="http://localhost/cabal/cashshop/reg.php">';
Once again : Thanks all for help me!![]()
Is there any ways to sell a Pack of item in CashShop?
---
Ex : I want to sell "Funny Halloween Katana" and "Funny Halloween Orb" in one Package? (buy 1 package for one price , receive 2 items , ---> kind of promotions)
Hmm, interesting idea.
At the moment the shop can only do single items, it can't even do a x10 for the cores (this is in the latest unreleased version though). I think i'll look into adding a "packs" feature though as it's a great idea. Thanks for suggesting it ;)
In fact, now I'm using directly MSSQL to add/edit item to ShopItems table cuz I'm familiar with SQL GUI :D
Some idea that might be help you in next release of cash shop :
- Allow item name and description to be saved in Unicode format (nvarchar instead of varchar - not of all Gamer/GM using English :D)
- Add qty column (ex : UCH x 10)
- Add package of items support (ex : Funny Halloween Katana + Funny Halloween Orb)
---
For package idea :
+ Add a table which named "ShopPackages"
> pakId int autoincrease
> pakInf varchar(1000) data stored in this column has some kinds of format, might be like that : 1,0,1,31;5,123,1,31;2,0,3,31 (<<ItemCode>,<ItemOpt>,<Qty>,<Duration>>[[<ItemCode>,<ItemOpt>,<Qty>,<Duration>][;...] in above sample : UCH x 1, 123 HP Pot lv3 x 1, FCH x 3 all no duration)
+ Add a column in ShopItems named "isPackage - bit"
+ Check if "isPackage == 1" -> Get package info in "ShopPackages"
---
Hope it help you.
:)
Last edited by trungnt88; 10-01-10 at 06:58 AM.
deleted
Last edited by donawick; 10-10-17 at 02:53 PM.
Code:<?php // General options for both reg page and cash shop // Title shown at the top of pages define('PAGE_TITLE',''); // Link to website or patch define('LINK_WSITE',''); // Text to display for link define('NAME_WSITE',''); // Link to forums define('LINK_FORUM',''); // Text to display for link define('NAME_FORUM',''); // MSSQL server connection details // Database server define('DB_ADDR','ip address'); // Database login define('DB_USER','sa'); // Database password define('DB_PASS','pass'); // In case you have a different db names define('DB_ACC','ACCOUNT'); define('DB_GAM','GAMEDB'); define('DB_CCA','CabalCash'); define('DB_CSH','CashShop'); // ServerIdx MUST match the one in WorldSvr_XX_YY.ini or cash items // Will not get delivered correctly. define('SVR_IDX','1'); // Category names for cash shop admin panel $cats=array(1=>'Costumes',2=>'Gear',3=>'Pets',4=>'Consumables',5=>'Items'); // Print debug info at the top of the cash shop pages define('TESTMODE',false); // Maintenance mode, open to GMs only. define('MAINTMODE',true); // Uses LastIp validation as well as UserNum and AuthKey // Can cause problems define('IPVALIDATION',false); // Allow transfer of Alz from warehoue to the bank // Set to false if you don't want to use Alz for cash items define('ALLOW_BANK',true); ?>
ç_ç