DEVILofDARKNESS Posted August 19, 2009 Share Posted August 19, 2009 if I run zf.sh (Zend Framework) I get the error: 44: php: not found What have I done wrong? Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/ Share on other sites More sharing options...
RichardRotterdam Posted August 19, 2009 Share Posted August 19, 2009 how are you running the file? Are you using a terminal under linux? Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901781 Share on other sites More sharing options...
DEVILofDARKNESS Posted August 19, 2009 Author Share Posted August 19, 2009 yes I simply do zf and I first did: alias zf='/opt/lampp/Zendframewor-1.9.1/bin/zf.sh' Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901790 Share on other sites More sharing options...
RichardRotterdam Posted August 19, 2009 Share Posted August 19, 2009 Hmm just typing zf in the terminal should work. You said you received the following error 44: php: not found Maybe you can't run php in the terminal. what happens if you type php in the terminal? Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901792 Share on other sites More sharing options...
DEVILofDARKNESS Posted August 19, 2009 Author Share Posted August 19, 2009 it says php not found, you can install it by doing sudo apt-get install php5-cli although php5 is installed. ? Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901794 Share on other sites More sharing options...
RichardRotterdam Posted August 19, 2009 Share Posted August 19, 2009 running php-cli and php under apache(or any other webserver software) are different. You need to install the php-cli. Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901795 Share on other sites More sharing options...
DEVILofDARKNESS Posted August 19, 2009 Author Share Posted August 19, 2009 okay I installed the php5-cli and now it gives an other error: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/gd.so' - /usr/lib/php5/20060613+lfs/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mcrypt.so' - /usr/lib/php5/20060613+lfs/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mysql.so' - /usr/lib/php5/20060613+lfs/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mysqli.so' - /usr/lib/php5/20060613+lfs/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/pdo_mysql.so' - /usr/lib/php5/20060613+lfs/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 Fatal error: Cannot redeclare class Zend_OpenId_Provider in /usr/share/php/libzend-framework-php/Zend/OpenId/Provider.php on line 44 Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901798 Share on other sites More sharing options...
RichardRotterdam Posted August 19, 2009 Share Posted August 19, 2009 Hmmm don't know how to solve those warnings I haven't experienced anything like that before as I am fairly fresh with Linux myself (6 months). Maybe you should ask that in the Linux forum. As for the fatal error. Fatal error: Cannot redeclare class Zend_OpenId_Provider in /usr/share/php/libzend-framework-php/Zend/OpenId/Provider.php on line 44 In your php.ini file , what does your include_path setting look like? I suspect that you're including the Zend Framework twice somehow. Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901813 Share on other sites More sharing options...
DEVILofDARKNESS Posted August 19, 2009 Author Share Posted August 19, 2009 include_path = ".:/opt/ZendFramework-1.9.1/library" This is the only include_path there is... (I use linux for 3 months now I guess ) Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901814 Share on other sites More sharing options...
RichardRotterdam Posted August 19, 2009 Share Posted August 19, 2009 Not sure if this is the case with your Linux distro but I have two php.ini files (or more not sure at the moment since I am not behind my own PC). There is a php.ini for the webserver and a php.ini for the php-cli. What distro of Linux are you running? And do you have more then one php.ini file? The paths could look like: /etc/php/php.ini /etc/php-cli/php.ini The include_path seems right but the error does not seem to verify this. Fatal error: Cannot redeclare class Zend_OpenId_Provider in /usr/share/php/libzend-framework-php/Zend/OpenId/Provider.php on line 44 That error would indicate that you have a include path like: include_path = ".:/usr/share/php/libzend-framework-php/" Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901820 Share on other sites More sharing options...
DEVILofDARKNESS Posted August 19, 2009 Author Share Posted August 19, 2009 I'm using ubuntu 9.04, but I first tried to install zendframework via synaptic, but I couldn't find where it was installed so I manually installed it later (I will de-install the synaptic files, maybe that is the problem) I have a php.ini file in my lampp directory (the one I changed) and I have one in /etc/php5/apache2/php.ini but if I change that, lampp doesn't work anymore because the apache of /etc takes it over I don't have a /etc/php5-cli or /etc/php-cli ... Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901826 Share on other sites More sharing options...
RichardRotterdam Posted August 19, 2009 Share Posted August 19, 2009 While I had a pretty good experience with Xampp under Windows I don't like it much under Linux it had too many bugs for me. I recommend not using lampp but installing mysql Apache and php with synaptic instead if you can. It will be a lot easier to manage upgrade and addons especially if you want to run other stuff such as python and ruby on Apache. I don't think your php.ini file for php cli is located in your lampp directory. Try doing a scan and search if you have more then just the two php.ini files you mentioned. Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901835 Share on other sites More sharing options...
DEVILofDARKNESS Posted August 19, 2009 Author Share Posted August 19, 2009 Okay I will do Like I said I had tried to install zendframework first with synaptic, I tried to un-done this, and know I get first a lot of errors then the zendframe screen, but if I do a zf command, the same happens followed by bash which doesnt know the command Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-901839 Share on other sites More sharing options...
trq Posted August 20, 2009 Share Posted August 20, 2009 Before I start, these comment relate to Debian. Ubuntu being based off Debian should be the same (or very similar). apt will install zend framework under /usr/share/php5, this is the same location things like pear will end up in. You should have a separate php.ini file for both mod_php and the cli, what is the output of.... find /etc -name 'php*ini' As for using lampp, I wouldn't bother. PHP is VERY easy to install and maintain on Debian. The way Apache is setup is rather nice too IMO. Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-902378 Share on other sites More sharing options...
DEVILofDARKNESS Posted August 20, 2009 Author Share Posted August 20, 2009 /etc/php5/apache2/php.ini /etc/php5/cli/php.ini (btw, ZendFramework is installed by synaptic in /usr/share/php, but not in php5 is this bad? because There is a file php5 in share) Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-902674 Share on other sites More sharing options...
DEVILofDARKNESS Posted August 20, 2009 Author Share Posted August 20, 2009 PS: I got ZendFrameWork running in /opt/ZendFramework-1.9.1 and I succeeded in creating a new project, but the tutorial said that I know could view this project in localhost/zf-tutorial (the project is called zf-tutorial) if I use my browser I get an error that it doesn't exist on the server... if I go to localhost, I get the homepage of my main project (not with Zend) which is located in /home/username/public_html Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-902684 Share on other sites More sharing options...
trq Posted August 20, 2009 Share Posted August 20, 2009 /home/username/public_html isn't the normal location for sites to reside. Are you using Apache as installed by synaptic? Your sites should be under /var/www. You still need to make an apache vhost for any new project, you'll also need to create the document root manually. This is why I hate things like lampp. I think you need a better understanding of how Apache is configured. Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-902885 Share on other sites More sharing options...
DEVILofDARKNESS Posted August 30, 2009 Author Share Posted August 30, 2009 Pff, it's a huge mess, I think I just don't gonna use zf, everything works fine for me now and I'm going to stay with it, although thanks for you help guys! Quote Link to comment https://forums.phpfreaks.com/topic/170979-zfsh-php-not-found/#findComment-909210 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.