|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
My host told me to put in my header to access php4. Now would it look something like this? because I tried putting #!/usr/bin/php4 at the beggining of the document but it just printed it. Another question... I was reading a book and they had some code to work with session_register. But I tried that but it didn't work. Here's the code: This is the error I get: Thanks in advance.
|
|
|
|
Joined: Jan 1999
Posts: 568
Moderator / Fish
|
Moderator / Fish
Joined: Jan 1999
Posts: 568 |
the shebang should go at the beggining, just like perl, so #!/usr/bin/php4 echo "whatever"; ?>
|
|
|
|
Joined: Jan 1999
Posts: 568
Moderator / Fish
|
Moderator / Fish
Joined: Jan 1999
Posts: 568 |
as to your other problem.
odd, it doesn't seem to have session support enabled, and you seem to be using version 4 as well (wasn't in php3). I'd contact your host about that.
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Well, I am sure it didnt work because I didn't have the right locaton of where php4 is. It says unless you call the php4 you will be using php3.
|
|
|
|
Joined: Jul 2000
Posts: 1,349
Member
|
Member
Joined: Jul 2000
Posts: 1,349 |
No, and if they had it set up in a semi-intelligent way, you shouldn't need it. Try without.
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Well, for some retarded reason they have PHP 3.0.9 still on the server and its hooked up with apache. So if I try a php file it will use 3.0.9 instead of 4.something. I think that are messed up but hey.
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
The only reason I want 4.something is because it can use the session_register and some other variables I would just love to use. And thats the only way I can use php4 is with the shebang line they said.
|
|
|
|
Joined: Jan 1999
Posts: 568
Moderator / Fish
|
Moderator / Fish
Joined: Jan 1999
Posts: 568 |
I get the suspiscion they haven't actually installed that function O_o I suggest you have a word with your host and ask them to re-install it.
and I used to have a host that ran a really weird implementation of php, also had to have the shebang.
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
Thanks alot Sally. I will do that.
|
|
|
|
Joined: Sep 2000
Posts: 71
Member
|
Member
Joined: Sep 2000
Posts: 71 |
To sort having to put the full path to PHP ask them to enable short tags within php.ini it looks like below This will mean you don't have to put the path to php.
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
But I have to call it because it is not installed into the Apache thing. So you need a shebang line they said.
[ July 21, 2001 11:10 PM: Message edited by: Tech-Ni-Kal ]
|
|
|
|
Joined: Mar 2000
Posts: 204
Member
|
Member
Joined: Mar 2000
Posts: 204 |
Well, the way f2s does it (yes, yes.. f2s), is they do that exact same thing. Though it's #!/usr/bin/php which is pretty close to the same thing. But that's if you want to run your php script outside of safe mode on f2s. You also have to rename the file extension to .cgi, not .php
-Never Underestimate The Power Of Stupid People In Large Groups.
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
|
|
|
|
Joined: Mar 2000
Posts: 615
Member
|
Member
Joined: Mar 2000
Posts: 615 |
Agh, he beat me See, .cgi files just run the script with whatever's in the shebang line. You can put PHP in there too
|
|
|
|
Joined: May 2001
Posts: 2,798
Member
|
Member
Joined: May 2001
Posts: 2,798 |
They installed php4 as a CGI binary. I didn't notice that. I also didn't know you could use .cgi to do php.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|