• Page 3 of 3
  • «
  • 1
  • 2
  • 3
uCoz Community » Additional Services » PHP and API on uCoz » Enabling PHP (PHP Usage & Application)
Enabling PHP
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 1 | 7:16 AM
The following post is a short guide on how to enable the possibility to use limited PHP scripts on your uCoz website.
PHP in uCoz is a paid service. It is available as a part of the Optimal, Maximal, Shop plans, or as an additional option to other plans for $1.99 per month (Note: additional options can be purchased only on the same day as a plan).

  • To buy a plan, go to Control Panel -> $Paid services -> Paid services:

  • To buy PHP as an additional option, buy any of the paid plans, then go to Control Panel -> $Paid services -> Paid services, where you will see the link to Buy a separate service.


If you experience any problems with payment and enabling of PHP services on your site, please post them here.
Attachments: 2166456.png (86.8 Kb) · 3552424.png (16.2 Kb)
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 31 | 8:33 PM
Ed05, you bought the plan on November 13, 09:21 a.m. (GMT+3). It's not 24 hours yet. Patience, and it will work smile
hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
Ed05
Posts: 556
Reputation: 7

Message # 32 | 7:43 PM
bigblog, you know everything lol B)

Added (2015-11-14, 7:43 PM)
---------------------------------------------
Ucoz server edited php code wich i upload and server insert error script data error and now i cant use important plugin.

!
Post edited by Ed05 - Sunday, 2015-11-15, 0:54 AM
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 33 | 10:53 PM
Ed05,
Quote
({"SCRIPTDATA":"","ERROR":""})

This is not an error, this is the general response of a PHP script.

If you write
Code
echo 'Hello';
?>

instead of
Code
?>


the script will output ({"SCRIPTDATA":"Hello","ERROR":""}).

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
Ed05
Posts: 556
Reputation: 7

Message # 34 | 0:51 AM
bigblog, i mean error cause wont load script and show me that msg, i asked author of script he told me that my server edit php file and cause that message.. i sent you in pm link to isue.
What mean
Quote
parse data error: SyntaxError: Unexpected token (
? Im keep geting that instead of wanted result.

!
Post edited by Ed05 - Sunday, 2015-11-15, 3:17 AM
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 35 | 5:52 AM
Ed05, you have a syntax error in your code. Can you provide the snippet? (I'm assuming this is a small code snippet.)
Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 36 | 9:27 AM
Ed05, please note that uCoz PHP and normal PHP are two different things. As I said before, this is the normal response of the server when the PHP file is executed. That message shows that everything is okay:
- "SCRIPTDATA":"" is the necessary data returned by the script,
- "ERROR":"" is the placeholder of the error. In your case, it's empty, so the script doesn't have any errors.

You need to call the action by the standard uCoz code:
Code
<?$PHPSCRIPT$("URL of your PHP")?>

or with a jQuery code (which has more variants as per you can send GET, POST or PUT requests.

You script might contain parameters which should set from the URL address and returned in a specific format. Like:
Quote
mysite.ucoz.com/php/myscript.php?param1=parameter&param2=parameter2

Red text - The name of the parameter declared in your PHP script, Blue text - The value of the specific parameter, which you want to return in a JSON or any other format.

Please send the script to Paradox for further assistance.

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
Ed05
Posts: 556
Reputation: 7

Message # 37 | 4:37 PM
bigblog, Paradox, ok, im not good in php cause this is just beginig of my working on it smile I sent link to Paradox.

Added (2015-11-17, 4:37 PM)
---------------------------------------------
Any update concerning this ? I think that i do everything like it could be but the problem is not on me, i already used few php scripts on my site and they worked fine..
But with this script i keep geting
Quote
parse data error: SyntaxError: Unexpected token (

!
Post edited by Ed05 - Tuesday, 2015-11-17, 4:54 PM
Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 38 | 10:16 AM
Ed05, sorry for the late reply. I've been run off my feet the past few days and haven't had a lot of time spare to look at the forums. I'll get back to you ASAP once I've had a good chance to look at the script. ))
Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
Ed05
Posts: 556
Reputation: 7

Message # 39 | 2:11 AM
Paradox, Ok let me know soon cause i want to cancel php package if i cant do this with it.

Added (2015-11-20, 2:11 AM)
---------------------------------------------
Oh..sorry for bother guys,i realize that this is heavy problem so i will quit fight for solution. I just received message from ucoz suport stuff that they dont help with custom php scripts and the publisher of the script told me that the problem is probably in server on wich i upload php files i will quote he's message which i received on my email
Quote
i think problem your server have edit data, and insert "SCRIPTDATA", "ERROR", ...
you can open a.php for see data output
then visit here for compare data output : http://onlinebioskop.ucoz.net/php/plugins/a.php

!
Post edited by Ed05 - Friday, 2015-11-20, 2:15 AM
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 40 | 1:18 PM
Ed05, you can do it, but the way you can do it is completely different than native PHP. However, it is true that our technical support does not provide help with custom scripts, although you can wait for Paradox or other members of the community who could help you smile
hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
Ed05
Posts: 556
Reputation: 7

Message # 41 | 3:43 PM
No, i need to have option to disable SCRIPTDATA and ucoz dont offer that. So that's it. wink
Attachments: 6050413.jpg (20.8 Kb)

!
Post edited by Ed05 - Friday, 2015-11-20, 4:23 PM
uCoz Community » Additional Services » PHP and API on uCoz » Enabling PHP (PHP Usage & Application)
  • Page 3 of 3
  • «
  • 1
  • 2
  • 3
Search: