Could not add a new row for my database using UnityC# -> Webphp

Status
Not open for further replies.

tirpstu2

New Member
Messages
6
Reaction score
0
Points
1
Hi Guys,

Hope you can help me with my problem.
I am trying to study the basics on how to store data online.
Everything in my php code is working well because when I use browser to access the file it adds a row on my data base.
The problem is when I use my C# script inside Unity. The create row will not go through.

I had a problem with unity before when I tried to read the text on the php result. It gave me an error 403 but I got through it by making Unity pretend that it's a browser(at least that's what it says online when I copy pasted it into my code).
But this time, I'm trying to pass on a WWForm and I can't do it together with what I tried above. So i need a way to make the website accept forms that I pass through Unity or something that would help me bypass this in C#.

I will keep on searching the internet for solutions and I will just close this thread if I found one. Thanks and any help will be appreciated.
 

tirpstu2

New Member
Messages
6
Reaction score
0
Points
1
I just tried my codes on a different host and their all working fine.
So I am assured that it's a problem with the host.
 

rmsx10ho

Member
Messages
159
Reaction score
13
Points
18
I'm not sure about your non-X10 host, but here in the X10 cPanel x3...
Software/Services >> Select PHP Version
It will show you the current active version and allow you to change versions.
 

tirpstu2

New Member
Messages
6
Reaction score
0
Points
1
I'm not sure about your non-X10 host, but here in the X10 cPanel x3...

It will show you the current active version and allow you to change versions.

The versions are different, my x10 is at 5.5 and the other host is at 7.1. I guess that was the problem?
 

rmsx10ho

Member
Messages
159
Reaction score
13
Points
18
Why guess..
Change X10 to 7.1 and see.
:)
 
Last edited:

tirpstu2

New Member
Messages
6
Reaction score
0
Points
1
I suddenly felt like I've become too lazy.
I set the php version to 7.1 and tried it again but nothing changed. I tried double checking if the code in both phps are the same and they are. Tried to create new row with my other webhost and it was successful in creating a new db row.

When I was looking into the cPanel where I changed the php version I noticed that dba and dbase doesn't have a check on it's checkbox. Does it change anything if it did?
 

rmsx10ho

Member
Messages
159
Reaction score
13
Points
18
Beats me... :p
Match here, the same settings where it's working elsewhere.
 

tirpstu2

New Member
Messages
6
Reaction score
0
Points
1
Too bad :(

Well, I've been searching for a solution a while now and I think the server is blocking Unity from accessing the php.
Cuz, when I try to extract the text that it shows the normal way. It gives me error 403. (It worked before on the first try)
Could it be blocking access from non-browser applications?
There might be a setting for it that I accidentally changed. Is there a way to reset settings for everything?
 

rmsx10ho

Member
Messages
159
Reaction score
13
Points
18
Sorry, I've never used Unity.

I'd try php 5.5 on the other host with your project and see if it still works.
If so, then it's probably not a PHP version issue.
Others here might have more info.
 

lylex10h

Active Member
Messages
982
Reaction score
71
Points
28
It sounds like you are trying to make a remote connection to the database using Unity. Remote database connections are blocked on free hosting.
 
Status
Not open for further replies.
Top