Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1142
  • Last Modified:

Location of /usr/local/lib/php

Hi experts,
this might sound very stupid but I have no knowledge of PHP whatsoever.

I am trying to install phpmotion and according to instructions I need to find out the path to php extensions library (done: /usr/local/lib/php/extensions/no-debug-zts-20060613) and copy a file into this location.

No that I know the path, where do I find this folder?
0
buetler
Asked:
buetler
  • 10
  • 5
  • 4
1 Solution
 
GodDoesntExistCommented:
Hi!

Where did you got that instruction?

According to this instruction you donĀ“t have to copy any files into that path. http://wiki.phpmotion.com/doku.php?id=installation_instructions


0
 
buetlerAuthor Commented:
0
 
drakesheCommented:
Create a PHP file with the following contents:
<?php
phpinfo()
?>
then run the PHP file.
Then on the page find the text:
extension_dir
Then you will see some text like:
/clientdata/php/php-5.2.6/lib/php/extensions/no-debug-non-zts-20060613
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
buetlerAuthor Commented:
Did I mention I had no knowledge of php? Thanks drakeshe but your answer makes no sense to me.

then run the PHP file - run where? run how?

Then on the page find the text - which page exactly?
0
 
buetlerAuthor Commented:
@drakeshe

Any change you are trying to explain me how to find a path to php extensions library?
0
 
buetlerAuthor Commented:
chanCe
0
 
GodDoesntExistCommented:
Hi buetler!

Create that file. You could just create a blank textfile and name it something like phpinfo.php

Then upload the file to your webserver (or localhost with apache) and run the file through your web browser.

If you are running localhost you should put the file in the www foler and then access it like this: http://localhost/phpinfo.php

If you are running on a web server just upload the file to the root and access it like this:
http://www.yourdomain.com/phpinfo.php

Good luck!
0
 
GodDoesntExistCommented:
*** EDIT ***

And of course add this to the phpinfo.php file:

<?php
phpinfo();
?>
0
 
buetlerAuthor Commented:
Sorry, my english must be really bad.
I have php.ini, I know where to find php.ini, I don't need your advice on it.

I need to find out the path to php extensions library (done: /usr/local/lib/php/extensions/no-debug-zts-20060613) and copy a file into this location.
0
 
GodDoesntExistCommented:
I see!

We are not talking about php.ini. You can find the path by creating a new PHP file. You can name it to whatever you want. You can name it find.php.

Copy this text to that new file (find.php):

<?php
phpinfo();
?>

That is the only text that should be in find.php. Put find.php to your web server (the same location where your site is). And then open the file through the web browser. You should see a lot of text in your web browser and there you should be able to find the exact path to your PHP extensions. All extensions path's are not exactly the same.

I repeat:

1. Create new file and name it to: find.php

2. Copt this text and paste it in the find.php file:

<?php
phpinfo();
?>

3. Save the find.php file.

4. Upload it to your web site.

5. Open the file through web browser. (For example www.yourdomain.com/find.php)

6. You will see a lot of text, search for extension_dir

7. You will now see your exact path, and then you can simply copy your files to your correct path


I hope this works for you! The path you're showing us is just an example of how the extensions library path could look like.
0
 
buetlerAuthor Commented:
Let's try again shall we
I have found a path already in my php.ini file.
The path is /usr/local/lib/php/extensions/no-debug-zts-20060613. This is not a sample path, this is a path to php extension library of my web site as in php.ini located on my server.

What I cannot find is above mentioned directory (/usr/local/lib/php/extensions/no-debug-zts-20060613) and that makes it kinda difficult to copy files into it.

Did I mention that I have found a path to php extension library?


0
 
buetlerAuthor Commented:
And just to make sure..
The path I am showing you is NOT just an example of how the extensions library path could look like.
0
 
buetlerAuthor Commented:
Screenshot
Picture1.png
0
 
drakesheCommented:
The folder does not exist that is why. PHP will check that folder to see if there are any extensions in there. If nothing is returned, then that means there is nothing to add to PHP. To get your thing working you must create the path to /usr/local/lib/php/extensions/no-debug-zts-20060613
0
 
drakesheCommented:
::-Edit-::
To create this path easily you can use a PHP function called make directory. Create a new PHP file with the steps that GodDoesntExist described but for the contents of the file have:
mkdir -p /usr/local/lib/php/extensions/no-debug-non-zts-20060613
Easy.
0
 
drakesheCommented:
Oh, damn, dont forget to put <?php before and ?> after. These tags initiate PHP functions.
So for the file you will have:
<?php
mkdir -p /usr/local/lib/php/extensions/no-debug-non-zts-20060613
?>

Open in new window

0
 
buetlerAuthor Commented:
Thanks, drakeshe but I don't think it worked.
If I open this new file in browser it gives me "Warning: Division by zero in /home5/officete/public_html/find.php on line 2"

Could there be a simpler way? Can i copy my file somewhere else and change a path in php.ini file? Will this may be work?
0
 
drakesheCommented:
Chaning the path should work
0
 
buetlerAuthor Commented:
Nope...
If I change the path in php.ini (Directory in which the loadable extensions (modules) reside.
extension_dir = "/public_html/phpshield") the path shown is still the same.
Could be that php.ini I have is just a copy of master file (?), I'll check with provider...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 10
  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now