Jump to content

PHP - Alternative drive


Go to solution Solved by Destramic,

Recommended Posts

hey guys...i'm having a little bit of trouble installing php on a alternative driver...i'm using windows 10 and have unzipped php 7.0.3 in the folder: R:\localhost\php\7.0.3 nts

 

normally i would install it in c:\php but doing it on a alternative drive i'm having trouble loading the extensions.

 

in the php.ini i have taken out the semi colan on the extensions and added a extension directory like so:

extension_dir = "R:/localhost/php/7.0.3 nts/ext/"

extension=php_openssl.dll

etc...

and i aslo put in a system variable under paths

;R:\localhost\php\7.0.3 nts\

then when trying to run openssl_random_pseudo_bytes() i get an error:

Uncaught Error: Call to undefined function openssl_random_pseudo_bytes()

when checking phpinfo() i can see that php.ini path is:

Configuration File (php.ini) Path:    C:\Windows 

so my php.ini file ins't being loaded causing the extension not to work

 

i use this batch file to run nginx and php which also executes the php.ini so i'm confued as to why its not working as it should

@ECHO OFF
start r:\localhost\"nginx 1.8.1"\nginx.exe
start r:\localhost\php\"7.0.3 nts"\php-cgi.exe -b 192.168.1.168:9000 -c r:\localhost\php\"7.0.3 nts"\php.ini
ping 127.0.0.1 -n 1>NUL
echo starting nginx
echo .
echo ..
echo ...
ping 192.168.1.168 >NUL
EXIT

how can i get my php.ini file to load please?

 

 

thanks guys

Link to comment
Share on other sites

  • Solution

problem came to the spaces in the directory when executing my batch file

 

here is how i fixed it.

@ECHO OFF
start "r:\localhost\nginx 1.8.1\nginx.exe"
start "r:\localhost\php\7.0.3 nts\php-cgi.exe" -b 192.168.1.168:9000 -c "r:\localhost\php\7.0.3 nts\php.ini"
ping 192.168.1.168 -n 1>NUL
echo starting nginx
echo .
echo ..
echo ...
ping 192.168.1.168 >NUL
EXIT
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.