| View previous topic :: View next topic |
| Author |
Message |
encodi
Joined: 29 Sep 2006 Posts: 5
|
Posted: Thu Oct 12, 2006 3:29 pm Post subject: How to run php-gtk2 on linux |
|
|
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
ty |
|
| Back to top |
|
 |
cweiske
Joined: 08 Dec 2005 Posts: 454 Location: Leipzig/Germany
|
Posted: Thu Oct 12, 2006 3:37 pm Post subject: |
|
|
What does nothing?
Do you type
| Code: | | php phpgtk2-demo.php | ? |
|
| Back to top |
|
 |
encodi
Joined: 29 Sep 2006 Posts: 5
|
Posted: Thu Oct 12, 2006 5:06 pm Post subject: |
|
|
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
|
Posted: Fri Oct 20, 2006 12:25 pm Post subject: |
|
|
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 |
|
 |
|