cereal 1,524 Nearly a Senior Poster Featured Poster

Check also PHP documentation for more information: http://www.php.net/manual/en/language.variables.variable.php

cereal 1,524 Nearly a Senior Poster Featured Poster

The insert queries are wrong, you have to declare the fields not only the values, so this:

$add = mysql_query("INSERT INTO `users` VALUES(NULL,'$username','$password','$email','$name','$parentage','$residence','$tehsil','$district','$occupation','$whwo','$nationality','$contactno','$bloodgroup','$identificationmark','$policestation',0)");

should be something like:

$add = mysql_query("INSERT INTO `users` (id, username, password, email, name, parentage, residence, tehsil, district, occupation, whwo, nationality, contactno, bloodgroup, identificationmark, policestation, another_field) VALUES(NULL,'$username','$password','$email','$name','$parentage','$residence','$tehsil','$district','$occupation','$whwo','$nationality','$contactno','$bloodgroup','$identificationmark','$policestation',0)");

obviously mine is an example, since I don't know the names of the fields in users table.

cereal 1,524 Nearly a Senior Poster Featured Poster

You can use a recursive function which checks if the value of the pair $key => $value is an array, in this case it loops again, an example:

<?php

    $food = array(
        'Healthy'   => array('Salad','Rice','Vegtables' => array('Tomatto','Onion')),
        'UnHealthy' => array('pasta', 'Vegetables' =>array('potatto', 'Corn')));

    function recursive_loop($array)
    {
        foreach($array as $key => $value)
        {
            if(is_array($value))
            {
                recursive_loop($value);
            }
            else
            {
                echo $value . PHP_EOL;
            }
        }
    }

    echo recursive_loop($food);
cereal 1,524 Nearly a Senior Poster Featured Poster

You don't have to change anything, the paths are relative to the file index.php so, unless you have system and application directories into another directory, don't change the values of those variables. Remember also to not include trailing slashes, otherwise it doesn't work:

$system_path = 'system';
$application_folder = 'application';

As suggestion create a test controller and check if it loads fine:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Test extends CI_Controller {

    public function index()
    {
        $this->load->view('test_index');
    }
}

and the relative view in views/test_index.php:

<?php

    echo 'hi!';

If still it doesn't work change the environment value to development, inside index.php:

    define('ENVIRONMENT', 'development');

and retry, if it does not work check CodeIgniter, PHP and Apache logs for errors.

EDIT
Ok, glad you solved, bye!

cereal 1,524 Nearly a Senior Poster Featured Poster

You could move CodeIgniter to a subdirectory:

/index.html
/backend/index.php
/backend/system/
/backend/application/

Create an .htaccess file inside backend and change the rewrite rule to match the directory:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /backend/index.php/$1 [L]

A part from this solution, keep in mind that you can create simple Controllers and Views to run the frontend.

cereal 1,524 Nearly a Senior Poster Featured Poster

Another possible method is to use exec() and call the arp-scan tool:

$interface = 'eth0';
$password = 'password';

$cmd = "echo '$password' | sudo -S arp-scan --quiet --interface=$interface --localnet";

exec($cmd, $output);
print_r($output);

The variable $output will return an array with the results of the scan. Note that you need to submit the password of a user in the server system, because arp-scan need sueruser privileges.

Using the flag --localnet is the same of submitting a range as 192.168.1.0/24, for more info check arp-scan documentation: http://www.nta-monitor.com/wiki/index.php/Arp-scan_User_Guide

cereal 1,524 Nearly a Senior Poster Featured Poster

It seems send_mail() function is receiving a malformed email address, check the submitted array $info to see what is wrong. By the way, Swiftmailer requires at least four parameters in order to work: setTo(), setFrom(), setSubject() and setBody(). Check documentation for more information: http://swiftmailer.org/docs/sending.html

cereal 1,524 Nearly a Senior Poster Featured Poster

Hi, if I'm not wrong you cannot replicate many Masters to one single Slave in MySQL, but you should check MySQL documentation and switch between versions to check if there are any changes: http://dev.mysql.com/doc/refman/5.1/en/replication.html

Note: if you are trying to apply replication in relation to your previous thread on PHP forum about searches on multiple databases, I suggested you about federated tables because it can be used to connect to multiple servers... then you could use a local cache system to temporary save part of the data queried by the clients...

Bye!

cereal 1,524 Nearly a Senior Poster Featured Poster

Hi, it could depend on the Quantum Depth of your current ImageMagick setup. Run this command in terminal:

identify -list configure |grep QuantumDepth

you should get QuantumDepth 16, usually however it's 8, which referes to the memory bit quality. In few words, to get better results you have to recompile ImageMagick with Q16 or Q32 as suggested here: http://www.imagemagick.org/script/advanced-unix-installation.php

cereal 1,524 Nearly a Senior Poster Featured Poster

It's easier to extend Sqlite class instead of rewriting a new one, take a look at the manual:

cereal 1,524 Nearly a Senior Poster Featured Poster
cereal 1,524 Nearly a Senior Poster Featured Poster

Let say the databases are on ServerB and ServerC and the main website with the search function is on ServerA, if the servers are in the same network you can use bind-address directive:

bind-address = 192.168.0.100 # local network IP address

Otherwise you have to comment this directive #bind-address and setup a firewall rule to allow connections to MySQL only from ServerA IP address. Once this is done you can directly access remote databases or you can choose to use federated tables: http://dev.mysql.com/doc/refman/5.0/en/federated-storage-engine.html which let you access remote databases by using your local server.

Consider also to setup SSL connections between the servers: http://dev.mysql.com/doc/refman/5.0/en/ssl-connections.html otherwise the data can be captured very easily.

cereal 1,524 Nearly a Senior Poster Featured Poster
cereal 1,524 Nearly a Senior Poster Featured Poster

Please run this query:

show create table phpfox_theme_template\G

And paste results here, this error seems to be caused by conflicting conditions in the WHERE clause. For example if you have a users table and run explain select * from users where id = 1 and username = 'veranopage' and there is no match between the conditions i.e. id 1 matches with another user, you get the same error as yours which equals to an empty result set. But in your case it seems related strictly to an index key.

A part from this I cannot help much more since their knowledge base is restricted:

Our knowledgebase can only be viewed by those that have a valid license with us.
If you have a valid license with us login here.

cereal 1,524 Nearly a Senior Poster Featured Poster

Hi, without the code is not simple to solve the problem. Check phpfox bug tracker, from their community forums it seems there are different problems with janrain.

cereal 1,524 Nearly a Senior Poster Featured Poster

Take a look at Composer, it could be useful for your project. The purpose is the same of yours and there are already many packages available: http://getcomposer.org/

cereal 1,524 Nearly a Senior Poster Featured Poster

Yes, you can edit your answers for 30 minutes. But you could flag your own post as Flag Bad Post and motivate the deletion request.

cereal 1,524 Nearly a Senior Poster Featured Poster

Add #!/bin/sh to the top of the script and make sure it's executable. If you are not sure about the path of sh then run which sh.

shouldnt the count be 6?

yes, it works fine for me. Maybe there are special characters?

cereal 1,524 Nearly a Senior Poster Featured Poster

It all depends on what you want to do. The two items are x and y? What have you tried? A simple $_GET['width'][1] it's not enough?

cereal 1,524 Nearly a Senior Poster Featured Poster

If you don't have a profile i.e. a specific and allowed access to edit your own submitted data, you can only contact the host and ask the removal. Differently, your action will be considered a cracking attempt.

cereal 1,524 Nearly a Senior Poster Featured Poster

You can output for RCS (Revision Control System) and ed scripts by using -n or -e:

diff -n file1 file2 > file3
diff -e file1 file2 > file3

Check man diff for more information. Or you can use the awk command:

diff file1 file2 | awk '/>/ || /</ { print $2 }' > file3
cereal 1,524 Nearly a Senior Poster Featured Poster

I don't know if there is a specific function in Wordpress to detect URI segments, or where you can set user defined functions, but you could add a conditional statement in your template to check the current section, something like:

function get_uri_segment($int = 1, $url = false)
{
    $url = $url === false ? $_SERVER['REQUEST_URI']:$url;
    $segment = explode('/',$url);

    if(array_key_exists($int,$segment))
    {
        return $segment[$int];
    }
    return false;
}

if(get_uri_segment(1) == 'tour')
{
    echo '<i class="icon-calendar"></i> '. wpb_page_title();
}
else
{
    echo '<i class="icon-book"></i> '. wpb_page_title();
}
cereal 1,524 Nearly a Senior Poster Featured Poster

It happens, look here for example: http://www.daniweb.com/web-development/php/threads/453173/how-to-view-jobs-from-another-site-on-my-website

All downvoted without an explanation. Bye!

cereal 1,524 Nearly a Senior Poster Featured Poster

There is no timeout for cache entries, the system works by deleting the least recently used (LRU algorithm), for more information check:

In my case, When I call one store procedure first time, It is giving me result in 1sec, after that it gives me result in 400ms. and when I am changing some parameters passed to store procedure and call first time, same behavior performed

I don't understand, can you provide an example?

cereal 1,524 Nearly a Senior Poster Featured Poster

Maybe users table has an id instead of user_id? Can you show the output of the command explain users?

cereal 1,524 Nearly a Senior Poster Featured Poster

Hi,

It seems you are sending a multidimensional array to this variable:

$to = $this->admin_model->get_goinmail();

You can submit arrays but in this form: $to = array('donald@email.tld','mickey@email.tld');
Also you are sending empty variables to these functions, so it will not work:

$this->email->from($from);
$this->email->subject(@$subject);
$this->email->message(@$message)

Important: remove the @ from the variables, otherwise you will not see errors, if you want to prevent errors from displaying you can edit index.php and change:

define('ENVIRONMENT', 'development');

to:

define('ENVIRONMENT', 'production');

Keep in mind that you can use the batch mode to loop the list and limit the amout of resources used by the script: http://ellislab.com/codeigniter/user-guide/libraries/email.html

cereal 1,524 Nearly a Senior Poster Featured Poster

Concerning the undefined function it seems a known bug: http://drupal.org/node/481758
Try to increase the max_execution_time in php.ini and reload Apache after editing to load the changes.

Regarding the other question, I didn't understood. Can you explain it better?

cereal 1,524 Nearly a Senior Poster Featured Poster

Sorry, mine was a suggestion based on:

wamp server

and

So I then restart all services and it runs ok again

Since Wamp is an acronym for Windows+Apache+MySQL+PHP, I thought you were using MySQL.

You can try to enable mod_status in Apache and check if your server is using all the clients enabled by the directive MaxClients. Check KeepAliveTimeout value, if the value is too high and there are too many concurrent connections, you will experience lag issues. And check also MaxKeepAliveRequests if this equals to 0 then the server can be overloaded really faster.

In particular check the error.log to see if there are errors like this:

[error] server reached MaxClients setting, consider raising the MaxClients setting
cereal 1,524 Nearly a Senior Poster Featured Poster

Try:

<?php
$html = "";
$url = "http://isbndb.com/api/books.xml?access_key=MCIJARNT&index1=isbn&value1=9780439023528";
$xml = simplexml_load_file($url);

foreach($xml->BookList as $book)
{
    $html .= '<h1>'. $book->BookData->Title .'</h1>';
}

echo $html.PHP_EOL;
?>
cereal 1,524 Nearly a Senior Poster Featured Poster

CI Session doesn't use PHP native Session, so you don't have to use session_destroy(), change you logout method to:

public function logout()
{
    $this->session->unset_userdata('login');
    $this->session->unset_userdata('username');   
    $this->session->unset_userdata($result); # error
    redirect('learning/login');
}

Also, if $result variable is global then use $this->result otherwise you get an error because the variable is not declared in the function.

Note: you don't need $this->session->sess_destroy() unless you want to destroy all the variables of the current session, if this is your goal then you don't need the previous $this->session->unset_userdata(''):

public function logout()
{
    $this->session->sess_destroy();
    redirect('learning/login');
}

For more information check the user guide: http://ellislab.com/codeigniter/user-guide/libraries/sessions.html

cereal 1,524 Nearly a Senior Poster Featured Poster

Yes you can, just change the first SELECT statement with a DELETE as this:

DELETE FROM wp_options, (SELECT SUBSTR(option_name,20) AS string FROM wp_options WHERE STRCMP(option_name,'_transient_timeout_') = 1 AND option_value < unix_timestamp()) AS sub WHERE option_name IN (CONCAT('_transient_',sub.string),CONCAT('_transient_timeout_',sub.string));

Bye!

cereal 1,524 Nearly a Senior Poster Featured Poster

Do you directly edit the file or you use resolvconf command?

cereal 1,524 Nearly a Senior Poster Featured Poster

Also check the logs of MySQL, Apache, PHP to see if there is a slow query or an error. And make sure the slow query log is enabled, by default MySQL logs only errors: http://dev.mysql.com/doc/refman/5.1/en/server-logs.html

cereal 1,524 Nearly a Senior Poster Featured Poster

Check PHP manual: http://php.net/manual/en/function.mail.php
If you still need help post back your code, bye!

cereal 1,524 Nearly a Senior Poster Featured Poster

Can you post the results of:

show create table tbl_user_reg\G
show create table tbl_course_offred\G

It will help to understand the relations between the two tables.
If I understood your request in tbl_course_offred you have a column skills which is varchar and saves multiple values as php,css,html and you want to be able to search one of those?

If yes, you can use a fulltext search query: http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

In order to work you have to add a fulltext index to the table, which needs to be MyISAM (it works with InnoDB only from MySQL 5.6 and above). But there are some limits:

1) words less or equal to 3 characters are not considered, unless you edit/add ft_min_word_len in the config file of the MySQL server (/etc/mysql/my.cnf), otherwise if you want to search php you get an empty result set. After the edit you have to reload/restart MySQL server and rebuild the fulltext index by running repeair table table_name;
2) if the searched word represents more then 50% of the index the query will return an empty set;
3) you need more then 3 rows to get results;
4) it doesn't work across multiple tables, but you can perform a subquery to provide a value to search in the other table.

An usage example: http://dev.mysql.com/doc/refman/5.0/en//fulltext-natural-language.html

In CodeIgniter, as the previous thread of yours, you have to use the query method, an example:

$this->db->query("SELECT * FROM tbl_course_offred MATCH(skills) AGAINST('php')");
cereal 1,524 Nearly a Senior Poster Featured Poster

To display the datepicker you have to set an id to the input field, you can do it by passing an array of attributes:

datefield = forms.TextInput(attrs={'id': 'datepicker', 'placeholder': 'Click to select'})
datefield.render('field_name', 'Pick up a Date')

Read: https://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.attrs

cereal 1,524 Nearly a Senior Poster Featured Poster

Then change it to an update query, this with appropriate adjustments should work:

UPDATE tbl_upcoming_course, (SELECT id FROM tbl_upcoming_course WHERE crs_last_date <= ? ORDER BY upcom_id LIMIT ?, ?) as sub SET `column_to_update` = 'value' WHERE id = sub.id;
cereal 1,524 Nearly a Senior Poster Featured Poster

You can use the query() method to run one single request:

$sql = "DELETE FROM tbl_upcoming_course as tbl, (SELECT id FROM tbl_upcoming_course WHERE crs_last_date <= ? ORDER BY upcom_id LIMIT ?, ?) as sub WHERE id = sub.id";

$this->db->query($sql, array($date, $limit, $offset));

Before doing this be sure $date is in the correct format. This method returns TRUE/FALSE: http://ellislab.com/codeigniter/user-guide/database/queries.html

cereal 1,524 Nearly a Senior Poster Featured Poster

Just to be clear, use: SUBSTR(option_name,20) instead of SUBSTR(option_name,-3,3)

cereal 1,524 Nearly a Senior Poster Featured Poster

Yes, start to count from the beginning, for example for:

_transient_timeout_gad_cache_5_776fa175e6cc472b8c7

we start to count up to _transient_timeout_ which is 19 and use SUBSTR to take the rest:

select substr('_transient_timeout_gad_cache_5_776fa175e6cc472b8c7',20) as string;
+---------------------------------+
| string                          |
+---------------------------------+
| gad_cache_5_776fa175e6cc472b8c7 |
+---------------------------------+
cereal 1,524 Nearly a Senior Poster Featured Poster

Ok, try:

SELECT * FROM wp_options AS main, (SELECT SUBSTR(option_name,-3,3) AS string FROM wp_options WHERE STRCMP(option_name,'_transient_timeout_') = 1 AND option_value < unix_timestamp()) AS sub WHERE option_name IN (CONCAT('_transient_',sub.string),CONCAT('_transient_timeout_',sub.string));

If it works then just convert the main query to delete. In my example I'm using:

SUBSTR(option_name,-3,3)

to extract the last 3 characters which are used as sub.string in the CONCAT statements, but you can rearrange it as you prefer, depending on the length of your unique values... for more info check:

Anyway, it would be easier to store a third column as timestamp, that way you could avoid the second row:

CREATE TABLE `wp_options` (
  `option_name` varchar(255) DEFAULT NULL,
  `option_value` varchar(255) DEFAULT NULL,
  `option_timeout` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8
cereal 1,524 Nearly a Senior Poster Featured Poster

Try:

DELETE FROM wp_options WHERE option_name IN ('_transient_timeout_xxx','_transient_xxx');

If using PHP then:

$options = implode(',',array("'_transient_timeout_xxx'","'_transient_xxx'"));
mysql_query("DELETE FROM wp_options WHERE option_name IN ($options)") or die(mysql_error());
cereal 1,524 Nearly a Senior Poster Featured Poster

It seems difficult because there is no official support to Oracle Java, but you can follow these instructions for Ubuntu, it will work also with Mint: http://askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6

cereal 1,524 Nearly a Senior Poster Featured Poster

In addition, for the Server Handler use php_sapi_name(): http://php.net/manual/en/function.php-sapi-name.php

cereal 1,524 Nearly a Senior Poster Featured Poster

I was wrong about this string:

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/

It is used in a second instance. Veedoo suggestion is correct, with that string the first part:

$OOO000000 = urldecode('%66%67%36%73%62%65%68%70%72%61%34%63%6f%5f%74%6e%64'); # fg6sbehpra4co_tnd
$OOO0000O0 = $OOO000000{4}.$OOO000000{9}.$OOO000000{3}.$OOO000000{5};
$OOO0000O0 .= $OOO000000{2}.$OOO000000{10}.$OOO000000{13}.$OOO000000{16};
$OOO0000O0 .= $OOO0000O0{3}.$OOO000000{11}.$OOO000000{12}.$OOO0000O0{7}.$OOO000000{5};

$OOO000O00 = $OOO000000{0}.$OOO000000{14};
$O0O000O0O = $OOO000O00.$OOO000000{11};
$O0O000O00 = $OOO000O00.$OOO000000{3};
$O0O00OO00 = $OOO000000{0}.$OOO000000{8}.$OOO000000{5}.$OOO000000{9}.$OOO000000{16};
$OOO00000O = $OOO000000{3}.$OOO000000{14}.$OOO000000{8}.$OOO000000{14}.$OOO000000{8};

$OOO0O0O00 = __FILE__; # current file name
$OO00O0000 = 0x9a0;

can be shown by echoing these variables:

echo $OOO0000O0.PHP_EOL; # base64_decode
echo $OOO00000O.PHP_EOL; # strtr
echo $O0O00OO00.PHP_EOL; # fread
echo $OOO0000O0.PHP_EOL; # ft
echo $O0O000O0O.PHP_EOL; # ftc
echo $O0O000O00.PHP_EOL; # fts

which outputs few PHP functions and a bunch of user defined function names(?). It seems the code is not complete, some variable names are missing and the function ft() is not defined. Anyway the part decoded in the first post becomes:

$O000O0O00 = $OOO000O00($OOO0O0O00,'rb'); # ft(__FILE__,'rb'); which probably is fopen()
$O0O00OO00($O000O0O00,0x4fa);             # another function: fread, 0x4fa converts to 1274

Which translates to:

$fp = fopen(__FILE__,'rb');
fread($fp,0x4fa);

next step:

$OO00O00O0 = $OOO0000O0($OOO00000O($O0O00OO00($O000O0O00, 0x368), '3C4hHR7yEoKBnvWimqfuSGt56bd2DkYzMjL+rVNZslFxgUIpX9aPT/cOewQJ081A=', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'));

becomes:

$OO00O00O0 = base64_decode( strtr( fread($fp,0x368), '3C4hHR7yEoKBnvWimqfuSGt56bd2DkYzMjL+rVNZslFxgUIpX9aPT/cOewQJ081A=',  'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'));

after that, there is an eval($OO00O00O0) which means execute the string as code, by echoing $OO00O00O0 we get this string:

while(
    !preg_match(
        '#^((.*\.)?uimg\.info)$#i',
        $O000OO00O = (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (isset($HTTP_SERVER_VARS['SERVER_NAME']) ? $HTTP_SERVER_VARS['SERVER_NAME'] : (isset($HTTP_SERVER_VARS['HTTP_HOST']) ? $HTTP_SERVER_VARS['HTTP_HOST'] : ''))))))
die($O000OO00O.'

which in other form is this:

if(isset($_SERVER['SERVER_NAME']))
{
    $O000OO00O = $_SERVER['SERVER_NAME'];
}
elseif(isset($_SERVER['HTTP_HOST']))
{
    $O000OO00O = $_SERVER['HTTP_HOST'];
}
elseif($HTTP_SERVER_VARS['SERVER_NAME']))
{
    $O000OO00O = $HTTP_SERVER_VARS['SERVER_NAME']; …
cereal 1,524 Nearly a Senior Poster Featured Poster

Ok, probably the pam extension is not loaded by your php.ini file, so add it to the file:

sudo nano /etc/php5/cgi/php.ini

and add extension=pam_auth.so to the bottom of the file, then reload apache:

sudo service apache2 reload

and check if it works fine. You can also check it from phpinfo() or by running php -i |grep pam into the terminal, if pam is loaded it will output some information.

cereal 1,524 Nearly a Senior Poster Featured Poster

Use base64_decode(): http://php.net/manual/en/function.base64-decode.php

For example, this:

eval($OOO0000O0('JE8wMDBPME8wMD0kT09...hbCgkT08wME8wME8wKTs='));

equals to:

eval($OOO0000O0(

    $O000O0O00 = $OOO000O00($OOO0O0O00,'rb');
    $O0O00OO00($O000O0O00,0x4fa);
    $OO00O00O0 = $OOO0000O0($OOO00000O($O0O00OO00($O000O0O00, 0x368), '3C4hHR7yEoKBnvWimqfuSGt56bd2DkYzMjL+rVNZslFxgUIpX9aPT/cOewQJ081A=', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'));
    eval($OO00O00O0);

));

The string 3C4hHR7yEoKBnvWimqfuSGt56bd2DkYzMjL+rVNZslFxgUIpX9aPT/cOewQJ081A= converts into binary data, it could be part of an image, music file or something else... the other string:

ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/

is probably the key to decode the string: $OOO0000O0=$OOO000000{4}.$OOO000000{9}.$OOO000000{3}... where each number as example $OOO000000{4} is a letter of the previous string, in this case, starting from zero it should be E, but decode the rest of the code to better understand what it does.

cereal 1,524 Nearly a Senior Poster Featured Poster

I'm not familiar with Slackware & Co. but it seems there's a tools similar to apt i.e. slapt-get which can be use from command line:

slapt-get --search package_name
slapt-get --install package_name

Here there is some information: http://software.jaos.org/git/slapt-get/plain/FAQ.html

Otherwise you can download the .deb or .rpm file from LibreOffice website and convert it with deb2tgz or rpm2tgz, and finally use installpkg:

installpkg package.tgz

Or check in http://slackbuilds.org/ there may be Libreoffice.
Bye.

cereal 1,524 Nearly a Senior Poster Featured Poster

Note the ampersand in my example: pam_auth('username','password',&$error); & is needed since the variable is passing by reference otherwise you get errors.

After this, if you still get errors check PHP and Apache log files, from there probably we can understand the nature of the problem.

cereal 1,524 Nearly a Senior Poster Featured Poster

Sorry to bump but I forgot to mention that pong.php after been uploaded to Server2 should be queried from Server1 with an HTTP request, you can use it as RESTful service, so in your local form you have to ask not only for FTP path but also an HTTP link, something like: http://server2.tld/public_html/ so your application can perform: http://server2.tld/public_html/pong.php?request=info and use the answer for the other steps. An example flow could be this:

step 1

page1: form to insert FTP credentials
ftp_script: send pong.php to Server2 and redirect to page2

step 2

page2: retrieve information from Server2/pong.php
page2: use info to create options for the installation process, i.e. select which file to send
ftp_script: send archive.(zip|php.gz) to Server2 and redirect to page3

step 3

page3: retrieve info from Server2/pong.php and get md5 digest from local file
page3: check if local and remote digest are equal then write appropriate form: if false back to step 2 else go to next step
curl_script: curl request to Server2/pong.php to execute the extraction and output results to step4

step 4

page4: output final results and create actions to execute remote code

An example of pong.php:

<?php

    $output = array();

    if($_SERVER['REQUEST_METHOD'] == 'GET')
    {
        $action = isset($_GET['request']) ? $_GET['request']:false;
        switch($action)
        {
            case 'info':
                $output['version'] = PHP_VERSION;
                $output['os'] = PHP_OS;
                $output['zlib'] = extension_loaded('zlib') ? 'true':'false';
                $output['zip'] = class_exists('ZipArchive') ? 'true':'false';
                $output['writable'] = is_writable(getcwd()) ? 'true':'false';
                $output['document_root'] = $_SERVER['DOCUMENT_ROOT'];
                $output['files'] = glob('*',GLOB_MARK);
                $output['free_space'] = disk_free_space(getcwd());
            break;
            case 'digest':
                # get digest
                $file = …