Previous Thread
Next Thread
Print Thread
Rate Thread
#104249 07/20/2001 3:25 PM
Joined: May 2001
Posts: 2,798
Member
Member
Offline
Joined: May 2001
Posts: 2,798
My host told me to put

Code
code:

in my header to access php4. Now would it look something like this?

Code
code:

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:
Code
code:


This is the error I get:

Code
code:


Thanks in advance.

Sponsored Links
#104250 07/20/2001 6:08 PM
Joined: Jan 1999
Posts: 568
Moderator / Fish
Moderator / Fish
Offline
Joined: Jan 1999
Posts: 568
the shebang should go at the beggining, just like perl, so
#!/usr/bin/php4
echo "whatever";
?>

#104251 07/20/2001 6:14 PM
Joined: Jan 1999
Posts: 568
Moderator / Fish
Moderator / Fish
Offline
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.

#104252 07/20/2001 6:58 PM
Joined: May 2001
Posts: 2,798
Member
Member
Offline
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.

#104253 07/20/2001 7:01 PM
Joined: May 2001
Posts: 2,798
Member
Member
Offline
Joined: May 2001
Posts: 2,798
Should the shebang line be shown.

http://www.stonecrick.com/main.php

Sponsored Links
#104254 07/20/2001 7:51 PM
Joined: Jul 2000
Posts: 1,349
Ell Offline
Member
Member
Offline
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. shocked

#104255 07/20/2001 8:33 PM
Joined: May 2001
Posts: 2,798
Member
Member
Offline
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.

#104256 07/20/2001 8:35 PM
Joined: May 2001
Posts: 2,798
Member
Member
Offline
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.

#104257 07/21/2001 5:15 AM
Joined: Jan 1999
Posts: 568
Moderator / Fish
Moderator / Fish
Offline
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.

#104258 07/21/2001 11:02 AM
Joined: May 2001
Posts: 2,798
Member
Member
Offline
Joined: May 2001
Posts: 2,798
Thanks alot Sally. I will do that.

Sponsored Links
#104259 07/21/2001 7:59 PM
Joined: Sep 2000
Posts: 71
Member
Member
Offline
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

Code
code:

This will mean you don't have to put the path to php.


vBulletin Team
[email protected]
#104260 07/21/2001 11:07 PM
Joined: May 2001
Posts: 2,798
Member
Member
Offline
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 ]

#104261 07/22/2001 10:31 PM
Joined: Mar 2000
Posts: 204
Member
Member
Offline
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.
#104262 07/24/2001 9:18 PM
Joined: May 2001
Posts: 2,798
Member
Member
Offline
Joined: May 2001
Posts: 2,798
Holy!!!! The Donut your are the best! That is exactly how to do it! And the script works!! laugh laugh laugh

#104263 07/25/2001 10:10 AM
Joined: Mar 2000
Posts: 615
Member
Member
Offline
Joined: Mar 2000
Posts: 615
Agh, he beat me wink

See, .cgi files just run the script with whatever's in the shebang line. You can put PHP in there too wink

#104264 07/25/2001 12:28 PM
Joined: May 2001
Posts: 2,798
Member
Member
Offline
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.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)