ubuntu: .run file does not work at all - php

hey I've got a strange problem, I've read plenty of articles about it on the net and still have no clue what am I doing wrong. Here it goes: I want to build php projects on ubuntu so I got netbeans and wanted to install xampp. I downloaded xamp installer (extension .run) and it doesn't work at all, I mean I tried via terminal and also graphical mode- still nothing. I just run it as it's supposed 2 b run and nothing happens. So I typed in the terminal the following:
strace ./<xampp_installer_name>.run
and I got something like lot of lines but only this one seems 2 contain some error:
open("/lib/ld-linux.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
_exit(127)
Does anyone have any idea what I missed or I am doing wrong with this...? It took a day of my life and I'm out so I'd appreciate any ideas.
peace

You might need the 64 bit version of the xampp installer.

For anyone else who has this problem, rconxs's solution worked for me. If you're new to Ubuntu, you can check if you'll need the 64 bit version by going to System Settings > Details. On the overview page, check to see if the "OS type" is 64 bit. If so, be sure to download the 64 bit installer (should have a file name similar to: xampp-linux-x64-1.8.3-2-installer.run). Then, just follow the rest of the instructions on the apache friends site.

Related

Stuck using terminal while trying to configure MySql and Php

I am currently following a tutorial on lynda.com which is explaining how to set up php and my sql using apache.
I now have a major issue that i can not seem to get around. Somewhere in the process of copying the tutorial i have entered something wrong and it wont let me type any normal commands.
When i load up terminal this appears:
Last login: Sat Sep 16 00:20:47 on ttys000
-bash: export: `/usr/local/mysql/bin: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin': not a valid identifier
-bash: touch: No such file or directory
Tom$
Previously i was entering commands like this:
Tom$ sudo apachectl configtest
Tom$ sudo nano httpd.conf
Everything worked and seemed fine, but i now appear to be stuck in this bash thing that i don't quite understand and each time i type anything it says "no such file or directory". Is there anyway i can get this back to normal? I have tried a number of things but nothing seems to work.
I hope this has been clear and any help this this topic would be much appreciated!

PHP from source - Questions about Extension-Folder and Interaction with existing repo-version

As a Linux beginner I'm currently a bit confused building my own PHP from source.
I have a Ubuntu with a LAMP-Stack where all packages comes from a Repository.
(PHP as FastCGI)
Now I'm trying to set up a second PHP-Version and actually it works well but I have a few questions.
First of all some specs:
Ubuntu 10.04 (I need this older Version)
PHP 5.3.2-1ubuntu4.2.5 (Repo)
For my own PHP-Version I use the following "./configure" parameters (Reduced to the essential):
--prefix=/opt/php5310
--with-config-file-path=/opt/php5310/etc
--with-config-file-scan-dir=/opt/php5310/conf.d
--with-libdir=lib64
--with-mysql=/usr/bin/mysql
...
First of all executing "sudo make test" show up a few failed tests (about 10-14). Unfortunately I can't find any information what I have to do or what excactly goes wrong but "sudo make install" works nevertheless.
Is it normal that not all tests passed?
Then I noticed (phpinfo) the "imagick" extension was not loaded.
Looking at the "extension_dir" shows why.
On the Repo-Version:
extension_dir = /usr/lib/php5/20090626
On my own Version:
extension_dir = /opt/php5310/lib/php/extensions/no-debug-non-zts-20090626
(This folder doesn't even exist)
When I put this inside the php.ini:
extension_dir = /usr/lib/php5/20090626
It's working but is it the right way or just a creepy workaround?
And what about "--with-libdir=lib64" doesn't it belong to "extension_dir"?
On my System /usr/lib64 is a symlink to /usr/lib.
And last but not least my Repo-Version has a folder "/etc/php5/cgi/conf.d" with many ".ini" files e.g. "curl.ini", "gd.ini" and so on.
My Solution was:
"--with-config-file-scan-dir=/opt/php5310/conf.d
And then create the "conf.d" Folder and copy everthing from "/etc/php5/cgi/conf.d" to "/opt/php5310/conf.d" to be not dependent on the PHP Repo-Version.
Would this be a correct solution for multiple PHP-Versions or should it be a symlink or
"--with-config-file-scan-dir=/etc/php5/cgi/conf.d
Thank you for your help
Failing tests generally means failing functionality. Of course, for something as large as PHP you may never touch that functionality. It may be that your best bet here is to search for the names of the tests which failed to see if anyone has had the same issue (and how to fix it or disable the functionality), and to find the source of the tests in PHP and understand why they failed.

PHP's mail() function doesn't work while using MAMP in OS X 10.8.2

I have searched all the solutions but they don't work out, because my problem is different from others.
I followed the solution step by step according to http://theandystratton.com/2009/fix-phps-mail-function-after-latest-os-x-leopard-update, but when I run the command tail -f /var/log/mail.log in terminal, I get an error:
sumomomatoMacBook-Pro.local postfix/sendmail[51722]: fatal: chdir /Library/Server/Mail/Data/spool: No such file or directory
If you don't understand what I am talking about because of my poor English, you can correct me and ask me for more details.
you have to start postfix, this solved my issue
http://benjaminrojas.net/configuring-postfix-to-send-mail-from-mac-os-x-mountain-lion/

execute a bat file using php installed in different drive

when I run exec('C:\execute\batfile.bat'); it works when my xampp is installed in
C:
but when I move my codes in another server the xampp there is installed in
D:
so my code exec('D:\execute\batfile.bat'); fails and doesn't show any errors when I test in browser.
Please help on how to run a bat file not saved in C:
Thank you so much
thanks for your suggestion and solutions :)
I follow the suggestion of #preet sangha and find "ERROR: The parameter is incorrect".
Then I researched more on what is the cause of incorrect parameter. Then I stumble upon the answer of juan at laluca and ernestokarim in http://php.net/manual/en/function.exec.php. And I follow the answer of ernestokarim
Start > Run > "services.msc"
Search the Apache Service, right click and select Properties.
You will see two radio buttons, check the first if it isn't, and then
check too the check box below.
Now restart Apache
I realize that for some reason when xampp is installed in C, function exec works fine but when you installed it in other drive it doesn't because of some permission issues.
The above steps solve my dilemma :-)
Try echoing the output, maybe you're just missed something inside the bat file and it's not a php problem
echo system("D:\execute\batfile.bat");

zf tool & PHPunit not recognised in include_path

I've be struggling with this for a while.
When using the zf tool included in the Zend Framework 1.11 to both create projects and actions and so on, I always get the notice that PHPUnit was not found in the include path and hence the test have not automatically been created. I know that this is only a notice and not an error however I would like it to work.
I am using OS X 10.7 and MAMP, my include path in MAMP is as follows:
include_path = ".:/Applications/MAMP/bin/php/php5.3.6/lib/php:/Applications/MAMP/bin/php/php5.3.6/lib/php/PHPUnit"
The only hint of the problem I have found so far on the internet is that the zf tool is using the natively installed php and include path and hence not noticing the PHPUnit.
I suppose that I could find the php.ini file and add the PHPUnit to it's include path but it feels a little bit of a hack.
Is there away to "prioritise" php installs?
Thank you for you help.
Al
I have finally found the answer at http://wiki.dreamhost.com/Zend_framework
Basically follow Step 5.
Replace
# find php: pear first, command -v second, straight up php lastly
if test "#php_bin#" != '#'php_bin'#'; then
PHP_BIN="#php_bin#"
elif command -v php 1>/dev/null 2>/dev/null; then
PHP_BIN=`command -v php`
else
PHP_BIN=php
fi
with
PHP_BIN=/Applications/MAMP/bin/php/php5.3.6/bin/php
Thank for your help anyway.

Categories