gnope php gtk gui gnope.org  

How to run php-gtk2 on linux

 
Post new topic   Reply to topic    gnope.org Forum Index -> Tutorials and questions
View previous topic :: View next topic  
Author Message
encodi



Joined: 29 Sep 2006
Posts: 5

PostPosted: Thu Oct 12, 2006 3:29 pm    Post subject: How to run php-gtk2 on linux Reply with quote

Ok, i have ubuntu linux distro and installed php5 and all the libraries of php5, then i downloaded the php-gtk-2.0.0alpha , uncompressed it and used the instructions on the php-gtk website to install it.

Now i would like to test one of the php-gtk2 applications on the /demos/ directory, how do i do that? if i double click on it it just opens the text editor with the code, in terminal it does nothing. i'm lost, sorry for the dumbest question ever maybe , but i need to know please Smile

ty
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 454
Location: Leipzig/Germany

PostPosted: Thu Oct 12, 2006 3:37 pm    Post subject: Reply with quote

What does nothing?
Do you type
Code:
php phpgtk2-demo.php
?
Back to top
encodi



Joined: 29 Sep 2006
Posts: 5

PostPosted: Thu Oct 12, 2006 5:06 pm    Post subject: Reply with quote

oh...hahaha sounds logic.

Thanks a lot. Yea that worked heh, well i'm learning. And i forgot to include the php_gtk2.so on the php.ini extensions too.
Back to top
cohort



Joined: 07 Feb 2006
Posts: 47

PostPosted: Fri Oct 20, 2006 12:25 pm    Post subject: Reply with quote

If you want to 'run' by double-clicking the file, you can do one of two things:

- Set the file executable and add a #! line to the beginning of your php-gtk2 file:
Code:

#!/usr/bin/php5
<?php
...
?>

(however, gnome will ask if you want to "run" or "display" each time)

Or:
- Rename the extension to .phpw or something (so as not to confuse gnome), then do this:
"To add actions associated with a file type, perform the following steps:

1. In the Nautilus view pane, select a file of the type to which you want to add an action.
2. Choose File->Open with Other Application.
3. Either choose an application in the open with dialog or browse to the program with which you wish to open this type.

The action you have chosen is now added to the list of actions for that particular file type. If there was no prior action associated with the type, the newly added action is the default.

You may also add actions in the Open With tabbed section under File->Properties."
(from gnome.org)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    gnope.org Forum Index -> Tutorials and questions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.